From 9f40949f5aa6689b1eb5495ef4debf2ba3102b23 Mon Sep 17 00:00:00 2001 From: Lucas <89882946+notbad3500@users.noreply.github.com> Date: Fri, 31 May 2024 11:20:31 +0200 Subject: [PATCH] Structure --- src/test/{java/test => }/TestSpecs.md | 10 +++++++++- .../java/{test/java => }/FailureTest.java | 0 src/test/java/{test/java => }/MainTest.java | 6 ------ src/test/java/Tester.java | 12 ++++++++++++ src/test/java/{test/java => }/make.md | 0 .../java => }/semantic/SemanticTest.java | 0 src/test/java/test/java/Tester.java | 19 ------------------- 7 files changed, 21 insertions(+), 26 deletions(-) rename src/test/{java/test => }/TestSpecs.md (87%) rename src/test/java/{test/java => }/FailureTest.java (100%) rename src/test/java/{test/java => }/MainTest.java (76%) create mode 100644 src/test/java/Tester.java rename src/test/java/{test/java => }/make.md (100%) rename src/test/java/{test/java => }/semantic/SemanticTest.java (100%) delete mode 100644 src/test/java/test/java/Tester.java diff --git a/src/test/java/test/TestSpecs.md b/src/test/TestSpecs.md similarity index 87% rename from src/test/java/test/TestSpecs.md rename to src/test/TestSpecs.md index 6fd5a41..7ae3416 100644 --- a/src/test/java/test/TestSpecs.md +++ b/src/test/TestSpecs.md @@ -75,4 +75,12 @@ Compiled Classfile ### Beispiel 2: Filled Class - \ No newline at end of file + + + für E2E Tests: + Testdatei mit Main ausführen/kompilieren + Testdatei mit "javac CompilerInput.java" kompilieren + + wenn beides erfolgreich + Ergebnis vom eigenen Compiler mit "java myOutput" ausführen + Ergebnis von javac mit "java CompilerInput" ausführen diff --git a/src/test/java/test/java/FailureTest.java b/src/test/java/FailureTest.java similarity index 100% rename from src/test/java/test/java/FailureTest.java rename to src/test/java/FailureTest.java diff --git a/src/test/java/test/java/MainTest.java b/src/test/java/MainTest.java similarity index 76% rename from src/test/java/test/java/MainTest.java rename to src/test/java/MainTest.java index 9e03dc7..a8c3a93 100644 --- a/src/test/java/test/java/MainTest.java +++ b/src/test/java/MainTest.java @@ -1,12 +1,6 @@ import org.junit.jupiter.api.Test; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.tree.ParseTree; -import parser.ASTBuilder; -import ast.ClassNode; -import ast.ProgramNode; -import bytecode.ByteCodeGenerator; import java.io.IOException; import java.nio.file.Paths; diff --git a/src/test/java/Tester.java b/src/test/java/Tester.java new file mode 100644 index 0000000..2c62e40 --- /dev/null +++ b/src/test/java/Tester.java @@ -0,0 +1,12 @@ +public class Tester { + public static void main(String[] args) { + + + } +} +// cp mitgeben +// java -jar pfadtocompiler.jar EmptyClass.java +// mit bash scipt ode rmakefile test automatisieren +// mvn package +// javac tester // tester compilen +// java tester // tester ausführen \ No newline at end of file diff --git a/src/test/java/test/java/make.md b/src/test/java/make.md similarity index 100% rename from src/test/java/test/java/make.md rename to src/test/java/make.md diff --git a/src/test/java/test/java/semantic/SemanticTest.java b/src/test/java/semantic/SemanticTest.java similarity index 100% rename from src/test/java/test/java/semantic/SemanticTest.java rename to src/test/java/semantic/SemanticTest.java diff --git a/src/test/java/test/java/Tester.java b/src/test/java/test/java/Tester.java deleted file mode 100644 index 8890547..0000000 --- a/src/test/java/test/java/Tester.java +++ /dev/null @@ -1,19 +0,0 @@ -public class Tester { - public static void main(String[] args) { - // für E2E Tests: - // Testdatei mit Main ausführen/kompilieren - // Testdatei mit "javac CompilerInput.java" kompilieren - - // wenn beides erfolgreich - // Ergebnis vom eigenen Compiler mit "java myOutput" ausführen - // Ergebnis von javac mit "java CompilerInput" ausführen - - - } -} -// cp mitgeben -// java -jar pfadtocompiler.jar EmptyClass.java -// mit bash scipt ode rmakefile test automatisieren -// mvn package -// javac tester // tester compilen -// java tester // tester ausführen \ No newline at end of file