Make expanded syntax visible in test failures to aid debugging.
This commit is contained in:
parent
6bf7c4efd4
commit
4518ad855f
|
@ -34,13 +34,16 @@
|
||||||
[(_ expr ty) (syntax/loc stx (tc-e expr #:ret (ret ty)))]
|
[(_ expr ty) (syntax/loc stx (tc-e expr #:ret (ret ty)))]
|
||||||
[(id a #:ret b)
|
[(id a #:ret b)
|
||||||
(syntax/loc stx
|
(syntax/loc stx
|
||||||
(let ([res1 (phase1-phase0-eval
|
(let-values
|
||||||
|
([(res1 expanded)
|
||||||
|
(phase1-phase0-eval
|
||||||
(let ([ex (local-expand #'a 'expression null)])
|
(let ([ex (local-expand #'a 'expression null)])
|
||||||
(find-mutated-vars ex mvar-env)
|
(find-mutated-vars ex mvar-env)
|
||||||
#`'#,(tc-expr ex)))]
|
#`(values '#,(tc-expr ex) '#,(syntax->datum ex))))]
|
||||||
[res2 (phase1-phase0-eval #`'#,b)])
|
[(res2) (phase1-phase0-eval #`'#,b)])
|
||||||
|
(with-check-info (['expanded expanded])
|
||||||
(check-tc-result-equal? (format "~a ~a" (quote-line-number id) 'a)
|
(check-tc-result-equal? (format "~a ~a" (quote-line-number id) 'a)
|
||||||
res1 res2)))]))
|
res1 res2))))]))
|
||||||
|
|
||||||
(define tests
|
(define tests
|
||||||
(test-suite
|
(test-suite
|
||||||
|
|
Loading…
Reference in New Issue
Block a user