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

12 lines
461 B
Solidity
Raw Normal View History

2021-08-20 16:47:38 +00:00
contract C {
constructor() payable {
assert(address(this).balance == 0); // should fail
assert(address(this).balance > 0); // should fail
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (40-74): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor(){ msg.value: 0 }
// Warning 6328: (93-126): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor(){ msg.value: 0 }