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