Search in sources :

Example 1 with SewingExpressionImpl

use of suite.lp.sewing.impl.SewingExpressionImpl in project suite by stupidsing.

the class EvaluatorFactoryTest method test.

private void test(String pattern, int result) {
    for (EvaluatorFactory ef : new EvaluatorFactory[] { // 
    new CompileExpressionImpl(new CompileClonerImpl()), new SewingExpressionImpl(new SewingClonerImpl()) }) {
        Evaluate_ e = ef.evaluator(Suite.parse(pattern));
        assertEquals(result, e.evaluate(Env.empty(0)));
    }
}
Also used : CompileClonerImpl(suite.lp.compile.impl.CompileClonerImpl) Evaluate_(suite.lp.doer.EvaluatorFactory.Evaluate_) SewingClonerImpl(suite.lp.sewing.impl.SewingClonerImpl) CompileExpressionImpl(suite.lp.compile.impl.CompileExpressionImpl) SewingExpressionImpl(suite.lp.sewing.impl.SewingExpressionImpl)

Aggregations

CompileClonerImpl (suite.lp.compile.impl.CompileClonerImpl)1 CompileExpressionImpl (suite.lp.compile.impl.CompileExpressionImpl)1 Evaluate_ (suite.lp.doer.EvaluatorFactory.Evaluate_)1 SewingClonerImpl (suite.lp.sewing.impl.SewingClonerImpl)1 SewingExpressionImpl (suite.lp.sewing.impl.SewingExpressionImpl)1