rt: add deftask* and untabify sources
deftask* evaluates result agument. Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
parent
18ee04ed2f
commit
563c362df3
1 changed files with 96 additions and 93 deletions
|
|
@ -23,8 +23,8 @@
|
|||
(:nicknames :rt :regression-test :rtest)
|
||||
(:use #:cl)
|
||||
(:export #:*do-tests-when-defined* #:*test* #:continue-testing
|
||||
#:deftest #:do-test #:do-tests #:get-test #:pending-tests
|
||||
#:rem-all-tests #:rem-test)
|
||||
#:deftest #:deftest* #:do-test #:do-tests #:get-test
|
||||
#:pending-tests #:rem-all-tests #:rem-test)
|
||||
(:documentation "The MIT regression tester"))
|
||||
|
||||
(in-package :sb-rt)
|
||||
|
|
@ -86,6 +86,9 @@
|
|||
(defmacro deftest (name form &rest values)
|
||||
`(add-entry '(t ,name ,form .,values)))
|
||||
|
||||
(defmacro deftest* (name form result)
|
||||
`(deftest ,name ,form ,@(eval result)))
|
||||
|
||||
(defun add-entry (entry)
|
||||
(setq entry (copy-list entry))
|
||||
(do ((l *entries* (cdr l))) (nil)
|
||||
|
|
@ -108,7 +111,7 @@
|
|||
(apply #'format t args)
|
||||
(if error? (throw '*debug* nil)))
|
||||
(error? (apply #'error args))
|
||||
(t (apply #'warn args))))
|
||||
(t (apply #'format t args))))
|
||||
|
||||
(defun do-test (&optional (name *test*))
|
||||
(do-entry (get-entry name)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue