Permalink
Browse files

CLJS-800: Extend PersistentQueueSeq with IPrintWithWriter

  • Loading branch information...
1 parent 4740fc5 commit 2907190e5414fd53a0e0a07424f342360eb31ed9 @tessellator tessellator committed with swannodette Apr 18, 2014
Showing with 6 additions and 0 deletions.
  1. +3 −0 src/cljs/cljs/core.cljs
  2. +3 −0 test/cljs/cljs/core_test.cljs
View
3 src/cljs/cljs/core.cljs
@@ -7005,6 +7005,9 @@ reduces them without incurring seq initialization"
PersistentQueue
(-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "#queue [" " " "]" opts (seq coll)))
+ PersistentQueueSeq
+ (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll))
+
PersistentTreeMapSeq
(-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll))
View
3 test/cljs/cljs/core_test.cljs
@@ -1795,6 +1795,9 @@
uuid (UUID. uuid-str)]
(assert (= (pr-str uuid) (str "#uuid \"" uuid-str "\""))))
+ ;;; pr-str PersistentQueueSeq - CLJS-800
+ (assert (= (pr-str (rest (conj cljs.core.PersistentQueue.EMPTY 1 2 3))) "(2 3)"))
+
;; CLJS-405
(defprotocol IBar (-bar [this x]))

0 comments on commit 2907190

Please sign in to comment.