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

You Might Also Like
Run applications fast and securely in a fully managed environment Icon
Run applications fast and securely in a fully managed environment

Cloud Run is a fully-managed compute platform that lets you run your code in a container directly on top of Google's scalable infrastructure.

Run frontend and backend services, batch jobs, deploy websites and applications, and queue processing workloads without the need to manage infrastructure.
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