From 58db64ad22da62ddd28fd5466a8610e095667534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Schr=C3=B6dter?= Date: Thu, 12 May 2016 20:50:36 +0200 Subject: [PATCH] WildCardTest implementiert --- test/bytecode/types/ExtendsTypeTest.java | 33 ----------------- .../types/ExtendsVectorStringTest.java | 2 +- test/bytecode/types/SuperType.java | 37 ------------------- test/bytecode/types/WildcardTest.jav | 10 ++--- test/bytecode/types/WildcardTest.java | 2 +- 5 files changed, 6 insertions(+), 78 deletions(-) delete mode 100644 test/bytecode/types/ExtendsTypeTest.java delete mode 100644 test/bytecode/types/SuperType.java diff --git a/test/bytecode/types/ExtendsTypeTest.java b/test/bytecode/types/ExtendsTypeTest.java deleted file mode 100644 index a3560b9c..00000000 --- a/test/bytecode/types/ExtendsTypeTest.java +++ /dev/null @@ -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); - } -} diff --git a/test/bytecode/types/ExtendsVectorStringTest.java b/test/bytecode/types/ExtendsVectorStringTest.java index f92c61ad..c106fbee 100644 --- a/test/bytecode/types/ExtendsVectorStringTest.java +++ b/test/bytecode/types/ExtendsVectorStringTest.java @@ -61,7 +61,7 @@ public class ExtendsVectorStringTest extends ASTBytecodeTest{ Object obj = cls.newInstance(); - Class objectClass = classLoader.loadClass("java.lang.Object"); + Class objectClass = classLoader.loadClass("java.lang.String"); Class[] params = new Class[1]; params[0] = objectClass; diff --git a/test/bytecode/types/SuperType.java b/test/bytecode/types/SuperType.java deleted file mode 100644 index 42a8d77b..00000000 --- a/test/bytecode/types/SuperType.java +++ /dev/null @@ -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); - } -} diff --git a/test/bytecode/types/WildcardTest.jav b/test/bytecode/types/WildcardTest.jav index f029c2d0..647d7b66 100644 --- a/test/bytecode/types/WildcardTest.jav +++ b/test/bytecode/types/WildcardTest.jav @@ -1,13 +1,11 @@ import java.util.Vector; -class SuperType{ - Vector numberVector; - - void method() { - method(numberVector); +class WildcardTest{ + void lower(Vector v) { + } - void method(Vector v) { + void upper(Vector v) { } } \ No newline at end of file diff --git a/test/bytecode/types/WildcardTest.java b/test/bytecode/types/WildcardTest.java index 6dd41df8..44df73a9 100644 --- a/test/bytecode/types/WildcardTest.java +++ b/test/bytecode/types/WildcardTest.java @@ -12,7 +12,7 @@ import bytecode.SourceFileBytecodeTest; public class WildcardTest extends SourceFileBytecodeTest{ @Override protected void init() { - testName = "Wildcard"; + testName = "WildcardTest"; rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; }