summaryrefslogtreecommitdiffstatshomepage
path: root/tests/jni/list.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/jni/list.py')
-rw-r--r--tests/jni/list.py16
1 files changed, 16 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])