diff options
author | Gav Wood <g@ethdev.com> | 2015-02-06 09:12:19 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2015-02-06 09:12:19 +0800 |
commit | 3d98ea22663ef87cffc032f6bf921039e959c293 (patch) | |
tree | 13aec19e1c2e7d936de06807f35e4aa9c260ab85 /SolidityParser.cpp | |
parent | 969366f46b83c57461fc5399fff76bd07738b6f2 (diff) | |
parent | fb55f4f24dc1fee6e35e828ba0454c328d14f7ca (diff) | |
download | dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar.gz dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar.bz2 dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar.lz dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar.xz dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.tar.zst dexon-solidity-3d98ea22663ef87cffc032f6bf921039e959c293.zip |
Merge pull request #953 from LefterisJP/sol_ethSubDenominations
Solidity ether subdenominations
Diffstat (limited to 'SolidityParser.cpp')
-rw-r--r-- | SolidityParser.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/SolidityParser.cpp b/SolidityParser.cpp index 9ba38a4a..b6837866 100644 --- a/SolidityParser.cpp +++ b/SolidityParser.cpp @@ -660,6 +660,25 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers) BOOST_CHECK_THROW(parseText(text), ParserError); } +BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations) +{ + char const* text = R"( + contract c { + function c () + { + a = 1 wei; + b = 2 szabo; + c = 3 finney; + b = 4 ether; + } + uint256 a; + uint256 b; + uint256 c; + uint256 d; + })"; + BOOST_CHECK_NO_THROW(parseTextExplainError(text)); +} + BOOST_AUTO_TEST_SUITE_END() } |