diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-26 19:09:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 19:09:47 +0800 |
commit | eb5a6aacd993e3782eaf0c0f9dbce03a0567512f (patch) | |
tree | e65437a39725831f4a450fb3e4991df085de2c35 | |
parent | af4d8779bb84e52607410bc512307a408d7f21a1 (diff) | |
parent | 95ec2fd0b647fc60c92e36212cec813475e79635 (diff) | |
download | dexon-solidity-eb5a6aacd993e3782eaf0c0f9dbce03a0567512f.tar.gz dexon-solidity-eb5a6aacd993e3782eaf0c0f9dbce03a0567512f.tar.zst dexon-solidity-eb5a6aacd993e3782eaf0c0f9dbce03a0567512f.zip |
Merge pull request #2961 from ethereum/fixEndToEndTestsInputs
Fix encoded EndToEnd inputs.
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 82dedf85..0536626f 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -1457,7 +1457,7 @@ BOOST_AUTO_TEST_CASE(msg_sig) } )"; compileAndRun(sourceCode); - ABI_CHECK(callContractFunction("foo(uint256)"), encodeArgs(asString(FixedHash<4>(dev::keccak256("foo(uint256)")).asBytes()))); + ABI_CHECK(callContractFunction("foo(uint256)", 0), encodeArgs(asString(FixedHash<4>(dev::keccak256("foo(uint256)")).asBytes()))); } BOOST_AUTO_TEST_CASE(msg_sig_after_internal_call_is_same) @@ -1473,7 +1473,7 @@ BOOST_AUTO_TEST_CASE(msg_sig_after_internal_call_is_same) } )"; compileAndRun(sourceCode); - ABI_CHECK(callContractFunction("foo(uint256)"), encodeArgs(asString(FixedHash<4>(dev::keccak256("foo(uint256)")).asBytes()))); + ABI_CHECK(callContractFunction("foo(uint256)", 0), encodeArgs(asString(FixedHash<4>(dev::keccak256("foo(uint256)")).asBytes()))); } BOOST_AUTO_TEST_CASE(now) @@ -3090,7 +3090,7 @@ BOOST_AUTO_TEST_CASE(event_anonymous_with_topics) char const* sourceCode = R"( contract ClientReceipt { event Deposit(address indexed _from, bytes32 indexed _id, uint indexed _value, uint indexed _value2, bytes32 data) anonymous; - function deposit(bytes32 _id, bool _manually) payable { + function deposit(bytes32 _id) payable { Deposit(msg.sender, _id, msg.value, 2, "abc"); } } @@ -3098,7 +3098,7 @@ BOOST_AUTO_TEST_CASE(event_anonymous_with_topics) compileAndRun(sourceCode); u256 value(18); u256 id(0x1234); - callContractFunctionWithValue("deposit(bytes32,bool)", value, id); + callContractFunctionWithValue("deposit(bytes32)", value, id); BOOST_REQUIRE_EQUAL(m_logs.size(), 1); BOOST_CHECK_EQUAL(m_logs[0].address, m_contractAddress); BOOST_CHECK(m_logs[0].data == encodeArgs("abc")); @@ -3757,11 +3757,11 @@ BOOST_AUTO_TEST_CASE(struct_containing_bytes_copy_and_delete) compileAndRun(sourceCode); string data = "123456789012345678901234567890123"; BOOST_CHECK(storageEmpty(m_contractAddress)); - ABI_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, u256(data.length()), 13, data), encodeArgs(true)); + ABI_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, 0x60, 13, u256(data.length()), data), encodeArgs(true)); BOOST_CHECK(!storageEmpty(m_contractAddress)); ABI_CHECK(callContractFunction("copy()"), encodeArgs(true)); BOOST_CHECK(storageEmpty(m_contractAddress)); - ABI_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, u256(data.length()), 13, data), encodeArgs(true)); + ABI_CHECK(callContractFunction("set(uint256,bytes,uint256)", 12, 0x60, 13, u256(data.length()), data), encodeArgs(true)); BOOST_CHECK(!storageEmpty(m_contractAddress)); ABI_CHECK(callContractFunction("del()"), encodeArgs(true)); BOOST_CHECK(storageEmpty(m_contractAddress)); @@ -7402,7 +7402,7 @@ BOOST_AUTO_TEST_CASE(string_allocation_bug) } )"; compileAndRun(sourceCode); - ABI_CHECK(callContractFunction("p(uint256)"), encodeArgs( + ABI_CHECK(callContractFunction("p(uint256)", 0), encodeArgs( u256(0xbbbb), u256(0xcccc), u256(0x80), |