diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-04-27 17:35:58 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-05-17 00:32:47 +0800 |
commit | 0b6eea0c557d0c987baa2d560fe3871ba3bb4a58 (patch) | |
tree | 78cea0e0f073e47f6b9c2eb81f434e463985f68b /test/libsolidity/SMTChecker.cpp | |
parent | 970567826905c953134e54c64f129e31b3fc6a05 (diff) | |
download | dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.gz dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.tar.zst dexon-solidity-0b6eea0c557d0c987baa2d560fe3871ba3bb4a58.zip |
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 71fdb906..ec23f452 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) |