Add uncovered test and replace uncovered tests by asserts

This commit is contained in:
Leonardo Alt
2020-11-30 18:46:47 +01:00
parent 7e7a42c6ad
commit fa561dbd0e
6 changed files with 103 additions and 100 deletions
@@ -1,7 +1,12 @@
pragma experimental SMTChecker;
contract C {
function f() public pure returns (byte) {
return (~byte(0xFF));
}
function f() public pure {
// ffff0000 in bytes4
bytes4 x = ~bytes4(hex"ffff");
assert(x == 0xffff0000); // should fail
assert(x == 0x0000ffff); // should hold
}
}
// ----
// Warning 6328: (175-198): CHC: Assertion violation happens here.
@@ -0,0 +1,10 @@
pragma experimental SMTChecker;
contract D {
function f(uint x) public pure {
assert(x**2 == 4);
}
}
// ----
// Warning 5188: (88-92): Assertion checker does not yet implement this operator.
// Warning 6328: (81-98): CHC: Assertion violation happens here.
// Warning 5188: (88-92): Assertion checker does not yet implement this operator.