changelog shortlog graph tags branches changeset file revisions annotate raw help

Mercurial > core / lisp/lib/rt/pkg.lisp

revision 211: f9e0d78b7458
parent 110: cae8da4b1415
child 215: 0d11384aae81
     1.1--- a/lisp/lib/rt/pkg.lisp	Sat Feb 17 18:41:47 2024 -0500
     1.2+++ b/lisp/lib/rt/pkg.lisp	Sat Feb 17 21:01:56 2024 -0500
     1.3@@ -563,6 +563,15 @@
     1.4       ;; return values (PASS? LOCKED)
     1.5       (values (not fails) locked))))
     1.6 
     1.7+(defmethod do-suite ((self string) &key stream)
     1.8+  (do-suite (ensure-suite self) :stream stream))
     1.9+
    1.10+(defmethod do-suite ((self symbol) &key stream)
    1.11+  (do-suite (ensure-suite self) :stream stream))
    1.12+
    1.13+(defmethod do-suite ((self null) &key stream)
    1.14+  (do-suite *test-suite* :stream stream))
    1.15+
    1.16 ;;; Checks
    1.17 (flet ((%test (val form)
    1.18 	 (let ((r 
    1.19@@ -574,7 +583,7 @@
    1.20   (defmacro is (test &rest args)
    1.21     "The DWIM Check.
    1.22 
    1.23-(is (= 1 1) :test 100) ;=> #S(TEST-RESULT :TAG :PASS :FORM (= 1 1))
    1.24+(is (= 1 1)) ;=> #S(TEST-RESULT :TAG :PASS :FORM (= 1 1))
    1.25 If TEST returns a truthy value, return a PASS test-result, else return
    1.26 a FAIL. The TEST is parameterized by ARGS which is a plist or nil.
    1.27 
    1.28@@ -647,12 +656,11 @@
    1.29   (destructuring-bind (pr doc dec fn)
    1.30       (multiple-value-bind (forms dec doc)
    1.31 	  ;; parse body with docstring allowed
    1.32-	  (sb-int:parse-body
    1.33-	   (or body) t)
    1.34+	  (sb-int:parse-body (or body) t)
    1.35 	`(,props ',doc ',dec ',forms))
    1.36     ;; TODO 2023-09-21: parse plist
    1.37     `(let ((obj (make-test
    1.38-		 :name ',(format nil "~A" name)
    1.39+		 :name ,(format nil "~A" name)
    1.40 		 ;; note: we could leave these unbound if we want,
    1.41 		 ;; personal preference
    1.42 		 :form ,fn
    1.43@@ -682,20 +690,3 @@
    1.44   (assert-suite name)
    1.45   `(progn
    1.46      (setq *test-suite* (ensure-suite ,name))))
    1.47-
    1.48-;;; Coverage
    1.49-(defmacro enable-coverage ()
    1.50-  `(declaim (optimize store-coverage-data)))
    1.51-
    1.52-(defun disable-coverage ()
    1.53-  `(declaim (optimize (sb-cover:store-coverage-data 0))))
    1.54-
    1.55-(defmacro with-coverage (&body body)
    1.56-  `(progn
    1.57-     (enable-coverage)
    1.58-     ,@body
    1.59-     (disable-coverage)))
    1.60-
    1.61-(defun coverage-report ()
    1.62-  "Generate a coverage report."
    1.63-  (sb-cover:report *coverage-directory*))