Skip to content

Commit

Permalink
LOGIC-63: fix CLJS broken tests. LCons typo: -withMeta -> -with-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
David Nolen authored and David Nolen committed Oct 26, 2012
1 parent e0b280f commit 371c035
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/main/clojure/cljs/core/logic.cljs
Expand Up @@ -294,7 +294,7 @@
(-meta [this]
meta)
IWithMeta
(-withMeta [this new-meta]
(-with-meta [this new-meta]
(LCons. a d new-meta))
LConsSeq
(-lfirst [_] a)
Expand Down
36 changes: 12 additions & 24 deletions src/test/cljs/cljs/core/logic/tests.cljs
Expand Up @@ -839,22 +839,16 @@
'[(1 2) 3]))

; test-unifier-4
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (unifier '(?x . ?y) '(1 . ?z))
; (lcons 1 '_.0)))
(assert (= (unifier '(?x . ?y) '(1 . ?z))
(lcons 1 '_.0)))

; test-unifier-5
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (unifier '(?x 2 . ?y) '(1 2 3 4 5))
; '(1 2 3 4 5)))
(assert (= (unifier '(?x 2 . ?y) '(1 2 3 4 5))
'(1 2 3 4 5)))

; test-unifier-6
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (unifier '(?x 2 . ?y) '(1 9 3 4 5))
; nil))
(assert (= (unifier '(?x 2 . ?y) '(1 9 3 4 5))
nil))

; test-binding-map-1
(assert (= (binding-map '(?x ?y) '(1 2))
Expand All @@ -869,22 +863,16 @@
'{?x 1 ?y (2)}))

; test-binding-map-4
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (binding-map '(?x . ?y) '(1 . ?z))
; '{?z _.0, ?x 1, ?y _.0}))
(assert (= (binding-map '(?x . ?y) '(1 . ?z))
'{?z _.0, ?x 1, ?y _.0}))

; test-binding-map-5
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (binding-map '(?x 2 . ?y) '(1 2 3 4 5))
; '{?x 1 ?y (3 4 5)}))
(assert (= (binding-map '(?x 2 . ?y) '(1 2 3 4 5))
'{?x 1 ?y (3 4 5)}))

; test-binding-map-6
;; Currently failes with:
; Error: No protocol method IWithMeta.-with-meta defined for type object: [object Object]
;(assert (= (binding-map '(?x 2 . ?y) '(1 9 3 4 5))
; nil))
(assert (= (binding-map '(?x 2 . ?y) '(1 9 3 4 5))
nil))

;; -----------------------------------------------------------------------------
;; Occurs Check
Expand Down

0 comments on commit 371c035

Please sign in to comment.