use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method binaryExp.
@Test
public void binaryExp() {
Exp e = getSecondExp("{ Bool b = True; Bool c = b == True; }");
assertEquals(e.getFreeVars(), "b");
}
use of abs.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 abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method ifExpr.
@Test
public void ifExpr() {
Exp e = getExp("{ Int x = 3; Int y = 4; Int z = 5; Int a = if x == 3 then y else z; }", 3);
assertEquals(e.getFreeVars(), "x", "y", "z");
}
use of abs.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");
}
use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method binaryExp2.
@Test
public void binaryExp2() {
Exp e = getSecondExp("{ Bool b = True; Bool c = True != b; }");
assertEquals(e.getFreeVars(), "b");
}
Aggregations