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

28 lines
462 B
Solidity

contract C
{
uint x;
modifier m {
require(x > 0);
require(x < 10000);
_;
assert(x > 1);
_;
assert(x > 2);
assert(x > 10);
}
function f() m public {
x = x + 1;
}
function g(uint _x) public {
x = _x;
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (123-137): CHC: Assertion violation happens here.
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.