From 3ccff8b406fa5b030e6549c8fa1ba507870f31fb Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sun, 16 May 2021 01:32:52 -0400 Subject: [PATCH] Partially fix failure. Related to #138. --- rackunit-lib/rackunit/private/check.rkt | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/rackunit-lib/rackunit/private/check.rkt b/rackunit-lib/rackunit/private/check.rkt index f313632..5c4b29e 100644 --- a/rackunit-lib/rackunit/private/check.rkt +++ b/rackunit-lib/rackunit/private/check.rkt @@ -93,7 +93,7 @@ (define-simple-macro (make-check-func (name:id formal:id ...) #:public-name pub:id body:expr ...) (λ (#:location [location (list 'unknown #f #f #f #f)] #:expression [expression 'unknown] - #:check-around [check-around current-check-around]) + #:check-around [check-around (current-check-around)]) (procedure-rename (λ (formal ... [message #f]) (define infos @@ -115,19 +115,21 @@ (syntax-parse stx [(chk . args) #`(let ([location (syntax->location #'loc)]) - (with-default-check-info* - (list (make-check-name 'name) - (make-check-location location) - (make-check-expression '(chk . args))) - #,(syntax/loc #'loc - (λ () - ((current-check-around) - (λ () - ((check-impl #:location location - #:expression '(chk . args) - #:check-around (λ () (λ (f) (f)))) - . args)))))))] - [chk:id + #,(syntax/loc #'loc + (λ () + ((current-check-around) + (λ () + (call-with-values + (lambda () + (with-default-check-info* + (list (make-check-name 'name) + (make-check-location location) + (make-check-expression '(chk . args))) + (values . args))) + (check-impl #:location location + #:expression '(chk . args) + #:check-around (λ (f) (f)))))))))] + [chk:id #'(check-impl #:location (syntax->location #'loc) #:expression 'chk)])))))