mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Update test expectations for z3 4.8.6
This commit is contained in:
parent
2f9779d06b
commit
b323134ef0
@ -7,10 +7,11 @@ contract Simple {
|
|||||||
for (i = 0; i < n; ++i)
|
for (i = 0; i < n; ++i)
|
||||||
a[i] = i;
|
a[i] = i;
|
||||||
require(n > 1);
|
require(n > 1);
|
||||||
// Assertion is safe but current solver version cannot solve it.
|
// Assertion is safe but current solver version times out.
|
||||||
// Keep test for next solver release.
|
// Keep test for next solver release.
|
||||||
assert(a[n-1] > a[n-2]);
|
assert(a[n-1] > a[n-2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// Warning: (267-290): Assertion violation happens here
|
// Warning: (261-284): Error trying to invoke SMT solver.
|
||||||
|
// Warning: (261-284): Assertion violation happens here
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
pragma experimental SMTChecker;
|
|
||||||
|
|
||||||
contract LoopFor2 {
|
|
||||||
uint[] b;
|
|
||||||
uint[] c;
|
|
||||||
|
|
||||||
function testUnboundedForLoop(uint n) public {
|
|
||||||
b[0] = 900;
|
|
||||||
uint[] memory a = b;
|
|
||||||
require(n > 0 && n < 100);
|
|
||||||
uint i;
|
|
||||||
while (i < n) {
|
|
||||||
b[i] = i + 1;
|
|
||||||
c[i] = b[i];
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
assert(b[0] == c[0]);
|
|
||||||
assert(a[0] == 900);
|
|
||||||
assert(b[0] == 900);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ----
|
|
||||||
// Warning: (312-331): Assertion violation happens here
|
|
@ -14,11 +14,13 @@ contract LoopFor2 {
|
|||||||
c[i] = b[i];
|
c[i] = b[i];
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
// Fails as false positive.
|
||||||
assert(b[0] == c[0]);
|
assert(b[0] == c[0]);
|
||||||
assert(a[0] == 900);
|
assert(a[0] == 900);
|
||||||
assert(b[0] == 900);
|
assert(b[0] == 900);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// Warning: (290-309): Assertion violation happens here
|
// Warning: (296-316): Assertion violation happens here
|
||||||
// Warning: (313-332): Assertion violation happens here
|
// Warning: (320-339): Assertion violation happens here
|
||||||
|
// Warning: (343-362): Assertion violation happens here
|
||||||
|
Loading…
Reference in New Issue
Block a user