returned test for exceptions in constructor

This commit is contained in:
LianaHus 2015-09-10 10:29:19 +02:00
parent 5291467a26
commit 466f5a4b88

View File

@ -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"(