racket / rackunit

Other
18 stars 32 forks source link

Fix hierarchy in reported test failure #171

Closed countvajhula closed 4 months ago

countvajhula commented 7 months ago

Fix #170

Before:

$ make test-flow
racket -y qi-test/tests/flow.rkt
--------------------
crossover > routing forms > flow tests > a test that should fail
FAILURE
name:       check-equal?
location:   qi-test/tests/flow.rkt:528:5
actual:     "ba"
expected:   #f
--------------------

After:

$ make test-flow
racket -y qi-test/tests/flow.rkt
--------------------
flow tests > routing forms > crossover > a test that should fail
FAILURE
name:       check-equal?
location:   qi-test/tests/flow.rkt:528:5
actual:     "ba"
expected:   #f
--------------------
sorawee commented 7 months ago

Does it make sense to add a test? Maybe in https://github.com/racket/rackunit/blob/master/rackunit-test/tests/rackunit/standalone.rkt ?

countvajhula commented 4 months ago

I'd forgotten about this one! Yeah I'm not super clear on the best strategy for writing tests here. If you have a good idea of how to go about it, then please feel free to take over, and thank you. Otherwise, I'll aim to return to this in a couple of weeks.