From 4eb61f98368b8284e04b75ce71ff75cdead09bb1 Mon Sep 17 00:00:00 2001 From: jianfengmao Date: Sun, 5 May 2024 20:01:38 -0600 Subject: [PATCH] More testing --- src/test/java/org/jpy/fixtures/CyclicReferenceChild2.java | 2 +- src/test/python/jpy_gettype_test.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/jpy/fixtures/CyclicReferenceChild2.java b/src/test/java/org/jpy/fixtures/CyclicReferenceChild2.java index 0781c546..bb185f77 100644 --- a/src/test/java/org/jpy/fixtures/CyclicReferenceChild2.java +++ b/src/test/java/org/jpy/fixtures/CyclicReferenceChild2.java @@ -13,5 +13,5 @@ * @author Jianfeng Mao */ @SuppressWarnings("UnusedDeclaration") -public abstract class CyclicReferenceChild2 extends CyclicReferenceParent { +public class CyclicReferenceChild2 extends CyclicReferenceParent { } diff --git a/src/test/python/jpy_gettype_test.py b/src/test/python/jpy_gettype_test.py index d48a9b4c..a7233526 100644 --- a/src/test/python/jpy_gettype_test.py +++ b/src/test/python/jpy_gettype_test.py @@ -73,13 +73,16 @@ def test_issue_74(self): def test_cyclic_reference(self): """ - Test if delaying resolving super classes doesn't break existing behavior + Test if delaying resolving super classes doesn't break existing class reference pattern. """ j_child1_class = jpy.get_type("org.jpy.fixtures.CyclicReferenceChild1") + j_child2_class = jpy.get_type("org.jpy.fixtures.CyclicReferenceChild2") + j_child2 = j_child2_class() j_child1 = j_child1_class.of(8) self.assertEqual(88, j_child1.parentMethod()) self.assertEqual(888, j_child1.grandParentMethod()) + self.assertIsNone(j_child1.refChild2(j_child2)) self.assertEqual(8, j_child1.get_x()) self.assertEqual(10, j_child1.y) self.assertEqual(100, j_child1.z)