Fix printing records in clojurescript

This commit is contained in:
Miloslav Nenadal 2016-02-27 17:40:27 +01:00
parent 49bdadd816
commit a36032da5a
2 changed files with 7 additions and 11 deletions

View file

@ -7,7 +7,8 @@
(defn- print-seq [aseq]
(pp/pprint-logical-block
(pp/write-out (ffirst aseq))
(print " ")
#?(:clj (print " ")
:cljs (-write *out* " "))
(pp/pprint-newline :linear)
;; [pjs] this is kind of ugly, but it is a private var :(
;; always print both parts of the [k v] pair

View file

@ -128,12 +128,10 @@ Testing pjstadig.humane-test-output.records-test
FAIL in (t-records) (:)
THESE TESTS ARE INTENDED TO FAIL these should not print as plain maps
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
actual:
#pjstadig.humane-test-output.records-test.ARecord{:foo:bar}
#pjstadig.humane-test-output.records-test.ARecord{:foo :bar}
diff:
-
@ -146,8 +144,7 @@ expected:
FAIL in (t-records) (:)
THESE TESTS ARE INTENDED TO FAIL there should be a diff here
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
actual:
{:foo :foo}
@ -158,12 +155,10 @@ expected:
FAIL in (t-records) (:)
THESE TESTS ARE INTENDED TO FAIL and here
expected:
#pjstadig.humane-test-output.records-test.ARecord{:foo:foo}
#pjstadig.humane-test-output.records-test.ARecord{:foo :foo}
actual:
#pjstadig.humane-test-output.records-test.BRecord{:foo:foo}
#pjstadig.humane-test-output.records-test.BRecord{:foo :foo}
diff:
+