solidity/test/libsolidity/smtCheckerTests/operators/bitwise_xor_int.sol
2023-03-09 14:59:32 +01:00

21 lines
537 B
Solidity

contract C {
function f() public pure {
int8 x = 1;
int16 y = 0;
assert(x ^ y == 1);
int16 z = -1;
assert(x ^ z == -2);
assert(y ^ z == -1);
assert(y ^ z > 0);
x = 7; y = 3;
assert(x ^ y < 5);
assert(x ^ y > 5);
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (156-173): CHC: Assertion violation happens here.
// Warning 6328: (214-231): CHC: Assertion violation happens here.
// Info 1391: CHC: 4 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.