use of org.abs_models.frontend.ast.PartialFunctionDecl in project abstools by abstools.
the class PartialFunctionTest method unusedFunctionNotRemoved.
@Test
public void unusedFunctionNotRemoved() {
Model model = expand(parse("", applyFunction()));
PartialFunctionDecl decl = getPartialFunction(model, "apply");
assertNotNull("Unused pardef 'apply' has been removed!", decl);
}
use of org.abs_models.frontend.ast.PartialFunctionDecl 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"));
}
Aggregations