From d8022c5aba1216e5d2abae54875d6be48eac8dcf Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 23 Jul 2017 01:27:57 -0400 Subject: - Improved reporting on tests. --- stdlib/source/lux/test.lux | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index 1fa9b8b71..eabfe9811 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -47,14 +47,14 @@ (def: (fail message) (All [a] (-> Text Test)) - (:: Monad wrap [failure (format " Error: " (%t message))])) + (:: Monad wrap [failure (format " [Error] " (%t message))])) (def: #export (test message condition) {#;doc "Check that a condition is true, and fail with the given message otherwise."} (-> Text Bool Test) (if condition - (:: Monad wrap [success (format "Success: " (%t message))]) - (:: Monad wrap [failure (format " Error: " (%t message))]))) + (:: Monad wrap [success (format "[Success] " message)]) + (:: Monad wrap [failure (format " [Error] " message)]))) (def: #hidden (run' tests) (-> (List [Text (IO Test) Text]) (Promise Counters)) @@ -66,9 +66,8 @@ [#let [pre (io;run now)] [counters documentation] (io;run test) #let [post (io;run now) - _ (log! (format "Context: " (%t description) - " @ " module - " in " (%i (i.- pre post)) "ms" + _ (log! (format "@ " module " (" (%i (i.- pre post)) "ms" ") " "\n" + description "\n" "\n" documentation "\n"))]] (wrap counters))))) (M;seq @))] -- cgit v1.2.3