diff --git a/solve-classic/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/TestClassicNotUnify.kt b/solve-classic/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/TestClassicNotUnify.kt index f928e33d3..714ede7d5 100644 --- a/solve-classic/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/TestClassicNotUnify.kt +++ b/solve-classic/src/commonTest/kotlin/it/unibo/tuprolog/solve/systemtest/TestClassicNotUnify.kt @@ -10,39 +10,10 @@ import it.unibo.tuprolog.solve.stdlib.DefaultBuiltins import it.unibo.tuprolog.theory.Theory import kotlin.test.Test -class TestClassicNotUnify : TestNotUnify, SolverFactory { +class TestClassicNotUnify : TestNotUnify, SolverFactory by ClassicSolverFactory { private val prototype = TestNotUnify.prototype(this) - override val defaultBuiltins: AliasedLibrary - get() = DefaultBuiltins - - override fun solverOf( - libraries: Libraries, - flags: FlagStore, - staticKb: Theory, - dynamicKb: Theory, - stdIn: InputChannel, - stdOut: OutputChannel, - stdErr: OutputChannel, - warnings: OutputChannel - ) = Solver.classic( - libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings - ) - - override fun mutableSolverOf( - libraries: Libraries, - flags: FlagStore, - staticKb: Theory, - dynamicKb: Theory, - stdIn: InputChannel, - stdOut: OutputChannel, - stdErr: OutputChannel, - warnings: OutputChannel - ) = MutableSolver.classic( - libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings - ) - @Test override fun testNumberNotUnify() { prototype.testNumberNotUnify() diff --git a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/TestNotUnify.kt b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/TestNotUnify.kt index b37c0f135..4af291c14 100644 --- a/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/TestNotUnify.kt +++ b/test-solve/src/commonMain/kotlin/it/unibo/tuprolog/solve/TestNotUnify.kt @@ -1,23 +1,11 @@ package it.unibo.tuprolog.solve -interface TestNotUnify { - companion object{ +interface TestNotUnify : SolverTest { + companion object { fun prototype(solverFactory: SolverFactory): TestNotUnify = - TestNotUnifyImpl(solverFactory) + TestNotUnifyImpl(solverFactory) } - /** A short test max duration */ - val shortDuration: TimeDuration - get() = 250L - - /** A medium test max duration */ - val mediumDuration: TimeDuration - get() = 2 * shortDuration - - /** A long test max duration */ - val longDuration: TimeDuration - get() = 4 * mediumDuration - /** * Tests the query * ```prolog