diff --git a/pom.xml b/pom.xml index ef0f4502d..833b42704 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> src/main/antlr4/java8 - ${project.basedir}/target/generated-sources/antlr4/de/dhbwstuttgart/parser/antlr + ${project.basedir}/src/main/java/de/dhbwstuttgart/parser/antlr -package de.dhbwstuttgart.parser.antlr @@ -89,7 +89,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> src/main/antlr4/sat - ${project.basedir}/target/generated-sources/antlr4/de/dhbwstuttgart/sat/asp/parser/antlr + ${project.basedir}/src/main/java/de/dhbwstuttgart/sat/asp/parser/antlr -package de.dhbwstuttgart.sat.asp.parser.antlr diff --git a/src/test/java/bytecode/InheritTest.java b/src/test/java/bytecode/InheritTest.java index 86181bf6d..77fcb9a17 100644 --- a/src/test/java/bytecode/InheritTest.java +++ b/src/test/java/bytecode/InheritTest.java @@ -138,11 +138,12 @@ public class InheritTest { */ @Test - public void testmainAA() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, MalformedURLException, ClassNotFoundException { + public void testmainAA() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, MalformedURLException, ClassNotFoundException, NoSuchFieldException { loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)}); classToTest = loader.loadClass("Inherit"); Method m = classToTestAA.getDeclaredMethod("m", Integer.class); assertEquals(m.invoke(instanceOfClassAA, 5), "AA"); + classToTestAA = classToTest.getField("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 0ef9c0201..0dd5ddcc1 100644 --- a/src/test/resources/bytecode/javFiles/Inherit.jav +++ b/src/test/resources/bytecode/javFiles/Inherit.jav @@ -6,6 +6,7 @@ import java.lang.String; public class Inherit { +AA aafield; //m(Integer i) { return "AA"; } main(d, i) {