summaryrefslogtreecommitdiff
path: root/tests/pybnative/for.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-07 23:27:45 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-07 23:27:45 +0100
commitd509ac25f9f387c5690126c49893d3da142971c2 (patch)
tree73c188e7ae137e28740d28d42cfdcbc939cc4df4 /tests/pybnative/for.py
parentbe6aa53cdb18359e5c7e51caac2ca0ea7160962d (diff)
py: Fix stack access in thumb native emitter.
Diffstat (limited to 'tests/pybnative/for.py')
-rw-r--r--tests/pybnative/for.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pybnative/for.py b/tests/pybnative/for.py
new file mode 100644
index 000000000..309c6c14f
--- /dev/null
+++ b/tests/pybnative/for.py
@@ -0,0 +1,15 @@
+import pyb
+
+@micropython.native
+def f1(n):
+ for i in range(n):
+ print(i)
+
+f1(4)
+
+@micropython.native
+def f2(r):
+ for i in r:
+ print(i)
+
+f2(range(4))