Merge pull request #9872 from ethereum/smt_remove_tests

Extract boost smt and remove unused tests
This commit is contained in:
chriseth
2020-09-24 13:20:19 +02:00
committed by GitHub
9 changed files with 44 additions and 375 deletions
@@ -0,0 +1,25 @@
==== Source: base ====
contract Base {
uint x;
address a;
function f() internal returns (uint) {
a = address(this);
++x;
return 2;
}
}
==== Source: der ====
pragma experimental SMTChecker;
import "base";
contract Der is Base {
function g(uint y) public {
x += f();
assert(y > x);
}
}
// ----
// Warning 1218: (der:101-109): Error trying to invoke SMT solver.
// Warning 6328: (der:113-126): Assertion violation happens here.
// Warning 2661: (base:100-103): Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 2661: (der:101-109): Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 2661: (base:100-103): Overflow (resulting value larger than 2**256 - 1) happens here.
@@ -0,0 +1,19 @@
==== Source: c ====
pragma experimental SMTChecker;
import "lib";
contract C {
function g(uint x) public pure {
uint y = L.f();
assert(x > y);
}
}
==== Source: lib ====
library L {
uint constant one = 1;
function f() internal pure returns (uint) {
return one;
}
}
// ----
// Warning 6328: (c:113-126): Assertion violation happens here.
// Warning 8364: (c:104-105): Assertion checker does not yet implement type type(library L)