Arithmetic compound assignment operators tests

This commit is contained in:
Leonardo Alt
2019-03-28 15:27:52 +01:00
parent 15269067b5
commit c7e5468505
11 changed files with 190 additions and 0 deletions
@@ -0,0 +1,15 @@
pragma experimental SMTChecker;
contract C
{
uint[] array;
function f(uint x, uint p) public {
require(x < 100);
require(array[p] == 200);
array[p] -= array[p] - x;
assert(array[p] >= 0);
assert(array[p] < 90);
}
}
// ----
// Warning: (201-222): Assertion violation happens here