diff options
Diffstat (limited to 'test/libsolidity/ViewPureChecker.cpp')
-rw-r--r-- | test/libsolidity/ViewPureChecker.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp index 53761ff2..bb5480b2 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", @@ -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) |