diff options
author | Christian <c@ethdev.com> | 2015-01-31 04:43:19 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-31 04:49:01 +0800 |
commit | b6de953430708faaa733c778f133b10c8c289900 (patch) | |
tree | bcd598035913920fcab774bb09aaa0c6db40df83 | |
parent | 7ed2dd65c8ea797de068940d27c19dc5deebc447 (diff) | |
download | dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar.gz dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar.bz2 dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar.lz dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar.xz dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.tar.zst dexon-solidity-b6de953430708faaa733c778f133b10c8c289900.zip |
Fix: No parameters for event.
-rw-r--r-- | SolidityEndToEndTest.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index da7f70d1..7edc250c 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -2016,6 +2016,25 @@ BOOST_AUTO_TEST_CASE(event) } } +BOOST_AUTO_TEST_CASE(event_no_arguments) +{ + char const* sourceCode = R"( + contract ClientReceipt { + event Deposit; + function deposit() { + Deposit(); + } + } + )"; + compileAndRun(sourceCode); + callContractFunction("deposit()"); + BOOST_REQUIRE_EQUAL(m_logs.size(), 1); + BOOST_CHECK_EQUAL(m_logs[0].address, m_contractAddress); + BOOST_CHECK(m_logs[0].data.empty()); + BOOST_REQUIRE_EQUAL(m_logs[0].topics.size(), 1); + BOOST_CHECK_EQUAL(m_logs[0].topics[0], dev::sha3(string("Deposit()"))); +} + BOOST_AUTO_TEST_CASE(event_lots_of_data) { char const* sourceCode = R"( |