aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-03-15 20:21:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-03-15 21:06:27 +0800
commitb0a23fa77d4e5f16b3ab1a56000db45748a05838 (patch)
treebd5d78b7cb1001bde949cbc889054bff3a6c86eb /test/libsolidity/SolidityEndToEndTest.cpp
parente923f27ea88601e8b62ef2c7d8be42ec23c5a849 (diff)
downloaddexon-solidity-b0a23fa77d4e5f16b3ab1a56000db45748a05838.tar.gz
dexon-solidity-b0a23fa77d4e5f16b3ab1a56000db45748a05838.tar.zst
dexon-solidity-b0a23fa77d4e5f16b3ab1a56000db45748a05838.zip
Add tests for fractional numbers in exponential notation
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 21d9074d..ebc9f51e 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -9186,11 +9186,15 @@ BOOST_AUTO_TEST_CASE(scientific_notation)
function g() returns (uint) {
return 200e-2 wei;
}
+ function h() returns (uint) {
+ return 2.5e1;
+ }
}
)";
compileAndRun(sourceCode, 0, "C");
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(20000000000)));
BOOST_CHECK(callContractFunction("g()") == encodeArgs(u256(2)));
+ BOOST_CHECK(callContractFunction("h()") == encodeArgs(u256(25)));
}
BOOST_AUTO_TEST_SUITE_END()