aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol')
-rw-r--r--test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol b/test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol
new file mode 100644
index 00000000..e39ab844
--- /dev/null
+++ b/test/libsolidity/smtCheckerTests/branches_assert_condition_2.sol
@@ -0,0 +1,16 @@
+pragma experimental SMTChecker;
+contract C {
+ function f(uint x) public pure {
+ if (x > 10) {
+ assert(x > 9);
+ }
+ else if (x > 2)
+ {
+ assert(x <= 10 && x > 2);
+ }
+ else
+ {
+ assert(0 <= x && x <= 2);
+ }
+ }
+}