solidity/test/libsolidity/smtCheckerTests/inheritance/base_contract_assertion_fail_8.sol
Martin Blicha cdfc19b503 SMTChecker: Bring back counterexample checks in regression tests
Since the default is now to ignore the counterexamples when checking
test output, we bring back counterexample checks in tests where the
counterexample is (mostly) deterministic.
2023-07-25 12:26:21 +02:00

20 lines
358 B
Solidity

abstract contract A {
uint x;
function f() public view {
assert(x == 2);
}
}
contract C is A {
function g() public {
x = 2;
f();
x = 0;
}
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (61-75): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nA.f()