diff --git a/src/test/java/AllgemeinTest.java b/src/test/java/AllgemeinTest.java index c937035e..7eab7616 100644 --- a/src/test/java/AllgemeinTest.java +++ b/src/test/java/AllgemeinTest.java @@ -40,7 +40,7 @@ public class AllgemeinTest { //String className = "FCTest3"; //String className = "Var"; //String className = "Put"; - String className = "Twice"; + String className = "Cycle"; //PL 2019-10-24: genutzt fuer unterschiedliche Tests path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/" + className + ".jav"; //path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/Overloading_Generics.jav"; diff --git a/src/test/java/insertGenerics/TestExample42.java b/src/test/java/insertGenerics/TestExample42.java index 130706d7..fd7dd95d 100644 --- a/src/test/java/insertGenerics/TestExample42.java +++ b/src/test/java/insertGenerics/TestExample42.java @@ -9,6 +9,7 @@ import de.dhbwstuttgart.bytecode.insertGenerics.PositionFinder; import org.junit.Test; import static org.junit.Assert.assertEquals; +import java.io.BufferedReader; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,6 +27,7 @@ public class TestExample42 { } public HashMap fillPosOfTphs() { + BufferedReader l; HashMap posOfTphs = new HashMap<>(); posOfTphs.put("K", PositionFinder.Position.FIELD); posOfTphs.put("L", PositionFinder.Position.METHOD); diff --git a/src/test/resources/AllgemeinTest/Cycle.jav b/src/test/resources/AllgemeinTest/Cycle.jav new file mode 100644 index 00000000..09959d99 --- /dev/null +++ b/src/test/resources/AllgemeinTest/Cycle.jav @@ -0,0 +1,11 @@ +class Cycle{ + + A und(A a, A b){ + return a; + } + + m(a){ + return und(m(m(a)), a); + } + +} \ No newline at end of file diff --git a/src/test/resources/AllgemeinTest/Twice.jav b/src/test/resources/AllgemeinTest/Twice.jav new file mode 100644 index 00000000..5cbb3bab --- /dev/null +++ b/src/test/resources/AllgemeinTest/Twice.jav @@ -0,0 +1,5 @@ +class Twice{ + m(x, f){ + return f.apply(f.apply(x)); + } +} \ No newline at end of file