aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-22 22:06:14 +0800
committerchriseth <chris@ethereum.org>2018-02-22 22:17:43 +0800
commitb5a3b6a4293537c843e8387ffd0b03253160dc0a (patch)
treeda9c796dc3676a92a8e8ff14c34068fb690e5699 /test
parentad010f557bc4af683688aef423e7ae68d0fd4d08 (diff)
downloaddexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar.gz
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar.bz2
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar.lz
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar.xz
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.tar.zst
dexon-solidity-b5a3b6a4293537c843e8387ffd0b03253160dc0a.zip
Parser test.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityParser.cpp13
1 files changed, 13 insertions, 0 deletions
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()
}