From b5a3b6a4293537c843e8387ffd0b03253160dc0a Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 22 Feb 2018 15:06:14 +0100 Subject: Parser test. --- test/libsolidity/SolidityParser.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 861e6408..b7097d0f 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -1708,6 +1708,19 @@ BOOST_AUTO_TEST_CASE(newInvalidTypeName) CHECK_PARSE_ERROR(text, "Expected explicit type name"); } +BOOST_AUTO_TEST_CASE(emitWithoutEvent) +{ + char const* text = R"( + contract C { + event A(); + function f() { + emit A; + } + } + )"; + CHECK_PARSE_ERROR(text, "Expected token LParen got 'Semicolon'"); +} + BOOST_AUTO_TEST_SUITE_END() } -- cgit v1.2.3