Package codeanalysis.syntax
Class ParserTest
java.lang.Object
codeanalysis.syntax.ParserTest
The ParserTest class contains tests for the parser.
It ensures that the parser correctly parses the syntax tree.
- Version:
- 1.0
- Author:
- Siyabend Urun
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTest if binary operators are parsed correctly.voidparserUnaryExpressionHonorsPrecedences(SyntaxType unaryType, SyntaxType binaryType) Test if unary operators are parsed correctly.
-
Constructor Details
-
ParserTest
public ParserTest()
-
-
Method Details
-
parserBinaryExpressionHonorsPrecedences
@ParameterizedTest @MethodSource("getBinaryOperatorPairsData") public void parserBinaryExpressionHonorsPrecedences(SyntaxType op1, SyntaxType op2) Test if binary operators are parsed correctly.- Parameters:
op1- The first operator.op2- The second operator.
-
parserUnaryExpressionHonorsPrecedences
@ParameterizedTest @MethodSource("getUnaryOperatorPairsData") public void parserUnaryExpressionHonorsPrecedences(SyntaxType unaryType, SyntaxType binaryType) Test if unary operators are parsed correctly.- Parameters:
unaryType- The syntax type of the unary operator.binaryType- The syntax type of the binary operator.
-