Re: [hackers] A very unconventional unit testing library
Hi Andrée,
Am Mi., 11. Aug. 2021 um 13:12 Uhr schrieb Mattias Andrée <maandree_AT_kth.se>:
> This looks like a very neat test framework. I would however like
> the file name to be printed in addition to line number as the
> test can cover multiple files: the file with the tests and files
> with utilities functions, or replacement for standard functions,
> that the tests use.
Thus far, my tests were simply pushing their filenames onto the hierarchy,
which was good enough for my purposes.
But you're right, it would be more flexible to always have the
filename be part the error message.
On a related note, I'm also not quite satisfied with the way dh_cuts
is currently recovering from failures.
Right now, after a failed assert, it will just keep going, reporting
all further errors.
This is sometimes useful, but when you're running tests in a loop, it
can potentially result in a lot of messages.
I think it might be best if I change it so that dh_cuts automatically
aborts if any asserts fail.
You can still recover from the abort and keep going by encapsulating
the test in a dh_branch() macro,
so this shouldn't pose much of an issue.
Best regards,
Thomas
Received on Wed Aug 11 2021 - 13:42:25 CEST
This archive was generated by hypermail 2.3.0
: Wed Aug 11 2021 - 14:24:30 CEST