From 2c210a37c68304ec9111007af34ce6309dd0701c Mon Sep 17 00:00:00 2001 From: Konrad Mrożek <konrad.mrozek@shareablee.com> Date: Thu, 15 Jun 2023 09:03:25 +0000 Subject: [PATCH] Support for expected and actual --- clojure/src/test_runner.clj | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/clojure/src/test_runner.clj b/clojure/src/test_runner.clj index b38513b..d7c5118 100644 --- a/clojure/src/test_runner.clj +++ b/clojure/src/test_runner.clj @@ -16,7 +16,9 @@ first meta :file)] - (println (str "FAIL:" source-file ":" (:line m) ":" (t/testing-vars-str m) ":" (t/testing-contexts-str) ":" (:message m "FAIL")))))) + (println (str "FAIL:" source-file ":" (:line m) ":" (t/testing-vars-str m) ":" (t/testing-contexts-str) ":" (:message m "FAIL"))) + (println (str "FAIL-CONTINUE:EXPECTED:" (pr-str (:expected m)))) + (println (str "FAIL-CONTINUE:ACTUAL:" (pr-str (:actual m))))))) (defmethod emacs-report :error [m] @@ -24,7 +26,12 @@ first meta :file)] - (println (str "ERROR:" source-file ":" (:line m) ":" (t/testing-vars-str m) ":" (t/testing-contexts-str) ":" (:message m "FAIL"))))) + (println (str "ERROR:" source-file ":" (:line m) ":" (t/testing-vars-str m) ":" (t/testing-contexts-str) ":" (:message m "FAIL"))) + (println (str "ERROR-CONTINUE:EXPECTED:" (pr-str (:expected m)))) + (println (str "ERROR-CONTINUE:ACTUAL:" + (if (instance? Throwable (:actual m)) + (ex-message (:actual m)) + (pr-str (:actual m))))))) (defmethod emacs-report :default [_]) -- Gitblit v1.9.3