A unit testing framework for C
Switch branches/tags
Clone or download
brarcher Merge pull request #170 from ozars/doxygen-devel-feature
Add development version of doxygen configuration
Latest commit 2dc6337 Aug 21, 2018
Permalink
Failed to load latest commit information.
checkmk Update various reference to Sourceforge Nov 26, 2017
cmake cmake: remove HAVE_* for snprintf in config.h.in Jan 2, 2014
contrib * Transforms check XML to format suitable for JUnit Oct 19, 2012
doc Add development version of doxygen configuration Aug 21, 2018
lib Set license statement Sep 1, 2017
m4 librt_timers.m4: use prev behavior when cross compiling Dec 21, 2013
src Fix START_TEST to look like valid C code. Jun 15, 2018
tests Check for strdup() failures in Check's unit tests Jun 20, 2018
web Remove CloudBees button on webpage Jul 27, 2018
xml * Updated XML output format Oct 19, 2012
.editorconfig Adding an EditorConfig file Jun 6, 2016
.gitignore Adding "rules" to .gitignore related to CMake Mar 4, 2017
.travis.yml Move CloudBees tests to Travis-CI Jun 20, 2018
AUTHORS Set license statement Sep 1, 2017
CMakeLists.txt Merge test scripts as well, fixed comments. Aug 29, 2017
COPYING.LESSER * Removed COPYING, replaced with COPYING.LESSER Oct 13, 2006
ChangeLog * note that svn commit messages are what matter in the ChangeLog Nov 26, 2010
HACKING Add development version of doxygen configuration Aug 21, 2018
Makefile.am Add development version of doxygen configuration Aug 21, 2018
NEWS Restore development header in NEWS Oct 20, 2017
README.md Mention rebuilding linker cache in README (#155) Jul 16, 2018
THANKS * Obfuscate email addresses a little bit more. Dec 12, 2006
TODO Update TODO Jun 20, 2018
appveyor.yml Add fpclassify to Makefile.am and comment VS2008 build Aug 31, 2017
check.m4 * Incorporated patch from Debian for debian bug #395466. This fixes Dec 6, 2006
check.pc.in Improving README Jun 6, 2016
configure.ac Add development version of doxygen configuration Aug 21, 2018
index.html Remove CloudBees button on webpage Jul 27, 2018
travis.sh Build example on Travis-CI Jul 3, 2018

README.md

About Check

Travis Build Status Appveyor Build Status

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.

Installation

Check has the following dependencies:

  • automake-1.9.6 (1.11.3 on OS X if you are using /usr/bin/ar)
  • autoconf-2.59
  • libtool-1.5.22
  • pkg-config-0.20
  • texinfo-4.7 (for documentation)
  • tetex-bin (or any texinfo-compatible TeX installation, for documentation)
  • POSIX sed

The versions specified may be higher than those actually needed.

autoconf

$ 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.

cmake

$ mkdir build
$ cd build
$ cmake ../
$ make
$ CTEST_OUTPUT_ON_FAILURE=1 make test

Linking against Check

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.