Fix printing records in clojurescript
This commit is contained in:
parent
49bdadd816
commit
a36032da5a
2 changed files with 7 additions and 11 deletions
|
@ -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
|
||||
|
|
15
test/fixtures/test_output_cljs
vendored
15
test/fixtures/test_output_cljs
vendored
|
@ -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:
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue