TestSolverConstructionImpl

class TestSolverConstructionImpl<T : Solver, MT : MutableSolver>(factory: SolverFactory, defaultBuiltIns: Library, solverType: KClass<T>, mutableSolverType: KClass<MT>) : TestSolverConstruction<T, MT>

Concrete implementation of TestSolverConstruction, instantiated via TestSolverConstruction.prototype. Holds solverType/mutableSolverType (captured reified by prototype) to assert the runtime class of solvers it builds, and two fixture groups: Dummy (a non-default library/theory/flags/channels configuration used by every "custom" test case) and Default (the configuration every "empty" test case expects a fresh solver to have).

Constructors

Link copied to clipboard
constructor(factory: SolverFactory, defaultBuiltIns: Library, solverType: KClass<T>, mutableSolverType: KClass<MT>)

Functions

Link copied to clipboard

Same as testBuildingCustomSolver, but calling .buildMutable(), expecting an MT.

Same as testBuildingCustomSolverWithDefaultBuiltins, but calling .buildMutable(), expecting an MT.

Link copied to clipboard
open override fun testBuildingCustomSolver()

Tests that SolverFactory.newBuilder().noBuiltins(), configured with a custom runtime, flags, static/dynamic theory and I/O channels, then .build(), returns a T matching that configuration (equivalent to testCreatingCustomSolver, but through the builder API).

Tests that SolverFactory.newBuilder(), configured with a custom runtime, flags, static/dynamic theory and I/O channels, then .build() (without calling .noBuiltins()), returns a T whose libraries are the custom runtime plus defaultBuiltins (equivalent to testCreatingCustomSolverWithDefaultBuiltins, but through the builder API).

Link copied to clipboard
open override fun testBuildingEmptyMutableSolver()

Same as testBuildingEmptySolver, but calling .buildMutable(), expecting an MT.

Link copied to clipboard
open override fun testBuildingEmptySolver()

Tests that SolverFactory.newBuilder().noBuiltins().build() returns a T with every default property (equivalent to testCreatingEmptySolver, but through the builder API).

Same as testBuildingSolverWithDefaultBuiltins, but calling .buildMutable(), expecting an MT.

Link copied to clipboard

Tests that SolverFactory.newBuilder().build() (without calling .noBuiltins()) returns a T whose only library is the suite's defaultBuiltins (equivalent to testCreatingSolverWithDefaultBuiltins, but through the builder API).

Link copied to clipboard

Same as testCreatingCustomSolver, but for SolverFactory.mutableSolverOf, expecting an MT.

Same as testCreatingCustomSolverWithDefaultBuiltins, but for SolverFactory.mutableSolverWithDefaultBuiltins, expecting an MT.

Link copied to clipboard
open override fun testCreatingCustomSolver()

Tests that SolverFactory.solverOf, called with an explicit custom library runtime, flags, static/dynamic theory and I/O channels, returns a T configured with exactly those values (and no default built-ins).

Tests that SolverFactory.solverWithDefaultBuiltins, called with an explicit custom library runtime, flags, static/dynamic theory and I/O channels, returns a T whose libraries are the custom runtime plus the suite's defaultBuiltins, with every other property matching the custom configuration.

Link copied to clipboard
Link copied to clipboard
open override fun testCreatingEmptySolver()

Tests that SolverFactory.solverOf, called with no argument, returns a T with every default property.

Same as testCreatingSolverWithDefaultBuiltins, but for SolverFactory.mutableSolverWithDefaultBuiltins, expecting an MT.

Link copied to clipboard

Tests that SolverFactory.solverWithDefaultBuiltins(), called with no argument, returns a T whose only library is the suite's defaultBuiltins, with every other property left at its default.