Search in sources :

Example 1 with Expression

use of org.whole.lang.java.model.Expression in project whole by wholeplatform.

the class ResolversTest method testAmbiguousDataEntityResolverTightening.

@Category(KnownFailingTests.class)
@Test
public void testAmbiguousDataEntityResolverTightening() {
    // workaround for JVM termination on StackOverflowError
    Assert.fail();
    Expression expression = createResolver(JavaEntityDescriptorEnum.Expression);
    Assignment assignment = jf.createAssignment();
    assignment.setRightHandSide(expression);
    expression.wSetValue("stringLiteral");
    Assert.assertTrue(Matcher.matchImpl(JavaEntityDescriptorEnum.StringLiteral, assignment.getRightHandSide()));
}
Also used : Assignment(org.whole.lang.java.model.Assignment) Expression(org.whole.lang.java.model.Expression) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 2 with Expression

use of org.whole.lang.java.model.Expression in project whole by wholeplatform.

the class ResolversTest method testDataEntityResolverTightening.

@Test
public void testDataEntityResolverTightening() {
    Expression expression = createResolver(JavaEntityDescriptorEnum.Expression);
    Assignment assignment = jf.createAssignment();
    assignment.setRightHandSide(expression);
    expression.wSetValue(false);
    Assert.assertTrue(Matcher.matchImpl(JavaEntityDescriptorEnum.BooleanLiteral, assignment.getRightHandSide()));
}
Also used : Assignment(org.whole.lang.java.model.Assignment) Expression(org.whole.lang.java.model.Expression) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Assignment (org.whole.lang.java.model.Assignment)2 Expression (org.whole.lang.java.model.Expression)2 Category (org.junit.experimental.categories.Category)1