Permalink
Browse files

tests/jni: Add test for working with container of List interface.

  • Loading branch information...
1 parent 3c7e1b8 commit 772f0b4159095baf2f073390b2bc2f8d5aab24de @pfalcon pfalcon committed Nov 12, 2015
Showing with 20 additions and 0 deletions.
  1. +16 −0 tests/jni/list.py
  2. +4 −0 tests/jni/list.py.exp
View
@@ -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])
@@ -0,0 +1,4 @@
+[]
+[one, two]
+[one, two]
+one two

0 comments on commit 772f0b4

Please sign in to comment.