| I realized something. If macros take as input the unevaluated source code, a macro can print out the unevaluated source code. So I made that happen. When a test fails, the user is given code to reproduce the test, including setup and teardown code. An example (indented differently to be more readable) arc> (suite math (setup x 3) (test adding (assert-same 5 (+ 1 x))))
math: 1 test, 0 nested suites.
'nil
arc> (test math)
Suite math:
math.adding failed: (+ 1 x) should be 5 but instead was 4.
rerun this test: (withs (x 3) (do1 (do (assert-same 5 (+ 1 x)))))
In suite math, 0 of 1 tests passed.
Test run completed in 0 seconds.
Oh dear, 1 of 1 failed.
'(0 1)
Not fully documented in the readme yet. I'll get to it. |