From 1c1388f24178767db8d519b490914b1b8c390bed Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 9 Aug 2017 20:58:57 +0100 Subject: Update parser tests --- test/libsolidity/SolidityParser.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test/libsolidity') diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 3890ca21..75cad8d9 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -906,22 +906,23 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers) CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\"."); } -BOOST_AUTO_TEST_CASE(multiple_payable_specifiers) +BOOST_AUTO_TEST_CASE(multiple_statemutability_specifiers) { char const* text = R"( contract c { function f() payable payable {} })"; - CHECK_PARSE_ERROR(text, "Multiple \"payable\" specifiers."); -} - -BOOST_AUTO_TEST_CASE(multiple_constant_specifiers) -{ - char const* text = R"( + CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\"."); + text = R"( contract c { function f() constant constant {} })"; - CHECK_PARSE_ERROR(text, "Multiple \"constant\" specifiers."); + CHECK_PARSE_ERROR(text, "State mutability already specified as \"view\"."); + text = R"( + contract c { + function f() payable constant {} + })"; + CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\"."); } BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations) -- cgit v1.2.3