Criterion 0,1 travis-ci

A KISS, non-intrusive cross-platform C unit testing framework

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:

  • [x] C99 and C++11 compatible.
  • [x] Tests are automatically registered when declared.
  • [x] Implements a xUnit framework structure.
  • [x] A default entry point is provided, no need to declare a main unless you want to do special handling.
  • [x] Test are isolated in their own process, crashes and signals can be reported and tested.
  • [x] Unified interface between C and C++: include the criterion header and it just works.
  • [x] Supports parameterized tests and theories.
  • [x] Progress and statistics can be followed in real time with report hooks.
  • [x] TAP output format can be enabled with an option.
  • [x] 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

Related Repositories

Criterion

Criterion

A KISS, non-intrusive cross-platform C unit testing framework ...

criterion

criterion

A powerful but simple library for measuring the performance of Haskell code. ...

criterion.rs

criterion.rs

Statistics-driven micro-benchmarking library ...

Discretization-MDLPC

Discretization-MDLPC

Discretization with Fayyad and Irani's minimum description length principle criterion (MDLPC) ...

triplet-criterion

triplet-criterion

A loss function based on the distances between anchor, positive and negative embeddings used in FaceNet ...


Top Contributors

Snaipe a1lu am11 kevinoid MrAnno offa blinskey hppritcha

Releases

-   v2.2.2 zip tar
-   v2.2.1 zip tar
-   v2.2.0 zip tar
-   v2.1.1 zip tar
-   v2.1.0 zip tar
-   v2.0.2 zip tar
-   v2.0.1 zip tar
-   v2.0.0 zip tar
-   v1.3.1 zip tar
-   v1.3.0 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar
-   v1.1.0 zip tar
-   v1.0.0 zip tar
-   v0.3 zip tar
-   v0.2 zip tar
-   v0.1 zip tar
-   2.3.0-rc1 zip tar