Skip to content

Commit e5e7e84

Browse files
committed
Update check-raise-value
1 parent 8efcbe5 commit e5e7e84

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

rackunit-lib/rackunit/meta.rkt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@
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

0 commit comments

Comments
 (0)