Checkpoint

This commit is contained in:
Tibo De Peuter 2025-05-02 13:28:00 +02:00
parent 23b2ce9362
commit f9017da734
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
18 changed files with 814 additions and 412 deletions

View file

@ -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."