aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-10 03:58:57 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-14 21:21:47 +0800
commit1c1388f24178767db8d519b490914b1b8c390bed (patch)
treee117865507c67efb9ef679d5967e62c4f6fbe0e2 /test/libsolidity
parent2a9ba937ba74ed8351b0590222ba2ac8a6e097c5 (diff)
downloaddexon-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.cpp17
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)