doctest
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What doctest is
doctest is a C++ testing framework modelled after Catch. Tests can live directly in production source or header files, next to the code they exercise. Defining DOCTEST_CONFIG_DISABLE removes all testing code from the built binary. Assertions are thread-safe and also work outside a testing context. Everything sits in the doctest namespace, and including the header pulls in no other headers. It compiles without warnings at the strictest warning levels of MSVC, GCC and Clang. It targets C++11, with an older tagged release for C++98. Separate binaries such as executables and DLLs can share one test registry. Tests can also be kept apart from production code in the conventional style.
Written from the project's README, read .
- Category
- Unit testing and test runners
- License
- MIT
- Language
- C++
- Changelog
- Releases on GitHub
Repository metrics
Status
slowLast commit 91 to 365 days before the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed unit testing and test runners tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from doctest's, with its source.
GoogleTest: Languages for writing tests: C++ (the 1.18.x branch requires C++17). source: README
Catch2: Languages for writing tests: C++. source: README
Jest: Languages for writing tests: JavaScript; TypeScript via Babel or ts-jest. source: README
Testify: Languages for writing tests: Go. source: README
Mocha: Languages for writing tests: JavaScript; TypeScript through Node.js type stripping or a loader such as tsx. source: Docs: TypeScript
AVA: Languages for writing tests: JavaScript on Node.js; TypeScript definitions included. source: README
PHPUnit: Languages for writing tests: PHP. source: README
Vitest: Languages for writing tests: JavaScript and TypeScript, with JSX. source: README
Questions
Is doctest open source?
Yes. doctest is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is doctest maintained?
On 2026-09-22, the last commit to the default branch was on 2026-03-27, so the listed status is slow. Rule: Last commit 91 to 365 days before the fetch date.
How many GitHub stars does doctest have?
6,868 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is doctest written in?
The repository's primary language, as reported by the GitHub API, is C++.
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- README, read