mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
returned test for exceptions in constructor
This commit is contained in:
parent
5291467a26
commit
466f5a4b88
@ -4182,6 +4182,23 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_call_fail)
|
|||||||
BOOST_CHECK(callContractFunction("test()") == encodeArgs(2));
|
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)
|
BOOST_AUTO_TEST_CASE(positive_integers_to_signed)
|
||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user