tests/jni: Add test for working with container of List interface.
This commit is contained in:
parent
3c7e1b80ac
commit
772f0b4159
16
tests/jni/list.py
Normal file
16
tests/jni/list.py
Normal file
@ -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])
|
4
tests/jni/list.py.exp
Normal file
4
tests/jni/list.py.exp
Normal file
@ -0,0 +1,4 @@
|
||||
[]
|
||||
[one, two]
|
||||
[one, two]
|
||||
one two
|
Loading…
Reference in New Issue
Block a user