From 0d4b0d4b71b5cf8657cd48a2cd840a8e7c39ebc9 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 2 Apr 2001 22:23:11 +0000 Subject: [PATCH] ... original commit: 35aca8462736f34c818d83d2da31e343b4557142 --- collects/tests/framework/debug.ss | 5 +++-- collects/tests/framework/main.ss | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/collects/tests/framework/debug.ss b/collects/tests/framework/debug.ss index a2a606b1..48d4ee95 100644 --- a/collects/tests/framework/debug.ss +++ b/collects/tests/framework/debug.ss @@ -17,8 +17,9 @@ (define-syntax debug-printf (lambda (stx) (syntax-case stx () - [(_ flag rest ...) - (syntax (debug-when flag (printf rest ...)))]))) + [(_ flag fmt-string rest ...) + (with-syntax ([flag-name (format ">> ~a: " (syntax-object->datum (syntax flag)))]) + (syntax (debug-when flag (printf (string-append flag-name fmt-string) rest ...))))]))) (define-syntax debug-when (lambda (stx) diff --git a/collects/tests/framework/main.ss b/collects/tests/framework/main.ss index f74928e5..dbe0dda5 100644 --- a/collects/tests/framework/main.ss +++ b/collects/tests/framework/main.ss @@ -104,8 +104,11 @@ (shutdown-listener) - (unless (null? failed-tests) + (cond + [(null? failed-tests) + (printf "All tests passed.~n")] + [else (debug-printf schedule "FAILED tests:~n") (for-each (lambda (failed-test) (debug-printf schedule " ~a // ~a~n" (car failed-test) (cdr failed-test))) - failed-tests))) \ No newline at end of file + failed-tests)]))