Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c1388f

Browse files
committed
Update parser tests
1 parent 2a9ba93 commit 1c1388f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/libsolidity/SolidityParser.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -906,22 +906,23 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers)
906906
CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\".");
907907
}
908908

909-
BOOST_AUTO_TEST_CASE(multiple_payable_specifiers)
909+
BOOST_AUTO_TEST_CASE(multiple_statemutability_specifiers)
910910
{
911911
char const* text = R"(
912912
contract c {
913913
function f() payable payable {}
914914
})";
915-
CHECK_PARSE_ERROR(text, "Multiple \"payable\" specifiers.");
916-
}
917-
918-
BOOST_AUTO_TEST_CASE(multiple_constant_specifiers)
919-
{
920-
char const* text = R"(
915+
CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\".");
916+
text = R"(
921917
contract c {
922918
function f() constant constant {}
923919
})";
924-
CHECK_PARSE_ERROR(text, "Multiple \"constant\" specifiers.");
920+
CHECK_PARSE_ERROR(text, "State mutability already specified as \"view\".");
921+
text = R"(
922+
contract c {
923+
function f() payable constant {}
924+
})";
925+
CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\".");
925926
}
926927

927928
BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations)

0 commit comments

Comments
 (0)