From 8ece97219a4e204af9459e27b676e62bd67fd52d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 14 Aug 2010 21:32:40 -0500 Subject: [PATCH] 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. --- collects/rackunit/private/check-info.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/rackunit/private/check-info.rkt b/collects/rackunit/private/check-info.rkt index 127c2cb493..de601b665b 100644 --- a/collects/rackunit/private/check-info.rkt +++ b/collects/rackunit/private/check-info.rkt @@ -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)