diff options
author | chriseth <chris@ethereum.org> | 2017-10-05 00:20:56 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-11-22 10:35:34 +0800 |
commit | 95a65dc04c6f6a5c611c25d6f07d54843f2daec9 (patch) | |
tree | 0bcb0ad1f7e24d8a986f40a37e0b0a2d6f4152f7 /test | |
parent | 90fb14f525fa37a15421e3dc40ffc98a5bce8378 (diff) | |
download | dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar.gz dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar.bz2 dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar.lz dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar.xz dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.tar.zst dexon-solidity-95a65dc04c6f6a5c611c25d6f07d54843f2daec9.zip |
Fix boolean constants.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SMTChecker.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/test/libsolidity/SMTChecker.cpp b/test/libsolidity/SMTChecker.cpp index 9d014125..9fbab03a 100644 --- a/test/libsolidity/SMTChecker.cpp +++ b/test/libsolidity/SMTChecker.cpp @@ -362,18 +362,15 @@ BOOST_AUTO_TEST_CASE(constant_condition) } )"; CHECK_WARNING(text, "Condition is always false"); -// TODO -// // a plain literal constant is fine -// text = R"( -// contract C { -// function f(uint x) public pure { -// if (true) { revert(); } -// } -// } -// )"; -// CHECK_SUCCESS_NO_WARNINGS(text); - -// TODO test unreacheable code + // a plain literal constant is fine + text = R"( + contract C { + function f(uint) public pure { + if (true) { revert(); } + } + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); } BOOST_AUTO_TEST_SUITE_END() |