diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-13 01:32:54 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-13 01:33:09 +0200 |
commit | 772f0b4159095baf2f073390b2bc2f8d5aab24de (patch) | |
tree | f8ce3cbb34e16a64ea043ad083e0883f4ac2ec13 /tests/jni | |
parent | 3c7e1b80ac2f453605c0a6b0896e84cdf0d536c7 (diff) | |
download | micropython-772f0b4159095baf2f073390b2bc2f8d5aab24de.tar.gz micropython-772f0b4159095baf2f073390b2bc2f8d5aab24de.zip |
tests/jni: Add test for working with container of List interface.
Diffstat (limited to 'tests/jni')
-rw-r--r-- | tests/jni/list.py | 16 | ||||
-rw-r--r-- | tests/jni/list.py.exp | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/jni/list.py b/tests/jni/list.py new file mode 100644 index 0000000000..6725abb5a0 --- /dev/null +++ b/tests/jni/list.py @@ -0,0 +1,16 @@ +import sys +import jni +try: + ArrayList = jni.cls("java/util/ArrayList") +except: + print("SKIP") + sys.exit() + +l = ArrayList() +print(l) +l.add("one") +l.add("two") + +print(l.toString()) +print(l) +print(l[0], l[1]) diff --git a/tests/jni/list.py.exp b/tests/jni/list.py.exp new file mode 100644 index 0000000000..cc34bb0a21 --- /dev/null +++ b/tests/jni/list.py.exp @@ -0,0 +1,4 @@ +[] +[one, two] +[one, two] +one two |