use of org.abs_models.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method parFnApp.
@Test
public void parFnApp() {
Exp e = getSecondExp("def Unit f(m)(Bool b) = Unit; { Bool b = True; Unit u = f(println)(b); }");
assertEquals(e.getFreeVars(), "b");
}
use of org.abs_models.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method callExp2.
@Test
public void callExp2() {
Exp e = getExp("interface I { Unit m(Bool b); } { Bool b = True; I i; Bool c = i.m(True); }", 2);
assertEquals(e.getFreeVars(), "i");
}
use of org.abs_models.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method fnApp.
@Test
public void fnApp() {
Exp e = getSecondExp("def Unit f(Bool b) = Unit; { Bool b; Unit u = f(b); }");
assertEquals(e.getFreeVars(), "b");
}
use of org.abs_models.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method callExp.
@Test
public void callExp() {
Exp e = getExp("interface I { Unit m(Bool b); } { Bool b = True; I i; Bool c = i.m(b); }", 2);
assertEquals(e.getFreeVars(), "i", "b");
}
use of org.abs_models.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method asyncCallExp.
@Test
public void asyncCallExp() {
Exp e = getExp("interface I { Unit m(Bool b); } { Bool b = True; I i; Bool c = i!m(b); }", 2);
assertEquals(e.getFreeVars(), "i", "b");
}
Aggregations