aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-04-27 17:35:58 +0800
committerLeonardo Alt <leo@ethereum.org>2018-04-27 17:35:58 +0800
commitab251c7e7d18a03184ab11e2d1c99d05af7d97f9 (patch)
treee9e9752d4163fe85dbdf6ff6ebb10d8b8e8eb187 /test
parentef2111a2fe89fef06a4d8e750d6a652b16358f4b (diff)
downloaddexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.gz
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.bz2
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.lz
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.xz
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.tar.zst
dexon-solidity-ab251c7e7d18a03184ab11e2d1c99d05af7d97f9.zip
Bool variables should not allow arithmetic comparison
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SMTChecker.cpp29
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)