Fix contract profiler tests to test more.

This commit is contained in:
Vincent St-Amour 2014-01-08 13:45:11 -05:00
parent 889ad57fff
commit cc0e67638c

View File

@ -1,5 +1,7 @@
#lang racket/base
(require racket/port)
(provide (all-defined-out))
(struct contract-profile
@ -25,7 +27,9 @@
(define dry-run? (make-parameter #f))
(define-syntax-rule (with-output-to-report-file file body ...)
(unless (dry-run?)
(with-output-to-file file
#:exists 'replace
(lambda () body ...))))
(if (dry-run?)
(parameterize ([current-output-port (open-output-nowhere)])
body ...)
(with-output-to-file file
#:exists 'replace
(lambda () body ...))))