Unit Testing Framework for C (outside of Github)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
cypherpunk 0566220723 degithubbing 4 months ago
checkmk 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
cmake 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
doc 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
lib 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
m4 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
src 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
tests 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
xml 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
AUTHORS 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
CMakeLists.txt 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
COPYING.LESSER 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
ChangeLog 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
INSTALL 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
Makefile.am 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
Makefile.in 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
NEWS 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
README degithubbing 4 months ago
THANKS 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
TODO 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
aclocal.m4 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
ar-lib 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
check.m4 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
check.pc.in 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
check_stdint.h 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
compile 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
config.guess 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
config.h.in 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
config.sub 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
configure 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
configure.ac 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
depcomp 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
install-sh 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
ltmain.sh 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
missing 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago
test-driver 0.9 to 0.15 upgrade (thanks to LFS) 4 months ago

README

# About Check

Check is a unit testing framework for C.

Unfortunately, its main repo was moved to NSA/Github, so here we are:
a repo for people to use/develop Check without being stuck in the NSA/Microsoft
walled garden.

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.

There is a tutorial available as `info check`.

# Installation

Check has the following dependencies:

* [automake](https://www.gnu.org/software/automake/)-1.9.6 (1.11.3 on OS X if you are using /usr/bin/ar)
* [autoconf](https://www.gnu.org/software/autoconf/)-2.59
* [libtool](https://www.gnu.org/software/libtool/)-1.5.22
* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)-0.20
* [texinfo](https://www.gnu.org/software/texinfo/)-4.7 (for documentation)
* tetex-bin (or any texinfo-compatible TeX installation, for documentation)
* POSIX [sed](https://en.wikipedia.org/wiki/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.

# Packaging

Check is available packaged for the following operating systems:

[![Packaging status](https://repology.org/badge/vertical-allrepos/check.svg)](https://repology.org/project/check/versions)