summaryrefslogtreecommitdiff
path: root/tests/micropython/viper_cond.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/viper_cond.py')
-rw-r--r--tests/micropython/viper_cond.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/micropython/viper_cond.py b/tests/micropython/viper_cond.py
index 258a37812..a168afce9 100644
--- a/tests/micropython/viper_cond.py
+++ b/tests/micropython/viper_cond.py
@@ -1,4 +1,14 @@
-# using a bool as a conditional
+# using False as a conditional
+@micropython.viper
+def f():
+ x = False
+ if x:
+ pass
+ else:
+ print("not x", x)
+f()
+
+# using True as a conditional
@micropython.viper
def f():
x = True