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. 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. Ultra light on compile times both in terms of including the header and writing thousands of asserts. Doesn't produce any warnings even on the most aggressive warning levels for MSVC/GCC/Clang.

Features

  • Can remove everything testing-related from the binary with the DOCTEST_CONFIG_DISABLE identifier
  • thread-safe - asserts can be used from multiple threads spawned from a single test case - example
  • Asserts can be used outside of a testing context - as a general purpose assert library - example
  • No global namespace pollution (everything is in doctest::) & doesn't drag any headers with it
  • Portable C++11 (use tag 1.2.9 for C++98) with over 100 different CI builds (static analysis, sanitizers..)
  • binaries (exe/dll) can use the test runner of another binary => tests in a single registry

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow doctest

doctest Web Site

Other Useful Business Software
Cut Cloud Costs with Google Compute Engine Icon
Cut Cloud Costs with Google Compute Engine

Save up to 91% with Spot VMs and get automatic sustained-use discounts. One free VM per month, plus $300 in credits.

Save on compute costs with Compute Engine. Reduce your batch jobs and workload bill 60-91% with Spot VMs. Compute Engine's committed use offers customers up to 70% savings through sustained use discounts. Plus, you get one free e2-micro VM monthly and $300 credit to start.
Try Compute Engine
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of doctest!

Additional Project Details

Programming Language

C++

Related Categories

C++ Software Testing Tool, C++ Frameworks

Registered

2022-05-30