Class SolverBasedTest0

  • Direct Known Subclasses:
    SolverBasedTest0.ParameterizedSolverBasedTest0

    public abstract class SolverBasedTest0
    extends Object
    Abstract base class with helpful utilities for writing tests that use an SMT solver. It instantiates and closes the SMT solver before and after each test, and provides fields with direct access to the most relevant instances.

    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.