use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstLambdaExpression method testLambdaAsFunction04.
@Test(expected = ELException.class)
public void testLambdaAsFunction04() {
ELProcessor processor = new ELProcessor();
// More method parameters than there are nested lambda expressions
processor.getValue("v = (()->y->()->2-y); v()(1)()()", Integer.class);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestAstLambdaExpression method testLambdaAsFunction03.
@Test
public void testLambdaAsFunction03() {
ELProcessor processor = new ELProcessor();
Object result = processor.getValue("v = (()->y->()->2-y); v()(1)()", Integer.class);
Assert.assertEquals(Integer.valueOf(1), result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestELArithmetic method testSubtract02.
@Test
public void testSubtract02() {
ELProcessor processor = new ELProcessor();
Long result = processor.eval("null - null");
Assert.assertEquals(Long.valueOf(0), result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestELArithmetic method testUnaryMinus01.
@Test
public void testUnaryMinus01() {
ELProcessor processor = new ELProcessor();
Long result = processor.eval("-null");
Assert.assertEquals(Long.valueOf(0), result);
}
use of jakarta.el.ELProcessor in project tomcat by apache.
the class TestELArithmetic method testMultiply02.
@Test
public void testMultiply02() {
ELProcessor processor = new ELProcessor();
Long result = processor.eval("null * null");
Assert.assertEquals(Long.valueOf(0), result);
}
Aggregations