News for hackers. Stuff that matters.
Re:Greatest: C unit testing library in one file by silentbicycle on Tuesday January 07, 2014 @09:02PM (#7021231)
I've seen people do that before, as well as putting the tests in the .c file, guarded by "#if TEST_MODULE_NAME", and exporting a (module_name)_run_tests(void) function.

My preference is to have separate test_module_name.c files. Failing that, I would include tests in the module's .c file rather than the header, so that the header can be relatively short and focused on documenting the module's interface, rather than its implementation details.

greatest doesn't force any specific style there, by design.

There are no comments on this comment yet.