use of de.be4.classicalb.core.parser.node.AFalsityPredicate in project probparsers by bendisposto.
the class ASTPrologTest method testTrueFalse.
@Test
public void testTrueFalse() throws BCompoundException {
checkPredicate("TRUE : BOOL", "member($,boolean_true($),bool_set($))");
checkPredicate("FALSE : BOOL", "member($,boolean_false($),bool_set($))");
final ADisjunctPredicate disjunction = new ADisjunctPredicate();
disjunction.setLeft(new ATruthPredicate());
disjunction.setRight(new AFalsityPredicate());
checkAST(0, "disjunct($,truth($),falsity($))", disjunction);
}
use of de.be4.classicalb.core.parser.node.AFalsityPredicate in project probparsers by bendisposto.
the class PredicatesTest method testBFalse.
@Test
public void testBFalse() throws BCompoundException {
parser.getOptions().setRestrictProverExpressions(true);
try {
getPredicateAsString("bfalse");
fail("exception expected");
} catch (BCompoundException e) {
assertTrue(e.getFirstException().getCause() instanceof CheckException);
}
parser.getOptions().setRestrictProverExpressions(false);
final String actual = getPredicateAsString("bfalse");
final String expected = "AFalsityPredicate()";
assertEquals(expected, actual);
}
Aggregations