tests/jni: Test for basic object operations.

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

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)

View File

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