mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #908 from chriseth/sol_fix_eventsWithoutParameters
Fix: No parameters for event.
This commit is contained in:
commit
4ea0493b9e
@ -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)
|
BOOST_AUTO_TEST_CASE(event_lots_of_data)
|
||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user