A KISS, non-intrusive cross-platform C unit testing framework
Find a file
Kevin Locke 07c380d6b7 asserts: Add assertions for wide strings
This commit creates _wcs_ variants of the _str_ assertions for operating
on wchar_t * instead of char *.  The assertions are useful for programs
using wchar_t strings, particularly on Windows where use of the wide
character version of the Windows API is encouraged by Microsoft.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2016-09-10 08:48:30 +02:00
.cmake version: bumped version to 2.3.0-dev 2016-09-06 19:11:16 +02:00
.githooks githooks: Fixed precommit hook not producing good patches 2016-09-10 08:47:37 +02:00
dependencies boxfort: Updated for PID mismatch fix in debug mode 2016-09-04 09:38:14 +02:00
dev dev: Fix FindCriterion.cmake package name 2016-05-15 12:40:40 +02:00
doc asserts: Add assertions for wide strings 2016-09-10 08:48:30 +02:00
include/criterion asserts: Add assertions for wide strings 2016-09-10 08:48:30 +02:00
po po: Updated line counts 2016-09-06 18:03:41 +02:00
samples asserts: Add assertions for wide strings 2016-09-10 08:48:30 +02:00
src section,elf: Fixed missing ElfW definition on FreeBSD. Fixes #156 2016-09-10 08:47:24 +02:00
test asserts: Add assertions for wide strings 2016-09-10 08:48:30 +02:00
.bumpversion.cfg version: bumped version to 2.3.0-dev 2016-09-06 19:11:16 +02:00
.gitignore Merge branch 'features/io-rewrite-nanopb' into bleeding 2016-01-18 01:35:55 +01:00
.gitmodules boxfort: Added boxfort dependency 2016-09-03 15:08:51 +02:00
.travis.yml travis: Fixed spurious fi as reported 2016-09-06 18:08:27 +02:00
.uncrustify.cfg style: Fixed (A) Op (B) formatting taking 'Op' as a function rather than an operator 2016-09-06 10:49:10 +02:00
appveyor.yml version: bumped version to 2.3.0-dev 2016-09-06 19:11:16 +02:00
ChangeLog release: Prepare release 2.2.2 2016-06-20 09:36:25 +02:00
CMakeLists.txt Revert "cmake: Build libcriterion.so as an executable PIE" 2016-09-06 18:23:04 +02:00
CONTRIBUTING.md contributing: Added bit on commit messages 2016-09-06 11:02:08 +02: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
LICENSE We're in 2016. 2016-01-06 17:35:35 +01:00
README.md version,readme: Fixed broken version badge 2016-09-07 10:43:08 +02:00

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

Binary releases are available on the release page

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
Subscribe to the mailing list Criterion mailing list on freelists.org
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