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