Search in sources :

Example 1 with LexicalScope

use of org.apache.commons.jexl3.internal.LexicalScope in project commons-jexl by apache.

the class LexicalTest method testScopeFrame.

@Test
public void testScopeFrame() {
    final LexicalScope scope = new LexicalScope();
    for (int i = 0; i < 128; i += 2) {
        Assert.assertTrue(scope.addSymbol(i));
        Assert.assertFalse(scope.addSymbol(i));
    }
    for (int i = 0; i < 128; i += 2) {
        Assert.assertTrue(scope.hasSymbol(i));
        Assert.assertFalse(scope.hasSymbol(i + 1));
    }
}
Also used : LexicalScope(org.apache.commons.jexl3.internal.LexicalScope) Test(org.junit.Test)

Aggregations

LexicalScope (org.apache.commons.jexl3.internal.LexicalScope)1 Test (org.junit.Test)1