aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityParser.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-03-15 21:55:45 +0800
committerGitHub <noreply@github.com>2017-03-15 21:55:45 +0800
commit0c8a766146cf1416143a5b1a66050b8d6c233907 (patch)
treed8c307ff316496c26a7dbaf9f5a3a17d240dc030 /test/libsolidity/SolidityParser.cpp
parent6258fe71854824fb28edf49bbc244e079c9c4f78 (diff)
parent07d775294b0c3270ee9d7bd496837193919c3d94 (diff)
downloaddexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.tar.gz
dexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.tar.zst
dexon-solidity-0c8a766146cf1416143a5b1a66050b8d6c233907.zip
Merge pull request #1698 from ethereum/exp-notation
Fix scientific notation in number literals
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r--test/libsolidity/SolidityParser.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index e5362e78..ffb4b6f2 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -1479,6 +1479,21 @@ 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;
+ uint256 e = 2.5e10;
+ }
+ )";
+ BOOST_CHECK(successParse(text));
+}
+
+
BOOST_AUTO_TEST_SUITE_END()
}