(use testament)
(import /fugue)
(import /test-support/a)
(import /test-support/b)
(deftest multiple-file-multi-extend
(is (= 11 (a/f 10))))
(deftest namespaced-allocations
(let [a-b (:new b/B)]
(fugue/allocate a-b :base-attr "base")
(fugue/allocate a-b :child-attr "child")
(is (= (a/A :base-attr) "base"))
(is (= (a-b :base-attr) "base"))
(is (= (b/B :child-attr) "child"))
(is (= (a-b :child-attr) "child"))))
(deftest overlapping-defmultis
(is (= "ok!" (a/g "ok")))
# g was defined for strings in a, but not b.
(is (thrown? (b/g "ok")))
(is (= 12 (b/g 10))))
(deftest declare-open-with-fallback-in-first-module
(is (= 2 (a/h 1)))
(is (= :ok (a/h :ok)))
(is (= "myname" (a/h (b/new-B :name "myname")))))
(run-tests!)