aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/046_for_loop.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/smtCheckerTests/046_for_loop.sol')
-rw-r--r--test/libsolidity/smtCheckerTests/046_for_loop.sol12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/046_for_loop.sol b/test/libsolidity/smtCheckerTests/046_for_loop.sol
new file mode 100644
index 00000000..90c4c328
--- /dev/null
+++ b/test/libsolidity/smtCheckerTests/046_for_loop.sol
@@ -0,0 +1,12 @@
+pragma experimental SMTChecker;
+contract C {
+ function f(uint x) public pure {
+ uint y;
+ for (y = 2; x < 10; ) {
+ y = 3;
+ }
+ assert(y == 2);
+ }
+}
+// ----
+// Warning: (167-181): Assertion violation happens here\nNote that some information is erased after the execution of loops.\nYou can re-introduce information using require().