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
Get Avast Free Antivirus with 24/7 AI-powered online scam detection Icon
Get Avast Free Antivirus with 24/7 AI-powered online scam detection

Get protection for today’s online threats. Free.

Award-winning antivirus protection, as well as protection against online scams, dangerous Wi-Fi connections, hacked accounts, and ransomware. It includes Avast Assistant, your built-in AI partner, which gives you help with suspicious online messages, offers, and more.
Free Download
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