commonMain.it.unibo.tuprolog.solve.TestTrueImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of test-solve Show documentation
Show all versions of test-solve Show documentation
Common testing facilities for 2P-Kt-based logic solvers
package it.unibo.tuprolog.solve
import it.unibo.tuprolog.dsl.theory.logicProgramming
internal class TestTrueImpl(private val solverFactory: SolverFactory) : TestTrue {
override fun testTrue() {
logicProgramming {
val solver = solverFactory.solverWithDefaultBuiltins()
val query = atomOf("true")
val solutions = solver.solve(query, mediumDuration).toList()
assertSolutionEquals(
kotlin.collections.listOf(query.yes()),
solutions,
)
}
}
}