diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-10 03:58:57 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-14 21:21:47 +0800 |
commit | 1c1388f24178767db8d519b490914b1b8c390bed (patch) | |
tree | e117865507c67efb9ef679d5967e62c4f6fbe0e2 /test/libsolidity | |
parent | 2a9ba937ba74ed8351b0590222ba2ac8a6e097c5 (diff) | |
download | dexon-solidity-1c1388f24178767db8d519b490914b1b8c390bed.tar.gz dexon-solidity-1c1388f24178767db8d519b490914b1b8c390bed.tar.zst dexon-solidity-1c1388f24178767db8d519b490914b1b8c390bed.zip |
Update parser tests
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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) |