aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-10 16:29:19 +0800
committerLianaHus <liana@ethdev.com>2015-09-15 17:40:20 +0800
commit466f5a4b88b4f317e8a4d9b5734fd938d4e01e80 (patch)
treee83b745450ec3f7772b2a2343ae084ef4366c706 /test/libsolidity/SolidityEndToEndTest.cpp
parent5291467a26342e746028b0b238df6b364d0b1065 (diff)
downloaddexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar
dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.gz
dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.bz2
dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.lz
dexon-solidity-466f5a4b88b4f317e8a4d9b5734fd938d4e01e80.tar.xz
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.cpp17
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"(