mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
modified the test
This commit is contained in:
parent
fde4ed6bf6
commit
19fb836bf6
@ -4164,24 +4164,32 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_call_fail)
|
|||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
contract A {
|
contract A {
|
||||||
uint public test = 0;
|
|
||||||
function A()
|
function A()
|
||||||
{
|
{
|
||||||
this.call("123");
|
this.call("123");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contract B {
|
||||||
|
uint public test = 1;
|
||||||
|
function testIt()
|
||||||
|
{
|
||||||
|
A a;
|
||||||
++test;
|
++test;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
compileAndRun(sourceCode, 0, "A");
|
compileAndRun(sourceCode, 0, "B");
|
||||||
|
|
||||||
BOOST_CHECK(callContractFunction("test()") == encodeArgs(1));
|
BOOST_CHECK(callContractFunction("testIt()") == encodeArgs());
|
||||||
|
BOOST_CHECK(callContractFunction("test()") == encodeArgs(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_out_of_band)
|
BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_out_of_band)
|
||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
contract A {
|
contract A {
|
||||||
uint public test = 0;
|
uint public test = 1;
|
||||||
uint[3] arr;
|
uint[3] arr;
|
||||||
function A()
|
function A()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user