Skip to content

Commit 3ccff8b

Browse files
committed
Partially fix failure.
Related to racket#138.
1 parent f943648 commit 3ccff8b

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

rackunit-lib/rackunit/private/check.rkt

+16-14
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
(define-simple-macro (make-check-func (name:id formal:id ...) #:public-name pub:id body:expr ...)
9494
(λ (#:location [location (list 'unknown #f #f #f #f)]
9595
#:expression [expression 'unknown]
96-
#:check-around [check-around current-check-around])
96+
#:check-around [check-around (current-check-around)])
9797
(procedure-rename
9898
(λ (formal ... [message #f])
9999
(define infos
@@ -115,19 +115,21 @@
115115
(syntax-parse stx
116116
[(chk . args)
117117
#`(let ([location (syntax->location #'loc)])
118-
(with-default-check-info*
119-
(list (make-check-name 'name)
120-
(make-check-location location)
121-
(make-check-expression '(chk . args)))
122-
#,(syntax/loc #'loc
123-
(λ ()
124-
((current-check-around)
125-
(λ ()
126-
((check-impl #:location location
127-
#:expression '(chk . args)
128-
#:check-around (λ () (λ (f) (f))))
129-
. args)))))))]
130-
[chk:id
118+
#,(syntax/loc #'loc
119+
(λ ()
120+
((current-check-around)
121+
(λ ()
122+
(call-with-values
123+
(lambda ()
124+
(with-default-check-info*
125+
(list (make-check-name 'name)
126+
(make-check-location location)
127+
(make-check-expression '(chk . args)))
128+
(values . args)))
129+
(check-impl #:location location
130+
#:expression '(chk . args)
131+
#:check-around (λ (f) (f)))))))))]
132+
[chk:id
131133
#'(check-impl #:location (syntax->location #'loc)
132134
#:expression 'chk)])))))
133135

0 commit comments

Comments
 (0)