From a0a813f87c903b45e0c834d586d4e74a064c5643 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 8 May 2020 11:35:21 +0200 Subject: [PATCH] Inherit Test update --- src/test/java/bytecode/InheritTest.java | 2 +- src/test/resources/bytecode/javFiles/Inherit.jav | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/bytecode/InheritTest.java b/src/test/java/bytecode/InheritTest.java index 77fcb9a1..e5ecc6c9 100644 --- a/src/test/java/bytecode/InheritTest.java +++ b/src/test/java/bytecode/InheritTest.java @@ -143,7 +143,7 @@ public class InheritTest { classToTest = loader.loadClass("Inherit"); Method m = classToTestAA.getDeclaredMethod("m", Integer.class); assertEquals(m.invoke(instanceOfClassAA, 5), "AA"); - classToTestAA = classToTest.getField("aafield").getType(); + classToTestAA = classToTest.getDeclaredField("aafield").getType(); Method main = classToTest.getDeclaredMethod("main", classToTestAA, Integer.class); assertEquals(main.invoke(instanceOfClass, instanceOfClassAA, 5), "AA"); } diff --git a/src/test/resources/bytecode/javFiles/Inherit.jav b/src/test/resources/bytecode/javFiles/Inherit.jav index 0dd5ddcc..60f5f8ed 100644 --- a/src/test/resources/bytecode/javFiles/Inherit.jav +++ b/src/test/resources/bytecode/javFiles/Inherit.jav @@ -6,14 +6,14 @@ import java.lang.String; public class Inherit { -AA aafield; + AA aafield; //m(Integer i) { return "AA"; } - - main(d, i) { + + main2(d, i) { return d.m(i); } - main(v, i) { + main2(v, i) { var aa = v.elementAt(0); return aa.m(i); }