a hack to work around what appears to be just a wrong way of doing things, but will ask Noel later.

The basic problem is that (with-check-info* '() (lambda () ...whatever...)) can, in some cases,
double the information that is recorded in a failed test case. Probably the right thing is
to use a parameter or something instead of using continuation marks directly.
This commit is contained in:
Robby Findler 2010-08-14 21:32:40 -05:00
parent b56019c275
commit 8ece97219a

View File

@ -24,7 +24,11 @@
;; (continuation-mark-set -> (listof check-info))
(define (check-info-stack marks)
(apply append (continuation-mark-set->list marks check-info-mark)))
(let ([ht (make-hash)])
(for ([x (in-list (apply append (continuation-mark-set->list marks check-info-mark)))]
[i (in-naturals)])
(hash-set! ht (check-info-name x) (cons i x)))
(map cdr (sort (hash-map ht (λ (k v) v)) < #:key car))))
;; with-check-info* : (list-of check-info) thunk -> any
(define (with-check-info* info thunk)