Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unbreak tests by fixing arity of some calls to =. #22

Merged
merged 1 commit into from
Sep 26, 2023
Merged
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
8 changes: 4 additions & 4 deletions test/defun/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
(* 2 x)))
(with-out-str
(is (= 4 (test1 2))))
(is (= "Square") (with-out-str (test1 2)))))
(is (= "Square\n" (with-out-str (test1 2))))))

(deftest test-meta
(testing "meta"
Expand All @@ -104,7 +104,7 @@
([name] (str "hello," name))
([a b] "unknown."))
(is (= "hello world" (-> #'hello meta :doc)))
(is (= '([name] [a b])) (-> #'hello meta :arglists))))
(is (= '([name] [a b]) (-> #'hello meta :arglists)))))

(deftest test-fun
(testing "fun"
Expand All @@ -131,12 +131,12 @@
([n ret] (recur (dec n) (+ n ret)))
([n] (recur n 0)))]
(is (= 30 (twice 15)))
(is (= 90) (six-times 15))
(is (= 90 (six-times 15)))
(is (= 5050 (accum 100))))
(is (nil? (resolve 'six-times)))
(is (nil? (resolve 'twice)))
(is (nil? (resolve 'accum)))
(letfun [(test3 ([[_ _ 2]] :a0)
([[1 1 3]] :a1)
([[1 2 3]] :a2))]
(is (= :a2) (test3 [1 2 3])))))
(is (= :a2 (test3 [1 2 3]))))))