aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2009-01-15 16:41:20 +0000
committerStuart Sierra <mail@stuartsierra.com>2009-01-15 16:41:20 +0000
commit76d245f934d70bcc9484894fba7b807949358652 (patch)
tree7acf2880a35c7ac41353cef05d45db533e399204 /src
parent9cbfd4ed3a438d87e0ba5903c50cab6bcf89d3ca (diff)
test_is.clj: print stack traces for exceptions
Diffstat (limited to 'src')
-rw-r--r--src/clojure/contrib/test_is.clj8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/clojure/contrib/test_is.clj b/src/clojure/contrib/test_is.clj
index dde7a410..b6328cf0 100644
--- a/src/clojure/contrib/test_is.clj
+++ b/src/clojure/contrib/test_is.clj
@@ -72,7 +72,8 @@
(ns clojure.contrib.test-is
- (:require [clojure.contrib.template :as temp]))
+ (:require [clojure.contrib.template :as temp]
+ [clojure.contrib.stacktrace :as stack]))
(def *report-counters* nil) ; bound to a ref of a map in test-ns
@@ -142,7 +143,10 @@
(when (seq *testing-contexts*) (println (testing-contexts-str)))
(when msg (println msg))
(println "expected:" (pr-str expected))
- (println " actual:" (pr-str actual)))
+ (print " actual: ")
+ (if (instance? Throwable actual)
+ (stack/print-cause-trace actual 5)
+ (prn actual)))