52045b30aab0

Add a couple more unification tests
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 09 Mar 2016 11:36:04 +0000
parents a6a6f6361af3
children 49191daa42d0
branches/tags (none)
files test/paip.lisp

Changes

--- a/test/paip.lisp	Wed Mar 09 11:33:07 2016 +0000
+++ b/test/paip.lisp	Wed Mar 09 11:36:04 2016 +0000
@@ -27,14 +27,13 @@
   (not-unifies foo bar)
   (not-unifies a (a))
   (not-unifies (a) (a b))
-  (not-unifies () (a))
-  )
+  (not-unifies () (a)))
 
 (test variable-unification
   (unifies :x 1 ((:x . 1)))
-  (unifies :x 2 ((:x . 2)))
   (unifies :x a ((:x . a)))
   (unifies :x :y ((:x . :y)))
+  (unifies (:x (f :x)) (2 (f 2)) ((:x . 2)))
   (unifies (likes sally :thing)
            (likes :person cats)
            ((:thing . cats)
@@ -47,7 +46,9 @@
            (10 + (1 + 2))
            ((:x . 10)
             (:y . 1)
-            (:z . 2))))
+            (:z . 2)))
+  (not-unifies (:x :x) (1 2))
+  (not-unifies (:x :y :x) (1 1 3)))
 
 (test occurs-unification
   (not-unifies :x (f :x))