summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-08-04 22:16:24 +1000
committerDamien George <damien.p.george@gmail.com>2018-08-04 22:16:24 +1000
commit49529f22d46364efb712a07860b645984ec42075 (patch)
tree322928721185249a051ba8132d609e02fcc39dba
parent10830059c5d3651abdb2d3532b28a9bb0a9425ee (diff)
tests/micropython/viper_cond: Add test for large int as bool.
-rw-r--r--tests/micropython/viper_cond.py8
-rw-r--r--tests/micropython/viper_cond.py.exp1
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/micropython/viper_cond.py b/tests/micropython/viper_cond.py
index a168afce9..bbb3f6923 100644
--- a/tests/micropython/viper_cond.py
+++ b/tests/micropython/viper_cond.py
@@ -23,3 +23,11 @@ def g():
if y:
print("y", y)
g()
+
+# using an int as a conditional that has the lower 16-bits clear
+@micropython.viper
+def h():
+ z = 0x10000
+ if z:
+ print("z", z)
+h()
diff --git a/tests/micropython/viper_cond.py.exp b/tests/micropython/viper_cond.py.exp
index dff710393..beacd48fe 100644
--- a/tests/micropython/viper_cond.py.exp
+++ b/tests/micropython/viper_cond.py.exp
@@ -1,3 +1,4 @@
not x False
x True
y 1
+z 65536