new file: resources/AllgemeinTest/CaptureConversion.jav

modified:   src/test/java/AllgemeinTest.java
Campture Conversion Test in Allgemeintest eingefuegt
This commit is contained in:
pl@gohorb.ba-horb.de 2023-03-01 18:41:46 +01:00
parent d79d2d28b1
commit 9606dc7b26
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,18 @@
import java.lang.Object;
import java.util.Vector;
class CaptureConversion {
<X> void assign(Vector<X> v1, Vector<X> v2) {
v1 = v2;
}
void main() {
Vector<?> v1;
v1 = new Vector<Object>();
Vector<? extends Object> v2;
v2 = new Vector<Object>();
v1 = v2;
assign(v1, v2);
}
}

View File

@ -49,8 +49,9 @@ public class AllgemeinTest {
//String className = "Box_Main";
//String className = "wildcardPair";
//String className = "VectorConstAdd";
String className = "VectorNotObject";
//String className = "VectorNotObject";
//String className = "WildcardCaptureConversionTest";
String className = "CaptureConversion";
//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";