diff options
author | chriseth <chris@ethereum.org> | 2018-05-02 21:56:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 21:56:06 +0800 |
commit | 42289b642ff12d9275dedf10c257cfec8295feed (patch) | |
tree | 387ecf7c3325763bc46485ef183f0df3f608b1d8 /test/libsolidity/SMTChecker.cpp | |
parent | 451e8edb1a095a8958eba96a0435ff9fb9ffb2a9 (diff) | |
parent | d43436cfec7cb1820f8f588a8a877e1cbf48b919 (diff) | |
download | dexon-solidity-42289b642ff12d9275dedf10c257cfec8295feed.tar.gz dexon-solidity-42289b642ff12d9275dedf10c257cfec8295feed.tar.zst dexon-solidity-42289b642ff12d9275dedf10c257cfec8295feed.zip |
Merge pull request #4003 from ethereum/bool_vars_comparison
BREAKING: Bool variables should not allow arithmetic comparison
Diffstat (limited to 'test/libsolidity/SMTChecker.cpp')
-rw-r--r-- | test/libsolidity/SMTChecker.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/libsolidity/SMTChecker.cpp b/test/libsolidity/SMTChecker.cpp index beb933a4..10f64a7f 100644 --- a/test/libsolidity/SMTChecker.cpp +++ b/test/libsolidity/SMTChecker.cpp @@ -388,35 +388,6 @@ BOOST_AUTO_TEST_CASE(bool_simple) } )"; CHECK_SUCCESS_NO_WARNINGS(text); - text = R"( - contract C { - function f(bool x) public pure { - bool y; - assert(x <= y); - } - } - )"; - CHECK_WARNING(text, "Assertion violation happens here"); - text = R"( - contract C { - function f(bool x) public pure { - bool y; - assert(x >= y); - } - } - )"; - CHECK_SUCCESS_NO_WARNINGS(text); - text = R"( - contract C { - function f(bool x) public pure { - require(x); - bool y; - assert(x > y); - assert(y < x); - } - } - )"; - CHECK_SUCCESS_NO_WARNINGS(text); } BOOST_AUTO_TEST_CASE(bool_int_mixed) |