diff options
author | Eduardo Julian | 2017-07-23 01:27:57 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-07-23 01:27:57 -0400 |
commit | d8022c5aba1216e5d2abae54875d6be48eac8dcf (patch) | |
tree | cf7ce3070c532985b62135552d86b72b71fa8c71 /stdlib/source | |
parent | 41f2e0c5dc17e939a73686ea3f54a251b6362141 (diff) |
- Improved reporting on tests.
Diffstat (limited to 'stdlib/source')
-rw-r--r-- | stdlib/source/lux/test.lux | 11 |
1 files changed, 5 insertions, 6 deletions
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<Promise> wrap [failure (format " Error: " (%t message))])) + (:: Monad<Promise> 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<Promise> wrap [success (format "Success: " (%t message))]) - (:: Monad<Promise> wrap [failure (format " Error: " (%t message))]))) + (:: Monad<Promise> wrap [success (format "[Success] " message)]) + (:: Monad<Promise> 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 @))] |