diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-10-26 21:17:26 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2016-11-11 22:51:54 +0800 |
commit | 33590d513e278526bdfbf4bd18ea5236a8911bb0 (patch) | |
tree | 12f1e18e9b3a046210775db4c01f0d2f2c128929 /test/libsolidity | |
parent | a40dcfef1257c4b159eb8248ecb0f837b42d8ead (diff) | |
download | dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar.gz dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar.bz2 dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar.lz dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar.xz dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.tar.zst dexon-solidity-33590d513e278526bdfbf4bd18ea5236a8911bb0.zip |
test: add a test for #621
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index a1430b02..bab54fab 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -6353,6 +6353,20 @@ BOOST_AUTO_TEST_CASE(decayed_tuple) BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2))); } +BOOST_AUTO_TEST_CASE(inline_tuple_with_rational_numbers) +{ + char const* sourceCode = R"( + contract c { + function f() returns (int8) { + int8[5] memory foo3 = [int8(1), -1, 0, 0, 0]; + return foo3[0]; + } + } + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(1))); +} + BOOST_AUTO_TEST_CASE(destructuring_assignment) { char const* sourceCode = R"( |