A KISS, non-intrusive cross-platform C unit testing framework
Go to file
Snaipe d59b810a56 Added Foundation framework to link flags on OS X + Clang 2015-11-16 16:06:25 +01:00
.cmake/Modules Added cmake 3.4.0 objective C compiler include fix 2015-11-16 15:13:34 +01:00
dependencies [Issue #64] Prefixed all unprefixed macros with CR_ 2015-10-02 15:02:50 +02:00
dev Added find module for criterion 2015-09-09 17:14:45 +02:00
doc [Issue #56] Updated screencast 2015-09-25 14:10:58 +02:00
include/criterion Added better integration for multiple native languages tests 2015-10-03 02:43:24 +02:00
po Added criterion_test_die to abort tests with a message on unhandled exceptions 2015-10-01 23:15:02 +02:00
samples Added better integration for multiple native languages tests 2015-10-03 02:43:24 +02:00
src Added Objective-C language support 2015-10-04 23:20:41 +02:00
test Added better integration for multiple native languages tests 2015-10-03 02:43:24 +02:00
.bumpversion.cfg [v2.1.0] Merge branch 'bleeding' (Version release) 2015-09-21 22:35:34 +02:00
.gitignore Added Objective-C language support 2015-10-04 23:20:41 +02:00
.gitmodules Added wingetopt to dependencies 2015-09-06 00:37:30 +02:00
.travis.yml Removed source build for clang on osx travis builds 2015-11-12 18:26:04 +01:00
CMakeLists.txt Added Foundation framework to link flags on OS X + Clang 2015-11-16 16:06:25 +01:00
CONTRIBUTING.md Updated contribution road map 2015-09-17 00:29:11 +02:00
ChangeLog [v2.1.0] Merge branch 'bleeding' (Version release) 2015-09-21 22:35:34 +02:00
LICENSE Initial commit 2015-01-31 13:45:12 +01:00
README.md Added analytics in README 2015-10-02 09:35:25 +02:00
appveyor.yml Disabled Objective C support on windows-mingw and installed gobjc & gnustep on travis 2015-10-07 18:26:26 +02:00

README.md

Criterion Logo =========

Unix Build Status Windows Build Status Coverage Status License Version

Analytics

A dead-simple, yet extensible, C and C++ unit testing framework.

Screencast

Philosophy

Most test frameworks for C require a lot of boilerplate code to set up tests and test suites -- you need to create a main, then register new test suites, then register the tests within these suits, and finally call the right functions.

This gives the user great control, at the unfortunate cost of simplicity.

Criterion follows the KISS principle, while keeping the control the user would have with other frameworks:

  • C99 and C++11 compatible.
  • Tests are automatically registered when declared.
  • Implements a xUnit framework structure.
  • A default entry point is provided, no need to declare a main unless you want to do special handling.
  • Test are isolated in their own process, crashes and signals can be reported and tested.
  • Unified interface between C and C++: include the criterion header and it just works.
  • Supports parameterized tests and theories.
  • Progress and statistics can be followed in real time with report hooks.
  • TAP output format can be enabled with an option.
  • Runs on Linux, FreeBSD, Mac OS X, and Windows (Compiling with MinGW GCC and Visual Studio 2015+).

Downloads

Packages

  • Mac OS X: brew install snaipe/soft/criterion
  • AUR: yaourt -S criterion

Binary archives

If you have a different platform, you can still build the library from source

Developer Resources

Documentation

An online documentation is available on ReadTheDocs (PDF | Zip | Epub)

Samples

Sample tests can be found in the sample directory.

Getting help

Gitter.im chat room: Join the chat at https://gitter.im/Snaipe/Criterion

Misc

Credits

Logo done by Greehm