aboutsummaryrefslogtreecommitdiff
path: root/src/clojure
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure')
-rw-r--r--src/clojure/contrib/test_is.clj7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/clojure/contrib/test_is.clj b/src/clojure/contrib/test_is.clj
index eb0b4daa..02adbae8 100644
--- a/src/clojure/contrib/test_is.clj
+++ b/src/clojure/contrib/test_is.clj
@@ -106,7 +106,7 @@
(defmethod report :error [event msg expected actual]
(report-count :error)
- (println "\nERROR in" *test-name* msg)
+ (println "\nERROR in" *test-name*)
(when msg (println msg))
(println "expected:" (pr-str expected))
(println " actual:" (pr-str actual)))
@@ -230,7 +230,10 @@
(when-let [t (:test (meta v))]
(binding [*test-name* (str v)]
(report-count :test)
- (t))))
+ (try (t)
+ (catch Throwable e
+ (report :error "Uncaught exception, not in assertion."
+ nil e))))))
(defn test-ns
"Tests all vars in the namespace. Returns a map of counts