Skip to content

Commit

Permalink
Flesh out TaggedValue tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Sep 24, 2014
1 parent 6dbc36b commit 9e85ca8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/puget/printer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@


(deftest canonical-tagged-value
(let [tval (reify TaggedValue
(edn-tag [this] 'foo)
(edn-value [this] :bar/baz))
doc (canonize tval)]))
(let [tv (reify TaggedValue
(edn-tag [this] 'foo)
(edn-value [this] :bar/baz))]
(is (= "#foo :bar/baz" (pprint-str tv))))
(let [tv (reify TaggedValue
(edn-tag [this] 'frobble/biznar)
(edn-value [this] [:foo :bar :baz]))]
(is (= "#frobble/biznar\n[:foo :bar :baz]" (pprint-str tv)))))


(deftest default-canonize
Expand Down

0 comments on commit 9e85ca8

Please sign in to comment.