aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-16 07:29:59 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-17 00:23:09 +0800
commita61c88e9fea2cb61bc9db11d3eded033a7630c45 (patch)
tree9867c6c8ddaf5e381524f365f6d3d6f8dfe2f6a5 /test
parenta2aaa47ee2032b522ca62249b210c06d3ca3c441 (diff)
downloaddexon-solidity-a61c88e9fea2cb61bc9db11d3eded033a7630c45.tar.gz
dexon-solidity-a61c88e9fea2cb61bc9db11d3eded033a7630c45.tar.zst
dexon-solidity-a61c88e9fea2cb61bc9db11d3eded033a7630c45.zip
Use state mutability in override error messages
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index fc4c795e..fb2686fc 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -933,7 +933,7 @@ BOOST_AUTO_TEST_CASE(illegal_override_remove_constness)
contract B { function f() constant {} }
contract C is B { function f() {} }
)";
- CHECK_ERROR(text, TypeError, "Overriding function should be declared constant.");
+ CHECK_ERROR(text, TypeError, "Overriding function changes state mutability from \"view\" to \"nonpayable\".");
}
BOOST_AUTO_TEST_CASE(illegal_override_add_constness)
@@ -942,7 +942,7 @@ BOOST_AUTO_TEST_CASE(illegal_override_add_constness)
contract B { function f() {} }
contract C is B { function f() constant {} }
)";
- CHECK_ERROR(text, TypeError, "Overriding function should not be declared constant.");
+ CHECK_ERROR(text, TypeError, "Overriding function changes state mutability from \"nonpayable\" to \"view\".");
}
BOOST_AUTO_TEST_CASE(complex_inheritance)
@@ -4779,7 +4779,7 @@ BOOST_AUTO_TEST_CASE(illegal_override_payable)
contract B { function f() payable {} }
contract C is B { function f() {} }
)";
- CHECK_ERROR(text, TypeError, "Overriding function should be declared payable.");
+ CHECK_ERROR(text, TypeError, "Overriding function changes state mutability from \"payable\" to \"nonpayable\".");
}
BOOST_AUTO_TEST_CASE(illegal_override_payable_nonpayable)
@@ -4788,7 +4788,7 @@ BOOST_AUTO_TEST_CASE(illegal_override_payable_nonpayable)
contract B { function f() {} }
contract C is B { function f() payable {} }
)";
- CHECK_ERROR(text, TypeError, "Overriding function should not be declared payable.");
+ CHECK_ERROR(text, TypeError, "Overriding function changes state mutability from \"nonpayable\" to \"payable\".");
}
BOOST_AUTO_TEST_CASE(function_variable_mixin)