From 065df5568c258a9f20a9f02b10be9b16dc95da6f Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 26 May 2022 12:31:31 +1000 Subject: tests: Move native while test from pybnative to micropython. And make it so this test can run on any target. LED and time testing has been removed from this test, that can now be tested using: ./run-tests.py --via-mpy --emit native. Signed-off-by: Damien George --- tests/micropython/native_while.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/micropython/native_while.py (limited to 'tests/micropython/native_while.py') 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) -- cgit v1.2.3