Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cljc/matcher_combinators/printer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
(colorized-print markup)
(pprint/simple-dispatch markup))))

(defrecord EllisionMarker [])
(defrecord EllisionMarker []
#?@(:clj [Comparable
(compareTo [_ _] 1)]))
(defmethod markup-expression EllisionMarker [_] '...)
(def ellision-marker (EllisionMarker.))

Expand Down
9 changes: 9 additions & 0 deletions test/clj/matcher_combinators/config_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,12 @@
(:matcher-combinators.result/value
(c/match [#{2}] [#{1 2}])))))
(config/disable-abbreviation!))

(deftest abbreviated-predicate-mismatch-output-test
(config/enable-abbreviation!)
(is (string?
(printer/as-string
(:matcher-combinators.result/value
(c/match {:a list?}
{:a (into [] (repeat 400 :a))})))))
(config/disable-abbreviation!))