diff options
Diffstat (limited to 'tests/micropython')
-rw-r--r-- | tests/micropython/native_while.py | 13 | ||||
-rw-r--r-- | tests/micropython/native_while.py.exp | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/micropython/native_while.py b/tests/micropython/native_while.py new file mode 100644 index 000000000..ccf0ae0e0 --- /dev/null +++ b/tests/micropython/native_while.py @@ -0,0 +1,13 @@ +# test native while loop + + +@micropython.native +def f(n): + i = 0 + while i < n: + print(i) + i += 1 + + +f(2) +f(4) diff --git a/tests/micropython/native_while.py.exp b/tests/micropython/native_while.py.exp new file mode 100644 index 000000000..d95e7f145 --- /dev/null +++ b/tests/micropython/native_while.py.exp @@ -0,0 +1,6 @@ +0 +1 +0 +1 +2 +3 |