Created
August 25, 2026 19:34
-
-
Save technomancy/52ceb7b526a604c39e1b77becb2056b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From f52f77a2977baa165203a1cb57b766c4945f8ff6 Mon Sep 17 00:00:00 2001 | |
| From: Phil Hagelberg <phil@hagelb.org> | |
| Date: Tue, 25 Aug 2026 12:32:50 -0700 | |
| Subject: [PATCH] Include the name of the deftest in the :test fn in deftest. | |
| Without this you get nonsense in your stack frames and can't actually | |
| tell which deftest a given trace comes from. | |
| --- | |
| src/clj/clojure/test.clj | 2 +- | |
| 1 file changed, 1 insertion(+), 1 deletion(-) | |
| diff --git a/src/clj/clojure/test.clj b/src/clj/clojure/test.clj | |
| index 925ebe0f..d8da0d26 100644 | |
| --- a/src/clj/clojure/test.clj | |
| +++ b/src/clj/clojure/test.clj | |
| @@ -635,7 +635,7 @@ | |
| {:added "1.1"} | |
| [name & body] | |
| (when *load-tests* | |
| - `(def ~(vary-meta name assoc :test `(fn [] ~@body)) | |
| + `(def ~(vary-meta name assoc :test `(fn ~name [] ~@body)) | |
| (fn [] (test-var (var ~name)))))) | |
| (defmacro deftest- | |
| -- | |
| 2.47.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment