Check is a unit testing framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs.
See https://libcheck.github.io/check for more information, including a tutorial. The tutorial is also available as info check
.
Check has the following dependencies:
The versions specified may be higher than those actually needed.
$ autoreconf --install
$ ./configure
$ make
$ make check
$ make install
$ sudo ldconfig
in this directory to set everything up. autoreconf calls all of the necessary tools for you, like autoconf, automake, autoheader, etc. If you ever change something during development, run autoreconf again (without --install), and it will perform the minimum set of actions necessary. Check is installed to /usr/local/lib
by default. ldconfig rebuilds the linker cache so that newly installed library file is included in the cache.
$ mkdir build
$ cd build
$ cmake ../
$ make
$ CTEST_OUTPUT_ON_FAILURE=1 make test
Check uses variadic macros in check.h, and the strict C90 options for gcc will complain about this. In gcc 4.0 and above you can turn this off explicitly with -Wno-variadic-macros
. In a future API it would be nice to eliminate these macros.
Check is available packaged for the following operating systems:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4