use of org.develnext.jphp.core.tokenizer.token.expr.operator.MulExprToken in project jphp by jphp-compiler.
the class ASMExpressionTest method testCallExpr.
@Test
public void testCallExpr() {
ExprStmtToken expression = getASMExpression("func(1 + 2, 3) * 3").getResult();
Assert.assertEquals(3, expression.getTokens().size());
Assert.assertTrue(expression.getTokens().get(0) instanceof CallExprToken);
CallExprToken call = (CallExprToken) expression.getTokens().get(0);
Assert.assertEquals(2, call.getParameters().size());
Assert.assertEquals("1+2", call.getParameters().get(0).getWord());
Assert.assertEquals("3", call.getParameters().get(1).getWord());
Assert.assertTrue(expression.getTokens().get(1) instanceof IntegerExprToken);
Assert.assertTrue(expression.getTokens().get(2) instanceof MulExprToken);
}
Aggregations