News for hackers. Stuff that matters.
Re:Greatest: C unit testing library in one file by simias on Wednesday January 08, 2014 @04:41AM (#7022579)
It's fairly typical. The standard "assert" macro behaves exactly that way, it does not generate code if the code is compiled with NDEBUG defined.

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:

http://lwn.net/Articles/434833/

There are no comments on this comment yet.