From a86a3a245219cc3d9c4e5fc146afd61f3f3e7b97 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 29 Jan 2015 14:35:28 +0100 Subject: Parsing of events. --- SolidityParser.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'SolidityParser.cpp') 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() } -- cgit