Skip to content

Repository files navigation

rcunit

Build

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.

Documentation

See doc/rcunit-user-guide.md.

Building and Installing

git clone https://github.com/jecklgamis/rcunit.git
cd rcunit
./autogen.sh
./configure
make
sudo make install

This 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/dir

Running Tests

make check

Test runs generate plain-text, JSON, and HTML reports in the process current working directory:

  • rcunit_test_run_report.txt
  • rcunit_test_run_report.json
  • rcunit_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.

About

A C unit testing framework

Resources

Stars

5 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages