@@ -4,7 +4,7 @@ package io.github.kelvindev15.dsl
4
4
import io .github .kelvindev15 .prolog .core .Constant .Atom
5
5
import io .github .kelvindev15 .prolog .core .Struct .{Directive , Fact , Rule }
6
6
import io .github .kelvindev15 .prolog .core .Variable .anonymous
7
- import io .github .kelvindev15 .prolog .core .{Constant , RecursiveStruct , Struct , Term , Variable }
7
+ import io .github .kelvindev15 .prolog .core .{Constant , PrologList , RecursiveStruct , Struct , Term , Variable }
8
8
import io .github .kelvindev15 .prolog .dsl .PrologDSL
9
9
import org .scalatest .funsuite .AnyFunSuite
10
10
import org .scalatest .matchers .should .Matchers
@@ -53,3 +53,9 @@ class TestDSL extends AnyFunSuite with Matchers with PrologDSL:
53
53
54
54
test(" Alternative syntax for pipe notation" ):
55
55
(head(1 , 2 , 3 , 4 ) | T ) shouldBe cons(1 , 2 , 3 , 4 )(T )
56
+
57
+ test(" Sequence of terms as a PrologList" ):
58
+ val toBeMatched = PrologList (H , " a" , " b" , 1 , 2 )
59
+ val list = cons(H , Seq [Term ](" a" , " b" , 1 , 2 ))
60
+ list shouldBe toBeMatched
61
+ cons(H , head(" a" , " b" , 1 , 2 )) shouldBe list
0 commit comments