diff options
Diffstat (limited to 'test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol')
-rw-r--r-- | test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol new file mode 100644 index 00000000..32419700 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol @@ -0,0 +1,20 @@ +pragma experimental SMTChecker; + +library L +{ + function add(uint x, uint y) internal pure returns (uint) { + require(x < 1000); + require(y < 1000); + return x + y; + } +} + +contract C +{ + function f(uint x) public pure { + uint y = L.add(x, 999); + assert(y < 1000); + } +} +// ---- +// Warning: (245-261): Assertion violation happens here |