C is one of the easier languages to do unit testing in:<p>1. write a new one file script which parses function declarations from a source code file<p>2. have the script find all function declarations which start with &quot;utest_&quot;, accept no parameters, and return &quot;int&quot; or &quot;bool&quot;.<p>3. have the script write out a new C file which calls all of matching unit test functions and asserts their return value is equal to 1<p>4. have your Makefile build and run a unit test binary using code generated by your script for each source code file containing greater than 0 unit tests.<p>Writing a script to parse function declarations from your C source code is useful because you can extend the script later on to generate documentation, code statistics, or conduct project-specific static analysis.