mirror of
https://github.com/janet-lang/janet
synced 2025-09-10 14:56:08 +00:00
Added misc tests to increase test coverage
This commit is contained in:
@@ -14,9 +14,12 @@
|
||||
(++ num-tests-run)
|
||||
(when x (++ num-tests-passed))
|
||||
(def str (string e))
|
||||
(def frame (last (debug/stack (fiber/current))))
|
||||
(def line-info (string/format "%s:%d"
|
||||
(frame :source) (frame :source-line)))
|
||||
(if x
|
||||
(when is-verbose (eprintf "\e[32m✔\e[0m %s: %v" (describe e) x))
|
||||
(eprintf "\e[31m✘\e[0m %s: %v" (describe e) x))
|
||||
(when is-verbose (eprintf "\e[32m✔\e[0m %s: %s: %v" line-info (describe e) x))
|
||||
(eprintf "\e[31m✘\e[0m %s: %s: %v" line-info (describe e) x))
|
||||
x)
|
||||
|
||||
(defmacro assert-error
|
||||
|
Reference in New Issue
Block a user