Alle Bytecode Tests in SourceBytecodeTests transformiert

This commit is contained in:
Enrico Schrödter 2016-04-29 09:43:36 +02:00
parent bbb79b1a1d
commit dad06a5626
39 changed files with 455 additions and 286 deletions

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class AssignTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Assign.jav";
public final static String outputFile = "Assign.class";
public class AssignTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Assign";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class BinaryTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Binary.jav";
public final static String outputFile = "Binary.class";
public class BinaryTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Binary";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class BinaryTest2 {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Binary2.jav";
public final static String outputFile = "Binary2.class";
public class BinaryTest2 extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Binary2";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class BoolLitTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "BoolLit.jav";
public final static String outputFile = "BoolLit.class";
public class BoolLitTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "BoolLit";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class CharLitTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "CharLitTest.jav";
public final static String outputFile = "CharLitTest.class";
public class CharLitTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "CharLit";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class ConditionTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Condition.jav";
public final static String outputFile = "Condition.class";
public class ConditionTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Condition";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class EmptyClassTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "EmptyClass.jav";
public final static String outputFile = "EmptyClass.class";
public class EmptyClassTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "EmptyClass";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class FieldDeclarationTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "FieldDeclaration.jav";
public final static String outputFile = "FieldDeclaration.class";
public class FieldDeclarationTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "FieldDeclaration";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -3,14 +3,20 @@ package bytecode;
import org.junit.Ignore;
import org.junit.Test;
public class ForTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "ForTest.jav";
public final static String outputFile = "ForTest.class";
public class ForTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "ForTest";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
@Ignore
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IdTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Id.jav";
public final static String outputFile = "Id.class";
public class IdTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Id";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -1,3 +1,3 @@
class Id {
class IdentityField {
<GPM, FNF extends GPM> Fun1<? extends GPM, ? super FNF> op = (x) -> x;
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IdentityFieldTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "IdentityField.jav";
public final static String outputFile = "IdentityField.class";
public class IdentityFieldTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "IdentityField";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IdentityTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Identity.jav";
public final static String outputFile = "Identity.class";
public class IdentityTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Identity";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -4,6 +4,8 @@ class IfElseIfStatement{
return 0;
}else if(flag){
return 1;
}else{
return 2;
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IfElseIfStatementTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "IfElseIfStatement.jav";
public final static String outputFile = "IfElseIfStatement.class";
public class IfElseIfStatementTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "IfElseIfStatement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IfElseStatementTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "IfElseStatement.jav";
public final static String outputFile = "IfElseStatement.class";
public class IfElseStatementTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "IfElseStatement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class IfStatementTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "IfStatement.jav";
public final static String outputFile = "IfStatement.class";
public class IfStatementTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "IfStatement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -21,16 +21,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class LambdaExpr2 {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "LambdaExpr2.jav";
public final static String outputFile = "LambdaExpr2.class";
public class LambdaExpr2Test extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "LambdaExpr";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
@Ignore
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class LambdaExpr {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "LambdaExpr.jav";
public final static String outputFile = "LambdaExpr.class";
public class LambdaExprTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "LambdaExpr";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class MainTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Main.jav";
public final static String outputFile = "Main.class";
public class MainTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Main";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -1,5 +1,5 @@
import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> {
class Matrix_lambda extends Vector<Vector<Integer>> {
op = (Matrix m) -> (f) -> f.apply(this, m);
}

View File

@ -1,4 +1,4 @@
class Matrix2 {
class Matrix_lambda2 {
op = (f) -> f.apply(2);
}

View File

@ -1,4 +1,4 @@
class Matrix3 {
class Matrix_lambda3 {
op = (f) -> f.apply();
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class Matrix_lambdaTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Matrix_lambda.jav";
public final static String outputFile = "Matrix_lambda.class";
public class Matrix_lambdaTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Matrix_lambda";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class Matrix_lambdaTest2 {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Matrix_lambda2.jav";
public final static String outputFile = "Matrix2.class";
public class Matrix_lambdaTest2 extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Matrix_lambda2";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class Matrix_lambdaTest3 {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Matrix_lambda3.jav";
public final static String outputFile = "Matrix3.class";
public class Matrix_lambdaTest3 extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Matrix_lambda3";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class MethodCallTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "MethodCall.jav";
public final static String outputFile = "MethodCall.class";
public class MethodCallTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "MethodCall";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class MethodEmpty {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "MethodEmpty.jav";
public final static String outputFile = "MethodEmpty.class";
public class MethodEmpty extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "MethodEmpty";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class MethodEmptyRetType {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "MethodEmptyRetType.jav";
public final static String outputFile = "MethodEmptyRetType.class";
public class MethodEmptyRetType extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "MethodEmptyRetType";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -23,35 +23,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class NewStatementTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "NewStatement.jav";
public final static String outputFile = "NewStatement.class";
public class NewStatementTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "NewStatement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory);
}
/*
@Test
public void testUntypedVectorDeclaredMethods() {
try{
File file = new File(System.getProperty("user.dir")+"/test/bytecode/types/");
URL url = file.toURL();
URL[] urls = new URL[]{url};
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
ClassLoader classLoader = new URLClassLoader(urls);
Class cls = classLoader.loadClass(testName);
Class untypedVectorTest = classLoader.loadClass("UntypedVector");
for(Method method: untypedVectorTest.getDeclaredMethods()){
System.out.println(method.toGenericString());
}
}catch(Exception e){
throw new RuntimeException(e);
Object obj = cls.newInstance();
assertTrue(true);
}
}
*/
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class ParameterTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Parameter.jav";
public final static String outputFile = "Parameter.class";
public class ParameterTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Parameter";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -21,16 +21,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class PostDecrement {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "PostDecrement.jav";
public final static String outputFile = "PostDecrement.class";
public class PostDecrement extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "PostDecrement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
@Ignore
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -21,16 +21,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class PostIncrement {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "PostIncrement.jav";
public final static String outputFile = "PostIncrement.class";
public class PostIncrement extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "PostIncrement";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
@Ignore
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class ReturnTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Return.jav";
public final static String outputFile = "Return.class";
public class ReturnTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Return";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class RunnableTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Runnable.jav";
public final static String outputFile = "Runnable.class";
public class RunnableTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "Runnable";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class StringLitTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "StringLitTest.jav";
public final static String outputFile = "StringLitTest.class";
public class StringLitTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "StringLitTest";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -20,15 +20,20 @@ import de.dhbwstuttgart.typeinference.Menge;
import de.dhbwstuttgart.typeinference.TypeinferenceResultSet;
import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet;
public class SystemOutPrintlnTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "SystemOutPrintln.jav";
public final static String outputFile = "SystemOutPrintln.class";
public class SystemOutPrintlnTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "SystemOutPrintln";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}

View File

@ -1,6 +1,6 @@
class Test3{
public static void main(String[] args){
System.out.println(new LambdaExpr2().op.apply());
System.out.println(new LambdaExpr2Test().op.apply());
}
}

View File

@ -2,13 +2,20 @@ package bytecode;
import org.junit.Test;
public class WhileTest {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "WhileTest.jav";
public final static String outputFile = "WhileTest.class";
public class WhileTest extends SourceFileBytecodeTest{
@Override
protected void init() {
testName = "WhileTest";
rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
}
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
public void testConstruct() throws Exception{
ClassLoader classLoader = getClassLoader();
Class cls = classLoader.loadClass(testName);
Object obj = cls.newInstance();
assertTrue(true);
}
}