Search in sources :

Example 1 with ReachabilityInformation

use of abs.backend.prolog.ReachabilityInformation in project abstools by abstools.

the class PartialFunctionTest method noPrologCodeGenerated.

@Test
public void noPrologCodeGenerated() throws NotImplementedYetException, UnsupportedEncodingException {
    Model model = expand(parse("apply(inc)(0);", applyFunction(), incFunction()));
    PartialFunctionDecl func = getPartialFunction(model, "apply");
    assertNotNull(func);
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    func.generateProlog(new PrintStream(os), new ReachabilityInformation(new ArrayList<>()));
    assertEquals("", os.toString("utf-8"));
}
Also used : PrintStream(java.io.PrintStream) Model(abs.frontend.ast.Model) ArrayList(java.util.ArrayList) ByteArrayOutputStream(java.io.ByteArrayOutputStream) PartialFunctionDecl(abs.frontend.ast.PartialFunctionDecl) ReachabilityInformation(abs.backend.prolog.ReachabilityInformation) Test(org.junit.Test)

Aggregations

ReachabilityInformation (abs.backend.prolog.ReachabilityInformation)1 Model (abs.frontend.ast.Model)1 PartialFunctionDecl (abs.frontend.ast.PartialFunctionDecl)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1