commonMain.it.unibo.tuprolog.solve.TestCharCode.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
/**
* char_code Testing
*
* Contained requests:
* ```prolog
* ?- char_code(a,X).
* ?- char_code(X,97).
* ?- char_code(X,a).
* ?- char_code(g,104).
* ```
*/
interface TestCharCode : SolverTest {
companion object {
fun prototype(solverFactory: SolverFactory): TestCharCodeImpl = TestCharCodeImpl(solverFactory)
}
/**
* Tests the queries
* ```prolog
* ?- char_code(a,X).
* ```
* succeeds.
*
*/
fun testCharCodeSecondIsVar()
/**
* Tests the queries
* ```prolog
* ?- char_code(X,97).
* ```
* succeeds.
*
*/
fun testCharCodeFirstIsVar()
/**
* Tests the queries
* ```prolog
* ?- char_code(X,a).
* ```
* Fails.
*
*/
fun testCharCodeTypeError()
/**
* Tests the queries
* ```prolog
* ?- char_code(g,104).
* ```
* Fails.
*
*/
fun testCharCodeFails()
}