Examples of runTestInSameEvaluator()


Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

  public void testStrategySeperately(){
    TestFramework tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("top_down(rules)(t) == f(g(b()),g(b()))"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("bottom_up(rules)(t) == f(b(),b())"));
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    assertTrue(tf.runTestInSameEvaluator("top_down(rules)(t) == f(g(b()),g(b()))"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("bottom_up(rules)(t) == f(b(),b())"));

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("B t2 = g(c());");
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("B t2 = g(c());");
    assertTrue(tf.runTestInSameEvaluator("once_top_down(rules2)(t2) == c()"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("B t2 = g(c());");
    assertTrue(tf.runTestInSameEvaluator("once_bottom_up(rules2)(t2) == g(b())"));
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    assertTrue(tf.runTestInSameEvaluator("once_top_down(rules2)(t2) == c()"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("B t2 = g(c());");
    assertTrue(tf.runTestInSameEvaluator("once_bottom_up(rules2)(t2) == g(b())"));

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("list[B] l = [g(c()),c()];");
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("list[B] l = [g(c()),c()];");
    assertTrue(tf.runTestInSameEvaluator("makeAll(rules2)(l) == [c(),b()]"));

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("tuple[A,B] t3 = <a(),c()>;");
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("tuple[A,B] t3 = <a(),c()>;");
    assertTrue(tf.runTestInSameEvaluator("top_down(rules2)(t3) == <a(),b()>"));

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("rel[A, B] r = {<a(), b()>, <f(b(),b()), c()>};");
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("rel[A, B] r = {<a(), b()>, <f(b(),b()), c()>};");
    assertTrue(tf.runTestInSameEvaluator("top_down(rules3)(r) == {<a(), c()>, <f(c(),c()), c()>}"));

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t4 = f(g(b()),g(b()));");
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t4 = f(g(b()),g(b()));");
    assertTrue(tf.runTestInSameEvaluator("top_down(functionToStrategy(rules4))(t4) == f(g(c()),g(c()))"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("innermost(rules)(t) == f(b(),b())"));
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    assertTrue(tf.runTestInSameEvaluator("top_down(functionToStrategy(rules4))(t4) == f(g(c()),g(c()))"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("innermost(rules)(t) == f(b(),b())"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("outermost(rules)(t) == f(b(),b())"));
View Full Code Here

Examples of org.rascalmpl.test.infrastructure.TestFramework.runTestInSameEvaluator()

    assertTrue(tf.runTestInSameEvaluator("innermost(rules)(t) == f(b(),b())"));
    tf = new TestFramework();
    tf.prepare("import StrategyTests;");
    tf.prepareMore("import Strategy;");
    tf.prepareMore("A t = f(g(g(b())),g(g(b())));");
    assertTrue(tf.runTestInSameEvaluator("outermost(rules)(t) == f(b(),b())"));
  }
 
  @Test @Ignore
  public void testTopologicalStrategy(){
    prepare("import StrategyTests;");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.