David K. Storrs wrote on 12/16/2015 06:50 PM:
I'm just getting started with rackunit, and I was very surprised when I found 
that it simply emits nothing if a test succeeds.


The Overeasy package does this, using the Racket logger. Add "info@overeasy" to your logging selector, such as in the DrRacket Log window. (Though this is not a reason I made Overeasy; hierarchical test IDs, like shown below, are of of the reasons.)

http://www.neilvandyke.org/overeasy/

#lang racket/base

(module+ test
  (require (planet neil/overeasy:3)))

(define (foo x y)
  (* x 42))

(module+ test
  (test-section 'foo
    (test-section 'initial
      (test 'zero         (foo 0  0)  0)
      (test 'one          (foo 1  0)  42)
      (test 'two          (foo 2  0)  84)
      (test 'negative     (foo -1 0) -42)
      (test 'negative-two (foo -2 0) -84))
    (test-section 'different-y
      (for-each (lambda (y)
                  (test-section y
                    (test 'x-zero (foo 0  0)  0)
                    (test 'x-one  (foo 1  0)  42)
                    ;; ...
                    ))
                '(0 1 2 -1 -2)))))

overeasy: Start Test Section [foo]
...
overeasy: Start Test Section [foo different-y 0]
overeasy: Test Passed [foo different-y 0 x-zero]
overeasy: Test Passed [foo different-y 0 x-one]
...

Neil V.

--
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to