diff --git a/tests/jni/object.py b/tests/jni/object.py new file mode 100644 index 0000000000000000000000000000000000000000..6cf936c4d0edd62ccf2d3fd23426a0d3984c2651 --- /dev/null +++ b/tests/jni/object.py @@ -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) diff --git a/tests/jni/object.py.exp b/tests/jni/object.py.exp new file mode 100644 index 0000000000000000000000000000000000000000..bda709ecfb4723e54988ddfe7b8d9450761779a6 --- /dev/null +++ b/tests/jni/object.py.exp @@ -0,0 +1,3 @@ +42 +42 +42