silentbicycle / greatest

A C testing library in 1 file. No dependencies, no dynamic allocation. ISC licensed.
ISC License
1.48k stars 108 forks source link

Have the option to raise SIGABRT on test failure #71

Closed fsaintjacques closed 6 years ago

fsaintjacques commented 6 years ago

One handy feature (I find) of cmocka is that it raises a SIGABRT on a test failure. Paired with gdb, this will directly drop you in the failing line.

Would you accept a patch that introduce an optional flag -a (would imply -f) which raises an abort signal on the first encountered failure? Maybe the feature is already there and my quick glancing was not enough.

silentbicycle commented 6 years ago

I definitely would. If you haven't already implemented it, I'll probably add it myself, as part of the next release. That feature doesn't exist yet, but I have a good idea how it would fit into the existing implementation, and I agree that it's a good idea.