Sorry to be thinking out loud here…

I thought the reason Alex might be using `foldts-test-suite` instead of
`fold-test-results` is because the latter automatically runs each test but
the former leaves that in programmatic control. I thought this would enable
me to catch exceptions, thus (using Alex's really good names for the
pieces). E.g.:

(define-test-suite hw
  (check-equal? 1 1)
  (check-equal? 1 (/ 1 0))
  (check-equal? 1 2))

(foldts-test-suite
 (λ (suite name before after seed) (before) seed)
 (λ (suite name before after seed kid-seed) (after) (append seed kid-seed))
 (λ (case name action seed)
   (let ([outcome (with-handlers ([exn:fail?
                                   (λ (e)
                                     (println "got here")
                                     (cons 'test-failed seed))])
                    (run-test-case name action))])
     (cons outcome seed)))
 empty
 hw)

Unfortunately, the `with-handers` does not seem to be taking effect at all:
the runner still halts with an error. Can anyone see what I'm missing?

Shriram

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAJUf2yS4i3McynuqnAtGcJXQVuR%3D%3DbSBZCTaQa4H06rNmd%2BwCQ%40mail.gmail.com.

Reply via email to