Mercurial > hg > xemacs-beta
diff tests/automated/test-harness.el @ 1413:aa15a2bbba1a
[xemacs-hg @ 2003-04-15 15:56:56 by stephent]
known bug status changes and new macros
<87r883bvuy.fsf@tleepslib.sk.tsukuba.ac.jp>
<87u1czbvzo.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 15 Apr 2003 15:56:58 +0000 |
parents | 3f6adebda25c |
children | 74cb069b8417 |
line wrap: on
line diff
--- a/tests/automated/test-harness.el Mon Apr 14 21:52:31 2003 +0000 +++ b/tests/automated/test-harness.el Tue Apr 15 15:56:58 2003 +0000 @@ -33,7 +33,8 @@ ;;; Assert, Check-Error, Check-Message, and Check-Error-Message functions ;;; to create tests. See `test-harness-from-buffer' below. ;;; Don't suppress tests just because they're due to known bugs not yet -;;; fixed -- use the Known-Bug-Expect-Failure wrapper macro to mark them. +;;; fixed -- use the Known-Bug-Expect-Failure and +;;; Implementation-Incomplete-Expect-Failure wrapper macros to mark them. ;;; A lot of the tests we run push limits; suppress Ebola message with the ;;; Ignore-Ebola wrapper macro. ;;; @@ -142,23 +143,26 @@ (with-output-to-temp-buffer "*Test-Log*" (princ (format "Testing %s...\n\n" filename)) - (defconst test-harness-expect-bug nil) + (defconst test-harness-failure-tag "FAIL") + (defconst test-harness-success-tag "PASS") (defmacro Known-Bug-Expect-Failure (&rest body) - `(let ((test-harness-expect-bug t)) ,@body)) + `(let ((test-harness-failure-tag "KNOWN BUG") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + ,@body)) + + (defmacro Implementation-Incomplete-Expect-Failure (&rest body) + `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + ,@body)) (defun Print-Failure (fmt &rest args) - (setq fmt (format "%s: %s" - (if test-harness-expect-bug - "KNOWN BUG" - "FAIL") - fmt)) + (setq fmt (format "%s: %s" test-harness-failure-tag fmt)) (if (noninteractive) (apply #'message fmt args)) (princ (concat (apply #'format fmt args) "\n"))) (defun Print-Pass (fmt &rest args) - (setq fmt (concat "PASS: " fmt)) - ;; #### should warn if expecting failure here! + (setq fmt (format "%s: %s" test-harness-success-tag fmt)) (and test-harness-verbose (princ (concat (apply #'format fmt args) "\n"))))