WildCardTest implementiert

This commit is contained in:
Enrico Schrödter 2016-05-12 20:50:36 +02:00
parent ae01af7a40
commit 58db64ad22
5 changed files with 6 additions and 78 deletions

View File

@ -1,33 +0,0 @@
package bytecode.types;
import static org.junit.Assert.*;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Vector;
import org.junit.Ignore;
import org.junit.Test;
import bytecode.SourceFileBytecodeTest;
public class ExtendsTypeTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "ExtendsType";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/";
}
@Test
@Ignore
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -61,7 +61,7 @@ public class ExtendsVectorStringTest extends ASTBytecodeTest{
Object obj = cls.newInstance(); Object obj = cls.newInstance();
Class objectClass = classLoader.loadClass("java.lang.Object"); Class objectClass = classLoader.loadClass("java.lang.String");
Class[] params = new Class[1]; Class[] params = new Class[1];
params[0] = objectClass; params[0] = objectClass;

View File

@ -1,37 +0,0 @@
package bytecode.types;
import static org.junit.Assert.*;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Vector;
import org.junit.Test;
import org.junit.Ignore;
import bytecode.SourceFileBytecodeTest;
public class SuperType extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "ExtendsType";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/";
}
@Test
@Ignore
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -1,13 +1,11 @@
import java.util.Vector; import java.util.Vector;
class SuperType{ class WildcardTest{
Vector<Number> numberVector; void lower(Vector<? super Integer> v) {
void method() {
method(numberVector);
} }
void method(Vector<? super Integer> v) { void upper(Vector<? extends Integer> v) {
} }
} }

View File

@ -12,7 +12,7 @@ import bytecode.SourceFileBytecodeTest;
public class WildcardTest extends SourceFileBytecodeTest{ public class WildcardTest extends SourceFileBytecodeTest{
@Override @Override
protected void init() { protected void init() {
testName = "Wildcard"; testName = "WildcardTest";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/";
} }