C unit testing in a header (works for C++ too!).  See fctx.wildbearsoftware.com for downloads, examples and documentation.