mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add uncovered test and replace uncovered tests by asserts
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user