diff --git a/resources/AllgemeinTest/VectorNotObject.jav b/resources/AllgemeinTest/VectorNotObject.jav new file mode 100644 index 000000000..d8ea900be --- /dev/null +++ b/resources/AllgemeinTest/VectorNotObject.jav @@ -0,0 +1,9 @@ +import java.util.Vector; + +class VectorNotObject { + + vectorAddAll(v1, v2) { + v1.addAll(v2); + return v1; + } + } diff --git a/resources/AllgemeinTest/WildcardCaptureConversionTest.jav b/resources/AllgemeinTest/WildcardCaptureConversionTest.jav new file mode 100644 index 000000000..59016f7ae --- /dev/null +++ b/resources/AllgemeinTest/WildcardCaptureConversionTest.jav @@ -0,0 +1,16 @@ +import java.util.Vector; +import java.lang.Integer; +import java.lang.String; + +class WildcardCaptureConversionTest { + + m(x, y ,z) { + x = new Vector(); + y = new Vector(); + x.add(1); + y.add("2"); + //Integer i = x.elementAt(0); + //String s = y.elementAt(0); + return z.vectorAddAll(x, y); + } +} \ No newline at end of file diff --git a/src/test/java/AllgemeinTest.java b/src/test/java/AllgemeinTest.java index 462033619..2dfc4dbf8 100644 --- a/src/test/java/AllgemeinTest.java +++ b/src/test/java/AllgemeinTest.java @@ -48,7 +48,9 @@ public class AllgemeinTest { //String className = "Box"; //String className = "Box_Main"; //String className = "wildcardPair"; - String className = "VectorConstAdd"; + //String className = "VectorConstAdd"; + String className = "VectorNotObject"; + //String className = "WildcardCaptureConversionTest"; //PL 2019-10-24: genutzt fuer unterschiedliche Tests path = System.getProperty("user.dir")+"/resources/AllgemeinTest/" + className + ".jav"; //path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/Overloading_Generics.jav";