diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-14 22:58:04 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-15 21:06:26 +0800 |
commit | 6014c3fe16e2d4c42c1bd710661885a5f787a715 (patch) | |
tree | 361d3f39859bda1c1c469402bd7bf3ce7ee0e1f0 /test/libsolidity/SolidityParser.cpp | |
parent | 924a8fff6bc517519eb91ca73adf06505b3f5a87 (diff) | |
download | dexon-solidity-6014c3fe16e2d4c42c1bd710661885a5f787a715.tar.gz dexon-solidity-6014c3fe16e2d4c42c1bd710661885a5f787a715.tar.zst dexon-solidity-6014c3fe16e2d4c42c1bd710661885a5f787a715.zip |
Add tests for scientific notation
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index e5362e78..cfc76ae0 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -1479,6 +1479,20 @@ BOOST_AUTO_TEST_CASE(function_type_state_variable) BOOST_CHECK(successParse(text)); } +BOOST_AUTO_TEST_CASE(scientific_notation) +{ + char const* text = R"( + contract test { + uint256 a = 2e10; + uint256 b = 2E10; + uint256 c = 200e-2; + uint256 d = 2E10 wei; + } + )"; + BOOST_CHECK(successParse(text)); +} + + BOOST_AUTO_TEST_SUITE_END() } |