awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
doctest avatar

doctest/doctest

0
View on GitHub↗
6,765 stars·691 forks·C++·MIT·4 vuesbit.ly/doctest-docs↗

Doctest

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 capability surface includes a thread-safe test runner with support for parameterized tests, test suites, and custom reporters. It provides specialized tools for validating expressions, comparing floating point values, and verifying exception behavior. The system also integrates with build tools such as CMake and Bazel.

The entire framework is provided as a single-header library to simplify integration.

Features

  • Single-File Framework Distributions - Distributed as a single-header library to eliminate complex build dependencies and simplify project integration.
  • Unit Testing Frameworks - Provides a fast, thread-safe runner to execute automated unit tests and verify code correctness.
  • Testing Logic Stripping - Allows stripping all testing logic and metadata from production binaries via configuration flags.
  • Header-Only Libraries - Supplies a single-header implementation to eliminate complex build dependencies and simplify project integration.
  • Compile-Time Optimization - Minimizes compilation overhead and binary size by streamlining expression decomposition and stripping metadata.
  • Hierarchical Subcases - Implements hierarchical subcases that re-execute parent setup code to isolate different execution paths within a single test.
  • Assertion Libraries - Ships a set of thread-safe macros for validating boolean expressions and capturing variable states during runtime failures.
  • Expression Decomposition - Evaluates boolean expressions and prints expanded variable values upon failure to simplify debugging.
  • Test Grouping Utilities - Provides nested subcases to group related assertions and share setup code within a single test case.
  • Expression Decomposition - Evaluates boolean expressions and automatically prints the expanded values of variables upon failure to simplify debugging.
  • Test Case Definitions - Supports creating named units of execution using standard or BDD-style scenario syntax.
  • Test Execution Runners - Provides a thread-safe execution engine for filtering, running, and reporting the results of test suites.
  • Test Discovery Mechanisms - Automatically identifies and registers test cases using static initialization, removing the need for manual test lists.
  • Test Execution Filtering - Includes a powerful filtering system to select specific test cases or suites using wildcard patterns.
  • Hierarchical Suite Grouping - Implements hierarchical subcases that re-execute parent setup code for granular shared state management.
  • Automatic Test Discovery - Automatically collects and tracks test cases using static initialization to eliminate manual registration lists.
  • Nested Setup Nodes - Implements hierarchical subcases that re-execute parent setup code to isolate different execution paths.
  • Thread-Safe Assertions - Provides a thread-safe assertion library for verifying runtime logic outside of standard test cases.
  • Build System Integration - Integrates test execution and discovery into build systems like CMake and Bazel to automate verification.
  • Command Line Configuration - Allows the configuration of test execution options and behavior via command-line flags or code overrides.
  • Test Logging Utilities - Captures expressions lazily and prints them only upon subsequent assertion failure to provide diagnostic context.
  • Test Integration - Enables test cases to be embedded within header files using conditional guards to minimize compilation overhead.
  • Compilation Speed Optimizations - Decreases compilation overhead by utilizing streamlined machinery that avoids complex expression decomposition.
  • Exception-Free Configurations - Operate without using exceptions to meet strict environment constraints or performance requirements.
  • Binary Test Stripping - Strips all testing logic and metadata from production binaries using conditional compilation guards to eliminate overhead.
  • Conditional Compilation Utilities - Uses preprocessor macros to toggle the inclusion of testing logic and metadata during the build process.
  • Exception Support Configurations - Supports environments where exceptions are disabled by allowing the removal of try-catch blocks and the exception system.
  • Exception Verification - Verifies that specific code paths throw expected exception types or contain specific error messages.
  • Thread-Safe Registries - Uses atomic operations and mutexes to allow safe test registration and execution across concurrent threads.
  • Compilation Performance Optimizations - Reduces compile times by converting complex assertion macros into single function calls.
  • Concurrent Assertion Validation - Allows assertion and logging macros to be called safely from multiple threads to verify concurrent behavior.
  • Concurrent Software Testing - Provides a thread-safe environment for verifying concurrent behavior in C++ software.
  • Test Execution Overrides - Allows configuring test execution options, such as failure limits and filters, via code or command-line.
  • Custom Failure Messaging - Provides detailed diagnostic messages by capturing local variables and strings during assertion failures.
  • Test Reporters - Implements an extensible reporter system and event listeners to format and deliver test outcomes.
  • Result Formatters - Enables exporting test results into various formats, including console text and XML, for external analysis.
  • Test Result Reporters - Provides a pluggable event listener model to format and route test results to various output sinks.
  • Test Execution Controls - Provides control over test flow by distinguishing between non-fatal assertions and fatal requirements.
  • Test Parameterization - Enables executing the same test logic multiple times using different types or generated sets of values.
  • Type-Parameterized Tests - Allows executing the same test logic across different data types to verify multiple implementations satisfy a common interface.
  • Parallel Test Execution - Supports executing test cases and assertions across multiple threads for verifying multi-threaded behavior.
  • Expression Decomposition - Decomposes assertions into string representations only upon failure to improve performance and provide detailed diagnostics.
  • Test Metadata - Allows attaching metadata to tests to control execution timeouts, expected failure counts, or skip status.
  • Embedded Test Runners - Allows integrating a test runner within a functional application to execute tests alongside production logic.
  • Test Fixture Systems - Implements fixture systems using classes or structures to share member variables and methods across multiple tests.
  • Cross-Binary Registry Sharing - Enables multiple binaries to contribute to a single test summary by sharing the test registry via a shared library.
  • Test Suite Organization - Provides mechanisms to organize test cases into named suites for bulk execution and command-line filtering.
  • Outils de développement - Fast, feature-rich testing framework

Historique des stars

Graphique de l'historique des stars pour doctest/doctestGraphique de l'historique des stars pour doctest/doctest

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Questions fréquentes

Que fait doctest/doctest ?

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.

Quelles sont les fonctionnalités principales de doctest/doctest ?

Les fonctionnalités principales de doctest/doctest sont : Single-File Framework Distributions, Unit Testing Frameworks, Testing Logic Stripping, Header-Only Libraries, Compile-Time Optimization, Hierarchical Subcases, Assertion Libraries, Expression Decomposition.

Quelles sont les alternatives open-source à doctest/doctest ?

Les alternatives open-source à doctest/doctest incluent : onqtam/doctest — doctest is a unit testing framework and assertion library for C++ delivered as a single-header library. It provides a… nextest-rs/nextest — nextest is a high-performance test execution framework and Rust test runner designed to manage parallelism, retries,… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… onsi/ginkgo — Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a… philsquared/catch — Catch is a C++ testing toolset providing frameworks for unit testing, behavior-driven development, and… jasmine/jasmine — Jasmine is a JavaScript testing framework and test runner designed for behavior-driven development. It provides a…

Alternatives open source à Doctest

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Doctest.
  • onqtam/doctestAvatar de onqtam

    onqtam/doctest

    6,768Voir sur GitHub↗

    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

    C++
    Voir sur GitHub↗6,768
  • nextest-rs/nextestAvatar de nextest-rs

    nextest-rs/nextest

    2,828Voir sur GitHub↗

    nextest is a high-performance test execution framework and Rust test runner designed to manage parallelism, retries, and timeouts. It serves as a test recording system that captures execution metadata and outputs into archives for later failure analysis and replay. The project distinguishes itself as a flakiness detection tool, identifying unstable tests through stress loops and automated retry policies. It also functions as a CI test orchestrator, capable of partitioning test suites across multiple workers and exporting results in standardized JUnit XML and JSON formats. The framework provi

    Rustcargo-plugincargo-subcommandflaky-tests
    Voir sur GitHub↗2,828
  • thomhurst/tunitAvatar de thomhurst

    thomhurst/TUnit

    3,744Voir sur 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
    Voir sur GitHub↗3,744
  • onsi/ginkgoAvatar de onsi

    onsi/ginkgo

    9,014Voir sur GitHub↗

    Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a domain-specific language for writing human-readable specifications, organizing tests into hierarchical containers and subjects to describe system behavior. The project distinguishes itself through advanced execution control and observability, featuring a test runner capable of parallel distribution, sharding, and randomized execution order to detect flaky tests. It includes specialized diagnostic tools for goroutine leak detection, hanging spec monitoring, and failure state debu

    Go
    Voir sur GitHub↗9,014
Voir les 30 alternatives à Doctest→