diff options
author | bitshift <bitshift@posteo.org> | 2018-03-06 02:24:33 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-03-27 10:30:03 +0800 |
commit | be35a65eb3966965e30b6b582f7722338e558013 (patch) | |
tree | 4784a52616f22bf96a388af7591ead908bad4617 /test/libsolidity/SolidityNameAndTypeResolution.cpp | |
parent | ed632025fe5995d093472b1e7660087e943f2ca6 (diff) | |
download | dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar.gz dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar.bz2 dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar.lz dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar.xz dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.tar.zst dexon-solidity-be35a65eb3966965e30b6b582f7722338e558013.zip |
Adds unit tests for moved function.
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 50ee2b2e..579fb239 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -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() } |