From 3ce223c6cb30f8e9f1035b6740d8c90f95a91185 Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Sun, 8 Feb 2015 19:23:17 +0800 Subject: add exponent operator https://www.pivotaltracker.com/n/projects/1189488/stories/83746404 --- SolidityParser.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'SolidityParser.cpp') diff --git a/SolidityParser.cpp b/SolidityParser.cpp index 7af99567..84f36170 100644 --- a/SolidityParser.cpp +++ b/SolidityParser.cpp @@ -387,6 +387,17 @@ BOOST_AUTO_TEST_CASE(complex_expression) BOOST_CHECK_NO_THROW(parseText(text)); } +BOOST_AUTO_TEST_CASE(exp_expression) +{ + char const* text = R"( + contract test { + function fun(uint256 a) { + uint256 x = 3 ** a; + } + })"; + BOOST_CHECK_NO_THROW(parseText(text)); +} + BOOST_AUTO_TEST_CASE(while_loop) { char const* text = "contract test {\n" -- cgit v1.2.3