tests: Move native for test from pybnative to micropython.

And make it generic so it can be run on any target.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-01-18 00:29:18 +11:00
parent c9f4c5acd6
commit 7a97e4351b
2 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
# test for native for loops
@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))