Skip to content

Commit

Permalink
ex er cise
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrink10 committed Jun 26, 2021
1 parent 6002612 commit 4f2b21a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/basilisp/test_multifn.lpy
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
"operating system")

(deftest multimethod-with-hierarchies-test
(testing "cannot create multimethod with non-reference type hierarchy"
(is (thrown? basilisp.lang.runtime/RuntimeException
(defmulti real-fn :os :hierarchy (make-hierarchy)))))

(let [m {:os :os/osx}]
(is (= "unix" (os-lineage m)))
(is (= "unix" (os-lineage m))) ;; check again (should be a cache hit)
Expand Down

0 comments on commit 4f2b21a

Please sign in to comment.