diff options
author | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-05 00:06:35 +0800 |
---|---|---|
committer | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-05 00:06:35 +0800 |
commit | 9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9 (patch) | |
tree | 0534caed8db8a09369bca0371c5957f888d8eec5 /SolidityEndToEndTest.cpp | |
parent | 4c4c4866d5ae474c5f18577ad0f29d8ad40774af (diff) | |
download | dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar.gz dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar.bz2 dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar.lz dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar.xz dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.tar.zst dexon-solidity-9f5d8342a6e89117a0f72e89ecf7f6ed2f7d26b9.zip |
add a test case for disorder named args
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r-- | SolidityEndToEndTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index d0d50167..f248a5a0 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -102,6 +102,16 @@ BOOST_AUTO_TEST_CASE(named_args) BOOST_CHECK(callContractFunction("b()", bytes()) == toBigEndian(u256(123))); } +BOOST_AUTO_TEST_CASE(disorder_named_args) +{ + char const* sourceCode = "contract test {\n" + " function a(uint a, uint b, uint c) returns (uint r) { r = a * 100 + b * 10 + c * 1; }\n" + " function b() returns (uint r) { r = a({c: 3, a: 1, b: 2}); }\n" + "}\n"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("b()", bytes()) == toBigEndian(u256(123))); +} + BOOST_AUTO_TEST_CASE(while_loop) { char const* sourceCode = "contract test {\n" |