The fastest feature-rich C++11/14/17/20 single-header testing framework for unit tests and TDD
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. If you work for a company using doctest or have the means to do so, please consider financial support. Monthly donations via Patreon and one-offs via PayPal.
A complete example with a self-registering test that compiles to an executable looks like this:
There are many C++ testing frameworks - Catch, Boost.Test, UnitTest++, cpputest, googletest and many other.
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
- Offers a way to remove everything testing-related from the binary with the
DOCTEST_CONFIG_DISABLE
identifier - thread-safe - asserts (and logging) 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
- Doesn't pollute the global namespace (everything is in namespace
doctest
) and doesn't drag any headers with it - Very portable C++11 (use tag 1.2.9 for C++98) with over 180 different CI builds (static analysis, sanitizers...)
- binaries (exe/dll) can use the test runner of another binary - so tests end up in a single registry - example
This allows the framework to be used in more ways than any other - tests can be written directly in the production code!
Tests can be considered a form of documentation and should be able to reside near the production code which they test.
- This makes the barrier for writing tests much lower - you don't have to: 1) make a separate source file 2) include a bunch of stuff in it 3) add it to the build system and 4) add it to source control - You can just write the tests for a class or a piece of functionality at the bottom of its source file - or even header file!
- Tests in the production code can be thought of as documentation or up-to-date comments - showing the use of APIs
- Testing internals that are not exposed through the public API and headers is no longer a mind-bending exercise
- Test-driven development in C++ has never been easier!
The framework can be used like any other if you don't want/need to mix production code and tests - check out the features.
doctest is modeled after Catch and some parts of the code have been taken directly - check out the differences.
This table compares doctest / Catch / lest which are all very similar.
Checkout the CppCon 2017 talk on YouTube to get a better understanding of how the framework works and read about how to use it in the JetBrains article - highlighting the unique aspects of the framework! On a short description on how to use the framework along production code you could refer to this GitHub issue. There is also an older article in the february edition of ACCU Overload 2017.
Documentation
Project:
- Features and design goals - the complete list of features
- Roadmap - upcoming features
- Benchmarks - compile-time and runtime supremacy
- Contributing - how to make a proper pull request
- Changelog - generated changelog based on closed issues/PRs
Usage:
- Tutorial - make sure you have read it before the other parts of the documentation
- Assertion macros
- Test cases, subcases and test fixtures
- Parameterized test cases
- Command line
- Logging macros
main()
entry point- Configuration
- String conversions
- Reporters
- Extensions
- FAQ
- Build systems
- Examples
Contributing
Support the development of the project with donations! There is a list of planned features which are all important and big - see the roadmap. I took a break from working in the industry to make open source software so every cent is a big deal.
If you work for a company using doctest or have the means to do so, please consider financial support.
Contributions in the form of issues and pull requests are welcome as well - check out the Contributing page.
Stargazers over time
Logo
The logo is licensed under a Creative Commons Attribution 4.0 International License. Copyright © 2019 area55git
version | 2.4.6+2 |
---|---|
license | MIT |
repository | https://pkg.cppget.org/1/stable |
download | doctest-2.4.6+2.tar.gz |
sha256 | 8795e3495430f05c770ffa362a0efa9216cd41669bcab3d68153e440fde3fd41 |
project | doctest |
---|---|
url | github.com/onqtam/doctest |
package-url | github.com/build2-packaging/doctest/ |
vik.kirilov@gmail.com | |
package-email | lyrahgames@mailbox.org |
Requires (1)
c++11 | c++14 | c++17 | c++20 |
Builds
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_14.0-static_O3 |
timestamp | 2024-04-25 00:42:09 UTC (01:43:39 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_14.0-O3 |
timestamp | 2024-04-25 00:41:20 UTC (01:44:27 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_14.0 |
timestamp | 2024-04-25 00:40:32 UTC (01:45:15 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16_libc++-static_O3 |
timestamp | 2024-04-25 00:07:40 UTC (02:18:07 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16_libc++-O3 |
timestamp | 2024-04-25 00:04:53 UTC (02:20:54 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16-static_O3 |
timestamp | 2024-04-25 00:02:47 UTC (02:23:00 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16_libc++ |
timestamp | 2024-04-25 00:02:17 UTC (02:23:30 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16 |
timestamp | 2024-04-24 23:56:27 UTC (02:29:20 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_16-O3 |
timestamp | 2024-04-24 23:53:35 UTC (02:32:12 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_15.0-static_O3 |
timestamp | 2024-04-24 15:58:57 UTC (10:26:50 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_15.0-O3 |
timestamp | 2024-04-24 15:58:06 UTC (10:27:41 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-clang_15.0 |
timestamp | 2024-04-24 15:57:13 UTC (10:28:34 hours ago) |
result | warning (update) | warning (test-installed) | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_13-static_O3 |
timestamp | 2024-04-24 06:29:15 UTC (19:56:32 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_13-ndebug_O3 |
timestamp | 2024-04-24 06:26:16 UTC (19:59:31 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_13 |
timestamp | 2024-04-24 06:25:35 UTC (20:00:12 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-gcc_13-O3 |
timestamp | 2024-04-24 06:24:57 UTC (20:00:51 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_fedora_38-gcc_13-bindist |
timestamp | 2024-04-24 06:19:09 UTC (20:06:38 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_fedora_37-gcc_12.2-bindist |
timestamp | 2024-04-24 05:47:24 UTC (20:38:23 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-gcc_13_homebrew-static_O3 |
timestamp | 2024-04-24 04:23:15 UTC (22:02:32 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-gcc_13_homebrew-O3 |
timestamp | 2024-04-24 04:22:22 UTC (22:03:25 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-apple-darwin22.5.0 |
tgt config | macos_13-gcc_13_homebrew |
timestamp | 2024-04-24 04:21:29 UTC (22:04:18 hours ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0_libc++-O3 |
timestamp | 2024-04-24 02:14:01 UTC (01 00:11:46 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0_libc++-static_O3 |
timestamp | 2024-04-24 02:13:52 UTC (01 00:11:55 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0-static_O3 |
timestamp | 2024-04-24 02:13:10 UTC (01 00:12:38 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0_libc++ |
timestamp | 2024-04-24 02:12:46 UTC (01 00:13:01 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0 |
timestamp | 2024-04-24 02:11:27 UTC (01 00:14:20 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_16.0-O3 |
timestamp | 2024-04-24 02:10:51 UTC (01 00:14:56 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_16.0_llvm_msvc_17.6-O2 |
timestamp | 2024-04-24 00:25:22 UTC (01 02:00:26 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_16.0_llvm_msvc_17.6-static_O2 |
timestamp | 2024-04-24 00:24:09 UTC (01 02:01:38 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_16.0_llvm_msvc_17.6 |
timestamp | 2024-04-24 00:18:29 UTC (01 02:07:18 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_12.2_mingw_w64-O2 |
timestamp | 2024-04-23 22:56:17 UTC (01 03:29:30 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_12.2_mingw_w64-static_O2 |
timestamp | 2024-04-23 22:54:08 UTC (01 03:31:39 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-w64-mingw32 |
tgt config | windows_10-gcc_12.2_mingw_w64 |
timestamp | 2024-04-23 22:53:42 UTC (01 03:32:05 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.6 |
timestamp | 2024-04-23 22:44:56 UTC (01 03:40:52 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.6-static_O2 |
timestamp | 2024-04-23 22:44:43 UTC (01 03:41:04 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.6-O2 |
timestamp | 2024-04-23 22:43:59 UTC (01 03:41:48 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_12-bindist |
timestamp | 2024-04-23 22:34:19 UTC (01 03:51:28 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_15 |
timestamp | 2024-04-23 22:25:11 UTC (01 04:00:36 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_12-clang_15_libc++ |
timestamp | 2024-04-23 22:20:46 UTC (01 04:05:02 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | aarch64-linux-gnu |
tgt config | linux_debian_11-gcc_12 |
timestamp | 2024-04-23 22:07:33 UTC (01 04:18:14 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_13.1-static_O3 |
timestamp | 2024-04-23 21:58:33 UTC (01 04:27:15 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_13.1-ndebug_O3 |
timestamp | 2024-04-23 21:57:52 UTC (01 04:27:55 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_13.1-O3 |
timestamp | 2024-04-23 21:53:50 UTC (01 04:31:57 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-gcc_13.1 |
timestamp | 2024-04-23 21:49:51 UTC (01 04:35:56 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-freebsd13.2 |
tgt config | freebsd_13-clang_14.0-O3 |
timestamp | 2024-04-23 21:26:38 UTC (01 04:59:09 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-freebsd13.2 |
tgt config | freebsd_13-clang_14.0-static_O3 |
timestamp | 2024-04-23 21:26:25 UTC (01 04:59:22 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-freebsd13.2 |
tgt config | freebsd_13-clang_14.0 |
timestamp | 2024-04-23 21:25:11 UTC (01 05:00:36 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-clang_15.0_msvc_msvc_17.6 |
timestamp | 2024-04-23 21:04:56 UTC (01 05:20:51 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-microsoft-win32-msvc14.3 |
tgt config | windows_10-msvc_17.5 |
timestamp | 2024-04-23 21:04:46 UTC (01 05:21:01 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-freebsd12.4 |
tgt config | freebsd_12-clang_13.0 |
timestamp | 2024-04-23 20:54:57 UTC (01 05:30:50 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_15.0_libc++ |
timestamp | 2024-04-23 20:54:28 UTC (01 05:31:20 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_12-clang_15.0 |
timestamp | 2024-04-23 20:50:39 UTC (01 05:35:08 days ago) |
result | success | log | rebuild |
toolchain | public-0.16.0 |
---|---|
target | x86_64-linux-gnu |
tgt config | linux_debian_11-gcc_12.1 |
timestamp | 2024-04-23 20:50:06 UTC (01 05:35:41 days ago) |
result | success | log | rebuild |
Changes
Change Log
2.4.6 (2021-03-22)
Fixed bugs:
- REQUIRE does not compile when operator== in different namespace #443
- Using templated operator== inside TEST_CASE changes deduced types of forwarding references #399
Closed issues:
- CMake doesn't link package #483
- Assertions are slow when running on Windows with a debugger attached #481
- Get list of registered test-case names #479
- Can't compile with glibc master (future 2.34): SIGSTKSZ is no longer a constant #473
- How to use Doctest with Github Actions #472
- Link error (multiple definition...) in simple project #470
- INFO does not compile when used like a function call #469
- std::uncaught_exceptions is only available if compiling for macOS 10.12 or above #466
- Compile failure with WinRT on 2.4.5 #465
Merged pull requests:
- Improve speed with attached debugger (Windows) #482 (pgroke)
- Convert to bool by casting, rather than double negation #480 (kitegi)
- Fix compile error when targeting macOS version earlier and macOS 10.12 #478 (SamWindell)
- Fix MSVC linter warning about uninitialized TestSuite variables #471 (Reedbeta)
- REQUIRE does not compile when operator== in different namespace #443 . #468 (navinp0304)
- Automatically add TEST_SUITE labels to discovered tests #464 (shivupa)
2.4.5 (2021-02-02)
Closed issues:
- Stack buffer overflow in
String
constructor #460 - Surpress warnings from clang-tidy #459
- compilation issue in MSVC when defining DOCTEST_THREAD_LOCAL to static #458
- nvcc compiler warning; doctest.h(4138): warning : expression has no effect #454
- Use of std::atomic can slow down multithreaded tests #452
Merged pull requests:
- Fix compilation on case-sensitive filesystems #463 (jhasse)
- Use function-like macros for prefixless macro names #462 (tbleher)
- Implement a multi lane atomic for assertion counts #453 (martinus)
2.4.4 (2020-12-25)
Closed issues:
- 2.4.2: build fails #450
- combine the same tests for different build configurations from multiple shared objects without having symbol clashes #436
- Issue with GitHub Security Scanning: gmtime #423
2.4.3 (2020-12-16)
2.4.2 (2020-12-15)
Closed issues:
- DOCTEST_CHECK_THROWS_WITH_AS fails to work with dependant exception type #447
- MSVC warnings: narrowing conversion, signed/unsigned mismatch #446
- log contexts for failures in JUnit reporter #441
- MinGW "'mutex' in namespace 'std' does not name a type" error. #438
- Test runner thread initialization #435
- PLATFORM is misdetected on MacOSX Big Sur #415
- CHECK_EQ with enum values #276
Merged pull requests:
- Squash MSVC warnings when including ntstatus.h #449 (nickhutchinson)
- Add MAIN_PROJECT check for test option #445 (globberwops)
- Suppress clang-analyzer-cplusplus.NewDeleteLeaks #444 (ncihnegn)
- log contexts for failures in JUnit reporter #442 (runave)
- Fix 32bit support on macOS #440 (AlexanderLanin)
2.4.1 (2020-11-04)
Closed issues:
- Avoid old C-style casts #424
- Segfault in unwind #422
- Inspect exception with gdb #421
- use-of-uninitialized-value #414
- Support unit tests with MPI #413
- Break into debugger support is missing for Linux #411
- What if built doctest as static library instead of header-only #408
- [Question] How to get test case name #407
- create extensions header for optional features requiring more std includes or newer C++ features #405
- tests/asserts summary lines are misaligned when counts exceed 999999 #402
- Call to 'ne' is ambiguous -- with solution #395
- Intermittent Segfaults #391
- Junit classname #390
- Add default printers for enums #121
Merged pull requests:
- Enum support (fix for Issue #121) #429 (jkriegshauser)
- Support Clang 3.4 #428 (AlexanderLanin)
- Silence remarks on old C-style casts #425 (UnePierre)
- Initial MPI unit tests implementation #418 (BerengerBerthoul)
- Add JUNIT_OUTPUT_DIR option to doctest_discover_tests #417 (Tradias)
- Add option to build with std headers. #416 (avostrik)
- Port Catch2 break into debugger for Linux. closes #411 #412 (mikezackles)
- summary: align even large values #402 #403 (dankamongmen)
- Add breakpoint inline assembly for the Apple Silicon macOS. #400 (bruvzg)
- fix google's death test URI in roadmap #393 (ashutosh108)
2.4.0 (2020-06-27)
Closed issues:
- Count points based on the number of passed/failed cases? #386
- How to understand "#data_array" in std::string? #383
- crash: doctest with custom allocator #382
- Feature Request: format PRIVATE/PUBLIC/INTERFACE entries with constant indentation #378
- JUnit Reporter for Doctest #376
- Avoiding Feature Bloat #374
- StringMaker<wchar_t> fail to compile with C++20 enabled (GCC) #357
- doctest_discover_tests and FetchContent_Declare #351
- Junit reporter #318
Merged pull requests:
- Add a note that doctest can be installed through Homebrew #388 (cameronwhite)
- provide alternative implementation of has_insertion_operator for C++20 #387 (lukaszgemborowski)
- Fix issue template to mention doctest #380 (nyanpasu64)
2.3.8 (2020-05-17)
Closed issues:
- Scenario name can not be passed to -tc to execute single scenario #373
- Compile Error with CHECK_NOTHROW when using 2 Template Arguments #372
- dll example won't compile #371
- Build error with MinGW (Mingw-w64) due to missing Windows.h (with capital W) #370
- How to override file_line_to_stream? #369
- Memory sanitizer fails. #365
- Warning c6319 in Visual Studio #359
- Any option to show each test case's execute time? #358
- doctest in embedded #355
- Reloading a plugin with test cases leads to a segmentation fault #350
- Compiling with DOCTEST_CONFIG_COLORS_ANSI fails on Windows #348
- Can I inherit ConsoleReporter? #344
- Noreturn and noexcept defines for Visual Studio 2013 support #327
- Data-driven testing -- print out the deepest DOCTEST_SUBCASE #215
- Print the SUBCASE path when an assert fails in the TEST_CASE body #125
Merged pull requests:
- fix: possible UB with nullptr increment #368 (oktonion)
- Use CMake's CMP0077 policy if available #363 (thelink2012)
- Fix warning c6319 in Visual Studio 16.5 #361 (Cvelth)
2.3.7 (2020-02-24)
Closed issues:
- Some of the GitHub CI builds are failing #334
- C++20 removed std::uncaught_exception #333
- Doctest SEH handlers are called before __except handlers #324
Merged pull requests:
- using std namespace where necessary and timer ticks fix #341 (oktonion)
- fix std::uncaught_exceptions #340 (cyyever)
- Fix GitHub CI and add GitHub build badges #336 (claremacrae)
- http -> https #331 (Coeur)
- Switch to catching unhandled exceptions on Windows Closes #324 #325 (jkriegshauser)
2.3.6 (2019-12-16)
Closed issues:
- Link problem w/ BUILD=Release if MESSAGE() with std::string/ostream-operator is used #316
- the FAQ about difference to Catch2 is missing tags #315
- include Windows.h in small caps to silence clang warnings #312
- Mistake in generator with lgtm error #311
- CMake: cannot install target doctest_with_main #310
- [bug] INFO() and CAPTURE() cannot compile using MSVC when used with DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL #306
- Skip subcase #304
- Does some equivalent features from google test exist here? #300
- How to use doctest in dll only(without main.cpp and .exe) #299
- Warning: C26812: The enum type 'doctest::assertType::Enum' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). #298
- test executable_dll_and_plugin fails on Linux, GCC 8.1.0, -fsanitize=address #201
Merged pull requests:
- Fixed missing ostream include for MacOS when defining DOCTEST_CONFIG_… #314 (NKTomHaygarth)
- include windows.h in cmall caps to silence clang nonportable warnings #313 (suoniq)
- Add .editorconfig file. #301 (DaanDeMeyer)
- Add Github Actions CI #285 (DaanDeMeyer)
2.3.5 (2019-09-22)
Closed issues:
- [feature request] Assertion macros for throwing exception of a specific type with message - <LEVEL>_THROWS_WITH_AS(expr, string, ex_type) #295
- CHECK_THROWS_AS of non-default constructor wants to call default constructor #293
- Typos and spelling errors in source, documentation and scripts #291
- Customize test names / variable substitution #284
- SUBCASE in function not behaving as expected #282
- SUPER_FAST_ASSERTS fails to compile CHECK_MESSAGE #281
- CHECK_MESSAGE no longer works with DOCTEST_CONFIG_SUPER_FAST_ASSERTS #280
- CAPTURE of structured binding element no longer works #279
- Reporter:
test\_case\_end
no longer fired after test case restart #278 - Add debug break override support #277
- Running tests from within Visual Studio in a static lib project #275
- Compile-time error when using a raw string literal inside of REQUIRE (MSVC 2017) #274
- Give example for having tests in production code #252
- Memory leaks just by including doctest.h #205
- Feature request: print subcase when an exception is thrown inside one #136
Merged pull requests:
- Fix typos and misspellings found by codespell. #292 (warmsocks)
- Document order by issue correctly #290 (DaanDeMeyer)
- Document that -order-by=file is compiler-dependent #289 (DaanDeMeyer)
- Add -order-by=name to filter_2 test #288 (DaanDeMeyer)
- Add support for compiling with clang-cl #286 (DaanDeMeyer)
- No minimum version limitation of Meson #283 (ydm)
2.3.4 (2019-08-12)
Closed issues:
- Remove INFO() limitation for using only lvalues and no rvalues #269
- Compile error on MAC OS with AppleClang 8.0.0.8000042 #266
- Throwing exception in a mocked method #265
- Illegal syntax for decorators compiles and runs without warning, but has no effect #264
- Support conditional expressions in REQUIRE #262
- Register a listener(reporter) that always listens #257
- Memory sanitizer complaint #255
- Windows Clang GNU command line warnings #253
- The build writes into the source directory #249
- How to enable tests inside another exe #246
- Testing multiple headers. #244
- CMakeLists.txt: Needs CMAKE_CXX_STANDARD=11 #243
- [bug] Can't compile the tests because of mutex, that is declared in the doctest #242
Merged pull requests:
- Improve Listener docs #273 (claremacrae)
- Rework
INFO
lazy evaluation to use lambdas. #270 (DaanDeMeyer) - Prevent compile errors with AppleClang compiler #268 (ClausKlein)
- Revert "fix : includeing windows.h header caause error" #263 (onqtam)
- Fix static analyzer URLs #259 (godbyk)
- fix : includeing windows.h header caause error #258 (rinechran)
- only look for C++ compiler with CMake #256 (zhihaoy)
- Fix #253 #254 (DaanDeMeyer)
- add alias target for doctest for use in build tree #247 (trondhe)
2.3.3 (2019-06-02)
Closed issues:
- Build fails with gcc9 because of -Wstrict-overflow=5 which is too high #241
- doctest given defined with short macro name #239
- Splitting templated test across different translation units #238
- Compile errors with iosfwd.h and Visual Studio 2019 Preview #183
- Add CMake test support as catch_discover_tests() in Catch2 #171
Merged pull requests:
- fix #239 - use long macro name #240 (m-bd)
- Add doctest_discover_tests() #236 (RedDwarf69)
- Ignore redundant-decls warning on MinGW #235 (AMS21)
- Fixed meson build file dependency declaration #233 (jormundgand)
2.3.2 (2019-05-06)
Closed issues:
- scripts/bench/run_all.py : module 'urllib' has no attribute 'urlretrieve' #230
- wrong set of tests registered with TEST_CASE_TEMPLATE get executed #228
- Logging not Working for me #227
- Link test runner executable into dll? #226
- Linking issue for executables after including doctest in library #224
- Strange REQUIRE_THROWS behaviour #223
- Windows clang-cl Wunused-variable warning #221
- Update doctest 2.3.1 in bincrafters #220
- make install, on 64 bit, installs cmake files into lib instead of lib64 folder #218
- TSAN: data race related to hasLoggedCurrentTestStart #217
- REQUIRE_THROWS_AS does not support class constructors #216
- Build failure on clang 7.0.1 on Fedora 29 #214
- add example compatible with -> https://github.com/report-ci/ #212
- No DOCTEST_WITH_TESTS? #211
Merged pull requests:
- Added meson file, to declare a dependency. #232 (jormundgand)
- Explicitly specify the doctest_with_main C++ standard in CMake. #231 (DaanDeMeyer)
- Remove architecture check from CMake package #225 (mmha)
- add default install prefix #219 (a4z)
- [regression] Workaround MSVC preprocessor issue triggered by REQUIRE_THROWS #213 (zhihaoy)
2.3.1 (2019-03-24)
Merged pull requests:
2.3.0 (2019-03-23)
Closed issues:
- Compilation with emscripten fails by default because of signal handling #207
- Compilation fails with cl.exe /Zc:wchar_t- #206
- Parallel invocation of doctest's own testsuite via CTest fails #202
- Get the number of passed/failed tests in the code #200
- Tests alongside code with multiple executables #199
- Cppcheck 1.86 warnings #198
- Compiling as Dll maybe is wrong #196
- Forward-declaring identifiers in std:: is UB - consider including some of the cheaper C/C++ stdlib headers #194
- QtCreator + clang warning about operator << precedence #191
- run test fixture from cli #190
- Installing doctest using cmake and make fails on Ubuntu 16.04 (C++11 is not used) #189
- c++17 requirement for testing private members #188
- [feature request] implement a user-extendable reporter system #138
- Same test runs multiple times when written in a header and included with different unnormalized paths #45
Merged pull requests:
- Fix unmatched bracket in DOCTEST_TEST_CASE_CLASS #204 (patstew)
- Template apply #203 (zhihaoy)
- No undefined behavior per C++ standard in detecting endianness. #195 (dimztimz)
- Fix propagating include directories of target doctest_with_main #193 (dimztimz)
- Move single header to a separate folder #187 (dimztimz)
- Fix Clang format to handle C++11 #186 (dimztimz)
- Rename doctest_impl.h to doctest.cpp for less confusion. #185 (dimztimz)
2.2.3 (2019-02-10)
Closed issues:
- Calling convention needed on a few functions #182
- Terminal color is not reset when a test fails with some signal #122
- testing private members - ability to write test cases in class bodies #76
2.2.2 (2019-01-28)
Closed issues:
- Add way to override getCurrentTicks() implementation #178
- Wrap <csignal> include with ifdef #177
- How to stop doctest hijack unhandled exceptions? #176
- Change the include path of the
doctest
CMake interface target so users need to specify the folder as well #175 - Reduce scope of DebugOutputWindowReporter instance #174
- Can logging (INFO) be used in helper class outside of TEST_CASE? #169
Merged pull requests:
- Change the include path in examples as #175 #180 (ncihnegn)
- Fix CMake include path #175 #179 (ncihnegn)
2.2.1 (2019-01-15)
Closed issues:
- the
--no-throw
option shouldn't affect\<LEVEL\>\_NOTHROW
asserts #173 - Make doctest work with XCode 6 and 7 (no support for C++11 thread_local) #172
- Print vector content. #170
- Conan package #103
- [feature request] Thread-safety for asserts and logging facilities #4
2.2.0 (2018-12-05)
Closed issues:
- remove the FAST_ versions of the binary asserts (not a breaking change!) #167
- [compile times] make the DOCTEST_CONFIG_SUPER_FAST_ASSERTS identifier affect normal asserts too #166
2.1.0 (2018-11-30)
Closed issues:
- doctest::String ctor with non-zero terminated string #165
- thread_local is not supported on iOS 9.0 #164
- Compiler error on Android NDK r18 #163
- [question] One setup for multiple tests #160
- clang unwanted warning in user code #156
- Unsigned integer overflow in fileOrderComparator #151
- ThreadSanitizer: signal-unsafe call inside of a signal #147
- Feature request: check for exception string (like Catch's CHECK_THROWS_WITH) #97
Merged pull requests:
- Fixed build error under Android NDK #162 (tals)
- Added clang-7 to travis build #161 (AMS21)
- Remove clang-tidy warnings for static fields created by doctest #159 (rantasub)
- Make it possible to change the command line options prefix #158 (tbleher)
2.0.1 (2018-10-24)
Closed issues:
- macro name collision with google log #157
- Add #define to not run tests by default #152
- REQUIRE_THROWS_MESSAGE not checking message correctly #150
- Test case passes even though subcase failed #149
Merged pull requests:
- Correctly document when a main() entry point will be created #155 (tbleher)
- Correct format string for unsigned char #154 (tbleher)
2.0.0 (2018-08-23)
Closed issues:
- MSVC 2017 15.8.1, New Warnings as Errors #144
- Windows clang-cl Wdeprecated-declarations warnings #143
- Logo Proposal for Doctest #141
- PCH Support #140
- improve compile times even further #139
- !!! BREAKING CHANGE !!! - Move to C++11 for next version of the library #137
- getCurrentTicks producing warning on MinGW #133
- [enhancement] Add support for "stand-alone assertions". #114
Merged pull requests:
1.2.9 (2018-05-10)
Closed issues:
- GCC 8.0 std::uncaught_exception() is deprecated #130
- Signal stack size too small on Linux #129
- Support Intel Compiler #128
- Please add support for MSVC 2005 #127
- scan-build report "Dereference of null pointer" for function wildcmp #124
- !!! BREAKING CHANGE (console output only) !!! - Emulate the error/warning format emitted by native compiler gcc/clang/msvc when printing test failures in the log #123
- ARM builds: FTBFS on armhf - error: cast from 'const char*' to 'const #118
Merged pull requests:
- Exclude Intel from GCC compiler check #132 (smcallis)
- Fix deprecated-declarations warning with GCC-8.0 #131 (AMS21)
1.2.8 (2018-03-10)
Closed issues:
- ARM64 builds: templated_test_cases.cpp test fails #119
1.2.7 (2018-02-06)
Closed issues:
- MSan has runtime error: unsigned integer overflow #116
- clang-tidy warning about cert-err58-cpp #115
- Linking errors #113
- inlining function defs #111
- Nullptr issue. #110
- MemorySanitizer: use-of-uninitialized-value #109
- Potential memory leak through scan-build #108
- Warnings raised to error with latest MSVC version #107
- New solution for tests in static libraries ! (MSVC) #106
- Command line flags do not work after code formatter/beautifier #104
- Cppcheck 1.81 warnings #102
Merged pull requests:
- Fix macros WIN32_LEAN_AND_MEAN typo #112 (vladimirgamalyan)
- Correct DOCTEST_NO_INSTALL logic; do install unless it is set (#99) #100 (onqtam)
- Correct DOCTEST_NO_INSTALL logic; do install unless it is set #99 (OdyX)
1.2.6 (2017-10-29)
Closed issues:
- [bug] writing an exception translator in a header file results in it being registered multiple times which is suboptimal #98
- Warnings when using something more than /W4 for Visual Studio #95
Merged pull requests:
- Added an option to not install Doctest in the CMake scripts #96 (nm17)
- Adding a defensive check against a null pointer for the current test suite #94 (Lectem)
- Remove incomplete copy ctor #93 (McMartin)
1.2.5 (2017-10-06)
Closed issues:
- Xcode 9 / clang - unknown warning group #92
1.2.4 (2017-09-20)
Closed issues:
- [bug] test cases can end up in the wrong test suite #91
1.2.3 (2017-09-11)
Closed issues:
- [bug] Defining a variable T inside a test with DOCTEST_CONFIG_DISABLE defined does not compile #90
- [support] Using
DOCTEST\_CONFIG\_NO\_SHORT\_MACRO\_NAMES
does not compile using g++ 6.3.0 #89 - [question] Why are SUBCASEs executed only once when within a function called multiple times? #88
1.2.2 (2017-09-05)
Closed issues:
- [question] Differences between doctest and googletest (gtest) for uninitialised local variables in test cases #86
- !!! BREAKING CHANGE !!! - remove the custom implementation of std::is_constructible and optionally use the <type_traits> header because of infinite template recursion issues with GCC #85
- Static Analysis results of doctest #83
- !!! BREAKING CHANGE !!! - catch exceptions as const reference in <LEVEL>_THROWS_AS #81
- doctest implementation as static library #77
- Provide some easy way to compare structs containing float/doubles #73
Merged pull requests:
- Add support for templated scenarios #87 (Lectem)
- Prefer if(MSVC) in CMakeLists.txt. #84 (martinmoene)
- catch throw_as exception as const reference #82 (a4z)
- Added doctest_with_main static lib #78 (ymadzhunkov)
1.2.1 (2017-05-24)
Closed issues:
- Compile error under MSVC 2015/2017 if <thread> included in same file as "doctest.h" #72
Merged pull requests:
1.2.0 (2017-05-15)
Closed issues:
- Further improvements on compile time - disable inlining of functions used in asserts #70
- Improve runtime performance - lazy stringification, more inlining, no statics on the hot path, move semantics for classes such as doctest::String which are used by value, etc. #69
- Add option to show duration of test case execution and add a timeout(seconds) decorator - marking them as failed if they exceed it #68
- Add support for test case decorators - label, description, skip, may_fail, should_fail, expected_failures, etc. #67
- Integrate static analysis into the CI builds #66
- Print the test suite name on test case failure #65
- Add signal handlers to handle crashes (and use SEH under Windows) - report which test case failed #63
- Add support to Approx for strong typedefs of double #62
- [question] Is there a way to always have 0 as the exit code regardless of test results? #59
- Add support for un-parenthesized expressions containing commas in asserts #58
- Add ability to filter subcases with filters #57
- Add option to query if code is being ran inside of a test - doctest::is_running_in_test #56
- Ability for a binary (executable / shared object) to use the test runner implementation of another binary - with exported symbols - so tests end up in a single registry #55
- How to force the use of colors in the terminal? #54
- How can I mix production code with the Unit Tests? #53
- add <= and >= operators to Approx (and also maybe < and >) #52
- Add ability to capture variables from test scope #48
- !!! BREAKING CHANGE !!! - Make TEST_SUITE work with blocks and add TEST_SUITE_BEGIN #41
- Add option to print which test suites/cases are run #39
- Add support for templated test cases - parameterized by type #38
- Add custom failure messages with lazy stringification #23
- Add an exception translation mechanism + the ability for users to extend it with custom exception types #12
- Add API for reporting failures #9
Merged pull requests:
- Update doctest to work with ARM DS5-compiler #64 (tomasnilefrost)
1.1.4 (2017-02-18)
Closed issues:
- Add option --force-colors - for when a tty is not detected for stdout #51
- Issue with using lambdas in tests in gcc #49
- Add the include file to releases #47
Merged pull requests:
- Add translation of std::exception for exceptions that terminate a test case #46 (eliaskosunen)
1.1.3 (2016-11-15)
Closed issues:
- Exception handlers cause warnings when exceptions are disabled #44
1.1.2 (2016-10-10)
Closed issues:
1.1.1 (2016-09-22)
1.1.0 (2016-09-21)
Closed issues:
- char* comparison uses the contents, not the pointer #36
- add configuration preprocessor identifier for passing by value in assertions instead of by reference #35
- restrict expressions in assertion macros to binary comparisons at most with a static assert #34
- Add clearFilters() to doctest::Context #33
- A way to refrain from polluting “#define” space for users of tested code? #32
- drop VC++6 support #31
- False positive test #30
- Turn off coloring after tests are finished? #28
- C++11 nullptr #27
- Only one SUBCASE per line is executed #25
- creative formatting of chars #24
- DOCTEST_BREAK_INTO_DEBUGGER undefined under OSX #22
- Tests inside a static library #21
- Add example how to remove doctest options from the command line for the program after the tests run #20
- Single-letter options active even without leading '-' (dash) #19
- pointer stringification not working for compilers different from MSVC #18
- Tests that accompany code run and produce output at default #17
- GCC 5.3.1 Compiler warning: sign compare #16
- Slower than Catch in realistic test cases #14
- Rename doctest::detail::Result res; in DOCTEST_ASSERT_IMPLEMENT #10
- No red when all tests pass #7
- UNIX line feedings on GitHub please #6
Merged pull requests:
- don't show green when tests fail #26 (ferkulat)
- Include "program code" in example #15 (martinmoene)
1.0.0 (2016-05-22)
Merged pull requests:
- Reduce the header size for test users #3 (zah)
- Add a Gitter chat badge to README.md #1 (gitter-badger)
* This Change Log was automatically generated by github_changelog_generator