aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/ViewPureChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/ViewPureChecker.cpp')
-rw-r--r--test/libsolidity/ViewPureChecker.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp
index 53761ff2..299cd084 100644
--- a/test/libsolidity/ViewPureChecker.cpp
+++ b/test/libsolidity/ViewPureChecker.cpp
@@ -43,13 +43,11 @@ BOOST_AUTO_TEST_CASE(environment_access)
vector<string> view{
"block.coinbase",
"block.timestamp",
- "block.blockhash(7)",
"block.difficulty",
"block.number",
"block.gaslimit",
"blockhash(7)",
"gasleft()",
- "msg.gas",
"msg.value",
"msg.sender",
"tx.origin",
@@ -57,7 +55,7 @@ BOOST_AUTO_TEST_CASE(environment_access)
"this",
"address(1).balance"
};
- // ``block.blockhash`` and ``blockhash`` are tested seperately below because their usage will
+ // ``block.blockhash`` and ``blockhash`` are tested separately below because their usage will
// produce warnings that can't be handled in a generic way.
vector<string> pure{
"msg.data",
@@ -90,12 +88,11 @@ BOOST_AUTO_TEST_CASE(environment_access)
"Statement has no effect."
}));
- CHECK_WARNING_ALLOW_MULTI(
+ CHECK_ERROR(
"contract C { function f() view public { block.blockhash; } }",
- (std::vector<std::string>{
- "Function state mutability can be restricted to pure",
- "\"block.blockhash()\" has been deprecated in favor of \"blockhash()\""
- }));
+ TypeError,
+ "\"block.blockhash()\" has been deprecated in favor of \"blockhash()\""
+ );
}
BOOST_AUTO_TEST_CASE(assembly_staticcall)