use of abs.frontend.ast.Model in project abstools by abstools.
the class PartialFunctionTest method noErlangCodeGenerated.
@Test
public void noErlangCodeGenerated() throws IOException, NotImplementedYetException {
Model model = expand(parse("apply(inc)(0);", applyFunction(), incFunction()));
PartialFunctionDecl func = getPartialFunction(model, "apply");
assertNotNull(func);
func.generateErlangCode(null);
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class PartialFunctionTest method unusedFunctionNotRemoved.
@Test
public void unusedFunctionNotRemoved() {
Model model = expand(parse("", "def Int f()() = 0;"));
PartialFunctionDecl decl = getPartialFunction(model, "f");
assertNotNull("Unused pardef 'f' has been removed!", decl);
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class PartialFunctionTest method noDynamicJavaCodeGenerated.
@Test
public void noDynamicJavaCodeGenerated() throws NotImplementedYetException, UnsupportedEncodingException {
Model model = expand(parse("apply(inc)(0);", applyFunction(), incFunction()));
PartialFunctionDecl func = getPartialFunction(model, "apply");
assertNotNull(func);
ByteArrayOutputStream os = new ByteArrayOutputStream();
func.generateJavaDynamic(new PrintStream(os));
assertEquals("", os.toString("utf-8"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class PartialFunctionTest method noMaudeCodeGenerated.
@Test
public void noMaudeCodeGenerated() throws NotImplementedYetException, UnsupportedEncodingException {
Model model = testExpand(parse("apply(inc)(0);", applyFunction(), incFunction()), "Apply_%s_inc");
PartialFunctionDecl func = getPartialFunction(model, "apply");
assertNotNull(func);
ByteArrayOutputStream os = new ByteArrayOutputStream();
func.generateMaude(new PrintStream(os));
assertEquals("", os.toString("utf-8"));
}
use of abs.frontend.ast.Model in project abstools by abstools.
the class RecoverTest method intfTest2.
@Test
public void intfTest2() {
Model m = assertParseError(" interface I class C { }");
assertContainsDeclWithName(m, "I");
}
Aggregations