commit | cbab26a46b5628418e536500bb1f4669a74cae5c | [log] [tgz] |
---|---|---|
author | onqtam <vik.kirilov@gmail.com> | Sat May 21 02:41:22 2016 +0300 |
committer | onqtam <vik.kirilov@gmail.com> | Sun May 22 04:45:42 2016 +0300 |
tree | ab5baef0468a0303e558b98ab14f1002e112d2d9 | |
parent | c832deb7a4bf9ff00f25342570b9b76561c50b7b [diff] |
moving examples around
The doctest library is inspired by the unittest {}
functionality of the D programming language.
It is heavily influenced by Catch which is currently the most popular, simple and user friendly alternative out there.
The main differences are:
A complete compiling example with a self-registering test and a test runner looks like this:
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" int factorial(int number) { return number <= 1 ? number : factorial(number - 1) * number; } TEST_CASE("testing the factorial function") { CHECK(factorial(1) == 1); CHECK(factorial(2) == 2); CHECK(factorial(10) == 3628800); }
Service | branch: master | branch: dev |
---|---|---|
Travis-CI (Linux/OSX) | ||
Appveyor (Windows) | ||
Unit Test Coverage | ||
Static Analysis |
Support the development of the project with donations! There is a list of planned features which are all important and big - see the roadmap. I work on this project in my spare time and every cent is a big deal. I took a break from working in the industry to make open source software.
Contributions in the form of issues and pull requests are welcome as well.
Open an issue for a discussion before making a pull request to make sure the contribution goes smoothly.
This framework has some design goals which must be kept. Make sure you have read the features and design goals page.
The master
branch is the stable one with the latest release and the dev
branch is on the bleeding edge.
All the framework tests have their output collected when the CMake TEST_MODE
variable is set to COLLECT
(making the new reference output) and later the tests are ran on the CI services (travis
and appveyor
) - their output is compared with the current reference output in the repository with the COMPARE
mode (default mode is NORMAL
).
Code should be formatted with a recent-enough clang-format
using the config file in the root of the repo (or I will do it...)
Testing with compilers different from GCC/Clang/MSVC (and more platforms) is something the project would benefit from.