rcunit is a small framework for testing C programs. It uses non-local jumps to emulate exceptions and handles program-terminating signals (e.g. SIGSEGV, SIGILL) during test runs. rcunit supports test fixtures per test module, and is free to use under the Apache License 2.0.
git clone https://github.com/jecklgamis/rcunit.git
cd rcunit
./autogen.sh
./configure
make
sudo make installThis installs the static library (librcunit.a) in /usr/local/lib and the
headers in /usr/local/include. To change the install prefix:
./configure --prefix=/some/dirmake checkTest runs generate plain-text, JSON, and HTML reports in the process current working directory:
rcunit_test_run_report.txtrcunit_test_run_report.jsonrcunit_test_run_report.html
The JSON report is suitable for tools and CI jobs. The HTML report provides a local browser view of module, test, assertion, fixture, and failure details.