use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method newExp.
@Test
public void newExp() {
Exp e = getSecondExp("class C(Bool b) {} { Bool b = True; new local C(b); }");
assertEquals(e.getFreeVars(), "b");
}
use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method caseExp.
@Test
public void caseExp() {
Exp e = getSecondExp("{ Bool b = True; Bool c = case True { y => y; }; }");
assertTrue(e.getFreeVars().isEmpty());
}
use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method binaryExp3.
@Test
public void binaryExp3() {
Exp e = getSecondExp("{ Bool b = True; Bool c = b == b; }");
assertEquals(e.getFreeVars(), "b");
}
use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method letExp2.
@Test
public void letExp2() {
Exp e = getSecondExp("{ Bool b = True; Bool c = let (Bool d) = b in d; }");
assertEquals(e.getFreeVars(), "b");
}
use of abs.frontend.ast.Exp in project abstools by abstools.
the class FreeVarTest method unaryExp.
@Test
public void unaryExp() {
Exp e = getSecondExp("{ Bool b = True; Bool c = !b; }");
assertEquals(e.getFreeVars(), "b");
}
Aggregations