I'm new to the world of C, is this typical?
I'm new to the world of C, is this typical?
Of course you shouldn't abuse it but in this instance it's perfectly fine IMHO.
This reminds me that in addition to that the linux kernel has a pretty cool feature for debugging called "dynamic debugging" where you can enable and disable "printk" (the kernel's version of printf) messages dynamically from the shell through the debugfs:
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.