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))

 (λ (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)))

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?


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 view this discussion on the web visit

Reply via email to