From 5bedf7f81612767f2f60ea57a1c38c34973465ec Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 6 Feb 2015 13:38:10 +0100 Subject: Some fixes for the ether units parser. --- SolidityParser.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'SolidityParser.cpp') diff --git a/SolidityParser.cpp b/SolidityParser.cpp index b6837866..7af99567 100644 --- a/SolidityParser.cpp +++ b/SolidityParser.cpp @@ -679,6 +679,19 @@ BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations) BOOST_CHECK_NO_THROW(parseTextExplainError(text)); } +BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations_in_expressions) +{ + char const* text = R"( + contract c { + function c () + { + a = 1 wei * 100 wei + 7 szabo - 3; + } + uint256 a; + })"; + BOOST_CHECK_NO_THROW(parseTextExplainError(text)); +} + BOOST_AUTO_TEST_SUITE_END() } -- cgit