diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-05-22 23:48:38 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-06-01 19:06:12 +0800 |
commit | 19fb836bf6440db32c8a392618bb76d44ec90953 (patch) | |
tree | a2a0e14679bcc598b7d38a5f2d30bf50ed6e65bf | |
parent | fde4ed6bf60180d6212ec81f9ecbf630377087b3 (diff) | |
download | dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar.gz dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar.bz2 dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar.lz dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar.xz dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.tar.zst dexon-solidity-19fb836bf6440db32c8a392618bb76d44ec90953.zip |
modified the test
-rw-r--r-- | libsolidity/SolidityEndToEndTest.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp index e4c5b47f..538174ab 100644 --- a/libsolidity/SolidityEndToEndTest.cpp +++ b/libsolidity/SolidityEndToEndTest.cpp @@ -4164,24 +4164,32 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_call_fail) { char const* sourceCode = R"( contract A { - uint public test = 0; function A() { this.call("123"); + + } + } + contract B { + uint public test = 1; + function testIt() + { + A a; ++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) { char const* sourceCode = R"( contract A { - uint public test = 0; + uint public test = 1; uint[3] arr; function A() { |