From 7a97e4351b4d78f64c3d1fbecd497481e649a83f Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 18 Jan 2021 00:29:18 +1100 Subject: 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 --- tests/micropython/native_for.py | 19 +++++++++++++++++++ tests/micropython/native_for.py.exp | 8 ++++++++ tests/pybnative/for.py | 19 ------------------- tests/pybnative/for.py.exp | 8 -------- 4 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 tests/micropython/native_for.py create mode 100644 tests/micropython/native_for.py.exp delete mode 100644 tests/pybnative/for.py delete mode 100644 tests/pybnative/for.py.exp (limited to 'tests') diff --git a/tests/micropython/native_for.py b/tests/micropython/native_for.py new file mode 100644 index 000000000..c640a8d08 --- /dev/null +++ b/tests/micropython/native_for.py @@ -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)) diff --git a/tests/micropython/native_for.py.exp b/tests/micropython/native_for.py.exp new file mode 100644 index 000000000..d4dc73eff --- /dev/null +++ b/tests/micropython/native_for.py.exp @@ -0,0 +1,8 @@ +0 +1 +2 +3 +0 +1 +2 +3 diff --git a/tests/pybnative/for.py b/tests/pybnative/for.py deleted file mode 100644 index 50177a9ba..000000000 --- a/tests/pybnative/for.py +++ /dev/null @@ -1,19 +0,0 @@ -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)) diff --git a/tests/pybnative/for.py.exp b/tests/pybnative/for.py.exp deleted file mode 100644 index d4dc73eff..000000000 --- a/tests/pybnative/for.py.exp +++ /dev/null @@ -1,8 +0,0 @@ -0 -1 -2 -3 -0 -1 -2 -3 -- cgit v1.2.3