diff options
author | chriseth <c@ethdev.com> | 2015-10-07 23:01:37 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-07 23:01:37 +0800 |
commit | 68bf6e60c5869ab1cb862674de44e5ab4c79b5bc (patch) | |
tree | 0258f82a5930fd7c4aa62a63039d99b9807b46d8 /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 8644ad686674edfd2205fb9624521692362d6bfa (diff) | |
parent | b6ddde9372c897c1eafc24ee16e3aa6aeec3f2f6 (diff) | |
download | dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.gz dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.tar.zst dexon-solidity-68bf6e60c5869ab1cb862674de44e5ab4c79b5bc.zip |
Merge pull request #122 from chriseth/anonymousEventsWithFourIndexedParams
Allow four indexed arguments for anynomous events.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 56061b0b..c96ae14d 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -2400,9 +2400,9 @@ BOOST_AUTO_TEST_CASE(event_anonymous_with_topics) { char const* sourceCode = R"( contract ClientReceipt { - event Deposit(address indexed _from, bytes32 indexed _id, uint _value) anonymous; + event Deposit(address indexed _from, bytes32 indexed _id, uint indexed _value, uint indexed _value2, bytes32 data) anonymous; function deposit(bytes32 _id, bool _manually) { - Deposit(msg.sender, _id, msg.value); + Deposit(msg.sender, _id, msg.value, 2, "abc"); } } )"; @@ -2412,10 +2412,12 @@ BOOST_AUTO_TEST_CASE(event_anonymous_with_topics) callContractFunctionWithValue("deposit(bytes32,bool)", value, id); BOOST_REQUIRE_EQUAL(m_logs.size(), 1); BOOST_CHECK_EQUAL(m_logs[0].address, m_contractAddress); - BOOST_CHECK_EQUAL(h256(m_logs[0].data), h256(u256(value))); - BOOST_REQUIRE_EQUAL(m_logs[0].topics.size(), 2); + BOOST_CHECK(m_logs[0].data == encodeArgs("abc")); + BOOST_REQUIRE_EQUAL(m_logs[0].topics.size(), 4); BOOST_CHECK_EQUAL(m_logs[0].topics[0], h256(m_sender)); BOOST_CHECK_EQUAL(m_logs[0].topics[1], h256(id)); + BOOST_CHECK_EQUAL(m_logs[0].topics[2], h256(value)); + BOOST_CHECK_EQUAL(m_logs[0].topics[3], h256(2)); } BOOST_AUTO_TEST_CASE(event_lots_of_data) |