Skip to content

libcheck/check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

455005d · Oct 22, 2021
Mar 20, 2021
Jan 18, 2021
Jun 16, 2020
Oct 19, 2012
Mar 18, 2021
Oct 12, 2020
Dec 21, 2013
Oct 18, 2021
Mar 18, 2021
Jul 27, 2018
Oct 19, 2012
Jun 6, 2016
Mar 4, 2017
Aug 28, 2019
Sep 19, 2021
Oct 13, 2006
Nov 26, 2010
Jun 21, 2020
Aug 29, 2019
Aug 8, 2020
Oct 23, 2020
Dec 12, 2006
Mar 9, 2020
Sep 2, 2019
Dec 6, 2006
Jun 6, 2016
Oct 31, 2020
Aug 8, 2020

Repository files navigation

Check

Linux Build Status OSX Build Status Windows Build Status

Table of Contents

About

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.

Installing

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

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.

Packaging

Check is available packaged for the following operating systems:

Packaging status