awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
onqtam avatar

onqtam/doctest

0
View on GitHub↗
6,768 stars·691 forks·C++·MIT·27 viewsbit.ly/doctest-docs↗

Doctest

doctest is a unit testing framework and assertion library for C++ delivered as a single-header library. It provides a test runner with a command line interface to execute tests, filter test suites, and generate execution reports.

The framework supports in-source unit testing and allows for the complete removal of testing logic from compiled binaries via preprocessor stripping to eliminate performance overhead in production environments. It also enables cross-binary test registry sharing, allowing one executable to utilize the test runner of another.

Capabilities include parameterized testing, thread-safe assertion verification for concurrent software validation, and automated test reporting for regression analysis. It utilizes automatic test registration to collect test cases without requiring manual lists of functions to execute.

Features

  • Unit Testing Frameworks - Provides a comprehensive framework for writing and executing isolated unit tests to verify C++ logic.
  • Thread-Safe Assertions - Implements thread-safe assertion verification to validate shared data consistency in concurrent software.
  • Testing Logic Stripping - Allows the complete removal of testing logic from compiled binaries via preprocessor stripping for production environments.
  • Production Logic Exclusion - Provides a mechanism to remove all testing logic from the compiled executable to eliminate production performance overhead.
  • Header-Only Libraries - Delivered as a single-header library to simplify integration and eliminate separate compilation steps.
  • Production Build Modes - Optimizes production builds by disabling development-only debugging and testing features.
  • Test Execution Controls - Provides controls for executing specific test suites and defining their behavior via the command line.
  • Assertion and Validation Utilities - Implements a system to define test conditions and assertions that report failures when expectations are not met.
  • Assertion Libraries - Ships a set of assertion macros to validate code conditions and verify invariants during test execution.
  • Test Execution Runners - Provides a command-line interface to manage the lifecycle, filtering, and execution of registered test suites.
  • Thread-Safe Assertion Recording - Implements internal locking mechanisms to safely record and report test failures occurring across multiple concurrent threads.
  • Static Registration - Implements static registration to collect test cases into registries at compile time using preprocessor macros.
  • Concurrent Assertion Validation - Enables checking conditions across multiple threads to ensure shared data remains consistent and safe.
  • Test Result Reporters - Generates detailed summaries of test execution results to analyze passed and failed cases.
  • Test Parameterization - Provides utilities to execute the same test logic across multiple sets of input data.
  • In-Source Testing - Allows the creation and execution of test cases and assertions directly within the C++ source files.
  • Regression Testing Suites - Supports executing parameterized test cases across multiple input sets to prevent software regressions.
  • Expression Decomposition - Employs C++ templates to decompose expressions into strings for detailed error reporting upon assertion failure.
  • Cross-Binary Registry Sharing - Enables cross-binary test registry sharing, allowing one executable to utilize the test runner of another.
  • Testing and Benchmarking - Lightweight single-header testing framework.
  • Testing and Debugging - Lightweight, feature-rich single-header testing framework.
  • Testing Frameworks - Offers a fast, header-only C++ testing framework.

Star history

Star history chart for onqtam/doctestStar history chart for onqtam/doctest

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does onqtam/doctest do?

doctest is a unit testing framework and assertion library for C++ delivered as a single-header library. It provides a test runner with a command line interface to execute tests, filter test suites, and generate execution reports.

What are the main features of onqtam/doctest?

The main features of onqtam/doctest are: Unit Testing Frameworks, Thread-Safe Assertions, Testing Logic Stripping, Production Logic Exclusion, Header-Only Libraries, Production Build Modes, Test Execution Controls, Assertion and Validation Utilities.

Which projects share features with onqtam/doctest?

Projects with overlapping indexed features include: doctest/doctest — doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation… catchorg/catch2 — Catch2 is a comprehensive framework for C++ software validation, providing an environment for unit testing,… vitest-dev/vitest — Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… microsoft/playwright — Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow… swiftlang/swift-testing — Swift Testing is a testing framework for the Swift programming language that provides a structured environment for…

Projects sharing features with Doctest

These projects share indexed features with Doctest. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • doctest/doctestdoctest avatar

    doctest/doctest

    6,765View on GitHub↗

    doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation that eliminates complex build dependencies, allowing developers to write and execute test cases directly within their source code. The framework is distinguished by its focus on compile-time performance and binary overhead. It uses conditional compilation guards to strip all testing logic and metadata from production binaries. Additionally, it features hierarchical subcases that re-execute parent setup code to isolate different execution paths within a single test case. Its c

    C++c-plus-pluscppcpp11
    View on GitHub↗6,765
  • catchorg/catch2catchorg avatar

    catchorg/Catch2

    20,198View on GitHub↗

    Catch2 is a comprehensive framework for C++ software validation, providing an environment for unit testing, integration verification, and performance analysis. It enables developers to define and execute automated test suites and micro-benchmarks directly within their applications. The framework is distinguished by its header-only distribution, which allows for integration into existing build systems without requiring complex external dependencies. It utilizes a hierarchical section-based execution model that supports behavior-driven testing, allowing for shared setup and teardown logic acros

    C++bddcppcpp14
    View on GitHub↗20,198
  • vitest-dev/vitestvitest-dev avatar

    vitest-dev/vitest

    15,970View on GitHub↗

    Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an integrated environment that supports unit, integration, and browser-based testing, allowing developers to execute test suites natively without requiring separate build steps or complex configuration. The project distinguishes itself through a highly optimized execution model that leverages worker-thread isolation and on-demand module transformation to provide rapid feedback. It includes a comprehensive suite of mocking and spying utilities that allow for the interception of depen

    TypeScripttesttesting-toolsvite
    View on GitHub↗15,970
  • thomhurst/tunitthomhurst avatar

    thomhurst/TUnit

    3,744View on GitHub↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    View on GitHub↗3,744
Compare all 30 related projects→