solidity/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol

24 lines
748 B
Solidity
Raw Normal View History

2021-08-20 16:47:38 +00:00
contract C {
constructor() payable {
require(msg.value > 100);
}
function f(address payable _a, uint _v) public {
require(_v < 10);
_a.transfer(_v);
}
function inv() public view {
assert(address(this).balance > 0); // should fail
assert(address(this).balance > 80); // should fail
assert(address(this).balance > 90); // should fail
}
}
// ====
// SMTEngine: all
2021-08-23 09:30:12 +00:00
// SMTIgnoreCex: yes
2021-08-20 16:47:38 +00:00
// ----
// Warning 6328: (193-226): CHC: Assertion violation might happen here.
2021-08-23 09:30:12 +00:00
// Warning 6328: (245-279): CHC: Assertion violation happens here.
// Warning 6328: (298-332): CHC: Assertion violation happens here.
2021-08-20 16:47:38 +00:00
// Warning 1236: (141-156): BMC: Insufficient funds happens here.
// Warning 4661: (193-226): BMC: Assertion violation happens here.