aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-08-07 09:40:39 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-07 20:23:14 +0800
commitb0f9fc5af08a34f3025acf37db170ddca77796e1 (patch)
tree01bdc222655e0e73893ccfeac6c2fe4599f55c50 /test/libsolidity
parent9d3827266cc734ac91368acff010e094f100f850 (diff)
downloaddexon-solidity-b0f9fc5af08a34f3025acf37db170ddca77796e1.tar.gz
dexon-solidity-b0f9fc5af08a34f3025acf37db170ddca77796e1.tar.zst
dexon-solidity-b0f9fc5af08a34f3025acf37db170ddca77796e1.zip
Fix type identifiers for RationalNumberType
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityTypes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityTypes.cpp b/test/libsolidity/SolidityTypes.cpp
index b8b537e5..db0e3b66 100644
--- a/test/libsolidity/SolidityTypes.cpp
+++ b/test/libsolidity/SolidityTypes.cpp
@@ -157,6 +157,9 @@ BOOST_AUTO_TEST_CASE(type_identifiers)
BOOST_CHECK_EQUAL(RationalNumberType(rational(7, 1)).identifier(), "t_rational_7_by_1");
BOOST_CHECK_EQUAL(RationalNumberType(rational(200, 77)).identifier(), "t_rational_200_by_77");
BOOST_CHECK_EQUAL(RationalNumberType(rational(2 * 200, 2 * 77)).identifier(), "t_rational_200_by_77");
+ BOOST_CHECK_EQUAL(RationalNumberType(rational(-2 * 200, -2 * 77)).identifier(), "t_rational_200_by_77");
+ BOOST_CHECK_EQUAL(RationalNumberType(rational(-2 * 200, 2 * 77)).identifier(), "t_rational_minus_200_by_77");
+ BOOST_CHECK_EQUAL(RationalNumberType(rational(2 * 200, -2 * 77)).identifier(), "t_rational_minus_200_by_77");
BOOST_CHECK_EQUAL(
StringLiteralType(Literal(SourceLocation{}, Token::StringLiteral, make_shared<string>("abc - def"))).identifier(),
"t_stringliteral_196a9142ee0d40e274a6482393c762b16dd8315713207365e1e13d8d85b74fc4"