removed Begin to Tast test
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
91552ad147
commit
ae872ed906
@ -1,45 +0,0 @@
|
||||
package semantic;
|
||||
|
||||
import ast.ProgramNode;
|
||||
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 org.junit.jupiter.api.Test;
|
||||
import parser.astBuilder.ASTBuilder;
|
||||
import parser.generated.SimpleJavaLexer;
|
||||
import parser.generated.SimpleJavaParser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class BeginnToTAST {
|
||||
|
||||
@Test
|
||||
public void FieldTests() {
|
||||
SemanticAnalyzer.clearAnalyzer();
|
||||
|
||||
CharStream codeCharStream = null;
|
||||
try {
|
||||
codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/input/johnsTests/FieldTests.java"));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
|
||||
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
|
||||
|
||||
SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
|
||||
ParseTree parseTree = parser.program(); // parse the input
|
||||
|
||||
/* ------------------------- AST builder -> AST ------------------------- */
|
||||
ASTBuilder astBuilder = new ASTBuilder();
|
||||
ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
|
||||
|
||||
var result = SemanticAnalyzer.generateTast(abstractSyntaxTree);
|
||||
|
||||
assertTrue(SemanticAnalyzer.errors.isEmpty());
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/combinedFeatureTests/LoopExamples.class
Normal file
BIN
src/test/resources/input/combinedFeatureTests/LoopExamples.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/Char.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/Char.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/Comments.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/Comments.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/DoWhile.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/DoWhile.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/EmptyClass.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/EmptyClass.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/Field.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/Field.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/For.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/For.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/If.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/If.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/IfElse.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/IfElse.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/IfElseIfElse.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/IfElseIfElse.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/Increment.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/Increment.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/MainMethod.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/MainMethod.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/Null.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/Null.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/SelfReference.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/SelfReference.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/TestClass2.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/TestClass2.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/ThisDot.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/ThisDot.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/VoidMethod.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/VoidMethod.class
Normal file
Binary file not shown.
BIN
src/test/resources/input/singleFeatureTests/While.class
Normal file
BIN
src/test/resources/input/singleFeatureTests/While.class
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user