diff --git a/test/bytecode/types/LocalVariableStringVector.jav b/test/bytecode/types/LocalVariableStringVector.jav new file mode 100644 index 00000000..887c82d6 --- /dev/null +++ b/test/bytecode/types/LocalVariableStringVector.jav @@ -0,0 +1,7 @@ +import java.util.Vector; + +class LocalVariableStringVector{ + void method() { + Vector vector; + } +} \ No newline at end of file diff --git a/test/bytecode/types/LocalVariableStringVectorTest.java b/test/bytecode/types/LocalVariableStringVectorTest.java new file mode 100644 index 00000000..a3761210 --- /dev/null +++ b/test/bytecode/types/LocalVariableStringVectorTest.java @@ -0,0 +1,39 @@ +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.Test; + +import bytecode.BytecodeTest; + +public class LocalVariableStringVectorTest extends BytecodeTest{ + @Override + protected void init() { + testName = "LocalVariableStringVector"; + rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; + } + + + + @Test + public void testCompiler() { + try{ + ClassLoader classLoader = getClassLoader(); + + Class cls = classLoader.loadClass(testName); + + Object obj = cls.newInstance(); + + assertTrue(true); + }catch(Exception e){ + throw new RuntimeException(e); + } + } + +} diff --git a/test/bytecode/types/LocalVariableVector.jav b/test/bytecode/types/LocalVariableVector.jav new file mode 100644 index 00000000..13cd673c --- /dev/null +++ b/test/bytecode/types/LocalVariableVector.jav @@ -0,0 +1,7 @@ +import java.util.Vector; + +class LocalVariableVector{ + void method() { + Vector vector; + } +} \ No newline at end of file diff --git a/test/bytecode/types/LocalVariableVectorTest.java b/test/bytecode/types/LocalVariableVectorTest.java new file mode 100644 index 00000000..52869f43 --- /dev/null +++ b/test/bytecode/types/LocalVariableVectorTest.java @@ -0,0 +1,38 @@ +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.Test; + +import bytecode.BytecodeTest; + +public class LocalVariableVectorTest extends BytecodeTest{ + @Override + protected void init() { + testName = "LocalVariableVector"; + rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; + } + + + + @Test + public void testCompiler() { + try{ + ClassLoader classLoader = getClassLoader(); + + Class cls = classLoader.loadClass(testName); + + Object obj = cls.newInstance(); + + assertTrue(true); + }catch(Exception e){ + throw new RuntimeException(e); + } + } +} diff --git a/test/bytecode/types/TypedVector.jav b/test/bytecode/types/MethodWithTypedVector.jav similarity index 70% rename from test/bytecode/types/TypedVector.jav rename to test/bytecode/types/MethodWithTypedVector.jav index d64e4f5f..a74062ee 100644 --- a/test/bytecode/types/TypedVector.jav +++ b/test/bytecode/types/MethodWithTypedVector.jav @@ -1,6 +1,6 @@ import java.util.Vector; -class TypedVector{ +class MethodWithTypedVector{ public void method(Vector v) { } diff --git a/test/bytecode/types/TypedVectorTest.java b/test/bytecode/types/MethodWithTypedVectorTest.java similarity index 90% rename from test/bytecode/types/TypedVectorTest.java rename to test/bytecode/types/MethodWithTypedVectorTest.java index 6a5cb441..6933c248 100644 --- a/test/bytecode/types/TypedVectorTest.java +++ b/test/bytecode/types/MethodWithTypedVectorTest.java @@ -15,10 +15,10 @@ import bytecode.BytecodeTest; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.Section; -public class TypedVectorTest extends BytecodeTest{ +public class MethodWithTypedVectorTest extends BytecodeTest{ @Override protected void init() { - testName = "TypedVector"; + testName = "MethodWithTypedVector"; rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; } diff --git a/test/bytecode/types/UntypedVector.jav b/test/bytecode/types/MethodWithUntypedVector.jav similarity index 65% rename from test/bytecode/types/UntypedVector.jav rename to test/bytecode/types/MethodWithUntypedVector.jav index 05835507..fead3981 100644 --- a/test/bytecode/types/UntypedVector.jav +++ b/test/bytecode/types/MethodWithUntypedVector.jav @@ -1,6 +1,6 @@ import java.util.Vector; -class UntypedVector{ +class MethodWithUntypedVector{ public void method(Vector v) { } diff --git a/test/bytecode/types/UntypedVectorTest.java b/test/bytecode/types/MethodWithUntypedVectorTest.java similarity index 93% rename from test/bytecode/types/UntypedVectorTest.java rename to test/bytecode/types/MethodWithUntypedVectorTest.java index a2277c0c..1be45ff0 100644 --- a/test/bytecode/types/UntypedVectorTest.java +++ b/test/bytecode/types/MethodWithUntypedVectorTest.java @@ -15,10 +15,10 @@ import bytecode.BytecodeTest; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.Section; -public class UntypedVectorTest extends BytecodeTest{ +public class MethodWithUntypedVectorTest extends BytecodeTest{ @Override protected void init() { - testName = "UntypedVector"; + testName = "MethodWithUntypedVector"; rootDirectory = System.getProperty("user.dir")+"/test/bytecode/types/"; }