diff options
Diffstat (limited to 'test/libsolidity/SolidityTypes.cpp')
-rw-r--r-- | test/libsolidity/SolidityTypes.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/libsolidity/SolidityTypes.cpp b/test/libsolidity/SolidityTypes.cpp index eb858128..87dda9c2 100644 --- a/test/libsolidity/SolidityTypes.cpp +++ b/test/libsolidity/SolidityTypes.cpp @@ -37,9 +37,9 @@ BOOST_AUTO_TEST_SUITE(SolidityTypes) BOOST_AUTO_TEST_CASE(storage_layout_simple) { MemberList members(MemberList::MemberMap({ - {string("first"), Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "128"))}, - {string("second"), Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "120"))}, - {string("wraps"), Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "16"))} + {string("first"), Type::fromElementaryTypeName("uint128")}, + {string("second"), Type::fromElementaryTypeName("uint120")}, + {string("wraps"), Type::fromElementaryTypeName("uint16")} })); BOOST_REQUIRE_EQUAL(u256(2), members.storageSize()); BOOST_REQUIRE(members.memberStorageOffset("first") != nullptr); @@ -53,15 +53,15 @@ BOOST_AUTO_TEST_CASE(storage_layout_simple) BOOST_AUTO_TEST_CASE(storage_layout_mapping) { MemberList members(MemberList::MemberMap({ - {string("first"), Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "128"))}, + {string("first"), Type::fromElementaryTypeName("uint128")}, {string("second"), make_shared<MappingType>( - Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "8")), - Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "8")) + Type::fromElementaryTypeName("uint8"), + Type::fromElementaryTypeName("uint8") )}, - {string("third"), Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "16"))}, + {string("third"), Type::fromElementaryTypeName("uint16")}, {string("final"), make_shared<MappingType>( - Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "8")), - Type::fromElementaryTypeName(ElementaryTypeNameToken(Token::fromIdentifierOrKeyword("uintM"), "8")) + Type::fromElementaryTypeName("uint8"), + Type::fromElementaryTypeName("uint8") )}, })); BOOST_REQUIRE_EQUAL(u256(4), members.storageSize()); |