File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
rackunit-lib/rackunit/private Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 104
104
(with-default-check-info* infos
105
105
(λ () ((current-check-around) (λ () body ... (void))))))
106
106
'pub )))
107
+
107
108
108
109
(define-simple-macro (define-check (name:id formal:id ... ) body:expr ... )
109
110
(begin
112
113
(with-syntax ([loc (datum->syntax #f 'loc stx)])
113
114
(syntax-parse stx
114
115
[(chk . args)
115
- #'((check-impl #:location (syntax->location #'loc )
116
- #:expression '(chk . args))
117
- . args)]
116
+ #'(let ([location (syntax->location #'loc )])
117
+ (with-default-check-info*
118
+ (list (make-check-location location)
119
+ (make-check-expression '(chk . args)))
120
+ (λ ()
121
+ ((current-check-around)
122
+ (λ () ((check-impl #:location location
123
+ #:expression '(chk . args))
124
+ . args))))))]
118
125
[chk:id
119
126
#'(check-impl #:location (syntax->location #'loc )
120
127
#:expression 'chk )])))))
Original file line number Diff line number Diff line change 121
121
(display-raised-message e)]
122
122
[else
123
123
(display-raised-summary "ERROR " e)
124
+ (display-check-info-stack (current-check-info)
125
+ #:verbose? verbose?)
124
126
(display-raised-message e)])
125
127
(display-delimiter)))
126
128
You can’t perform that action at this time.
0 commit comments