aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-10-25 23:50:31 +0800
committerLeonardo Alt <leo@ethereum.org>2018-11-19 22:29:00 +0800
commit06c3f0953ae9f9921683f80349c7b1bbddcb3a9f (patch)
treeb671dcda3fca233f9213da5a217c83c6ddcf534e /test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
parent5be45e736d2b111c9352ca2990a1c7a653c60c55 (diff)
downloaddexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar.gz
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar.bz2
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar.lz
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar.xz
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.tar.zst
dexon-solidity-06c3f0953ae9f9921683f80349c7b1bbddcb3a9f.zip
[SMTChecker] Support bound function calls
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