solidity/test/libsolidity/smtCheckerTests/imports/import_library.sol
2021-01-04 10:03:16 +01:00

19 lines
427 B
Solidity

==== 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): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\n\nTransaction trace:\nC.constructor()\nC.g(0)