Adds unit tests for moved function.

This commit is contained in:
bitshift
2018-03-27 03:30:03 +01:00
committed by Alex Beregszaszi
parent ed632025fe
commit be35a65eb3
4 changed files with 49 additions and 5 deletions
@@ -8555,6 +8555,18 @@ BOOST_AUTO_TEST_CASE(require_visibility_specifiers)
CHECK_ERROR(text, SyntaxError, "No visibility specified.");
}
BOOST_AUTO_TEST_CASE(blockhash_not_available_in_block)
{
char const* text = R"(
contract Test {
function a() public returns (bytes32) {
return block.blockhash(0);
}
}
)";
CHECK_ERROR(text, TypeError, "Member \"blockhash\" not found or not visible after argument-dependent lookup in block");
}
BOOST_AUTO_TEST_SUITE_END()
}