new file: resources/AllgemeinTest/CaptureConversion.jav
modified: src/test/java/AllgemeinTest.java Campture Conversion Test in Allgemeintest eingefuegt
This commit is contained in:
parent
d79d2d28b1
commit
9606dc7b26
18
resources/AllgemeinTest/CaptureConversion.jav
Normal file
18
resources/AllgemeinTest/CaptureConversion.jav
Normal 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);
|
||||
}
|
||||
}
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user