Assert that a message was produced at a given position.
Construct a program by inserting the given expression into a return statement of a method and then run the semantic checks on it.
Construct a program by inserting the given expression into a return
statement of a method and then run the semantic checks on it. The
idea is that you construct the expression outside, insert it into
the program, run the checks and then you can check that attributes
of the expression are as you expect. The optional retType, vars
and stmts arguments can be used to inject a return type, variable
declarations or statements into the method as well. The return type
defaults to integer and the variable and statement lists to empty.
Parse some test input as a program and, if the parse succeeds with no input left, return the program tree.
Parse some test input as a program and, if the parse succeeds with no input left, return the program tree. If the parse fails, fail the test.
Parse some test input as a program and run the semantic analyser over the resulting tree (if the parse succeeds).
Run the semantic checks on the given program.
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.
This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.
Tests that check that the parser works correctly. I.e., it accepts correct input and produces the appropriate trees, and it rejects illegal input.