forked from JavaTX/JavaCompilerCore
JUnit Test für Lokale Variabeln erstellt
This commit is contained in:
parent
ce52fd8904
commit
f077829d30
7
test/bytecode/types/LocalVariableStringVector.jav
Normal file
7
test/bytecode/types/LocalVariableStringVector.jav
Normal file
@ -0,0 +1,7 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class LocalVariableStringVector{
|
||||
void method() {
|
||||
Vector<String> vector;
|
||||
}
|
||||
}
|
39
test/bytecode/types/LocalVariableStringVectorTest.java
Normal file
39
test/bytecode/types/LocalVariableStringVectorTest.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
7
test/bytecode/types/LocalVariableVector.jav
Normal file
7
test/bytecode/types/LocalVariableVector.jav
Normal file
@ -0,0 +1,7 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class LocalVariableVector{
|
||||
void method() {
|
||||
Vector vector;
|
||||
}
|
||||
}
|
38
test/bytecode/types/LocalVariableVectorTest.java
Normal file
38
test/bytecode/types/LocalVariableVectorTest.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class TypedVector{
|
||||
class MethodWithTypedVector{
|
||||
public void method(Vector<String> v) {
|
||||
|
||||
}
|
@ -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/";
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class UntypedVector{
|
||||
class MethodWithUntypedVector{
|
||||
public void method(Vector v) {
|
||||
|
||||
}
|
@ -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/";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user