diff options
author | LianaHus <liana@ethdev.com> | 2015-09-10 16:29:19 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-15 17:40:20 +0800 |
commit | 466f5a4b88b4f317e8a4d9b5734fd938d4e01e80 (patch) | |
tree | e83b745450ec3f7772b2a2343ae084ef4366c706 /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 5291467a26342e746028b0b238df6b364d0b1065 (diff) | |
download | dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.gz dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.zst dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.zip |
returned test for exceptions in constructor
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 21e21018..8f94cba1 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -4182,6 +4182,23 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_call_fail) BOOST_CHECK(callContractFunction("test()") == encodeArgs(2)); } +BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_out_of_baund) +{ + char const* sourceCode = R"( + contract A { + uint public test = 1; + uint[3] arr; + function A() + { + uint index = 5; + test = arr[index]; + ++test; + } + } + )"; + BOOST_CHECK(compileAndRunWithoutCheck(sourceCode, 0, "A").empty()); +} + BOOST_AUTO_TEST_CASE(positive_integers_to_signed) { char const* sourceCode = R"( |