solidity/test/libsolidity/smtCheckerTests/special/time_units.sol

23 lines
1.0 KiB
Solidity
Raw Normal View History

contract D {
function f() public pure {
assert(1 == 1 seconds);
assert(2 == 1 seconds);
assert(2 minutes == 120 seconds);
assert(3 minutes == 120 seconds);
assert(2 hours == 120 minutes);
assert(3 hours == 120 minutes);
assert(2 days == 48 hours);
assert(4 days == 48 hours);
assert(2 weeks == 14 days);
assert(25 weeks == 14 days);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
2021-03-31 15:11:54 +00:00
// Warning 6328: (69-91): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()
// Warning 6328: (131-163): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()
// Warning 6328: (201-231): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()
// Warning 6328: (265-291): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()
// Warning 6328: (325-352): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()