mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 07:58:04 +00:00
Added Documentation for Tests in README.md and Renamed ByteCode-Tests into E2E-Tests
This commit is contained in:
parent
43a05c761a
commit
573de11af4
38
README.md
38
README.md
@ -36,3 +36,41 @@
|
||||
(so würde z.B. (true || false == false) false zurückgeben)
|
||||
- i++ und i-- sind nur in for-Schleifen oder Statements erlaubt, --i und ++i sind generell nicht erlaubt
|
||||
- ein File kann nur eine Klasse enthalten
|
||||
|
||||
|
||||
## Aufbau der Tests
|
||||
### Tests für den Scanner, Parser und Typechecker:
|
||||
- Die Testfiles (.java), die alle Features abdecken, sind im Ordner `src/test/testFiles/ASTandTypedASTFeatures` zu finden.
|
||||
Ihr Name gibt circa an, welches Feature / welche Features sie abdecken
|
||||
- Ihre manuell übersetzten ASTs und TypedASTs befinden sich im Ordner `src/test/testFiles/ASTandTypedASTFeatures`
|
||||
- Die Klasse `src/test/java/ScannerParserTests.java` enthält die JUnit-Tests, die die korrekte Umwandlung der Testfiles in AST
|
||||
durch den Compiler prüfen, indem sie den durch den Compiler generierten AST mit dem manuell erstellten AST vergleichen
|
||||
- Die Klasse `src/test/java/TypingTests.java` enthält die JUnit-Tests, die die korrekte Umwandlung der manuell erstellten ASTs
|
||||
in TypedASTs durch den Compiler prüfen, indem sie den durch den Compiler generierten TypedAST mit dem manuell erstellten
|
||||
TypedAST vergleichen
|
||||
- Weitere Testfiles, die nicht unbedingt auf ein bestimmtes Feature abzielen, sind im Ordner `src/test/testFiles/MoreTestFiles`
|
||||
zu finden, die manuell übersetzen ASTs und TypedASTs dazu sind im Ordner `src/test/java/MoreTestResources` zu finden.
|
||||
Die korrekte Umwandlung dieser Testfiles in AST und TypedAST wird ebenfalls durch die Klassen `src/test/java/ScannerParserTests.java`
|
||||
und `src/test/java/TypingTests.java` geprüft, jedoch sind die Unit-Tests hier nicht vollständig
|
||||
### Tests für den gesamten Compiler:
|
||||
- Da die Kompilierung der Testfiles für den Scanner, Parser und Typechecker teilweise nicht gut mit Reflections testbar ist,
|
||||
gibt es extra Testfiles für das Testen des Compilers im Ordner `src/test/testFiles/E2EFeatures`
|
||||
- Jedes der Testfiles hat eine eigene Testklasse, welche sich im Ordner `src/test/java/E2ETests/Features` befindet. Diese
|
||||
Testklassen haben jeweils einen Namen, der sich aus `ByteCode_` und dem Namen des Testfiles zusammensetzt. Sie prüfen
|
||||
mithilfe der Hilfsklasse `src/test/java/E2ETests/BytecodeTestUtil.java`, ob der Compiler die Testfiles korrekt in
|
||||
class-Files umwandelt. Die Hilfsklasse erstellt ein Objekt der Klasse und implementiert Methoden, welche mit Reflections
|
||||
Werte aus dem Objekt auslesen und zurückgeben. Diese Werte werden dann mit den erwarteten Werten in der jeweiligen
|
||||
Testklasse verglichen.
|
||||
- Die Klasse `src/test/java/AllE2ETests.java` führt mithilfe der Klasse `src/test/java/HelpClasses/TestFileTester.java`
|
||||
alle Testklassen für die E2E-Tests der einzelnen Features aus und gibt deren Ergebnis aus. Somit muss für das E2E-Testen
|
||||
der gesamten Features nur diese Klasse ausgeführt werden.
|
||||
### Negative Tests:
|
||||
- Um zu überprüfen, dass der Compiler auch bei fehlerhaften Testfiles fehlschlägt, gibt es Testfiles im Ordner
|
||||
`src/test/testFiles/Negative`, welche nicht korrekt kompiliert werden können. Die Testfiles sin in mehrere Kategorien
|
||||
unterteilt, die durch die Ordnerstruktur in `src/test/testFiles/Negative` dargestellt werden. Für jede Kategorie gibt es
|
||||
eine eigene Testklasse, die sich im Ordner `src/test/java/NegativeTests` befindet und den gleichen Namen wie der Ordner
|
||||
ihrer Kategorie hat. Diese Testklassen versuchen die Testfiles ihrer Kategorie zu kompilieren und erwarten, dass der
|
||||
Compiler fehlschlägt.
|
||||
- Wie bei den E2E-Tests gibt es auch hier eine Klasse `src/test/java/AllNegativeTests.java`, die neben eigenen Tests auch
|
||||
alle Testklassen für die negativen Tests ausführt und deren Ergebnis ausgibt. Somit muss für das Testen der negativen
|
||||
Tests nur diese Klasse ausgeführt werden.
|
@ -8,138 +8,138 @@ class AllE2ETests {
|
||||
|
||||
// @Test
|
||||
// void testPublicClass() {
|
||||
// byte[] resultBytecode = Compiler.generateByteCodeArrayFromTypedAst();
|
||||
// assertEquals(AbstractSyntax_PublicClass.get(), resultBytecode);
|
||||
// byte[] resultE2E = Compiler.generateE2EArrayFromTypedAst();
|
||||
// assertEquals(AbstractSyntax_PublicClass.get(), resultE2E);
|
||||
// }
|
||||
|
||||
// @Test
|
||||
// void testMethodCall() {
|
||||
// assertDoesNotThrow(() -> {
|
||||
// BytecodeTestUtil testUtility = new BytecodeTestUtil("src/test/testFiles/ASTandTypedASTFeatures/MethodCall.java", "MethodCall");
|
||||
// E2ETestUtil testUtility = new E2ETestUtil("src/test/testFiles/ASTandTypedASTFeatures/MethodCall.java", "MethodCall");
|
||||
//
|
||||
// assertEquals(0, testUtility.invokeMethod("method", null));
|
||||
// assertEquals(1, testUtility.invokeMethod("method1", new Class<?>[]{int.class}, 1));
|
||||
// assertEquals(3, testUtility.invokeMethod("method2", new Class<?>[]{int.class, int.class}, 1, 2));
|
||||
// });
|
||||
// }
|
||||
|
||||
@Test
|
||||
void runByteCodeBreakTests() {
|
||||
run(ByteCode_Break.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeClassTests() {
|
||||
run(ByteCode_Class.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeClassObjectsTests() {
|
||||
run(ByteCode_ClassObjects.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeCommentTests() {
|
||||
run(ByteCode_Comment.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeCompAssignTests() {
|
||||
run(ByteCode_CompAssign.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeComplexCallsTests() {
|
||||
run(ByteCode_ComplexCalls.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeConstructorTests() {
|
||||
run(ByteCode_Constructor.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeContinueTests() {
|
||||
run(ByteCode_Continue.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeDataTypesTests() {
|
||||
run(ByteCode_DataTypes.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeFieldTests() {
|
||||
run(ByteCode_Field.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeForTests() {
|
||||
run(ByteCode_For.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeIfTests() {
|
||||
run(ByteCode_If.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeLogicExprTests() {
|
||||
run(ByteCode_LogicExpr.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeMainTests() {
|
||||
run(ByteCode_Main.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeMethodTests() {
|
||||
run(ByteCode_Method.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeMethodCallTests() {
|
||||
run(ByteCode_MethodCall.class);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// void runByteCodeMultipleClassesTests() {
|
||||
// run(ByteCode_MultipleClasses.class);
|
||||
// } TODO: Fix this test or remove it
|
||||
|
||||
@Test
|
||||
void runByteCodeOperatorsTests() {
|
||||
run(ByteCode_Operators.class);
|
||||
void runE2EBreakTests() {
|
||||
run(E2E_Break.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeOverloadedTests() {
|
||||
run(ByteCode_Overloaded.class);
|
||||
void runE2EClassTests() {
|
||||
run(E2E_Class.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodePrintTests() {
|
||||
run(ByteCode_Print.class);
|
||||
void runE2EClassObjectsTests() {
|
||||
run(E2E_ClassObjects.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeReturnTests() {
|
||||
run(ByteCode_Return.class);
|
||||
void runE2ECommentTests() {
|
||||
run(E2E_Comment.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeUnaryTests() {
|
||||
run(ByteCode_Unary.class);
|
||||
void runE2ECompAssignTests() {
|
||||
run(E2E_CompAssign.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeVariableDefWithDeclTests() {
|
||||
run(ByteCode_VariableDefWithDecl.class);
|
||||
void runE2EComplexCallsTests() {
|
||||
run(E2E_ComplexCalls.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runByteCodeWhileTests() {
|
||||
run(ByteCode_While.class);
|
||||
void runE2EConstructorTests() {
|
||||
run(E2E_Constructor.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EContinueTests() {
|
||||
run(E2E_Continue.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EDataTypesTests() {
|
||||
run(E2E_DataTypes.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EFieldTests() {
|
||||
run(E2E_Field.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EForTests() {
|
||||
run(E2E_For.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EIfTests() {
|
||||
run(E2E_If.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2ELogicExprTests() {
|
||||
run(E2E_LogicExpr.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EMainTests() {
|
||||
run(E2E_Main.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EMethodTests() {
|
||||
run(E2E_Method.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EMethodCallTests() {
|
||||
run(E2E_MethodCall.class);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// void runE2EMultipleClassesTests() {
|
||||
// run(E2E_MultipleClasses.class);
|
||||
// } TODO: Fix this test or remove it
|
||||
|
||||
@Test
|
||||
void runE2EOperatorsTests() {
|
||||
run(E2E_Operators.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EOverloadedTests() {
|
||||
run(E2E_Overloaded.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EPrintTests() {
|
||||
run(E2E_Print.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EReturnTests() {
|
||||
run(E2E_Return.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EUnaryTests() {
|
||||
run(E2E_Unary.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EVariableDefWithDeclTests() {
|
||||
run(E2E_VariableDefWithDecl.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void runE2EWhileTests() {
|
||||
run(E2E_While.class);
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Break {
|
||||
public class E2E_Break {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -103,7 +103,7 @@ public class ByteCode_Break {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Break");
|
||||
Assertions.assertEquals("Break", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "whileRepetition"));
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "forRepetition"));
|
||||
} catch (Exception e) {
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Class {
|
||||
public class E2E_Class {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -58,7 +58,7 @@ public class ByteCode_Class {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Class");
|
||||
Assertions.assertEquals("Class", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_ClassObjects {
|
||||
public class E2E_ClassObjects {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Comment {
|
||||
public class E2E_Comment {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -58,7 +58,7 @@ public class ByteCode_Comment {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Comment");
|
||||
Assertions.assertEquals("Comment", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_CompAssign {
|
||||
public class E2E_CompAssign {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -98,7 +98,7 @@ public class ByteCode_CompAssign {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "CompAssign");
|
||||
Assertions.assertEquals("CompAssign", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_ComplexCalls {
|
||||
public class E2E_ComplexCalls {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -111,7 +111,7 @@ public class ByteCode_ComplexCalls {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "ComplexCalls");
|
||||
Assertions.assertEquals("ComplexCalls", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Constructor {
|
||||
public class E2E_Constructor {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -79,7 +79,7 @@ public class ByteCode_Constructor {
|
||||
public void testInvokeConstructor1() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Constructor");
|
||||
Assertions.assertEquals("Constructor", instance.getClass().getName());
|
||||
Assertions.assertEquals(1, util.getFieldValueOfObject(instance, "i"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
@ -90,7 +90,7 @@ public class ByteCode_Constructor {
|
||||
public void testInvokeConstructor2() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{int.class}, new Object[]{5});
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Constructor");
|
||||
Assertions.assertEquals("Constructor", instance.getClass().getName());
|
||||
Assertions.assertEquals(5, util.getFieldValueOfObject(instance, "i"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
@ -101,7 +101,7 @@ public class ByteCode_Constructor {
|
||||
public void testInvokeConstructor3() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{int.class, int.class}, new Object[]{5, 10});
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Constructor");
|
||||
Assertions.assertEquals("Constructor", instance.getClass().getName());
|
||||
Assertions.assertEquals(15, util.getFieldValueOfObject(instance, "i"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Continue {
|
||||
public class E2E_Continue {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -98,7 +98,7 @@ public class ByteCode_Continue {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Continue");
|
||||
Assertions.assertEquals("Continue", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "repetitions"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_DataTypes {
|
||||
public class E2E_DataTypes {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -114,7 +114,7 @@ public class ByteCode_DataTypes {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "DataTypes");
|
||||
Assertions.assertEquals("DataTypes", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "x"));
|
||||
Assertions.assertEquals(false, util.getFieldValueOfObject(instance, "y"));
|
||||
Assertions.assertEquals('\u0000', util.getFieldValueOfObject(instance, "z"));
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Field {
|
||||
public class E2E_Field {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -108,7 +108,7 @@ public class ByteCode_Field {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Field");
|
||||
Assertions.assertEquals("Field", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "x"));
|
||||
Assertions.assertEquals('\u0000', util.getFieldValueOfObject(instance, "c"));
|
||||
} catch (Exception e) {
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_For {
|
||||
public class E2E_For {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -99,7 +99,7 @@ public class ByteCode_For {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "For");
|
||||
Assertions.assertEquals("For", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "repetitionsFirstFor"));
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "repetitionsSecondFor"));
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "repetitionsThirdFor"));
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_If {
|
||||
public class E2E_If {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -80,7 +80,7 @@ public class ByteCode_If {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "If");
|
||||
Assertions.assertEquals("If", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_InDeCrement {
|
||||
public class E2E_InDeCrement {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -83,7 +83,7 @@ public class ByteCode_InDeCrement {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "InDeCrement");
|
||||
Assertions.assertEquals("InDeCrement", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_LogicExpr {
|
||||
public class E2E_LogicExpr {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -111,7 +111,7 @@ public class ByteCode_LogicExpr {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "LogicExpr");
|
||||
Assertions.assertEquals("LogicExpr", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -9,7 +9,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Main {
|
||||
public class E2E_Main {
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@BeforeEach
|
||||
@ -97,7 +97,7 @@ public class ByteCode_Main {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Main");
|
||||
Assertions.assertEquals("Main", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValueOfObject(instance, "i"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Method {
|
||||
public class E2E_Method {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -102,7 +102,7 @@ public class ByteCode_Method {
|
||||
public void testInvokeConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Method");
|
||||
Assertions.assertEquals("Method", instance.getClass().getName());
|
||||
Assertions.assertEquals(0, util.getFieldValue("x"));
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_MethodCall {
|
||||
public class E2E_MethodCall {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -92,7 +92,7 @@ public class ByteCode_MethodCall {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "MethodCall");
|
||||
Assertions.assertEquals("MethodCall", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_MultipleClasses {
|
||||
public class E2E_MultipleClasses {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class ByteCode_Operators {
|
||||
public class E2E_Operators {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -112,7 +112,7 @@ public class ByteCode_Operators {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Operators");
|
||||
Assertions.assertEquals("Operators", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Overloaded {
|
||||
public class E2E_Overloaded {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -89,7 +89,7 @@ public class ByteCode_Overloaded {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Overloaded");
|
||||
Assertions.assertEquals("Overloaded", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -9,7 +9,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Print {
|
||||
public class E2E_Print {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
||||
@ -81,7 +81,7 @@ public class ByteCode_Print {
|
||||
public void testInvokeDefaultConstructor() {
|
||||
try {
|
||||
Object instance = util.invokeConstructor(new Class<?>[]{}, null);
|
||||
Assertions.assertEquals(instance.getClass().getName(), "Print");
|
||||
Assertions.assertEquals("Print", instance.getClass().getName());
|
||||
} catch (Exception e) {
|
||||
Assertions.fail();
|
||||
}
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Return {
|
||||
public class E2E_Return {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_Unary {
|
||||
public class E2E_Unary {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_VariableDefWithDecl {
|
||||
public class E2E_VariableDefWithDecl {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
@ -7,7 +7,7 @@ import E2ETests.BytecodeTestUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ByteCode_While {
|
||||
public class E2E_While {
|
||||
|
||||
private BytecodeTestUtil util;
|
||||
|
Loading…
Reference in New Issue
Block a user