aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityParser.cpp
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-01-30 07:44:42 +0800
committerGav Wood <g@ethdev.com>2015-01-30 07:44:42 +0800
commit7925610ab4f6b2110526bc4accb30ee971d8fe5f (patch)
treeddfc278c0ada5eb2d4924aa0b12d008f20b41247 /SolidityParser.cpp
parent6dd6e55d317fde3b7540f0b7311619ff0df079ec (diff)
parentdbfd0c601913eabc32aa8b937d654d6217300597 (diff)
downloaddexon-solidity-7925610ab4f6b2110526bc4accb30ee971d8fe5f.tar.gz
dexon-solidity-7925610ab4f6b2110526bc4accb30ee971d8fe5f.tar.zst
dexon-solidity-7925610ab4f6b2110526bc4accb30ee971d8fe5f.zip
Merge pull request #893 from chriseth/sol_events
Events in Solidity
Diffstat (limited to 'SolidityParser.cpp')
-rw-r--r--SolidityParser.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/SolidityParser.cpp b/SolidityParser.cpp
index 7bfb4c0c..745df98d 100644
--- a/SolidityParser.cpp
+++ b/SolidityParser.cpp
@@ -586,6 +586,33 @@ BOOST_AUTO_TEST_CASE(modifier_invocation)
BOOST_CHECK_NO_THROW(parseText(text));
}
+BOOST_AUTO_TEST_CASE(event)
+{
+ char const* text = R"(
+ contract c {
+ event e();
+ })";
+ BOOST_CHECK_NO_THROW(parseText(text));
+}
+
+BOOST_AUTO_TEST_CASE(event_arguments)
+{
+ char const* text = R"(
+ contract c {
+ event e(uint a, string32 s);
+ })";
+ BOOST_CHECK_NO_THROW(parseText(text));
+}
+
+BOOST_AUTO_TEST_CASE(event_arguments_indexed)
+{
+ char const* text = R"(
+ contract c {
+ event e(uint a, string32 indexed s, bool indexed b);
+ })";
+ BOOST_CHECK_NO_THROW(parseText(text));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}