I use rackunit like this in my code
(run-tests (test-suite "suite-name"
(test-case "case name"
...
))
I'm trying to practice TDD. When an assertion fails, I'm able to see which assertion failed. But in case of an error, unfortunately rackunit just shows me the error encountered and the test case name that failed.
If I execute the code normally, I see stack trace with line numbers. How can I make rackunit show this information?
Use errortrace.
As an example, the following program
produces:
when you run with
racket test.rkt.But if we run it with
racket -l errortrace -t test.rkt, then it produces: