original commit: 35aca8462736f34c818d83d2da31e343b4557142
This commit is contained in:
Robby Findler 2001-04-02 22:23:11 +00:00
parent 70853d2a8c
commit 0d4b0d4b71
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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)))
failed-tests)]))