public class BooleanFormulaSubject extends Subject<BooleanFormulaSubject,BooleanFormula>
Subject subclass for testing assertions about BooleanFormulas with Truth
(allows to use assert_().about(...).that(formula).isUnsatisfiable() etc.).
Use SolverBasedTest0.assertThatFormula(BooleanFormula),
or AbstractVerb.about(com.google.common.truth.SubjectFactory) and
forSolver(SolverContext).
failureStrategy| Modifier and Type | Method and Description |
|---|---|
static SubjectFactory<BooleanFormulaSubject,BooleanFormula> |
forSolver(SolverContext context)
Use this for checking assertions about BooleanFormulas
(given the corresponding solver) with Truth:
assert_().about(BooleanFormulaSubject.forSolver(mgr)).that(formula).is...(). |
void |
implies(BooleanFormula expected)
Check that the subject implies a given formula,
i.e.
|
void |
isEquisatisfiableTo(BooleanFormula other) |
void |
isEquivalentTo(BooleanFormula expected)
Check that the subject is equivalent to a given formula,
i.e.
|
void |
isSatisfiable()
Check that the subject is satisfiable.
|
void |
isTautological()
Check that the subject is tautological, i.e., always holds.
|
void |
isUnsatisfiable()
Check that the subject is unsatisfiable.
|
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hashCode, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, namedpublic static SubjectFactory<BooleanFormulaSubject,BooleanFormula> forSolver(SolverContext context)
assert_().about(BooleanFormulaSubject.forSolver(mgr)).that(formula).is...().public void isUnsatisfiable()
throws SolverException,
InterruptedException
SolverExceptionInterruptedExceptionpublic void isSatisfiable()
throws SolverException,
InterruptedException
SolverExceptionInterruptedExceptionpublic void isTautological()
throws SolverException,
InterruptedException
isEquivalentTo(BooleanFormula)
with the formula true, but it checks satisfiability of the subject
and unsatisfiability of the negated subject in two steps to improve error messages.SolverExceptionInterruptedExceptionpublic void isEquivalentTo(BooleanFormula expected) throws SolverException, InterruptedException
subject <=> expected always holds.
Will show a counterexample on failure.SolverExceptionInterruptedExceptionpublic void isEquisatisfiableTo(BooleanFormula other) throws SolverException, InterruptedException
SolverExceptionInterruptedExceptionpublic void implies(BooleanFormula expected) throws SolverException, InterruptedException
subject => expected always holds.
Will show a counterexample on failure.SolverExceptionInterruptedException