From bb30e9184b37d736e588be51a20fdf9758c3ef57 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 11 Feb 2015 16:37:46 +0100 Subject: [PATCH] Introducing EnumType and some Parser tests --- SolidityParser.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SolidityParser.cpp b/SolidityParser.cpp index 035bfd789..291ec6051 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() }