aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityParser.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-06 20:38:10 +0800
committerChristian <c@ethdev.com>2015-02-06 20:38:29 +0800
commit5bedf7f81612767f2f60ea57a1c38c34973465ec (patch)
treeffc5d661c9c7a7f10b17f7fa9f123884ef4b0164 /SolidityParser.cpp
parent366284d37c555b2dfbbd8b8cf37a943660e5b69c (diff)
downloaddexon-solidity-5bedf7f81612767f2f60ea57a1c38c34973465ec.tar.gz
dexon-solidity-5bedf7f81612767f2f60ea57a1c38c34973465ec.tar.zst
dexon-solidity-5bedf7f81612767f2f60ea57a1c38c34973465ec.zip
Some fixes for the ether units parser.
Diffstat (limited to 'SolidityParser.cpp')
-rw-r--r--SolidityParser.cpp13
1 files changed, 13 insertions, 0 deletions
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()
}