use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testAvailable.
@Test
public void testAvailable() throws Exception {
final PrologTerm transPred = new CompoundPrologTerm("bla");
final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
final PrologTerm available = new CompoundPrologTerm("available", wrapped);
final PrologTerm expected = new CompoundPrologTerm("ap", available);
check("Av(bla)", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testAnd.
@Test
public void testAnd() throws Exception {
final PrologTerm expected = new CompoundPrologTerm("and", TERM_TRUE, TERM_FALSE);
check("true & false", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method check.
private void check(final String input, final PrologTerm expectedTerm) throws LtlParseException {
final PrologTerm term = parse(input);
Assert.assertEquals(expectedTerm, term);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testNot.
@Test
public void testNot() throws Exception {
final PrologTerm expected = new CompoundPrologTerm("not", TERM_TRUE);
check("not true", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testDLK.
@Test
public void testDLK() throws Exception {
final PrologTerm transPred = new CompoundPrologTerm("bla");
final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
final PrologTerm args = new ListPrologTerm(wrapped);
final PrologTerm dlk = new CompoundPrologTerm("dlk", args);
final PrologTerm expected = new CompoundPrologTerm("ap", dlk);
check("deadlock( bla)", expected);
}
Aggregations