diff options
author | chriseth <chris@ethereum.org> | 2017-04-25 00:08:21 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-04-25 00:08:21 +0800 |
commit | 9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5 (patch) | |
tree | 2483889716b36aee967bd1784966fe126bb416ea | |
parent | aad64d818a9ad25c19cecf1e4b4a026aeb968051 (diff) | |
download | dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar.gz dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar.bz2 dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar.lz dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar.xz dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.tar.zst dexon-solidity-9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5.zip |
More pure tests.
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 0de89aa1..b98c3706 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5492,6 +5492,14 @@ BOOST_AUTO_TEST_CASE(bare_revert) CHECK_WARNING(text, "Statement has no effect."); } +BOOST_AUTO_TEST_CASE(bare_others) +{ + CHECK_WARNING("contract C { function f() { selfdestruct; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { assert; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { require; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { suicide; } }", "Statement has no effect."); +} + BOOST_AUTO_TEST_CASE(pure_statement_in_for_loop) { char const* text = R"( |