tests/jni: Test for basic object operations.

This commit is contained in:
Paul Sokolovsky 2015-10-24 01:19:48 +03:00
parent 805c6534f8
commit 9a334d41e3
2 changed files with 19 additions and 0 deletions

16
tests/jni/object.py Normal file
View File

@ -0,0 +1,16 @@
import sys
import jni
try:
Integer = jni.cls("java/lang/Integer")
except:
print("SKIP")
sys.exit()
# Create object
i = Integer(42)
print(i)
# Call object method
print(i.hashCode())
# Pass object to another method
System = jni.cls("java/lang/System")
System.out.println(i)

3
tests/jni/object.py.exp Normal file
View File

@ -0,0 +1,3 @@
42
42
42