tests/jni: Test for basic object operations.

pull/1526/head
Paul Sokolovsky 2015-10-24 01:19:48 +03:00
rodzic 805c6534f8
commit 9a334d41e3
2 zmienionych plików z 19 dodań i 0 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

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