Checkpoint
This commit is contained in:
parent
23b2ce9362
commit
f9017da734
18 changed files with 814 additions and 412 deletions
|
@ -133,6 +133,21 @@ class LogicGrammarTests {
|
|||
assertEquals("invited/2", l2.functor, "Expected functor 'invited/2'")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `parse check_identical(X, Y)`() {
|
||||
var input = "check_identical(X, Y) :- X == Y."
|
||||
|
||||
assertDoesNotThrow {
|
||||
val result = parser.parseToEnd(input)
|
||||
}
|
||||
|
||||
input = "check_identical(X, Y) :- X = Y, !, write('X == Y succeeded'), nl."
|
||||
|
||||
assertDoesNotThrow {
|
||||
val result = parser.parseToEnd(input)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `parse constraints`() {
|
||||
val input = ":- a."
|
||||
|
|
Reference in a new issue