diff options
author | chriseth <chris@ethereum.org> | 2017-04-22 02:09:37 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-04-22 02:09:37 +0800 |
commit | aad64d818a9ad25c19cecf1e4b4a026aeb968051 (patch) | |
tree | 644a75b73fa77836f638f8ca374c210cbf3f07b9 | |
parent | 937695bfdc76a7c0c8b828c26121e7dd0c641acf (diff) | |
download | dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar.gz dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar.bz2 dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar.lz dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar.xz dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.tar.zst dexon-solidity-aad64d818a9ad25c19cecf1e4b4a026aeb968051.zip |
Test for side-effect free condition.
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 9126806c..0de89aa1 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5505,6 +5505,19 @@ BOOST_AUTO_TEST_CASE(pure_statement_in_for_loop) CHECK_WARNING(text, "Statement has no effect."); } +BOOST_AUTO_TEST_CASE(pure_statement_check_for_regular_for_loop) +{ + char const* text = R"( + contract C { + function f() { + for (uint x = 0; true; x++) + {} + } + } + )"; + success(text); +} + BOOST_AUTO_TEST_SUITE_END() } |