use of de.bmoth.parser.ast.nodes.AnySubstitutionNode in project bmoth by hhu-stups.
the class MachinesTest method testAnySubstitution.
@Test
public void testAnySubstitution() {
String machine = MACHINE_NAME;
machine += VARIABLES_X_Y;
machine += INVARIANT_X_Y;
machine += INITIALISATION_X_1_Y_TRUE;
machine += "OPERATIONS foo = ANY p WHERE 1=1 THEN x := p END \n";
machine += "END";
MachineNode machineAsSemanticAst = parseMachine(machine);
AnySubstitutionNode any = (AnySubstitutionNode) machineAsSemanticAst.getOperations().get(0).getSubstitution();
DeclarationNode p = any.getParameters().get(0);
assertEquals("p", p.getName());
assertEquals(INTEGER, p.getType().toString());
}
Aggregations