aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol')
-rw-r--r--test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
new file mode 100644
index 00000000..99c785d0
--- /dev/null
+++ b/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
@@ -0,0 +1,21 @@
+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
+{
+ using L for uint;
+ function f(uint x) public pure {
+ uint y = x.add(999);
+ assert(y < 1000);
+ }
+}
+// ----
+// Warning: (261-277): Assertion violation happens here