commit | db758e027e735484d4e9b51da35ea737b0baec1d | [log] [tgz] |
---|---|---|
author | Stefan <29021710+Saalvage@users.noreply.github.com> | Mon Jun 06 03:42:02 2022 +0200 |
committer | GitHub <noreply@github.com> | Mon Jun 06 03:42:02 2022 +0200 |
tree | 6379443191e0e5214d3c139f5d9f4859c635b0dc | |
parent | 16ed548bc973315a80497e51c2795d59b9dc5ac3 [diff] |
Add clang-tidy integration and fix all warnings (#659) * Add clang-tidy job * Install ninja * Remove duplicate path * Remove compiler specification?? * Remove linebreak * Readd compiler specification * Remove check specification * Install clang-tidy * Enable default checks * Add .clang-tidy * Start fixing tidy * Require tidy >=14 * Bump Ubuntu version * Bump clang-tidy invocation to 14 * Next set of fixes * Fix set :D * maybe this does the trick * ?? * ???? * Surely this is it * Close to just giving up * Mark operator* with noexcept * NOLINT * Bump clang-tidy version * Revert "Bump clang-tidy version" This reverts commit 3173050e17359eacd62899f284128ec2e0b4f5db. * More NOLINT test * Does this do the trick? * Else suppression * More fixes! * Specify error * Root cause * Readd at one location * Cleanup and more fixes * Huh! * More eradication * fuchsia * More fuchsia * More * definitions-in-headers * definitions-in-headers 2 * Does this do the trick? * Sussy lambda cast * Mem * Try default move const * Improve declaration * A lot more fixes! * - * + * * * Getting somewhere * Woo * More * Fix process * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Wrap up and add all CI * Accomodate weird DLL bug? * Update main.yml * Test reintroduce error * Finishing touches * Final finishing touches
doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of magnitude) and runtime compared to other feature-rich alternatives. It brings the ability of compiled languages such as D / Rust / Nim to have tests written directly in the production code thanks to a fast, transparent and flexible test runner with a clean interface.
The framework is and will stay free but needs your support to sustain its development. There are lots of new features and maintenance to do. If you work for a company using doctest or have the means to do so, please consider financial support. Monthly donations via Patreon and one-offs via PayPal.
A complete example with a self-registering test that compiles to an executable looks like this:
There are many C++ testing frameworks - Catch, Boost.Test, UnitTest++, cpputest, googletest and others.
The key differences between it and other testing frameworks are that it is light and unintrusive:
DOCTEST_CONFIG_DISABLE
identifierdoctest::
) & doesn't drag any headers with itThis allows the framework to be used in more ways than any other - tests can be written directly in the production code!
Tests can be a form of documentation and should be able to reside near the production code which they test.
The framework can be used just like any other without mixing production code and tests - check out the features.
doctest is modeled after Catch and some parts of the code have been taken directly - check out the differences.
This table compares doctest / Catch / lest which are all very similar.
Checkout the CppCon 2017 talk on YouTube to get a better understanding of how the framework works and read about how to use it in the JetBrains article - highlighting the unique aspects of the framework! On a short description on how to use the framework along production code you could refer to this GitHub issue. There is also an older article in the february edition of ACCU Overload 2017.
Project:
Usage:
main()
entry pointSupport the development of the project with donations! There is a list of planned features which are all important and big - see the roadmap.
If you work for a company using doctest or have the means to do so, please consider financial support.
Contributions in the form of issues and pull requests are welcome as well - check out the Contributing page.
The logo is licensed under a Creative Commons Attribution 4.0 International License. Copyright © 2019 area55git