aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-11 23:37:46 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-14 06:16:14 +0800
commitbb30e9184b37d736e588be51a20fdf9758c3ef57 (patch)
tree0880f23a03c63bbd42e0d8b2af64130b01d0c649
parent76d659dbe244c0934a0c3ca0284f2562d1872957 (diff)
downloaddexon-solidity-bb30e9184b37d736e588be51a20fdf9758c3ef57.tar.gz
dexon-solidity-bb30e9184b37d736e588be51a20fdf9758c3ef57.tar.zst
dexon-solidity-bb30e9184b37d736e588be51a20fdf9758c3ef57.zip
Introducing EnumType and some Parser tests
-rw-r--r--SolidityParser.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/SolidityParser.cpp b/SolidityParser.cpp
index 035bfd78..291ec605 100644
--- a/SolidityParser.cpp
+++ b/SolidityParser.cpp
@@ -717,6 +717,20 @@ BOOST_AUTO_TEST_CASE(enum_declaration)
BOOST_CHECK_NO_THROW(parseTextExplainError(text));
}
+BOOST_AUTO_TEST_CASE(empty_enum_declaration)
+{
+ char const* text = R"(
+ contract c {
+ enum foo { };
+ function c ()
+ {
+ a = 5;
+ }
+ uint256 a;
+ })";
+ BOOST_CHECK_NO_THROW(parseTextExplainError(text));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}