All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.it.unibo.tuprolog.solve.TestRepeatImpl.kt Maven / Gradle / Ivy

package it.unibo.tuprolog.solve

import it.unibo.tuprolog.dsl.theory.prolog

internal class TestRepeatImpl(private val solverFactory: SolverFactory) : TestRepeat {
    override fun testRepeat() {
        prolog {
            val solver = solverFactory.solverWithDefaultBuiltins()

            val query = (repeat and "!" and fail)
            val solutions = solver.solve(query, mediumDuration).toList()

            assertSolutionEquals(
                kotlin.collections.listOf(query.no()),
                solutions
            )
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy