A KISS, non-intrusive cross-platform C unit testing framework
Go to file
Snaipe 7092a1c5aa doc: Fixed parameterized test dumping criterion namespace 2016-04-10 17:15:30 +02:00
.cmake Fixed cross-compiling of cmake subprojects 2016-02-19 21:10:15 +01:00
dependencies Updated nanomsg patch for Windows API setting 2016-02-06 19:30:55 +01:00
dev Added find module for criterion 2015-09-09 17:14:45 +02:00
doc doc: Integrated doxygen docs for parameterized tests in sphinx 2016-04-10 16:27:35 +02:00
include/criterion doc: Fixed parameterized test dumping criterion namespace 2016-04-10 17:15:30 +02:00
po Updated po file line numbers 2016-02-13 13:05:41 +01:00
samples Fixed cross-compiling of cmake subprojects 2016-02-19 21:10:15 +01:00
src Fixed cross-compiling of cmake subprojects 2016-02-19 21:10:15 +01:00
test Merge branch 'features/new-logging' into bleeding 2016-02-18 00:25:45 +01:00
.bumpversion.cfg [v2.2.0] Merge branch 'bleeding' (Version release) 2015-12-08 14:31:59 +01:00
.gitignore Merge branch 'features/io-rewrite-nanopb' into bleeding 2016-01-18 01:35:55 +01:00
.gitmodules Revert "Switched from nanomsg to zeromq temporarily until the fork patch works" 2016-01-28 23:43:23 +01:00
.travis.yml Removed OS X from the allowed travis build failures 2016-01-23 10:56:37 +01:00
CMakeLists.txt Removed libcsptr tests from builds 2016-02-19 21:10:15 +01:00
CONTRIBUTING.md Updated contribution road map 2015-09-17 00:29:11 +02:00
ChangeLog [v2.2.0] Merge branch 'bleeding' (Version release) 2015-12-08 14:31:59 +01:00
LICENSE We're in 2016. 2016-01-06 17:35:35 +01:00
README.md Removed google analytics beacon from README 2016-02-14 23:12:19 +01:00
appveyor.yml Manually added cram shell path for appveyor builds 2016-02-06 23:06:53 +01:00
debian.copyright [license] Updated license year on missed files 2016-01-18 16:06:54 +01:00
description.txt Added missing files for ppa builds 2015-11-28 14:33:09 +01:00

README.md

Criterion Logo =========

Unix Build Status Windows Build Status Coverage Status License Version

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

Channel Description
Join the chat at https://gitter.im/Snaipe/Criterion Snaipe/Criterion on gitter.im
Join #criterion on freenode #criterion on irc.freenode.net

Misc

Credits

Logo made by Paul Bouigue