Mercurial > hg > xemacs-beta
comparison tests/automated/test-harness.el @ 4323:94509abd0ef0
Commit a forgotten chunk of 4d0f773d5e21.
This is the change to the file tests/automated/test-harness.el. See the
tests/ChangeLog of that commit,
http://mid.gmane.org/E1J1MtP-0000bo-Vw@alioth.debian.org for the details.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 11 Dec 2007 21:41:54 +0100 |
parents | 3660d327399f |
children | 7b628daa39d4 |
comparison
equal
deleted
inserted
replaced
4322:f70e56bb52a7 | 4323:94509abd0ef0 |
---|---|
201 | 201 |
202 (defmacro Known-Bug-Expect-Failure (&rest body) | 202 (defmacro Known-Bug-Expect-Failure (&rest body) |
203 `(let ((test-harness-failure-tag "KNOWN BUG") | 203 `(let ((test-harness-failure-tag "KNOWN BUG") |
204 (test-harness-success-tag "PASS (FAILURE EXPECTED)")) | 204 (test-harness-success-tag "PASS (FAILURE EXPECTED)")) |
205 ,@body)) | 205 ,@body)) |
206 | 206 |
207 (defmacro Known-Bug-Expect-Error (expected-error &rest body) | |
208 (let ((quoted-body (if (= 1 (length body)) | |
209 `(quote ,(car body)) `(quote (progn ,@body))))) | |
210 `(let ((test-harness-failure-tag "KNOWN BUG") | |
211 (test-harness-success-tag "PASS (FAILURE EXPECTED)")) | |
212 (condition-case error-info | |
213 (progn | |
214 (setq trick-optimizer (progn ,@body)) | |
215 (Print-Pass | |
216 "%S executed successfully, but expected error %S" | |
217 ,quoted-body | |
218 ',expected-error) | |
219 (incf passes)) | |
220 (,expected-error | |
221 (Print-Failure "%S ==> error %S, as expected" | |
222 ,quoted-body ',expected-error) | |
223 (incf no-error-failures)) | |
224 (error | |
225 (Print-Failure "%S ==> expected error %S, got error %S instead" | |
226 ,quoted-body ',expected-error error-info) | |
227 (incf wrong-error-failures)))))) | |
228 | |
207 (defmacro Implementation-Incomplete-Expect-Failure (&rest body) | 229 (defmacro Implementation-Incomplete-Expect-Failure (&rest body) |
208 `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") | 230 `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") |
209 (test-harness-success-tag "PASS (FAILURE EXPECTED)")) | 231 (test-harness-success-tag "PASS (FAILURE EXPECTED)")) |
210 ,@body)) | 232 ,@body)) |
211 | 233 |
335 (incf other-failures))) | 357 (incf other-failures))) |
336 (ad-unadvise 'message))))) | 358 (ad-unadvise 'message))))) |
337 | 359 |
338 ;; #### Perhaps this should override `message' itself, too? | 360 ;; #### Perhaps this should override `message' itself, too? |
339 (defmacro Silence-Message (&rest body) | 361 (defmacro Silence-Message (&rest body) |
340 `(flet ((append-message (&rest args) ())) ,@body)) | 362 `(flet ((append-message (&rest args) ()) |
363 (clear-message (&rest args) ())) | |
364 ,@body)) | |
341 | 365 |
342 (defmacro Ignore-Ebola (&rest body) | 366 (defmacro Ignore-Ebola (&rest body) |
343 `(let ((debug-issue-ebola-notices -42)) ,@body)) | 367 `(let ((debug-issue-ebola-notices -42)) ,@body)) |
344 | 368 |
345 (defun Int-to-Marker (pos) | 369 (defun Int-to-Marker (pos) |