public abstract class SolverBasedTest0 extends Object
To run the tests using all available solvers, add the following code to your class:
@Parameters(name="{0}")
public static List<Object[]> getAllSolvers() {
return allSolversAsParameters();
}
@Parameter(0)
public Solvers solver;
@Override
protected Solvers solverToUse() {
return solver;
}
assertThatFormula(BooleanFormula) can be used to easily write assertions
about formulas using Truth.
Test that rely on a theory that not all solvers support
should call one of the require methods at the beginning.
| Modifier and Type | Field and Description |
|---|---|
protected ArrayFormulaManager |
amgr |
protected BooleanFormulaManager |
bmgr |
protected BitvectorFormulaManager |
bvmgr |
protected Configuration |
config |
protected SolverContext |
context |
protected SolverContextFactory |
factory |
protected UFManager |
fmgr |
protected FloatingPointFormulaManager |
fpmgr |
protected IntegerFormulaManager |
imgr |
protected LogManager |
logger |
protected FormulaManager |
mgr |
protected QuantifiedFormulaManager |
qmgr |
protected RationalFormulaManager |
rmgr |
| Constructor and Description |
|---|
SolverBasedTest0() |
| Modifier and Type | Method and Description |
|---|---|
protected ProverEnvironmentSubject |
assertThatEnvironment(BasicProverEnvironment<?> prover)
Use this for checking assertions about ProverEnvironments with Truth:
assertThatEnvironment(stack).is...(). |
protected BooleanFormulaSubject |
assertThatFormula(BooleanFormula formula)
Use this for checking assertions about BooleanFormulas with Truth:
assertThatFormula(formula).is...(). |
void |
closeSolver() |
protected ConfigurationBuilder |
createTestConfigBuilder() |
void |
initSolver() |
protected void |
requireArrays()
Skip test if the solver does not support arrays.
|
protected void |
requireBitvectors()
Skip test if the solver does not support bitvectors.
|
protected void |
requireFalse(String failureMessage) |
protected void |
requireFloats() |
protected void |
requireInterpolation() |
protected void |
requireOptimization()
Skip test if the solver does not support optimization.
|
protected void |
requireQuantifiers()
Skip test if the solver does not support quantifiers.
|
protected void |
requireRationals()
Skip test if the solver does not support rationals.
|
protected SolverContextFactory.Solvers |
solverToUse()
Return the solver to use in this test.
|
protected Configuration config
protected final LogManager logger
protected SolverContextFactory factory
protected SolverContext context
protected FormulaManager mgr
protected BooleanFormulaManager bmgr
protected UFManager fmgr
protected IntegerFormulaManager imgr
@Nullable protected RationalFormulaManager rmgr
@Nullable protected BitvectorFormulaManager bvmgr
@Nullable protected QuantifiedFormulaManager qmgr
@Nullable protected ArrayFormulaManager amgr
@Nullable protected FloatingPointFormulaManager fpmgr
protected SolverContextFactory.Solvers solverToUse()
protected ConfigurationBuilder createTestConfigBuilder()
protected final void requireRationals()
protected final void requireBitvectors()
protected final void requireQuantifiers()
protected final void requireArrays()
protected final void requireFloats()
protected final void requireOptimization()
protected final void requireInterpolation()
protected final void requireFalse(String failureMessage)
protected final BooleanFormulaSubject assertThatFormula(BooleanFormula formula)
assertThatFormula(formula).is...().protected final ProverEnvironmentSubject assertThatEnvironment(BasicProverEnvironment<?> prover)
assertThatEnvironment(stack).is...().