Skip to content

Commit

Permalink
v2.4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Saalvage committed Jun 18, 2022
1 parent 0663959 commit b7c21ec
Show file tree
Hide file tree
Showing 18 changed files with 257 additions and 221 deletions.
125 changes: 123 additions & 2 deletions CHANGELOG.md
@@ -1,7 +1,128 @@
# Change Log

## [2.4.8](https://github.com/doctest/doctest/tree/2.4.8) (2022-01-10)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.7...2.4.8)
## [v2.4.9](https://github.com/doctest/doctest/tree/v2.4.9) (2022-06-18)
[Full Changelog](https://github.com/doctest/doctest/compare/v2.4.8...v2.4.9)

**Closed issues:**
- Visual Studio's Test Explorer and Resharper C\+\+'s Unit Test Explorer don't see Doctest's tests \#661 ([KulaGGin](https://github.com/KulaGGin))
- How to get detailed information about testcases failing due to thrown exceptions? \#660 ([NiklasKappel](https://github.com/NiklasKappel))
- Add clang\-tidy integration and fix all warnings \#659 ([Saalvage](https://github.com/Saalvage))
- Avoid static init problem in insufficient\_procs\(\) \(MPI\) \#657 ([starintheuniverse](https://github.com/starintheuniverse))
- Use MPI\_Isend in MpiConsoleReporter to avoid deadlock \#656 ([starintheuniverse](https://github.com/starintheuniverse))
- Deadlock in MpiConsoleReporter when root rank fails assert \#655 ([starintheuniverse](https://github.com/starintheuniverse))
- Cleanup of DOCTEST\_DO\_BINARY\_EXPRESSION\_COMPARISON\. Fixes \#651 \#652 ([iboB](https://github.com/iboB))
- Comparison with implicit cast from non\-const value can't be decomposed \#651 ([iboB](https://github.com/iboB))
- Local structured bindings cannot be used in CHECK macros \(since 2\.4\.8\) \#647 ([pragmaxwell](https://github.com/pragmaxwell))
- Add tests for DOCTEST\_CONFIG\_USE\_STD\_HEADERS \#643 ([Saalvage](https://github.com/Saalvage))
- Stringification amendments \#642 ([Saalvage](https://github.com/Saalvage))
- Clean up defines a bit; Implement \#439 \#641 ([Saalvage](https://github.com/Saalvage))
- Fix \#508 \#640 ([Saalvage](https://github.com/Saalvage))
- Fix \#508 \#639 ([Saalvage](https://github.com/Saalvage))
- New doctest version gives me an error: reference to local binding '\.\.\.' declared in enclosing function 'DOCTEST\_ANON\_FUNC\_16' \#638 ([a4z](https://github.com/a4z))
- The tutorial example does not work \(linker errors\) with clang 10 \#637 ([sixcy](https://github.com/sixcy))
- Implementing \`DOCTEST\_ASSERT\_IMPLEMENT\_1\` as lambda prevents testing structured bindings \#636 ([ChrisThrasher](https://github.com/ChrisThrasher))
- re\-re\-remove overly restrictive minimum version of meson \#635 ([eli-schwartz](https://github.com/eli-schwartz))
- Fix move\-only types failing to decompose correctly \#634 ([Saalvage](https://github.com/Saalvage))
- Weird compilation error when using CHECK\_THROWS/CHECK\_THROWS\_AS on Visual Studio 2019 with no exceptions \#633 ([yeputons](https://github.com/yeputons))
- Error triggered by comparing typeid with new doctest 2\.4\.8 \#632 ([JazzSuite](https://github.com/JazzSuite))
- Improve Mac PowerPC support \#631 ([ryandesign](https://github.com/ryandesign))
- issue introduced in 2\.4\.7 \#630 ([onqtam](https://github.com/onqtam))
- Decompose expressions containing the spaceship operator \#629 ([falbrechtskirchinger](https://github.com/falbrechtskirchinger))
- added nolint for cert\-err58 \#628 ([serguei-k](https://github.com/serguei-k))
- Fix properties not being passed in doctest\_discover\_tests \#626 ([quantumsteve](https://github.com/quantumsteve))
- Config no multithreading \#625 ([Saalvage](https://github.com/Saalvage))
- wasm\*\-support? \#624 ([FrozenSource](https://github.com/FrozenSource))
- Fix MPI extension to work with no parallel tests \#623 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- string comparison leads to gotting stuck \#622 ([laoshaw](https://github.com/laoshaw))
- doctest\_discover\_tests no longer sets ENVIRONMENT variables for discovered tests\. \#621 ([quantumsteve](https://github.com/quantumsteve))
- Add contains option to checks\. \#620 ([MFraters](https://github.com/MFraters))
- Feature request: CHECK\_THROWS\_WITH with contains option \#619 ([MFraters](https://github.com/MFraters))
- Add alias target for doctest\_with\_main \#617 ([jessestricker](https://github.com/jessestricker))
- Allow escaping backslash with backslash in filters \(\#614\) \#616 ([yeputons](https://github.com/yeputons))
- Fix operator<< \#615 ([Saalvage](https://github.com/Saalvage))
- Correct minor typos \#613 ([utilForever](https://github.com/utilForever))
- Fix MPI extension to work if launched without mpirun/mpiexec \#612 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Fix mpi subcase \#611 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- compilation error with custom operator== defined in namespace \#610 ([zvyagin1](https://github.com/zvyagin1))
- Regression: Clang\-Tidy warnings in 2\.4\.8 \#607 ([nlohmann](https://github.com/nlohmann))
- Internal compiler error with GCC 7\.5 \#606 ([foonathan](https://github.com/foonathan))
- tagging convension has changed? \#605 ([kloczek](https://github.com/kloczek))
- Update Doctest in vcpkg to 2\.4\.8 \#604 ([gc435](https://github.com/gc435))
- Add IsNaN operator\! \#603 ([Saalvage](https://github.com/Saalvage))
- Ignored generated files from CMake, OSX, Xcode, and VS \#602 ([LeonBrands](https://github.com/LeonBrands))
- Move roadmap and wipe it clean \#601 ([Saalvage](https://github.com/Saalvage))
- removes a duplicate word 'most' in configuration\.md \#599 ([krishnakumarg1984](https://github.com/krishnakumarg1984))
- Fix subcase reentry \#598 ([Saalvage](https://github.com/Saalvage))
- Loop\-generated \`SUBCASE\`s are not run \#597 ([yeputons](https://github.com/yeputons))
- Void \#596 ([Saalvage](https://github.com/Saalvage))
- Add flag that forces custom stringification methods to be provided \#595 ([Saalvage](https://github.com/Saalvage))
- Fix coverage \#594 ([Saalvage](https://github.com/Saalvage))
- TEST CODECOV PR BEHAVIOR \#593 ([Saalvage](https://github.com/Saalvage))
- Ignore CMake and MacOS generated files \#592 ([LeonBrands](https://github.com/LeonBrands))
- Feature request: option to disable fallback "\{?\}" stringifier \#591 ([YarikTH](https://github.com/YarikTH))
- Add tests for default stringification result of doctest \#590 ([YarikTH](https://github.com/YarikTH))
- Feature config ret vals \#589 ([Saalvage](https://github.com/Saalvage))
- DOCTEST\_CONFIG\_ASSERT\_RETURN\_VALUES \#588 ([Saalvage](https://github.com/Saalvage))
- Support pretty printing of container based on heuristics \#587 ([YarikTH](https://github.com/YarikTH))
- Refactor stringification \#585 ([Saalvage](https://github.com/Saalvage))
- Feature: Better NaN \#584 ([Saalvage](https://github.com/Saalvage))
- Nan check \#582 ([Saalvage](https://github.com/Saalvage))
- Update roadmap following maintainer change \#581 ([eyalroz](https://github.com/eyalroz))
- Regression between 2\.4\.6 and 2\.4\.7 \#571 ([YarikTH](https://github.com/YarikTH))
- build failure with gcc\-11\.2 when using user declared operator<<\(ostream, vector\) \#551 ([nlitsme](https://github.com/nlitsme))
- variable maximum is assigned 6206517616395625 instead of the actual return value which is 5\.0 \#530 ([kk723](https://github.com/kk723))
- toString can call existing user\-defined toString through ADL incorrectly \#508 ([zeux](https://github.com/zeux))
- \[Coverity\] Concurrent data access violations \(MISSING\_LOCK\) doctest\.h: 5838 in doctest::<unnamed>::ConsoleReporter::test\_case\_start\(const doctest::TestCaseData &\)\(\) \#486 ([jiridanek](https://github.com/jiridanek))
- Provide an error message if REQUIRE \(or other disabled assertion macros\) are used when exceptions are disabled \#439 ([alexeyr](https://github.com/alexeyr))
- Conflict with templated toString function \#420 ([TillHeinzel](https://github.com/TillHeinzel))
- \-tc does not work with comma in names \#398 ([martinus](https://github.com/martinus))
- Compile error on MSVC2019 with any macro which involves stringification of std::string \(asserts, INFO, etc\.\) when <ostream> isn't included \#381 ([nyanpasu64](https://github.com/nyanpasu64))
- the dll example doesn't run correctly on Windows with MinGW \#375 ([GregKon](https://github.com/GregKon))
- add basic conan recipe \#354 ([trondhe](https://github.com/trondhe))
- CHECK\_MESSAGE\(\) should accept temporaries \#337 ([eyalroz](https://github.com/eyalroz))
- stringify of cstring literals doesn't work out of the box with separate test\_driver\.cpp \#329 ([teichert](https://github.com/teichert))
- warning : function declared 'noreturn' should not return \[\-Winvalid\-noreturn\] \#307 ([Vexthil](https://github.com/Vexthil))
- Test cases containing a comma cannot be run individually \#297 ([Tradias](https://github.com/Tradias))
- \[bug\] Can't compile the tests because of mutex, that is declared in the doctest \#242 ([BrunaoW](https://github.com/BrunaoW))
- The \`CHECK\` macro conflicts with Boost\.Beast \(and surely others\) \#234 ([reddwarf69](https://github.com/reddwarf69))
- Feature request: check if a \`float\` or \`double\` is NaN \#105 ([iamthad](https://github.com/iamthad))

**Merged pull requests:**
- Add clang\-tidy integration and fix all warnings \#659 ([Saalvage](https://github.com/Saalvage))
- Avoid static init problem in insufficient\_procs\(\) \(MPI\) \#657 ([starintheuniverse](https://github.com/starintheuniverse))
- Use MPI\_Isend in MpiConsoleReporter to avoid deadlock \#656 ([starintheuniverse](https://github.com/starintheuniverse))
- Cleanup of DOCTEST\_DO\_BINARY\_EXPRESSION\_COMPARISON\. Fixes \#651 \#652 ([iboB](https://github.com/iboB))
- Add tests for DOCTEST\_CONFIG\_USE\_STD\_HEADERS \#643 ([Saalvage](https://github.com/Saalvage))
- Stringification amendments \#642 ([Saalvage](https://github.com/Saalvage))
- Clean up defines a bit; Implement \#439 \#641 ([Saalvage](https://github.com/Saalvage))
- Fix \#508 \#640 ([Saalvage](https://github.com/Saalvage))
- re\-re\-remove overly restrictive minimum version of meson \#635 ([eli-schwartz](https://github.com/eli-schwartz))
- Fix move\-only types failing to decompose correctly \#634 ([Saalvage](https://github.com/Saalvage))
- Improve Mac PowerPC support \#631 ([ryandesign](https://github.com/ryandesign))
- added nolint for cert\-err58 \#628 ([serguei-k](https://github.com/serguei-k))
- Fix properties not being passed in doctest\_discover\_tests \#626 ([quantumsteve](https://github.com/quantumsteve))
- Config no multithreading \#625 ([Saalvage](https://github.com/Saalvage))
- Fix MPI extension to work with no parallel tests \#623 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Add contains option to checks\. \#620 ([MFraters](https://github.com/MFraters))
- Add alias target for doctest\_with\_main \#617 ([jessestricker](https://github.com/jessestricker))
- Allow escaping backslash with backslash in filters \(\#614\) \#616 ([yeputons](https://github.com/yeputons))
- Fix operator<< \#615 ([Saalvage](https://github.com/Saalvage))
- Fix MPI extension to work if launched without mpirun/mpiexec \#612 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Fix mpi subcase \#611 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Add IsNaN operator\! \#603 ([Saalvage](https://github.com/Saalvage))
- Move roadmap and wipe it clean \#601 ([Saalvage](https://github.com/Saalvage))
- removes a duplicate word 'most' in configuration\.md \#599 ([krishnakumarg1984](https://github.com/krishnakumarg1984))
- Fix subcase reentry \#598 ([Saalvage](https://github.com/Saalvage))
- Add flag that forces custom stringification methods to be provided \#595 ([Saalvage](https://github.com/Saalvage))
- Fix coverage \#594 ([Saalvage](https://github.com/Saalvage))
- Ignore CMake and MacOS generated files \#592 ([LeonBrands](https://github.com/LeonBrands))
- Feature config ret vals \#589 ([Saalvage](https://github.com/Saalvage))
- Refactor stringification \#585 ([Saalvage](https://github.com/Saalvage))
- Feature: Better NaN \#584 ([Saalvage](https://github.com/Saalvage))
- Nan check \#582 ([Saalvage](https://github.com/Saalvage))

## [v2.4.8](https://github.com/doctest/doctest/tree/v2.4.8) (2022-01-10)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.7...v2.4.8)

**Closed issues:**

Expand Down
27 changes: 27 additions & 0 deletions doc/html_generated/assertions.html
Expand Up @@ -138,6 +138,19 @@

Currently [**logging macros**](logging.html) cannot be used for extra context for asserts outside of a test run. That means that the ```_MESSAGE``` variants of asserts are also not usable - since they are just a packed ```INFO()``` with an assert right after it.

## String containment

```doctest::Contains``` can be used to check whether the string passed to its constructor is contained within the string it is compared with. Here's a simple example:

```
REQUIRE("foobar" == doctest::Contains("foo"));
```

It can also be used with the ```THROWS_WITH``` family of assertion macros to check whether the thrown exception [translated to a string](stringification.html#translating-exceptions) contains the provided string. Here's another example:
```
REQUIRE_THROWS_WITH(func(), doctest::Contains("Oopsie"));
```

## Floating point comparisons

When comparing floating point numbers - especially if at least one of them has been computed - great care must be taken to allow for rounding errors and inexact representations.
Expand All @@ -156,6 +169,20 @@

When dealing with very large or very small numbers it can be useful to specify a scale, which can be achieved by calling the ```scale()``` method on the ```doctest::Approx``` instance.

## NaN checking

Two NaN floating point numbers do not compare equal to each other. This makes it quite inconvenient to check for NaN while capturing the value.
```
CHECK(std::isnan(performComputation()); // does not capture the result of the call
```

**doctest** provides `doctest::IsNaN` which can be used in assertions to check if a float (or any other floating point fundamental type) is indeed NaN, outputting the actual value if it is not.
```
CHECK(doctest::IsNaN(performComputation()); // captures the result!
```

`IsNaN` is able to capture the value, even if negated via `!`.

--------

- Check out the [**example**](../../examples/all_features/assertion_macros.cpp) which shows many of these macros
Expand Down
6 changes: 3 additions & 3 deletions doc/html_generated/build-systems.html
Expand Up @@ -7,7 +7,7 @@

The latest released version of doctest can be obtained from here: https://raw.githubusercontent.com/doctest/doctest/master/doctest/doctest.h

You can substitute ```master``` with ```dev``` or a tag like ```1.2.9``` for a specific version in the URL above.
You can substitute ```master``` with ```dev``` or a tag like ```v1.4.8``` for a specific version in the URL above.

### CMake

Expand Down Expand Up @@ -77,8 +77,8 @@
- vcpkg
- hunter
- conan
- https://bintray.com/bincrafters/public-conan/doctest:bincrafters
- https://bintray.com/mmha/conan/doctest%3Ammha
- https://conan.io/center/doctest
- https://github.com/conan-io/conan-center-index/tree/master/recipes/doctest
- Homebrew (`brew install doctest`)

---
Expand Down
4 changes: 3 additions & 1 deletion doc/html_generated/commandline.html
Expand Up @@ -14,7 +14,9 @@
**Bool options** - they expect ```1```/```yes```/```on```/```true``` or ```0```/```no```/```off```/```false``` after the ```=``` sign - but they can also be used like flags and the ```=value``` part can be skipped - then ```true``` is assumed.

**Filters** - a comma-separated list of wildcards for matching values - where ```*``` means "match any sequence" and ```?``` means "match any one character".
To pass patterns with intervals use ```""``` like this: ```--test-case="*no sound*,vaguely named test number ?"```. Patterns that contain a comma can be escaped with ```\``` (example: ```--test-case=this\,test\,has\,commas```).
To pass patterns with intervals use ```""``` like this: ```--test-case="*no sound*,vaguely named test number ?"```. Patterns that contain a comma or a backslash can be escaped with ```\``` (example: ```--test-case=this\,test\,has\,commas\,and\,a\\\,backslash\,followed\,by\,a\,comma```).
If a backslash is followed by neither ```\``` nor ```,``` it's left as is, e.g. ```--test-case="Test that \ works correctly"```.
Be careful: your shell may use ```\``` for escaping as well, so `\` may actually get consumed by the shell instead of doctest.

All the options can also be set with code (defaults/overrides) if the user [**supplies the ```main()``` function**](main.html).

Expand Down

0 comments on commit b7c21ec

Please sign in to comment.