File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 5757;; Extracting raised values from checks
5858
5959(define (check-raise-value chk-thnk)
60- ;; To fully isolate the evaluation of a check inside another check,
61- ;; we have to ensure that 1) the inner check raises its failure normally
62- ;; instead of writing to stdout / stderr, 2) the inner check doesn't log
63- ;; any pass or fail information to rackunit/log, and 3) the inner check's info
64- ;; stack is independent of the outer check's info stack.
65- (or (parameterize ([current-check-handler raise]
66- [test-log-enabled? #f ]
67- [current-check-info (list)])
60+ ;; Checks called inside other checks raise their values normally and don't
61+ ;; log test failures, so all we have to do is ensure the check is executed
62+ ;; with an info stack that is independent of the outer check.
63+ (or (parameterize ([current-check-info (list)])
6864 (with-handlers ([(negate exn:break?) values]) (chk-thnk) #f ))
6965 (fail-check "Check passed unexpectedly " )))
7066
You can’t perform that action at this time.
0 commit comments