forked from catchorg/Catch2
Compare commits
48 Commits
v3.0.1
...
add_cstdin
Author | SHA1 | Date | |
---|---|---|---|
181265e9a6 | |||
97c48e0c34 | |||
9c9f35068e | |||
1bd233866c | |||
f993b702c6 | |||
caf1264588 | |||
a6d59b62b2 | |||
cc0e91472a | |||
3bd0c58878 | |||
a63ad74554 | |||
5f9109a8dc | |||
5a1ef7e4a6 | |||
bea58bf8bb | |||
34d9724058 | |||
5d269045b2 | |||
95a1206805 | |||
6f9f1465c3 | |||
8730260457 | |||
bdfa920f93 | |||
a369267874 | |||
1f381a1f62 | |||
165647abbc | |||
7e4ec432d0 | |||
078201fcf4 | |||
8110ee9206 | |||
fa9416426a | |||
338e4ec1f8 | |||
372b7575f6 | |||
d32fca4a49 | |||
a0ece7b252 | |||
0a810c5e59 | |||
d0177ee686 | |||
173539ab9e | |||
8822e28772 | |||
ff9506cedd | |||
0c13d021da | |||
3644b4135d | |||
1c4f52b24a | |||
231c58a048 | |||
5efd327dd4 | |||
40dd9dd3f4 | |||
4142e699c2 | |||
9e445930cc | |||
2dc657cd1f | |||
cca5923502 | |||
8c952bd076 | |||
85c00eb946 | |||
3a18a688a0 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,6 +20,7 @@ DerivedData
|
||||
Build
|
||||
.idea
|
||||
.vs
|
||||
.vscode
|
||||
cmake-build-*
|
||||
benchmark-dir
|
||||
.conan/test_package/build
|
||||
@ -31,3 +32,5 @@ msvc-sln*
|
||||
# Currently we use Doxygen for dep graphs and the full docs are only slowly
|
||||
# being filled in, so we definitely do not want git to deal with the docs.
|
||||
docs/doxygen
|
||||
*.cache
|
||||
compile_commands.json
|
||||
|
@ -37,9 +37,11 @@ endif()
|
||||
|
||||
|
||||
project(Catch2
|
||||
VERSION 3.0.1 # CML version placeholder, don't delete
|
||||
VERSION 3.1.0 # CML version placeholder, don't delete
|
||||
LANGUAGES CXX
|
||||
HOMEPAGE_URL "https://github.com/catchorg/Catch2"
|
||||
# HOMEPAGE_URL is not supported until CMake version 3.12, which
|
||||
# we do not target yet.
|
||||
# HOMEPAGE_URL "https://github.com/catchorg/Catch2"
|
||||
DESCRIPTION "A modern, C++-native, unit test framework."
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
[](https://github.com/catchorg/Catch2/actions/workflows/mac-builds.yml)
|
||||
[](https://ci.appveyor.com/project/catchorg/catch2)
|
||||
[](https://codecov.io/gh/catchorg/Catch2)
|
||||
[](https://godbolt.org/z/9x9qoM)
|
||||
[](https://godbolt.org/z/EdoY15q9G)
|
||||
[](https://discord.gg/4CWS9zD)
|
||||
|
||||
|
||||
|
@ -51,6 +51,7 @@ conan_basic_setup()'''.format(line_to_replace, self.install_folder.replace("\\",
|
||||
self.cpp_info.components["catch2base"].names["cmake_find_package_multi"] = "Catch2"
|
||||
self.cpp_info.components["catch2base"].names["pkg_config"] = "Catch2"
|
||||
self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
|
||||
self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")
|
||||
# Catch2WithMain
|
||||
self.cpp_info.components["catch2main"].names["cmake_find_package"] = "Catch2WithMain"
|
||||
self.cpp_info.components["catch2main"].names["cmake_find_package_multi"] = "Catch2WithMain"
|
||||
|
@ -26,6 +26,7 @@ Running:
|
||||
|
||||
Odds and ends:
|
||||
* [Frequently Asked Questions (FAQ)](faq.md#top)
|
||||
* [Best practices and other tips](usage-tips.md#top)
|
||||
* [CMake integration](cmake-integration.md#top)
|
||||
* [CI and other miscellaneous pieces](ci-and-misc.md#top)
|
||||
* [Known limitations](limitations.md#top)
|
||||
|
@ -5,6 +5,7 @@
|
||||
[CMake targets](#cmake-targets)<br>
|
||||
[Automatic test registration](#automatic-test-registration)<br>
|
||||
[CMake project options](#cmake-project-options)<br>
|
||||
[`CATCH_CONFIG_*` customization options in CMake](#catch_config_-customization-options-in-cmake)<br>
|
||||
[Installing Catch2 from git repository](#installing-catch2-from-git-repository)<br>
|
||||
[Installing Catch2 from vcpkg](#installing-catch2-from-vcpkg)<br>
|
||||
|
||||
@ -50,7 +51,7 @@ Include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.0.0-preview3
|
||||
GIT_TAG v3.0.1 # or a later release
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
@ -62,17 +63,19 @@ target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
## Automatic test registration
|
||||
|
||||
Catch2's repository also contains two CMake scripts that help users
|
||||
Catch2's repository also contains three CMake scripts that help users
|
||||
with automatically registering their `TEST_CASE`s with CTest. They
|
||||
can be found in the `extras` folder, and are
|
||||
|
||||
1) `Catch.cmake` (and its dependency `CatchAddTests.cmake`)
|
||||
2) `ParseAndAddCatchTests.cmake` (deprecated)
|
||||
3) `CatchShardTests.cmake` (and its dependency `CatchShardTestsImpl.cmake`)
|
||||
|
||||
If Catch2 has been installed in system, both of these can be used after
|
||||
doing `find_package(Catch2 REQUIRED)`. Otherwise you need to add them
|
||||
to your CMake module path.
|
||||
|
||||
<a id="catch_discover_tests"></a>
|
||||
### `Catch.cmake` and `CatchAddTests.cmake`
|
||||
|
||||
`Catch.cmake` provides function `catch_discover_tests` to get tests from
|
||||
@ -256,6 +259,49 @@ unset(OptionalCatchTestLauncher)
|
||||
ParseAndAddCatchTests(bar)
|
||||
```
|
||||
|
||||
|
||||
### `CatchShardTests.cmake`
|
||||
|
||||
> `CatchShardTests.cmake` was introduced in Catch2 3.1.0.
|
||||
|
||||
`CatchShardTests.cmake` provides a function
|
||||
`catch_add_sharded_tests(TEST_BINARY)` that splits tests from `TEST_BINARY`
|
||||
into multiple shards. The tests in each shard and their order is randomized,
|
||||
and the seed changes every invocation of CTest.
|
||||
|
||||
Currently there are 3 customization points for this script:
|
||||
|
||||
* SHARD_COUNT - number of shards to split target's tests into
|
||||
* REPORTER - reporter spec to use for tests
|
||||
* TEST_SPEC - test spec used for filtering tests
|
||||
|
||||
Example usage:
|
||||
|
||||
```
|
||||
include(CatchShardTests)
|
||||
|
||||
catch_add_sharded_tests(foo-tests
|
||||
SHARD_COUNT 4
|
||||
REPORTER "xml::out=-"
|
||||
TEST_SPEC "A"
|
||||
)
|
||||
|
||||
catch_add_sharded_tests(tests
|
||||
SHARD_COUNT 8
|
||||
REPORTER "xml::out=-"
|
||||
TEST_SPEC "B"
|
||||
)
|
||||
```
|
||||
|
||||
This registers total of 12 CTest tests (4 + 8 shards) to run shards
|
||||
from `foo-tests` test binary, filtered by a test spec.
|
||||
|
||||
_Note that this script is currently a proof-of-concept for reseeding
|
||||
shards per CTest run, and thus does not support (nor does it currently
|
||||
aim to support) all customization points from
|
||||
[`catch_discover_tests`](#catch_discover_tests)._
|
||||
|
||||
|
||||
## CMake project options
|
||||
|
||||
Catch2's CMake project also provides some options for other projects
|
||||
@ -293,6 +339,31 @@ compiled separately to ensure that they are self-sufficient.
|
||||
Defaults to `OFF`.
|
||||
|
||||
|
||||
## `CATCH_CONFIG_*` customization options in CMake
|
||||
|
||||
> CMake support for `CATCH_CONFIG_*` options was introduced in Catch2 3.0.1
|
||||
|
||||
Due to the new separate compilation model, all the options from the
|
||||
[Compile-time configuration docs](configuration.md#top) can also be set
|
||||
through Catch2's CMake. To set them, define the option you want as `ON`,
|
||||
e.g. `-DCATCH_CONFIG_NOSTDOUT=ON`.
|
||||
|
||||
Note that setting the option to `OFF` doesn't disable it. To force disable
|
||||
an option, you need to set the `_NO_` form of it to `ON`, e.g.
|
||||
`-DCATCH_CONFIG_NO_COLOUR_WIN32=ON`.
|
||||
|
||||
|
||||
To summarize the configuration option behaviour with an example:
|
||||
|
||||
| `-DCATCH_CONFIG_COLOUR_WIN32` | `-DCATCH_CONFIG_NO_COLOUR_WIN32` | Result |
|
||||
|-------------------------------|----------------------------------|-------------|
|
||||
| `ON` | `ON` | error |
|
||||
| `ON` | `OFF` | force-on |
|
||||
| `OFF` | `ON` | force-off |
|
||||
| `OFF` | `OFF` | auto-detect |
|
||||
|
||||
|
||||
|
||||
## Installing Catch2 from git repository
|
||||
|
||||
If you cannot install Catch2 from a package manager (e.g. Ubuntu 16.04
|
||||
|
@ -147,7 +147,7 @@ validity, and throw an error if they are wrong._
|
||||
|
||||
> Support for passing arguments to reporters through the `-r`, `--reporter` flag was introduced in Catch2 3.0.1
|
||||
|
||||
There are multiple built-in reporters, you can see what they do by using the
|
||||
There are multiple built-in reporters, you can see what they do by using the
|
||||
[`--list-reporter`](command-line.md#listing-available-tests-tags-or-reporters)
|
||||
flag. If you need a reporter providing custom format outside of the already
|
||||
provided ones, look at the ["write your own reporter" part of the reporter
|
||||
@ -220,6 +220,15 @@ similar information.
|
||||
|
||||
`--list-listeners` lists all registered listeners and their descriptions.
|
||||
|
||||
The [`--verbosity` argument](#output-verbosity) modifies the level of detail provided by the default `--list*` options
|
||||
as follows:
|
||||
|
||||
| Option | `normal` (default) | `quiet` | `high` |
|
||||
|--------------------|---------------------------------|---------------------|-----------------------------------------|
|
||||
| `--list-tests` | Test names and tags | Test names only | Same as `normal`, plus source code line |
|
||||
| `--list-tags` | Tags and counts | Same as `normal` | Same as `normal` |
|
||||
| `--list-reporters` | Reporter names and descriptions | Reporter names only | Same as `normal` |
|
||||
| `--list-listeners` | Listener names and descriptions | Same as `normal` | Same as `normal` |
|
||||
|
||||
<a id="sending-output-to-a-file"></a>
|
||||
## Sending output to a file
|
||||
@ -533,12 +542,17 @@ when writing to a file
|
||||
|
||||
> [Introduced](https://github.com/catchorg/Catch2/pull/2257) in Catch2 3.0.1.
|
||||
|
||||
When `--shard-count <#number of shards>` is used, the tests to execute will be split evenly in to the given number of sets,
|
||||
identified by indicies starting at 0. The tests in the set given by `--shard-index <#shard index to run>` will be executed.
|
||||
The default shard count is `1`, and the default index to run is `0`. It is an error to specify a shard index greater than
|
||||
the number of shards.
|
||||
When `--shard-count <#number of shards>` is used, the tests to execute
|
||||
will be split evenly in to the given number of sets, identified by indices
|
||||
starting at 0. The tests in the set given by
|
||||
`--shard-index <#shard index to run>` will be executed. The default shard
|
||||
count is `1`, and the default index to run is `0`.
|
||||
|
||||
_It is an error to specify a shard index greater than the number of shards._
|
||||
|
||||
Sharding is useful when you want to split test execution across multiple
|
||||
processes, as is done with the [Bazel test sharding](https://docs.bazel.build/versions/main/test-encyclopedia.html#test-sharding).
|
||||
|
||||
This is useful when you want to split test execution across multiple processes, as is done with [Bazel test sharding](https://docs.bazel.build/versions/main/test-encyclopedia.html#test-sharding).
|
||||
|
||||
<a id="no-tests-override"></a>
|
||||
## Allow running the binary without tests
|
||||
|
@ -13,6 +13,7 @@ with you sharing this fact.
|
||||
- Locksley.CZ
|
||||
- [Makimo](https://makimo.pl/)
|
||||
- NASA
|
||||
- [Nexus Software Systems](https://nexwebsites.com)
|
||||
- [UX3D](https://ux3d.io)
|
||||
- [King](https://king.com)
|
||||
|
||||
|
@ -98,11 +98,13 @@ is equivalent with the out-of-the-box experience.
|
||||
|
||||
|
||||
## Bazel support
|
||||
When `CATCH_CONFIG_BAZEL_SUPPORT` is defined, Catch2 will register a `JUnit`
|
||||
reporter writing to a path pointed by `XML_OUTPUT_FILE` provided by Bazel.
|
||||
When `CATCH_CONFIG_BAZEL_SUPPORT` is defined or when `BAZEL_TEST=1` (which is set by the Bazel inside of a test environment),
|
||||
Catch2 will register a `JUnit` reporter writing to a path pointed by `XML_OUTPUT_FILE` provided by Bazel.
|
||||
|
||||
> `CATCH_CONFIG_BAZEL_SUPPORT` was [introduced](https://github.com/catchorg/Catch2/pull/2399) in Catch2 3.0.1.
|
||||
|
||||
> `CATCH_CONFIG_BAZEL_SUPPORT` was [deprecated](https://github.com/catchorg/Catch2/pull/2459) in Catch2 3.1.0.
|
||||
|
||||
## C++11 toggles
|
||||
|
||||
CATCH_CONFIG_CPP11_TO_STRING // Use `std::to_string`
|
||||
|
@ -17,13 +17,14 @@ as it can be replaced by `Catch.cmake` that provides the function
|
||||
command line interface instead of parsing C++ code with regular expressions.
|
||||
|
||||
|
||||
## Planned changes
|
||||
|
||||
### Console Colour API
|
||||
|
||||
The API for Catch2's console colour will be changed to take an extra
|
||||
argument, the stream to which the colour code should be applied.
|
||||
### `CATCH_CONFIG_BAZEL_SUPPORT`
|
||||
|
||||
Catch2 supports writing the Bazel JUnit XML output file when it is aware
|
||||
that is within a bazel testing environment. Originally there was no way
|
||||
to accurately probe the environment for this information so the flag
|
||||
`CATCH_CONFIG_BAZEL_SUPPORT` was added. This now deprecated. Bazel has now had a change
|
||||
where it will export `BAZEL_TEST=1` for purposes like the above. Catch2
|
||||
will now instead inspect the environment instead of relying on build configuration.
|
||||
|
||||
---
|
||||
|
||||
|
11
docs/faq.md
11
docs/faq.md
@ -46,6 +46,17 @@ This means that we will not knowingly make backwards-incompatible changes
|
||||
without incrementing the major version number.
|
||||
|
||||
|
||||
## Does Catch2 support running tests in parallel?
|
||||
|
||||
Not natively, no. We see running tests in parallel as the job of an
|
||||
external test runner, that can also run them in separate processes,
|
||||
support test execution timeouts and so on.
|
||||
|
||||
However, Catch2 provides some tools that make the job of external test
|
||||
runners easier. [See the relevant section in our page on best
|
||||
practices](usage-tips.md#parallel-tests).
|
||||
|
||||
|
||||
---
|
||||
|
||||
[Home](Readme.md#top)
|
||||
|
@ -258,6 +258,12 @@ definitions to handle generic range-like types. These are:
|
||||
* `SizeIs(Matcher size_matcher)`
|
||||
* `Contains(T&& target_element, Comparator = std::equal_to<>{})`
|
||||
* `Contains(Matcher element_matcher)`
|
||||
* `AllMatch(Matcher element_matcher)`
|
||||
* `NoneMatch(Matcher element_matcher)`
|
||||
* `AnyMatch(Matcher element_matcher)`
|
||||
* `AllTrue()`
|
||||
* `NoneTrue()`
|
||||
* `AnyTrue()`
|
||||
|
||||
`IsEmpty` should be self-explanatory. It successfully matches objects
|
||||
that are empty according to either `std::empty`, or ADL-found `empty`
|
||||
@ -275,6 +281,14 @@ the target element. The other variant is constructed from a matcher,
|
||||
in which case a range is accepted if any of its elements is accepted
|
||||
by the provided matcher.
|
||||
|
||||
`AllMatch`, `NoneMatch`, and `AnyMatch` match ranges for which either
|
||||
all, none, or any of the contained elements matches the given matcher,
|
||||
respectively.
|
||||
|
||||
`AllTrue`, `NoneTrue`, and `AnyTrue` match ranges for which either
|
||||
all, none, or any of the contained elements are `true`, respectively.
|
||||
It works for ranges of `bool`s and ranges of elements (explicitly)
|
||||
convertible to `bool`.
|
||||
|
||||
## Writing custom matchers (old style)
|
||||
|
||||
|
@ -50,7 +50,8 @@ compilation times in the v3 version. The basic steps to do so are:
|
||||
|
||||
1. Change your CMakeLists.txt to link against `Catch2WithMain` target if
|
||||
you use Catch2's default main. (If you do not, keep linking against
|
||||
the `Catch2` target.)
|
||||
the `Catch2` target.). If you use pkg-config, change `pkg-config catch2` to
|
||||
`pkg-config catch2-with-main`.
|
||||
2. Delete TU with `CATCH_CONFIG_RUNNER` or `CATCH_CONFIG_MAIN` defined,
|
||||
as it is no longer needed.
|
||||
3. Change `#include <catch2/catch.hpp>` to `#include <catch2/catch_all.hpp>`
|
||||
|
@ -118,6 +118,9 @@ A high available cloud native micro-service application management platform impl
|
||||
### [ArangoDB](https://github.com/arangodb/arangodb)
|
||||
ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values.
|
||||
|
||||
### [Cytopia](https://github.com/CytopiaTeam/Cytopia)
|
||||
Cytopia is a free, open source retro pixel-art city building game with a big focus on mods. It utilizes a custom isometric rendering engine based on SDL2.
|
||||
|
||||
### [d-SEAMS](https://github.com/d-SEAMS/seams-core)
|
||||
Open source molecular dynamics simulation structure analysis suite of tools in modern C++.
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
# Release notes
|
||||
**Contents**<br>
|
||||
[3.1.0](#310)<br>
|
||||
[3.0.1](#301)<br>
|
||||
[2.13.7](#2137)<br>
|
||||
[2.13.6](#2136)<br>
|
||||
@ -49,6 +50,45 @@
|
||||
[Even Older versions](#even-older-versions)<br>
|
||||
|
||||
|
||||
## 3.1.0
|
||||
|
||||
### Improvements
|
||||
* Improved suppression of `-Wparentheses` for older GCCs
|
||||
* Turns out that even GCC 9 does not properly handle `_Pragma`s in the C++ frontend.
|
||||
* Added type constraints onto `random` generator (#2433)
|
||||
* These constraints copy what the standard says for the underlying `std::uniform_int_distribution`
|
||||
* Suppressed -Wunused-variable from nvcc (#2306, #2427)
|
||||
* Suppressed -Wunused-variable from MinGW (#2132)
|
||||
* Added All/Any/NoneTrue range matchers (#2319)
|
||||
* These check that all/any/none of boolean values in a range are true.
|
||||
* The JUnit reporter now normalizes classnames from C++ namespaces to Java-like namespaces (#2468)
|
||||
* This provides better support for other JUnit based tools.
|
||||
* The Bazel support now understands `BAZEL_TEST` environment variable (#2459)
|
||||
* The `CATCH_CONFIG_BAZEL_SUPPORT` configuration option is also still supported.
|
||||
* Returned support for compiling Catch2 with GCC 5 (#2448)
|
||||
* This required removing inherited constructors from Catch2's internals.
|
||||
* I recommend updating to a newer GCC anyway.
|
||||
* `catch_discover_tests` now has a new options for setting library load path(s) when running the Catch2 binary (#2467)
|
||||
|
||||
|
||||
### Fixes
|
||||
* Fixed crash when listing listeners without any registered listeners (#2442)
|
||||
* Fixed nvcc compilation error in constructor benchmarking helper (#2477)
|
||||
* Catch2's CMakeList supports pre-3.12 CMake again (#2428)
|
||||
* The gain from requiring CMake 3.12 was very minor, but y'all should really update to newer CMake
|
||||
|
||||
|
||||
### Miscellaneous
|
||||
* Fixed SelfTest build on MinGW (#2447)
|
||||
* The in-repo conan recipe exports the CMake helper (#2460)
|
||||
* Added experimental CMake script to showcase using test case sharding together with CTest
|
||||
* Compared to `catch_discover_tests`, it supports very limited number of options and customization
|
||||
* Added documentation page on best practices when running Catch2 tests
|
||||
* Catch2 can be built as a dynamic library (#2397, #2398)
|
||||
* Note that Catch2 does not have visibility annotations, and you are responsible for ensuring correct visibility built into the resulting library.
|
||||
|
||||
|
||||
|
||||
## 3.0.1
|
||||
|
||||
**Catch2 now uses statically compiled library as its distribution model.
|
||||
|
@ -72,7 +72,8 @@ All tag names beginning with non-alphanumeric characters are reserved by Catch.
|
||||
|
||||
* `[@<alias>]` - tag aliases all begin with `@` (see below).
|
||||
|
||||
* `[!benchmark]` - this test case is actually a benchmark. This is an experimental feature, and currently has no documentation. If you want to try it out, look at `projects/SelfTest/Benchmark.tests.cpp` for details.
|
||||
* `[!benchmark]` - this test case is actually a benchmark. Currently this only serves to hide the test case by default, to avoid the execution time costs.
|
||||
|
||||
|
||||
## Tag aliases
|
||||
|
||||
@ -153,7 +154,7 @@ Scenario : vector can be sized and resized
|
||||
Then : The size changes
|
||||
```
|
||||
|
||||
See also [runnable example on godbolt](https://godbolt.org/z/e5vPPM),
|
||||
See also [runnable example on godbolt](https://godbolt.org/z/eY5a64r99),
|
||||
with a more complicated (and failing) example.
|
||||
|
||||
> `AND_GIVEN` was [introduced](https://github.com/catchorg/Catch2/issues/1360) in Catch2 2.4.0.
|
||||
|
@ -59,7 +59,10 @@ struct Template_Fixture {
|
||||
T m_a;
|
||||
};
|
||||
|
||||
TEMPLATE_TEST_CASE_METHOD(Template_Fixture,"A TEMPLATE_TEST_CASE_METHOD based test run that succeeds", "[class][template]", int, float, double) {
|
||||
TEMPLATE_TEST_CASE_METHOD(Template_Fixture,
|
||||
"A TEMPLATE_TEST_CASE_METHOD based test run that succeeds",
|
||||
"[class][template]",
|
||||
int, float, double) {
|
||||
REQUIRE( Template_Fixture<TestType>::m_a == 1 );
|
||||
}
|
||||
|
||||
@ -77,7 +80,11 @@ struct Foo_class {
|
||||
}
|
||||
};
|
||||
|
||||
TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Template_Fixture, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test succeeds", "[class][template]", (Foo_class, std::vector), int) {
|
||||
TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Template_Fixture,
|
||||
"A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test succeeds",
|
||||
"[class][template]",
|
||||
(Foo_class, std::vector),
|
||||
int) {
|
||||
REQUIRE( Template_Template_Fixture<TestType>::m_a.size() == 0 );
|
||||
}
|
||||
```
|
||||
@ -101,7 +108,12 @@ struct Nttp_Fixture{
|
||||
int value = V;
|
||||
};
|
||||
|
||||
TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][nttp]",((int V), V), 1, 3, 6) {
|
||||
TEMPLATE_TEST_CASE_METHOD_SIG(
|
||||
Nttp_Fixture,
|
||||
"A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds",
|
||||
"[class][template][nttp]",
|
||||
((int V), V),
|
||||
1, 3, 6) {
|
||||
REQUIRE(Nttp_Fixture<V>::value > 0);
|
||||
}
|
||||
|
||||
@ -117,8 +129,13 @@ struct Template_Foo_2 {
|
||||
size_t size() { return V; }
|
||||
};
|
||||
|
||||
TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][product][nttp]", ((typename T, size_t S), T, S),(std::array, Template_Foo_2), ((int,2), (float,6)))
|
||||
{
|
||||
TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(
|
||||
Template_Fixture_2,
|
||||
"A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds",
|
||||
"[class][template][product][nttp]",
|
||||
((typename T, size_t S), T, S),
|
||||
(std::array, Template_Foo_2),
|
||||
((int,2), (float,6))) {
|
||||
REQUIRE(Template_Fixture_2<TestType>{}.m_a.size() >= 2);
|
||||
}
|
||||
```
|
||||
@ -132,8 +149,10 @@ only difference is the source of types. This allows you to reuse the template ty
|
||||
Example:
|
||||
```cpp
|
||||
using MyTypes = std::tuple<int, char, double>;
|
||||
TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture, "Template test case method with test types specified inside std::tuple", "[class][template][list]", MyTypes)
|
||||
{
|
||||
TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture,
|
||||
"Template test case method with test types specified inside std::tuple",
|
||||
"[class][template][list]",
|
||||
MyTypes) {
|
||||
REQUIRE( Template_Fixture<TestType>::m_a == 1 );
|
||||
}
|
||||
```
|
||||
|
@ -94,7 +94,7 @@ before we move on.
|
||||
* The test automatically self-registers with the test runner, and user
|
||||
does not have do anything more to ensure that it is picked up by the test
|
||||
framework. _Note that you can run specific test, or set of tests,
|
||||
through the [command line](command-line#top)._
|
||||
through the [command line](command-line.md#top)._
|
||||
* The individual test assertions are written using the `REQUIRE` macro.
|
||||
It accepts a boolean expression, and uses expression templates to
|
||||
internally decompose it, so that it can be individually stringified
|
||||
|
95
docs/usage-tips.md
Normal file
95
docs/usage-tips.md
Normal file
@ -0,0 +1,95 @@
|
||||
<a id="top"></a>
|
||||
# Best practices and other tips on using Catch2
|
||||
|
||||
## Running tests
|
||||
|
||||
Your tests should be run in a manner roughly equivalent with:
|
||||
|
||||
```
|
||||
./tests --order rand --warn NoAssertions
|
||||
```
|
||||
|
||||
Notice that all the tests are run in a large batch, their relative order
|
||||
is randomized, and that you ask Catch2 to fail test whose leaf-path
|
||||
does not contain an assertion.
|
||||
|
||||
The reason I recommend running all your tests in the same process is that
|
||||
this exposes your tests to interference from their runs. This can be both
|
||||
positive interference, where the changes in global state from previous
|
||||
test allow later tests to pass, but also negative interference, where
|
||||
changes in global state from previous test causes later tests to fail.
|
||||
|
||||
In my experience, interference, especially destructive interference,
|
||||
usually comes from errors in the code under test, rather than the tests
|
||||
themselves. This means that by allowing interference to happen, our tests
|
||||
can find these issues. Obviously, to shake out interference coming from
|
||||
different orderings of tests, the test order also need to be shuffled
|
||||
between runs.
|
||||
|
||||
However, running all tests in a single batch eventually becomes impractical
|
||||
as they will take too long to run, and you will want to run your tests
|
||||
in parallel.
|
||||
|
||||
|
||||
<a id="parallel-tests"></a>
|
||||
## Running tests in parallel
|
||||
|
||||
There are multiple ways of running tests in parallel, with various level
|
||||
of structure. If you are using CMake and CTest, then we provide a helper
|
||||
function [`catch_discover_tests`](cmake-integration.md#automatic-test-registration)
|
||||
that registers each Catch2 `TEST_CASE` as a single CTest test, which
|
||||
is then run in a separate process. This is an easy way to set up parallel
|
||||
tests if you are already using CMake & CTest to run your tests, but you
|
||||
will lose the advantage of running tests in batches.
|
||||
|
||||
|
||||
Catch2 also supports [splitting tests in a binary into multiple
|
||||
shards](command-line.md#test-sharding). This can be used by any test
|
||||
runner to run batches of tests in parallel. Do note that when selecting
|
||||
on the number of shards, you should have more shards than there are cores,
|
||||
to avoid issues with long running tests getting accidentally grouped in
|
||||
the same shard, and causing long-tailed execution time.
|
||||
|
||||
**Note that naively composing sharding and random ordering of tests will break.**
|
||||
|
||||
Invoking Catch2 test executable like this
|
||||
|
||||
```text
|
||||
./tests --order rand --shard-index 0 --shard-count 3
|
||||
./tests --order rand --shard-index 1 --shard-count 3
|
||||
./tests --order rand --shard-index 2 --shard-count 3
|
||||
```
|
||||
|
||||
does not guarantee covering all tests inside the executable, because
|
||||
each invocation will have its own random seed, thus it will have its own
|
||||
random order of tests and thus the partitioning of tests into shards will
|
||||
be different as well.
|
||||
|
||||
To do this properly, you need the individual shards to share the random
|
||||
seed, e.g.
|
||||
```text
|
||||
./tests --order rand --shard-index 0 --shard-count 3 --rng-seed 0xBEEF
|
||||
./tests --order rand --shard-index 1 --shard-count 3 --rng-seed 0xBEEF
|
||||
./tests --order rand --shard-index 2 --shard-count 3 --rng-seed 0xBEEF
|
||||
```
|
||||
|
||||
|
||||
## Organizing tests into binaries
|
||||
|
||||
Both overly large and overly small test binaries can cause issues. Overly
|
||||
large test binaries have to be recompiled and relinked often, and the
|
||||
link times are usually also long. Overly small test binaries in turn pay
|
||||
significant overhead from linking against Catch2 more often per compiled
|
||||
test case, and also make it hard/impossible to run tests in batches.
|
||||
|
||||
Because there is no hard and fast rule for the right size of a test binary,
|
||||
I recommend having 1:1 correspondence between libraries in project and test
|
||||
binaries. (At least if it is possible, in some cases it is not.) Having
|
||||
a test binary for each library in project keeps related tests together,
|
||||
and makes tests easy to navigate by reflecting the project's organizational
|
||||
structure.
|
||||
|
||||
|
||||
---
|
||||
|
||||
[Home](Readme.md#top)
|
@ -19,7 +19,7 @@ TEST_CASE( "Factorials of 1 and higher are computed (pass)", "[single-file]" ) {
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 010-TestCase 010-TestCase.cpp && 010-TestCase --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 010-TestCase 010-TestCase.cpp && 010-TestCase --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 010-TestCase.cpp && 010-TestCase --success
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
|
@ -10,8 +10,8 @@ TEST_CASE( "1: All test cases reside in other .cpp files (empty)", "[multi-file:
|
||||
// Here just to show there are two source files via option --list-tests.
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -c 020-TestCase-1.cpp
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 020-TestCase TestCase-1.o 020-TestCase-2.cpp && 020-TestCase --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -c 020-TestCase-1.cpp
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 020-TestCase TestCase-1.o 020-TestCase-2.cpp && 020-TestCase --success
|
||||
//
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% -c 020-TestCase-1.cpp
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% -Fe020-TestCase.exe 020-TestCase-1.obj 020-TestCase-2.cpp && 020-TestCase --success
|
||||
|
@ -53,7 +53,7 @@ TEST_CASE( "Assert that something is false (continue after failure)", "[check-fa
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 030-Asn-Require-Check 030-Asn-Require-Check.cpp && 030-Asn-Require-Check --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 030-Asn-Require-Check 030-Asn-Require-Check.cpp && 030-Asn-Require-Check --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 030-Asn-Require-Check.cpp && 030-Asn-Require-Check --success
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
|
@ -45,7 +45,7 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) {
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 100-Fix-Section 100-Fix-Section.cpp && 100-Fix-Section --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 100-Fix-Section 100-Fix-Section.cpp && 100-Fix-Section --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 100-Fix-Section.cpp && 100-Fix-Section --success
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
|
@ -52,8 +52,11 @@ TEST_CASE_METHOD( UniqueTestsFixture, "Create Employee/Normal", "[create]" ) {
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 110-Fix-ClassFixture 110-Fix-ClassFixture.cpp && 110-Fix-ClassFixture --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 110-Fix-ClassFixture 110-Fix-ClassFixture.cpp && 110-Fix-ClassFixture --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 110-Fix-ClassFixture.cpp && 110-Fix-ClassFixture --success
|
||||
//
|
||||
// Compile with pkg-config:
|
||||
// - g++ -std=c++14 -Wall $(pkg-config catch2-with-main --cflags) -o 110-Fix-ClassFixture 110-Fix-ClassFixture.cpp $(pkg-config catch2-with-main --libs)
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
//
|
||||
|
@ -48,7 +48,7 @@ SCENARIO( "vectors can be sized and resized", "[vector]" ) {
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 120-Bdd-ScenarioGivenWhenThen 120-Bdd-ScenarioGivenWhenThen.cpp && 120-Bdd-ScenarioGivenWhenThen --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 120-Bdd-ScenarioGivenWhenThen 120-Bdd-ScenarioGivenWhenThen.cpp && 120-Bdd-ScenarioGivenWhenThen --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 120-Bdd-ScenarioGivenWhenThen.cpp && 120-Bdd-ScenarioGivenWhenThen --success
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
|
@ -420,7 +420,7 @@ TEST_CASE_METHOD( Fixture, "3: Testcase with class-based fixture", "[tag-C][tag-
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 210-Evt-EventListeners 210-Evt-EventListeners.cpp && 210-Evt-EventListeners --success
|
||||
// - g++ -std=c++14 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 210-Evt-EventListeners 210-Evt-EventListeners.cpp && 210-Evt-EventListeners --success
|
||||
// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 210-Evt-EventListeners.cpp && 210-Evt-EventListeners --success
|
||||
|
||||
// Expected compact output (all assertions):
|
||||
|
@ -116,6 +116,13 @@ same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``.
|
||||
``--out dir/<test_name>suffix``. This can be used to add a file extension to
|
||||
the output e.g. ".xml".
|
||||
|
||||
``DL_PATHS path...``
|
||||
Specifies paths that need to be set for the dynamic linker to find shared
|
||||
libraries/DLLs when running the test executable (PATH/LD_LIBRARY_PATH respectively).
|
||||
These paths will both be set when retrieving the list of test cases from the
|
||||
test executable and when the tests are executed themselves. This requires
|
||||
cmake/ctest >= 3.22.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -124,7 +131,7 @@ function(catch_discover_tests TARGET)
|
||||
""
|
||||
""
|
||||
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;REPORTER;OUTPUT_DIR;OUTPUT_PREFIX;OUTPUT_SUFFIX"
|
||||
"TEST_SPEC;EXTRA_ARGS;PROPERTIES"
|
||||
"TEST_SPEC;EXTRA_ARGS;PROPERTIES;DL_PATHS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
@ -135,6 +142,12 @@ function(catch_discover_tests TARGET)
|
||||
set(_TEST_LIST ${TARGET}_TESTS)
|
||||
endif()
|
||||
|
||||
if (_DL_PATHS)
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.22.0")
|
||||
message(FATAL_ERROR "The DL_PATHS option requires at least cmake 3.22")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
## Generate a unique name based on the extra arguments
|
||||
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS} ${_REPORTER} ${_OUTPUT_DIR} ${_OUTPUT_PREFIX} ${_OUTPUT_SUFFIX}")
|
||||
string(SUBSTRING ${args_hash} 0 7 args_hash)
|
||||
@ -164,6 +177,7 @@ function(catch_discover_tests TARGET)
|
||||
-D "TEST_OUTPUT_DIR=${_OUTPUT_DIR}"
|
||||
-D "TEST_OUTPUT_PREFIX=${_OUTPUT_PREFIX}"
|
||||
-D "TEST_OUTPUT_SUFFIX=${_OUTPUT_SUFFIX}"
|
||||
-D "TEST_DL_PATHS=${_DL_PATHS}"
|
||||
-D "CTEST_FILE=${ctest_tests_file}"
|
||||
-P "${_CATCH_DISCOVER_TESTS_SCRIPT}"
|
||||
VERBATIM
|
||||
|
@ -10,10 +10,17 @@ set(reporter ${TEST_REPORTER})
|
||||
set(output_dir ${TEST_OUTPUT_DIR})
|
||||
set(output_prefix ${TEST_OUTPUT_PREFIX})
|
||||
set(output_suffix ${TEST_OUTPUT_SUFFIX})
|
||||
set(dl_paths ${TEST_DL_PATHS})
|
||||
set(script)
|
||||
set(suite)
|
||||
set(tests)
|
||||
|
||||
if(WIN32)
|
||||
set(dl_paths_variable_name PATH)
|
||||
else()
|
||||
set(dl_paths_variable_name LD_LIBRARY_PATH)
|
||||
endif()
|
||||
|
||||
function(add_command NAME)
|
||||
set(_args "")
|
||||
# use ARGV* instead of ARGN, because ARGN splits arrays into multiple arguments
|
||||
@ -35,6 +42,12 @@ if(NOT EXISTS "${TEST_EXECUTABLE}")
|
||||
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(dl_paths)
|
||||
cmake_path(CONVERT "${dl_paths}" TO_NATIVE_PATH_LIST paths)
|
||||
set(ENV{${dl_paths_variable_name}} "${paths}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-tests --verbosity quiet
|
||||
OUTPUT_VARIABLE output
|
||||
@ -85,6 +98,13 @@ if(output_dir AND NOT IS_ABSOLUTE ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(dl_paths)
|
||||
foreach(path ${dl_paths})
|
||||
cmake_path(NATIVE_PATH path native_path)
|
||||
list(APPEND environment_modifications "${dl_paths_variable_name}=path_list_prepend:${native_path}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Parse output
|
||||
foreach(line ${output})
|
||||
set(test ${line})
|
||||
@ -115,6 +135,14 @@ foreach(line ${output})
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
${properties}
|
||||
)
|
||||
|
||||
if(environment_modifications)
|
||||
add_command(set_tests_properties
|
||||
"${prefix}${test}${suffix}"
|
||||
PROPERTIES
|
||||
ENVIRONMENT_MODIFICATION "${environment_modifications}")
|
||||
endif()
|
||||
|
||||
list(APPEND tests "${prefix}${test}${suffix}")
|
||||
endforeach()
|
||||
|
||||
|
66
extras/CatchShardTests.cmake
Normal file
66
extras/CatchShardTests.cmake
Normal file
@ -0,0 +1,66 @@
|
||||
|
||||
# Copyright Catch2 Authors
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
# Supported optional args:
|
||||
# * SHARD_COUNT - number of shards to split target's tests into
|
||||
# * REPORTER - reporter spec to use for tests
|
||||
# * TEST_SPEC - test spec used for filtering tests
|
||||
function(catch_add_sharded_tests TARGET)
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
||||
message(FATAL_ERROR "add_sharded_catch_tests only supports CMake versions 3.10.0 and up")
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments(
|
||||
""
|
||||
""
|
||||
"SHARD_COUNT;REPORTER;TEST_SPEC"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if (NOT DEFINED _SHARD_COUNT)
|
||||
set(_SHARD_COUNT 2)
|
||||
endif()
|
||||
|
||||
# Generate a unique name based on the extra arguments
|
||||
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS} ${_REPORTER} ${_OUTPUT_DIR} ${_OUTPUT_PREFIX} ${_OUTPUT_SUFFIX} ${_SHARD_COUNT}")
|
||||
string(SUBSTRING ${args_hash} 0 7 args_hash)
|
||||
|
||||
set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-sharded-tests-include-${args_hash}.cmake")
|
||||
set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-sharded-tests-impl-${args_hash}.cmake")
|
||||
|
||||
file(WRITE "${ctest_include_file}"
|
||||
"if(EXISTS \"${ctest_tests_file}\")\n"
|
||||
" include(\"${ctest_tests_file}\")\n"
|
||||
"else()\n"
|
||||
" add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n"
|
||||
"endif()\n"
|
||||
)
|
||||
|
||||
set_property(DIRECTORY
|
||||
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
|
||||
)
|
||||
|
||||
set(shard_impl_script_file "${CMAKE_CURRENT_LIST_DIR}/CatchShardTestsImpl.cmake")
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${TARGET} POST_BUILD
|
||||
BYPRODUCTS "${ctest_tests_file}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TARGET_NAME=${TARGET}"
|
||||
-D "TEST_BINARY=$<TARGET_FILE:${TARGET}>"
|
||||
-D "CTEST_FILE=${ctest_tests_file}"
|
||||
-D "SHARD_COUNT=${_SHARD_COUNT}"
|
||||
-D "REPORTER_SPEC=${_REPORTER}"
|
||||
-D "TEST_SPEC=${_TEST_SPEC}"
|
||||
-P "${shard_impl_script_file}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
|
||||
endfunction()
|
52
extras/CatchShardTestsImpl.cmake
Normal file
52
extras/CatchShardTestsImpl.cmake
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
# Copyright Catch2 Authors
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
# Indirection for CatchShardTests that allows us to delay the script
|
||||
# file generation until build time.
|
||||
|
||||
# Expected args:
|
||||
# * TEST_BINARY - full path to the test binary to run sharded
|
||||
# * CTEST_FILE - full path to ctest script file to write to
|
||||
# * TARGET_NAME - name of the target to shard (used for test names)
|
||||
# * SHARD_COUNT - number of shards to split the binary into
|
||||
# Optional args:
|
||||
# * REPORTER_SPEC - reporter specs to be passed down to the binary
|
||||
# * TEST_SPEC - test spec to pass down to the test binary
|
||||
|
||||
if(NOT EXISTS "${TEST_BINARY}")
|
||||
message(FATAL_ERROR
|
||||
"Specified test binary '${TEST_BINARY}' does not exist"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(other_args "")
|
||||
if (TEST_SPEC)
|
||||
set(other_args "${other_args} ${TEST_SPEC}")
|
||||
endif()
|
||||
if (REPORTER_SPEC)
|
||||
set(other_args "${other_args} --reporter ${REPORTER_SPEC}")
|
||||
endif()
|
||||
|
||||
# foreach RANGE in cmake is inclusive of the end, so we have to adjust it
|
||||
math(EXPR adjusted_shard_count "${SHARD_COUNT} - 1")
|
||||
|
||||
file(WRITE "${CTEST_FILE}"
|
||||
"string(RANDOM LENGTH 8 ALPHABET \"0123456789abcdef\" rng_seed)\n"
|
||||
"\n"
|
||||
"foreach(shard_idx RANGE ${adjusted_shard_count})\n"
|
||||
" add_test(${TARGET_NAME}-shard-" [[${shard_idx}]] "/${adjusted_shard_count}\n"
|
||||
" ${TEST_BINARY}"
|
||||
" --shard-index " [[${shard_idx}]]
|
||||
" --shard-count ${SHARD_COUNT}"
|
||||
" --rng-seed " [[0x${rng_seed}]]
|
||||
" --order rand"
|
||||
"${other_args}"
|
||||
"\n"
|
||||
" )\n"
|
||||
"endforeach()\n"
|
||||
)
|
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
// Catch v3.0.1
|
||||
// Generated: 2022-05-17 22:08:46.674860
|
||||
// Catch v3.1.0
|
||||
// Generated: 2022-07-17 20:14:04.055157
|
||||
// ----------------------------------------------------------
|
||||
// This file is an amalgamation of multiple different files.
|
||||
// You probably shouldn't edit it directly.
|
||||
@ -360,11 +360,23 @@ namespace Catch {
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__CUDACC__) && !defined(__clang__)
|
||||
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" )
|
||||
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" )
|
||||
# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" )
|
||||
#endif
|
||||
|
||||
// clang-cl defines _MSC_VER as well as __clang__, which could cause the
|
||||
// start/stop internal suppression macros to be double defined.
|
||||
#if defined(__clang__) && !defined(_MSC_VER)
|
||||
|
||||
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
|
||||
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" )
|
||||
|
||||
#endif // __clang__ && !_MSC_VER
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
|
||||
// which results in calls to destructors being emitted for each temporary,
|
||||
// without a matching initialization. In practice, this can result in something
|
||||
@ -2320,7 +2332,7 @@ namespace Catch {
|
||||
double z1 = normal_quantile((1. - confidence_level) / 2.);
|
||||
|
||||
auto cumn = [n]( double x ) -> long {
|
||||
return std::lround( normal_cdf( x ) * n );
|
||||
return std::lround( normal_cdf( x ) * static_cast<double>(n) );
|
||||
};
|
||||
auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };
|
||||
double b1 = bias + z1;
|
||||
@ -2730,7 +2742,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
T const& stored_object() const {
|
||||
return *static_cast<T*>(static_cast<void*>(data));
|
||||
return *static_cast<T const*>(static_cast<void const*>(data));
|
||||
}
|
||||
|
||||
|
||||
@ -5568,9 +5580,9 @@ namespace Catch {
|
||||
|
||||
#endif // CATCH_ASSERTION_HANDLER_HPP_INCLUDED
|
||||
|
||||
// We need this suppression to leak, because it took until GCC 9
|
||||
// We need this suppression to leak, because it took until GCC 10
|
||||
// for the front end to handle local suppression via _Pragma properly
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 9
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ <= 9
|
||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||
#endif
|
||||
|
||||
@ -5879,6 +5891,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
static void TestName(); \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||
static void TestName()
|
||||
@ -5889,6 +5902,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
||||
@ -5896,6 +5910,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
#define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ \
|
||||
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
|
||||
void test(); \
|
||||
@ -5912,6 +5927,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
do { \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||
} while(false)
|
||||
@ -7046,8 +7062,8 @@ namespace Catch {
|
||||
#define CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
||||
#define CATCH_VERSION_MAJOR 3
|
||||
#define CATCH_VERSION_MINOR 0
|
||||
#define CATCH_VERSION_PATCH 1
|
||||
#define CATCH_VERSION_MINOR 1
|
||||
#define CATCH_VERSION_PATCH 0
|
||||
|
||||
#endif // CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
||||
@ -7752,12 +7768,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: Ideally this would be also constrained against the various char types,
|
||||
// but I don't expect users to run into that in practice.
|
||||
template <typename T>
|
||||
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value,
|
||||
GeneratorWrapper<T>>
|
||||
std::enable_if_t<std::is_integral<T>::value, GeneratorWrapper<T>>
|
||||
random(T a, T b) {
|
||||
static_assert(
|
||||
!std::is_same<T, char>::value &&
|
||||
!std::is_same<T, int8_t>::value &&
|
||||
!std::is_same<T, uint8_t>::value &&
|
||||
!std::is_same<T, signed char>::value &&
|
||||
!std::is_same<T, unsigned char>::value &&
|
||||
!std::is_same<T, bool>::value,
|
||||
"The requested type is not supported by the underlying random distributions from std" );
|
||||
return GeneratorWrapper<T>(
|
||||
Catch::Detail::make_unique<RandomIntegerGenerator<T>>(a, b, Detail::getSeed())
|
||||
);
|
||||
@ -8097,6 +8118,9 @@ namespace Catch {
|
||||
#ifndef CATCH_CONSOLE_WIDTH_HPP_INCLUDED
|
||||
#define CATCH_CONSOLE_WIDTH_HPP_INCLUDED
|
||||
|
||||
// This include must be kept so that user's configured value for CONSOLE_WIDTH
|
||||
// is used before we attempt to provide a default value
|
||||
|
||||
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
|
||||
#define CATCH_CONFIG_CONSOLE_WIDTH 80
|
||||
#endif
|
||||
@ -10455,7 +10479,6 @@ namespace Catch {
|
||||
|
||||
class IsEmptyMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
// todo: Use polyfills
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
#if defined(CATCH_CONFIG_POLYFILL_NONMEMBER_CONTAINER_ACCESS)
|
||||
@ -10856,7 +10879,55 @@ namespace Catch {
|
||||
}
|
||||
};
|
||||
|
||||
// Creates a matcher that checks whether a range contains element matching a matcher
|
||||
// Matcher for checking that all elements in range are true.
|
||||
class AllTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (!elem) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Matcher for checking that no element in range is true.
|
||||
class NoneTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (elem) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Matcher for checking that any element in range is true.
|
||||
class AnyTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (elem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Creates a matcher that checks whether all elements in a range match a matcher
|
||||
template <typename Matcher>
|
||||
AllMatchMatcher<Matcher> AllMatch(Matcher&& matcher) {
|
||||
return { CATCH_FORWARD(matcher) };
|
||||
@ -10873,6 +10944,15 @@ namespace Catch {
|
||||
AnyMatchMatcher<Matcher> AnyMatch(Matcher&& matcher) {
|
||||
return { CATCH_FORWARD(matcher) };
|
||||
}
|
||||
|
||||
// Creates a matcher that checks whether all elements in a range are true
|
||||
AllTrueMatcher AllTrue();
|
||||
|
||||
// Creates a matcher that checks whether no element in a range is true
|
||||
NoneTrueMatcher NoneTrue();
|
||||
|
||||
// Creates a matcher that checks whether any element in a range is true
|
||||
AnyTrueMatcher AnyTrue();
|
||||
}
|
||||
}
|
||||
|
||||
@ -11252,7 +11332,11 @@ namespace Catch {
|
||||
|
||||
class StreamingReporterBase : public ReporterBase {
|
||||
public:
|
||||
using ReporterBase::ReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
StreamingReporterBase(ReporterConfig&& _config):
|
||||
ReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~StreamingReporterBase() override;
|
||||
|
||||
void benchmarkPreparing( StringRef ) override {}
|
||||
@ -11309,7 +11393,11 @@ namespace Catch {
|
||||
|
||||
class AutomakeReporter final : public StreamingReporterBase {
|
||||
public:
|
||||
using StreamingReporterBase::StreamingReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
AutomakeReporter(ReporterConfig&& _config):
|
||||
StreamingReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~AutomakeReporter() override;
|
||||
|
||||
static std::string getDescription() {
|
||||
@ -11505,7 +11593,11 @@ namespace Catch {
|
||||
using TestCaseNode = Node<TestCaseStats, SectionNode>;
|
||||
using TestRunNode = Node<TestRunStats, TestCaseNode>;
|
||||
|
||||
using ReporterBase::ReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
CumulativeReporterBase(ReporterConfig&& _config):
|
||||
ReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~CumulativeReporterBase() override;
|
||||
|
||||
void benchmarkPreparing( StringRef ) override {}
|
||||
|
@ -31,7 +31,9 @@ set(BENCHMARK_HEADERS
|
||||
${SOURCES_DIR}/benchmark/detail/catch_timing.hpp
|
||||
)
|
||||
set(BENCHMARK_SOURCES
|
||||
${SOURCES_DIR}/benchmark/internal/catch_benchmark_combined_tu.cpp
|
||||
${SOURCES_DIR}/benchmark/catch_chronometer.cpp
|
||||
${SOURCES_DIR}/benchmark/detail/catch_benchmark_function.cpp
|
||||
${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.cpp
|
||||
${SOURCES_DIR}/benchmark/detail/catch_stats.cpp
|
||||
)
|
||||
|
||||
@ -166,7 +168,6 @@ set(IMPL_SOURCES
|
||||
${SOURCES_DIR}/catch_approx.cpp
|
||||
${SOURCES_DIR}/internal/catch_assertion_handler.cpp
|
||||
${SOURCES_DIR}/catch_assertion_result.cpp
|
||||
${SOURCES_DIR}/matchers/internal/catch_matchers_combined_tu.cpp
|
||||
${SOURCES_DIR}/internal/catch_clara.cpp
|
||||
${SOURCES_DIR}/internal/catch_commandline.cpp
|
||||
${SOURCES_DIR}/internal/catch_source_line_info.cpp
|
||||
@ -182,18 +183,16 @@ set(IMPL_SOURCES
|
||||
${SOURCES_DIR}/internal/catch_fatal_condition_handler.cpp
|
||||
${SOURCES_DIR}/internal/catch_floating_point_helpers.cpp
|
||||
${SOURCES_DIR}/internal/catch_istream.cpp
|
||||
${SOURCES_DIR}/generators/internal/catch_generators_combined_tu.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_combined_tu.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter.cpp
|
||||
${SOURCES_DIR}/internal/catch_list.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_floating_point.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_quantifiers.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_string.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_templated.cpp
|
||||
${SOURCES_DIR}/catch_message.cpp
|
||||
${SOURCES_DIR}/internal/catch_output_redirect.cpp
|
||||
${SOURCES_DIR}/catch_registry_hub.cpp
|
||||
${SOURCES_DIR}/internal/catch_combined_tu.cpp
|
||||
${SOURCES_DIR}/internal/catch_random_number_generator.cpp
|
||||
${SOURCES_DIR}/internal/catch_random_seed_generation.cpp
|
||||
${SOURCES_DIR}/internal/catch_reporter_registry.cpp
|
||||
@ -223,6 +222,29 @@ set(IMPL_SOURCES
|
||||
${SOURCES_DIR}/internal/catch_xmlwriter.cpp
|
||||
${SOURCES_DIR}/internal/catch_test_case_info_hasher.cpp
|
||||
${SOURCES_DIR}/generators/catch_generators_random.cpp
|
||||
${SOURCES_DIR}/generators/catch_generator_exception.cpp
|
||||
${SOURCES_DIR}/generators/catch_generators.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_container_properties.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_exception.cpp
|
||||
${SOURCES_DIR}/matchers/catch_matchers_predicate.cpp
|
||||
${SOURCES_DIR}/matchers/internal/catch_matchers_impl.cpp
|
||||
${SOURCES_DIR}/catch_tag_alias_autoregistrar.cpp
|
||||
${SOURCES_DIR}/internal/catch_decomposer.cpp
|
||||
${SOURCES_DIR}/internal/catch_errno_guard.cpp
|
||||
${SOURCES_DIR}/internal/catch_lazy_expr.cpp
|
||||
${SOURCES_DIR}/internal/catch_leak_detector.cpp
|
||||
${SOURCES_DIR}/internal/catch_message_info.cpp
|
||||
${SOURCES_DIR}/internal/catch_polyfills.cpp
|
||||
${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp
|
||||
${SOURCES_DIR}/internal/catch_uncaught_exceptions.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_capture.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_config.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_exception.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_reporter_registry.cpp
|
||||
${SOURCES_DIR}/interfaces/catch_interfaces_testcase.cpp
|
||||
)
|
||||
set(INTERNAL_FILES ${IMPL_SOURCES} ${INTERNAL_HEADERS})
|
||||
|
||||
@ -247,11 +269,12 @@ set(REPORTER_HEADERS
|
||||
)
|
||||
set(REPORTER_SOURCES
|
||||
${SOURCES_DIR}/reporters/catch_reporter_automake.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_combined_tu.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_common_base.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_compact.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_console.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_cumulative_base.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_event_listener.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_helpers.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_junit.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_multi.cpp
|
||||
${SOURCES_DIR}/reporters/catch_reporter_registrars.cpp
|
||||
@ -263,9 +286,7 @@ set(REPORTER_SOURCES
|
||||
)
|
||||
set(REPORTER_FILES ${REPORTER_HEADERS} ${REPORTER_SOURCES})
|
||||
|
||||
# Fixme: STATIC because for dynamic, we would need to handle visibility
|
||||
# and I don't want to do the annotations right now
|
||||
add_library(Catch2 STATIC
|
||||
add_library(Catch2
|
||||
${REPORTER_FILES}
|
||||
${INTERNAL_FILES}
|
||||
${BENCHMARK_HEADERS}
|
||||
@ -318,7 +339,7 @@ target_include_directories(Catch2
|
||||
)
|
||||
|
||||
|
||||
add_library(Catch2WithMain STATIC
|
||||
add_library(Catch2WithMain
|
||||
${SOURCES_DIR}/internal/catch_main.cpp
|
||||
)
|
||||
add_build_reproducibility_settings(Catch2WithMain)
|
||||
@ -409,3 +430,27 @@ endif()
|
||||
|
||||
list(APPEND CATCH_WARNING_TARGETS Catch2 Catch2WithMain)
|
||||
set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE)
|
||||
|
||||
|
||||
# We still do not support building dynamic library with hidden visibility
|
||||
# so we want to check & warn users if they do this. However, we won't abort
|
||||
# the configuration step so that we don't have to also provide an override.
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (MSVC)
|
||||
set_target_properties(Catch2 Catch2WithMain
|
||||
PROPERTIES
|
||||
WINDOWS_EXPORT_ALL_SYMBOLS ON
|
||||
)
|
||||
endif()
|
||||
|
||||
get_target_property(_VisPreset Catch2 CXX_VISIBILITY_PRESET)
|
||||
if (NOT MSVC AND _VisPreset STREQUAL "hidden")
|
||||
set_target_properties(Catch2 Catch2WithMain
|
||||
PROPERTIES
|
||||
CXX_VISIBILITY_PRESET "default"
|
||||
VISIBILITY_INLINES_HIDDEN OFF
|
||||
)
|
||||
message(WARNING "Setting Catch2's visibility to default."
|
||||
" Hidden visibility is not supported.")
|
||||
endif()
|
||||
endif()
|
||||
|
17
src/catch2/benchmark/catch_chronometer.cpp
Normal file
17
src/catch2/benchmark/catch_chronometer.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
ChronometerConcept::~ChronometerConcept() = default;
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
@ -59,7 +59,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
T const& stored_object() const {
|
||||
return *static_cast<T*>(static_cast<void*>(data));
|
||||
return *static_cast<T const*>(static_cast<void const*>(data));
|
||||
}
|
||||
|
||||
|
||||
|
17
src/catch2/benchmark/detail/catch_benchmark_function.cpp
Normal file
17
src/catch2/benchmark/detail/catch_benchmark_function.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
BenchmarkFunction::callable::~callable() = default;
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
30
src/catch2/benchmark/detail/catch_run_for_at_least.cpp
Normal file
30
src/catch2/benchmark/detail/catch_run_for_at_least.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||
#include <exception>
|
||||
#include <catch2/internal/catch_enforce.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
struct optimized_away_error : std::exception {
|
||||
const char* what() const noexcept override;
|
||||
};
|
||||
|
||||
const char* optimized_away_error::what() const noexcept {
|
||||
return "could not measure benchmark, maybe it was optimized away";
|
||||
}
|
||||
|
||||
void throw_optimized_away_error() {
|
||||
Catch::throw_exception(optimized_away_error{});
|
||||
}
|
||||
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
@ -115,7 +115,7 @@ namespace Catch {
|
||||
double z1 = normal_quantile((1. - confidence_level) / 2.);
|
||||
|
||||
auto cumn = [n]( double x ) -> long {
|
||||
return std::lround( normal_cdf( x ) * n );
|
||||
return std::lround( normal_cdf( x ) * static_cast<double>(n) );
|
||||
};
|
||||
auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };
|
||||
double b1 = bias + z1;
|
||||
|
@ -1,75 +0,0 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small benchmarking-related TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////
|
||||
// vvv formerly catch_chronometer.cpp vvv //
|
||||
////////////////////////////////////////////
|
||||
|
||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
ChronometerConcept::~ChronometerConcept() = default;
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// vvv formerly catch_benchmark_function.cpp vvv //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
BenchmarkFunction::callable::~callable() = default;
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// vvv formerly catch_run_for_at_least.cpp vvv //
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||
#include <exception>
|
||||
#include <catch2/internal/catch_enforce.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
||||
namespace Detail {
|
||||
struct optimized_away_error : std::exception {
|
||||
const char* what() const noexcept override;
|
||||
};
|
||||
|
||||
const char* optimized_away_error::what() const noexcept {
|
||||
return "could not measure benchmark, maybe it was optimized away";
|
||||
}
|
||||
|
||||
void throw_optimized_away_error() {
|
||||
Catch::throw_exception(optimized_away_error{});
|
||||
}
|
||||
|
||||
} // namespace Detail
|
||||
} // namespace Benchmark
|
||||
} // namespace Catch
|
@ -13,6 +13,28 @@
|
||||
#include <catch2/internal/catch_test_spec_parser.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
|
||||
|
||||
namespace {
|
||||
bool provideBazelReporterOutput() {
|
||||
#ifdef CATCH_CONFIG_BAZEL_SUPPORT
|
||||
return true;
|
||||
#else
|
||||
|
||||
# if defined( _MSC_VER )
|
||||
// On Windows getenv throws a warning as there is no input validation,
|
||||
// since the switch is hardcoded, this should not be an issue.
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable : 4996 )
|
||||
# endif
|
||||
|
||||
return std::getenv( "BAZEL_TEST" ) != nullptr;
|
||||
|
||||
# if defined( _MSC_VER )
|
||||
# pragma warning( pop )
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
namespace Catch {
|
||||
|
||||
bool operator==( ProcessedReporterSpec const& lhs,
|
||||
@ -59,27 +81,27 @@ namespace Catch {
|
||||
} );
|
||||
}
|
||||
|
||||
#if defined( CATCH_CONFIG_BAZEL_SUPPORT )
|
||||
// Register a JUnit reporter for Bazel. Bazel sets an environment
|
||||
// variable with the path to XML output. If this file is written to
|
||||
// during test, Bazel will not generate a default XML output.
|
||||
// This allows the XML output file to contain higher level of detail
|
||||
// than what is possible otherwise.
|
||||
if(provideBazelReporterOutput()){
|
||||
// Register a JUnit reporter for Bazel. Bazel sets an environment
|
||||
// variable with the path to XML output. If this file is written to
|
||||
// during test, Bazel will not generate a default XML output.
|
||||
// This allows the XML output file to contain higher level of detail
|
||||
// than what is possible otherwise.
|
||||
# if defined( _MSC_VER )
|
||||
// On Windows getenv throws a warning as there is no input validation,
|
||||
// since the key is hardcoded, this should not be an issue.
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable : 4996 )
|
||||
// On Windows getenv throws a warning as there is no input validation,
|
||||
// since the key is hardcoded, this should not be an issue.
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable : 4996 )
|
||||
# endif
|
||||
const auto bazelOutputFilePtr = std::getenv( "XML_OUTPUT_FILE" );
|
||||
const auto bazelOutputFilePtr = std::getenv( "XML_OUTPUT_FILE" );
|
||||
# if defined( _MSC_VER )
|
||||
# pragma warning( pop )
|
||||
# endif
|
||||
if ( bazelOutputFilePtr != nullptr ) {
|
||||
m_data.reporterSpecifications.push_back(
|
||||
{ "junit", std::string( bazelOutputFilePtr ), {}, {} } );
|
||||
}
|
||||
#endif
|
||||
if ( bazelOutputFilePtr != nullptr ) {
|
||||
m_data.reporterSpecifications.push_back(
|
||||
{ "junit", std::string( bazelOutputFilePtr ), {}, {} } );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// We now fixup the reporter specs to handle default output spec,
|
||||
|
24
src/catch2/catch_tag_alias_autoregistrar.cpp
Normal file
24
src/catch2/catch_tag_alias_autoregistrar.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/catch_tag_alias_autoregistrar.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) {
|
||||
CATCH_TRY {
|
||||
getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);
|
||||
} CATCH_CATCH_ALL {
|
||||
// Do not throw when constructing global objects, instead register the exception to be processed later
|
||||
getMutableRegistryHub().registerStartupException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
|
@ -36,7 +36,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
Version const& libraryVersion() {
|
||||
static Version version( 3, 0, 1, "", 0 );
|
||||
static Version version( 3, 1, 0, "", 0 );
|
||||
return version;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
||||
#define CATCH_VERSION_MAJOR 3
|
||||
#define CATCH_VERSION_MINOR 0
|
||||
#define CATCH_VERSION_PATCH 1
|
||||
#define CATCH_VERSION_MINOR 1
|
||||
#define CATCH_VERSION_PATCH 0
|
||||
|
||||
#endif // CATCH_VERSION_MACROS_HPP_INCLUDED
|
||||
|
17
src/catch2/generators/catch_generator_exception.cpp
Normal file
17
src/catch2/generators/catch_generator_exception.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/generators/catch_generator_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
const char* GeneratorException::what() const noexcept {
|
||||
return m_msg;
|
||||
}
|
||||
|
||||
} // end namespace Catch
|
@ -5,36 +5,6 @@
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small generator-related TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// vvv formerly catch_generator_exception.cpp vvv //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/generators/catch_generator_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
const char* GeneratorException::what() const noexcept {
|
||||
return m_msg;
|
||||
}
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
// vvv formerly catch_generators.cpp vvv //
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/internal/catch_enforce.hpp>
|
@ -65,12 +65,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: Ideally this would be also constrained against the various char types,
|
||||
// but I don't expect users to run into that in practice.
|
||||
template <typename T>
|
||||
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value,
|
||||
GeneratorWrapper<T>>
|
||||
std::enable_if_t<std::is_integral<T>::value, GeneratorWrapper<T>>
|
||||
random(T a, T b) {
|
||||
static_assert(
|
||||
!std::is_same<T, char>::value &&
|
||||
!std::is_same<T, int8_t>::value &&
|
||||
!std::is_same<T, uint8_t>::value &&
|
||||
!std::is_same<T, signed char>::value &&
|
||||
!std::is_same<T, unsigned char>::value &&
|
||||
!std::is_same<T, bool>::value,
|
||||
"The requested type is not supported by the underlying random distributions from std" );
|
||||
return GeneratorWrapper<T>(
|
||||
Catch::Detail::make_unique<RandomIntegerGenerator<T>>(a, b, Detail::getSeed())
|
||||
);
|
||||
|
13
src/catch2/interfaces/catch_interfaces_capture.cpp
Normal file
13
src/catch2/interfaces/catch_interfaces_capture.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_capture.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IResultCapture::~IResultCapture() = default;
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small interfaces-related TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// vvv formerly catch_interfaces_capture.cpp vvv //
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_capture.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IResultCapture::~IResultCapture() = default;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// vvv formerly catch_interfaces_config.cpp vvv //
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_config.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IConfig::~IConfig() = default;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// vvv formerly catch_interfaces_exception.cpp vvv //
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IExceptionTranslator::~IExceptionTranslator() = default;
|
||||
IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// vvv formerly catch_interfaces_registry_hub.cpp vvv //
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IRegistryHub::~IRegistryHub() = default;
|
||||
IMutableRegistryHub::~IMutableRegistryHub() = default;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// vvv formerly catch_interfaces_testcase.cpp vvv //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
|
||||
|
||||
namespace Catch {
|
||||
ITestInvoker::~ITestInvoker() = default;
|
||||
ITestCaseRegistry::~ITestCaseRegistry() = default;
|
||||
}
|
||||
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IReporterRegistry::~IReporterRegistry() = default;
|
||||
}
|
||||
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IReporterFactory::~IReporterFactory() = default;
|
||||
EventListenerFactory::~EventListenerFactory() = default;
|
||||
}
|
13
src/catch2/interfaces/catch_interfaces_config.cpp
Normal file
13
src/catch2/interfaces/catch_interfaces_config.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_config.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IConfig::~IConfig() = default;
|
||||
}
|
14
src/catch2/interfaces/catch_interfaces_exception.cpp
Normal file
14
src/catch2/interfaces/catch_interfaces_exception.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IExceptionTranslator::~IExceptionTranslator() = default;
|
||||
IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default;
|
||||
}
|
14
src/catch2/interfaces/catch_interfaces_registry_hub.cpp
Normal file
14
src/catch2/interfaces/catch_interfaces_registry_hub.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IRegistryHub::~IRegistryHub() = default;
|
||||
IMutableRegistryHub::~IMutableRegistryHub() = default;
|
||||
}
|
14
src/catch2/interfaces/catch_interfaces_reporter_factory.cpp
Normal file
14
src/catch2/interfaces/catch_interfaces_reporter_factory.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IReporterFactory::~IReporterFactory() = default;
|
||||
EventListenerFactory::~EventListenerFactory() = default;
|
||||
}
|
13
src/catch2/interfaces/catch_interfaces_reporter_registry.cpp
Normal file
13
src/catch2/interfaces/catch_interfaces_reporter_registry.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
|
||||
|
||||
namespace Catch {
|
||||
IReporterRegistry::~IReporterRegistry() = default;
|
||||
}
|
14
src/catch2/interfaces/catch_interfaces_testcase.cpp
Normal file
14
src/catch2/interfaces/catch_interfaces_testcase.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
|
||||
|
||||
namespace Catch {
|
||||
ITestInvoker::~ITestInvoker() = default;
|
||||
ITestCaseRegistry::~ITestCaseRegistry() = default;
|
||||
}
|
@ -1,237 +0,0 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small top-level TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// vvv formerly catch_tag_alias_autoregistrar.cpp vvv //
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/catch_tag_alias_autoregistrar.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) {
|
||||
CATCH_TRY {
|
||||
getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);
|
||||
} CATCH_CATCH_ALL {
|
||||
// Do not throw when constructing global objects, instead register the exception to be processed later
|
||||
getMutableRegistryHub().registerStartupException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
// vvv formerly catch_polyfills.cpp vvv //
|
||||
//////////////////////////////////////////
|
||||
|
||||
#include <catch2/internal/catch_polyfills.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <cmath>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
#if !defined(CATCH_CONFIG_POLYFILL_ISNAN)
|
||||
bool isnan(float f) {
|
||||
return std::isnan(f);
|
||||
}
|
||||
bool isnan(double d) {
|
||||
return std::isnan(d);
|
||||
}
|
||||
#else
|
||||
// For now we only use this for embarcadero
|
||||
bool isnan(float f) {
|
||||
return std::_isnan(f);
|
||||
}
|
||||
bool isnan(double d) {
|
||||
return std::_isnan(d);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// vvv formerly catch_uncaught_exceptions.cpp vvv //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/internal/catch_uncaught_exceptions.hpp>
|
||||
#include <catch2/internal/catch_config_uncaught_exceptions.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Catch {
|
||||
bool uncaught_exceptions() {
|
||||
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
return false;
|
||||
#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
|
||||
return std::uncaught_exceptions() > 0;
|
||||
#else
|
||||
return std::uncaught_exception();
|
||||
#endif
|
||||
}
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
////////////////////////////////////////////
|
||||
// vvv formerly catch_errno_guard.cpp vvv //
|
||||
////////////////////////////////////////////
|
||||
#include <catch2/internal/catch_errno_guard.hpp>
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
namespace Catch {
|
||||
ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}
|
||||
ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
// vvv formerly catch_decomposer.cpp vvv //
|
||||
///////////////////////////////////////////
|
||||
#include <catch2/internal/catch_decomposer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
ITransientExpression::~ITransientExpression() = default;
|
||||
|
||||
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
|
||||
if( lhs.size() + rhs.size() < 40 &&
|
||||
lhs.find('\n') == std::string::npos &&
|
||||
rhs.find('\n') == std::string::npos )
|
||||
os << lhs << ' ' << op << ' ' << rhs;
|
||||
else
|
||||
os << lhs << '\n' << op << '\n' << rhs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// vvv formerly catch_startup_exception_registry.cpp vvv //
|
||||
///////////////////////////////////////////////////////////
|
||||
#include <catch2/internal/catch_startup_exception_registry.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
|
||||
namespace Catch {
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {
|
||||
CATCH_TRY {
|
||||
m_exceptions.push_back(exception);
|
||||
} CATCH_CATCH_ALL {
|
||||
// If we run out of memory during start-up there's really not a lot more we can do about it
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::exception_ptr> const& StartupExceptionRegistry::getExceptions() const noexcept {
|
||||
return m_exceptions;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// vvv formerly catch_leak_detector.cpp vvv //
|
||||
//////////////////////////////////////////////
|
||||
#include <catch2/internal/catch_leak_detector.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
|
||||
|
||||
#ifdef CATCH_CONFIG_WINDOWS_CRTDBG
|
||||
#include <crtdbg.h>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
LeakDetector::LeakDetector() {
|
||||
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||
flag |= _CRTDBG_LEAK_CHECK_DF;
|
||||
flag |= _CRTDBG_ALLOC_MEM_DF;
|
||||
_CrtSetDbgFlag(flag);
|
||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
||||
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
|
||||
// Change this to leaking allocation's number to break there
|
||||
_CrtSetBreakAlloc(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#else // ^^ Windows crt debug heap enabled // Windows crt debug heap disabled vv
|
||||
|
||||
Catch::LeakDetector::LeakDetector() {}
|
||||
|
||||
#endif // CATCH_CONFIG_WINDOWS_CRTDBG
|
||||
|
||||
Catch::LeakDetector::~LeakDetector() {
|
||||
Catch::cleanUp();
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// vvv formerly catch_message_info.cpp vvv //
|
||||
/////////////////////////////////////////////
|
||||
|
||||
#include <catch2/internal/catch_message_info.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
MessageInfo::MessageInfo( StringRef _macroName,
|
||||
SourceLineInfo const& _lineInfo,
|
||||
ResultWas::OfType _type )
|
||||
: macroName( _macroName ),
|
||||
lineInfo( _lineInfo ),
|
||||
type( _type ),
|
||||
sequence( ++globalCount )
|
||||
{}
|
||||
|
||||
// This may need protecting if threading support is added
|
||||
unsigned int MessageInfo::globalCount = 0;
|
||||
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
// vvv formerly catch_lazy_expr.cpp vvv //
|
||||
//////////////////////////////////////////
|
||||
#include <catch2/internal/catch_lazy_expr.hpp>
|
||||
#include <catch2/internal/catch_decomposer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
auto operator << (std::ostream& os, LazyExpression const& lazyExpr) -> std::ostream& {
|
||||
if (lazyExpr.m_isNegated)
|
||||
os << '!';
|
||||
|
||||
if (lazyExpr) {
|
||||
if (lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression())
|
||||
os << '(' << *lazyExpr.m_transientExpression << ')';
|
||||
else
|
||||
os << *lazyExpr.m_transientExpression;
|
||||
} else {
|
||||
os << "{** error - unchecked empty expression requested **}";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Catch
|
@ -57,11 +57,23 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__CUDACC__) && !defined(__clang__)
|
||||
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" )
|
||||
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" )
|
||||
# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" )
|
||||
#endif
|
||||
|
||||
// clang-cl defines _MSC_VER as well as __clang__, which could cause the
|
||||
// start/stop internal suppression macros to be double defined.
|
||||
#if defined(__clang__) && !defined(_MSC_VER)
|
||||
|
||||
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
|
||||
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" )
|
||||
|
||||
#endif // __clang__ && !_MSC_VER
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
|
||||
// which results in calls to destructors being emitted for each temporary,
|
||||
// without a matching initialization. In practice, this can result in something
|
||||
|
@ -232,25 +232,22 @@ namespace Catch {
|
||||
|
||||
Detail::unique_ptr<ColourImpl> makeColourImpl( ColourMode implSelection,
|
||||
IStream* stream ) {
|
||||
if ( implSelection == ColourMode::None ) {
|
||||
return Detail::make_unique<NoColourImpl>( stream );
|
||||
}
|
||||
if ( implSelection == ColourMode::ANSI ) {
|
||||
return Detail::make_unique<ANSIColourImpl>( stream );
|
||||
}
|
||||
#if defined( CATCH_CONFIG_COLOUR_WIN32 )
|
||||
if ( implSelection == ColourMode::Win32 ) {
|
||||
return Detail::make_unique<Win32ColourImpl>( stream );
|
||||
}
|
||||
#endif
|
||||
if ( implSelection == ColourMode::ANSI ) {
|
||||
return Detail::make_unique<ANSIColourImpl>( stream );
|
||||
}
|
||||
if ( implSelection == ColourMode::None ) {
|
||||
return Detail::make_unique<NoColourImpl>( stream );
|
||||
}
|
||||
|
||||
// todo: check win32 eligibility under ifdef, otherwise ansi
|
||||
if ( implSelection == ColourMode::PlatformDefault) {
|
||||
#if defined (CATCH_CONFIG_COLOUR_WIN32)
|
||||
#if defined( CATCH_CONFIG_COLOUR_WIN32 )
|
||||
if ( Win32ColourImpl::useImplementationForStream( *stream ) ) {
|
||||
return Detail::make_unique<Win32ColourImpl>( stream );
|
||||
} else {
|
||||
return Detail::make_unique<NoColourImpl>( stream );
|
||||
}
|
||||
#endif
|
||||
if ( ANSIColourImpl::useImplementationForStream( *stream ) ) {
|
||||
|
@ -8,6 +8,10 @@
|
||||
#ifndef CATCH_CONSOLE_WIDTH_HPP_INCLUDED
|
||||
#define CATCH_CONSOLE_WIDTH_HPP_INCLUDED
|
||||
|
||||
// This include must be kept so that user's configured value for CONSOLE_WIDTH
|
||||
// is used before we attempt to provide a default value
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
|
||||
#define CATCH_CONFIG_CONSOLE_WIDTH 80
|
||||
#endif
|
||||
|
23
src/catch2/internal/catch_decomposer.cpp
Normal file
23
src/catch2/internal/catch_decomposer.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_decomposer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
ITransientExpression::~ITransientExpression() = default;
|
||||
|
||||
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
|
||||
if( lhs.size() + rhs.size() < 40 &&
|
||||
lhs.find('\n') == std::string::npos &&
|
||||
rhs.find('\n') == std::string::npos )
|
||||
os << lhs << ' ' << op << ' ' << rhs;
|
||||
else
|
||||
os << lhs << '\n' << op << '\n' << rhs;
|
||||
}
|
||||
}
|
16
src/catch2/internal/catch_errno_guard.cpp
Normal file
16
src/catch2/internal/catch_errno_guard.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_errno_guard.hpp>
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
namespace Catch {
|
||||
ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}
|
||||
ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }
|
||||
}
|
29
src/catch2/internal/catch_lazy_expr.cpp
Normal file
29
src/catch2/internal/catch_lazy_expr.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_lazy_expr.hpp>
|
||||
#include <catch2/internal/catch_decomposer.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
auto operator << (std::ostream& os, LazyExpression const& lazyExpr) -> std::ostream& {
|
||||
if (lazyExpr.m_isNegated)
|
||||
os << '!';
|
||||
|
||||
if (lazyExpr) {
|
||||
if (lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression())
|
||||
os << '(' << *lazyExpr.m_transientExpression << ')';
|
||||
else
|
||||
os << *lazyExpr.m_transientExpression;
|
||||
} else {
|
||||
os << "{** error - unchecked empty expression requested **}";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Catch
|
38
src/catch2/internal/catch_leak_detector.cpp
Normal file
38
src/catch2/internal/catch_leak_detector.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_leak_detector.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
#ifdef CATCH_CONFIG_WINDOWS_CRTDBG
|
||||
#include <crtdbg.h>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
LeakDetector::LeakDetector() {
|
||||
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||
flag |= _CRTDBG_LEAK_CHECK_DF;
|
||||
flag |= _CRTDBG_ALLOC_MEM_DF;
|
||||
_CrtSetDbgFlag(flag);
|
||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
|
||||
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
|
||||
// Change this to leaking allocation's number to break there
|
||||
_CrtSetBreakAlloc(-1);
|
||||
}
|
||||
}
|
||||
|
||||
#else // ^^ Windows crt debug heap enabled // Windows crt debug heap disabled vv
|
||||
|
||||
Catch::LeakDetector::LeakDetector() {}
|
||||
|
||||
#endif // CATCH_CONFIG_WINDOWS_CRTDBG
|
||||
|
||||
Catch::LeakDetector::~LeakDetector() {
|
||||
Catch::cleanUp();
|
||||
}
|
25
src/catch2/internal/catch_message_info.cpp
Normal file
25
src/catch2/internal/catch_message_info.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_message_info.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
MessageInfo::MessageInfo( StringRef _macroName,
|
||||
SourceLineInfo const& _lineInfo,
|
||||
ResultWas::OfType _type )
|
||||
: macroName( _macroName ),
|
||||
lineInfo( _lineInfo ),
|
||||
type( _type ),
|
||||
sequence( ++globalCount )
|
||||
{}
|
||||
|
||||
// This may need protecting if threading support is added
|
||||
unsigned int MessageInfo::globalCount = 0;
|
||||
|
||||
} // end namespace Catch
|
34
src/catch2/internal/catch_polyfills.cpp
Normal file
34
src/catch2/internal/catch_polyfills.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_polyfills.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
#if !defined(CATCH_CONFIG_POLYFILL_ISNAN)
|
||||
bool isnan(float f) {
|
||||
return std::isnan(f);
|
||||
}
|
||||
bool isnan(double d) {
|
||||
return std::isnan(d);
|
||||
}
|
||||
#else
|
||||
// For now we only use this for embarcadero
|
||||
bool isnan(float f) {
|
||||
return std::_isnan(f);
|
||||
}
|
||||
bool isnan(double d) {
|
||||
return std::_isnan(d);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end namespace Catch
|
@ -126,7 +126,7 @@ namespace Catch {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto ret = kvPairs.emplace( kv.key, kv.value );
|
||||
auto ret = kvPairs.emplace( std::string(kv.key), std::string(kv.value) );
|
||||
if ( !ret.second ) {
|
||||
// Duplicated key. We might want to handle this differently,
|
||||
// e.g. by overwriting the existing value?
|
||||
|
@ -500,6 +500,11 @@ namespace Catch {
|
||||
// before running the tests themselves, or the binary can crash
|
||||
// without failed test being reported.
|
||||
FatalConditionHandlerGuard _(&m_fatalConditionhandler);
|
||||
// We keep having issue where some compilers warn about an unused
|
||||
// variable, even though the type has non-trivial constructor and
|
||||
// destructor. This is annoying and ugly, but it makes them stfu.
|
||||
(void)_;
|
||||
|
||||
m_activeTestCase->invoke();
|
||||
}
|
||||
|
||||
|
29
src/catch2/internal/catch_startup_exception_registry.cpp
Normal file
29
src/catch2/internal/catch_startup_exception_registry.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_startup_exception_registry.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
namespace Catch {
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {
|
||||
CATCH_TRY {
|
||||
m_exceptions.push_back(exception);
|
||||
} CATCH_CATCH_ALL {
|
||||
// If we run out of memory during start-up there's really not a lot more we can do about it
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::exception_ptr> const& StartupExceptionRegistry::getExceptions() const noexcept {
|
||||
return m_exceptions;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end namespace Catch
|
@ -13,6 +13,7 @@
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include <catch2/internal/catch_stringref.hpp>
|
||||
#include <catch2/internal/catch_source_line_info.hpp>
|
||||
|
||||
// We need this suppression to leak, because it took until GCC 9
|
||||
// We need this suppression to leak, because it took until GCC 10
|
||||
// for the front end to handle local suppression via _Pragma properly
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 9
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ <= 9
|
||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||
#endif
|
||||
|
||||
|
@ -77,6 +77,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
static void TestName(); \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||
static void TestName()
|
||||
@ -87,6 +88,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
||||
@ -94,6 +96,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
#define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
namespace{ \
|
||||
struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
|
||||
void test(); \
|
||||
@ -110,6 +113,7 @@ struct AutoReg : Detail::NonCopyable {
|
||||
do { \
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
|
||||
} while(false)
|
||||
|
26
src/catch2/internal/catch_uncaught_exceptions.cpp
Normal file
26
src/catch2/internal/catch_uncaught_exceptions.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/internal/catch_uncaught_exceptions.hpp>
|
||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
||||
#include <catch2/internal/catch_config_uncaught_exceptions.hpp>
|
||||
#include <catch2/catch_user_config.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Catch {
|
||||
bool uncaught_exceptions() {
|
||||
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
return false;
|
||||
#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
|
||||
return std::uncaught_exceptions() > 0;
|
||||
#else
|
||||
return std::uncaught_exception();
|
||||
#endif
|
||||
}
|
||||
} // end namespace Catch
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <iomanip>
|
||||
#include <type_traits>
|
||||
#include <cstdint>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
|
25
src/catch2/matchers/catch_matchers.cpp
Normal file
25
src/catch2/matchers/catch_matchers.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
std::string MatcherUntypedBase::toString() const {
|
||||
if (m_cachedToString.empty()) {
|
||||
m_cachedToString = describe();
|
||||
}
|
||||
return m_cachedToString;
|
||||
}
|
||||
|
||||
MatcherUntypedBase::~MatcherUntypedBase() = default;
|
||||
|
||||
} // namespace Matchers
|
||||
} // namespace Catch
|
34
src/catch2/matchers/catch_matchers_container_properties.cpp
Normal file
34
src/catch2/matchers/catch_matchers_container_properties.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/matchers/catch_matchers_container_properties.hpp>
|
||||
#include <catch2/internal/catch_reusable_string_stream.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
std::string IsEmptyMatcher::describe() const {
|
||||
return "is empty";
|
||||
}
|
||||
|
||||
std::string HasSizeMatcher::describe() const {
|
||||
ReusableStringStream sstr;
|
||||
sstr << "has size == " << m_target_size;
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
IsEmptyMatcher IsEmpty() {
|
||||
return {};
|
||||
}
|
||||
|
||||
HasSizeMatcher SizeIs(std::size_t sz) {
|
||||
return HasSizeMatcher{ sz };
|
||||
}
|
||||
|
||||
} // end namespace Matchers
|
||||
} // end namespace Catch
|
@ -17,7 +17,6 @@ namespace Catch {
|
||||
|
||||
class IsEmptyMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
// todo: Use polyfills
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
#if defined(CATCH_CONFIG_POLYFILL_NONMEMBER_CONTAINER_ACCESS)
|
||||
|
26
src/catch2/matchers/catch_matchers_exception.cpp
Normal file
26
src/catch2/matchers/catch_matchers_exception.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
#include <catch2/matchers/catch_matchers_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
bool ExceptionMessageMatcher::match(std::exception const& ex) const {
|
||||
return ex.what() == m_message;
|
||||
}
|
||||
|
||||
std::string ExceptionMessageMatcher::describe() const {
|
||||
return "exception message matches \"" + m_message + '"';
|
||||
}
|
||||
|
||||
ExceptionMessageMatcher Message(std::string const& message) {
|
||||
return ExceptionMessageMatcher(message);
|
||||
}
|
||||
|
||||
} // namespace Matchers
|
||||
} // namespace Catch
|
17
src/catch2/matchers/catch_matchers_predicate.cpp
Normal file
17
src/catch2/matchers/catch_matchers_predicate.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/matchers/catch_matchers_predicate.hpp>
|
||||
|
||||
std::string Catch::Matchers::Detail::finalizeDescription(const std::string& desc) {
|
||||
if (desc.empty()) {
|
||||
return "matches undescribed predicate";
|
||||
} else {
|
||||
return "matches predicate: \"" + desc + '"';
|
||||
}
|
||||
}
|
24
src/catch2/matchers/catch_matchers_quantifiers.cpp
Normal file
24
src/catch2/matchers/catch_matchers_quantifiers.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
#include <catch2/matchers/catch_matchers_quantifiers.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
std::string AllTrueMatcher::describe() const { return "contains only true"; }
|
||||
|
||||
AllTrueMatcher AllTrue() { return AllTrueMatcher{}; }
|
||||
|
||||
std::string NoneTrueMatcher::describe() const { return "contains no true"; }
|
||||
|
||||
NoneTrueMatcher NoneTrue() { return NoneTrueMatcher{}; }
|
||||
|
||||
std::string AnyTrueMatcher::describe() const { return "contains at least one true"; }
|
||||
|
||||
AnyTrueMatcher AnyTrue() { return AnyTrueMatcher{}; }
|
||||
} // namespace Matchers
|
||||
} // namespace Catch
|
@ -85,7 +85,55 @@ namespace Catch {
|
||||
}
|
||||
};
|
||||
|
||||
// Creates a matcher that checks whether a range contains element matching a matcher
|
||||
// Matcher for checking that all elements in range are true.
|
||||
class AllTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (!elem) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Matcher for checking that no element in range is true.
|
||||
class NoneTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (elem) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Matcher for checking that any element in range is true.
|
||||
class AnyTrueMatcher final : public MatcherGenericBase {
|
||||
public:
|
||||
std::string describe() const override;
|
||||
|
||||
template <typename RangeLike>
|
||||
bool match(RangeLike&& rng) const {
|
||||
for (auto&& elem : rng) {
|
||||
if (elem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Creates a matcher that checks whether all elements in a range match a matcher
|
||||
template <typename Matcher>
|
||||
AllMatchMatcher<Matcher> AllMatch(Matcher&& matcher) {
|
||||
return { CATCH_FORWARD(matcher) };
|
||||
@ -102,6 +150,15 @@ namespace Catch {
|
||||
AnyMatchMatcher<Matcher> AnyMatch(Matcher&& matcher) {
|
||||
return { CATCH_FORWARD(matcher) };
|
||||
}
|
||||
|
||||
// Creates a matcher that checks whether all elements in a range are true
|
||||
AllTrueMatcher AllTrue();
|
||||
|
||||
// Creates a matcher that checks whether no element in a range is true
|
||||
NoneTrueMatcher NoneTrue();
|
||||
|
||||
// Creates a matcher that checks whether any element in a range is true
|
||||
AnyTrueMatcher AnyTrue();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,135 +0,0 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small matcher-related TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// vvv formerly catch_matchers_impl.cpp vvv //
|
||||
//////////////////////////////////////////////
|
||||
#include <catch2/matchers/internal/catch_matchers_impl.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
// This is the general overload that takes a any string matcher
|
||||
// There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers
|
||||
// the Equals matcher (so the header does not mention matchers)
|
||||
void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) {
|
||||
std::string exceptionMessage = Catch::translateActiveException();
|
||||
MatchExpr<std::string, StringMatcher const&> expr( CATCH_MOVE(exceptionMessage), matcher, matcherString );
|
||||
handler.handleExpr( expr );
|
||||
}
|
||||
|
||||
} // namespace Catch
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// vvv formerly catch_matchers_container_properties.cpp vvv //
|
||||
//////////////////////////////////////////////////////////////
|
||||
#include <catch2/matchers/catch_matchers_container_properties.hpp>
|
||||
#include <catch2/internal/catch_reusable_string_stream.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
std::string IsEmptyMatcher::describe() const {
|
||||
return "is empty";
|
||||
}
|
||||
|
||||
std::string HasSizeMatcher::describe() const {
|
||||
ReusableStringStream sstr;
|
||||
sstr << "has size == " << m_target_size;
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
IsEmptyMatcher IsEmpty() {
|
||||
return {};
|
||||
}
|
||||
|
||||
HasSizeMatcher SizeIs(std::size_t sz) {
|
||||
return HasSizeMatcher{ sz };
|
||||
}
|
||||
|
||||
} // end namespace Matchers
|
||||
} // end namespace Catch
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
// vvv formerly catch_matchers.cpp vvv //
|
||||
/////////////////////////////////////////
|
||||
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
std::string MatcherUntypedBase::toString() const {
|
||||
if (m_cachedToString.empty()) {
|
||||
m_cachedToString = describe();
|
||||
}
|
||||
return m_cachedToString;
|
||||
}
|
||||
|
||||
MatcherUntypedBase::~MatcherUntypedBase() = default;
|
||||
|
||||
} // namespace Matchers
|
||||
} // namespace Catch
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// vvv formerly catch_matchers_predicate.cpp vvv //
|
||||
///////////////////////////////////////////////////
|
||||
#include <catch2/matchers/catch_matchers_predicate.hpp>
|
||||
|
||||
std::string Catch::Matchers::Detail::finalizeDescription(const std::string& desc) {
|
||||
if (desc.empty()) {
|
||||
return "matches undescribed predicate";
|
||||
} else {
|
||||
return "matches predicate: \"" + desc + '"';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// vvv formerly catch_matchers_exception.cpp vvv //
|
||||
///////////////////////////////////////////////////
|
||||
#include <catch2/matchers/catch_matchers_exception.hpp>
|
||||
|
||||
namespace Catch {
|
||||
namespace Matchers {
|
||||
|
||||
bool ExceptionMessageMatcher::match(std::exception const& ex) const {
|
||||
return ex.what() == m_message;
|
||||
}
|
||||
|
||||
std::string ExceptionMessageMatcher::describe() const {
|
||||
return "exception message matches \"" + m_message + '"';
|
||||
}
|
||||
|
||||
ExceptionMessageMatcher Message(std::string const& message) {
|
||||
return ExceptionMessageMatcher(message);
|
||||
}
|
||||
|
||||
} // namespace Matchers
|
||||
} // namespace Catch
|
25
src/catch2/matchers/internal/catch_matchers_impl.cpp
Normal file
25
src/catch2/matchers/internal/catch_matchers_impl.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/matchers/internal/catch_matchers_impl.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
// This is the general overload that takes a any string matcher
|
||||
// There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers
|
||||
// the Equals matcher (so the header does not mention matchers)
|
||||
void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) {
|
||||
std::string exceptionMessage = Catch::translateActiveException();
|
||||
MatchExpr<std::string, StringMatcher const&> expr( CATCH_MOVE(exceptionMessage), matcher, matcherString );
|
||||
handler.handleExpr( expr );
|
||||
}
|
||||
|
||||
} // namespace Catch
|
@ -8,7 +8,9 @@
|
||||
#ifndef CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
|
||||
#define CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/reporters/catch_reporter_streaming_base.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -16,7 +18,11 @@ namespace Catch {
|
||||
|
||||
class AutomakeReporter final : public StreamingReporterBase {
|
||||
public:
|
||||
using StreamingReporterBase::StreamingReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
AutomakeReporter(ReporterConfig&& _config):
|
||||
StreamingReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~AutomakeReporter() override;
|
||||
|
||||
static std::string getDescription() {
|
||||
|
@ -8,7 +8,9 @@
|
||||
#ifndef CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
|
||||
#define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/reporters/catch_reporter_common_base.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
#include <catch2/internal/catch_unique_ptr.hpp>
|
||||
#include <catch2/internal/catch_optional.hpp>
|
||||
|
||||
@ -88,7 +90,11 @@ namespace Catch {
|
||||
using TestCaseNode = Node<TestCaseStats, SectionNode>;
|
||||
using TestRunNode = Node<TestRunStats, TestCaseNode>;
|
||||
|
||||
using ReporterBase::ReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
CumulativeReporterBase(ReporterConfig&& _config):
|
||||
ReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~CumulativeReporterBase() override;
|
||||
|
||||
void benchmarkPreparing( StringRef ) override {}
|
||||
|
40
src/catch2/reporters/catch_reporter_event_listener.cpp
Normal file
40
src/catch2/reporters/catch_reporter_event_listener.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
// Copyright Catch2 Authors
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
#include <catch2/reporters/catch_reporter_event_listener.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
void EventListenerBase::fatalErrorEncountered( StringRef ) {}
|
||||
|
||||
void EventListenerBase::benchmarkPreparing( StringRef ) {}
|
||||
void EventListenerBase::benchmarkStarting( BenchmarkInfo const& ) {}
|
||||
void EventListenerBase::benchmarkEnded( BenchmarkStats<> const& ) {}
|
||||
void EventListenerBase::benchmarkFailed( StringRef ) {}
|
||||
|
||||
void EventListenerBase::assertionStarting( AssertionInfo const& ) {}
|
||||
|
||||
void EventListenerBase::assertionEnded( AssertionStats const& ) {}
|
||||
void EventListenerBase::listReporters(
|
||||
std::vector<ReporterDescription> const& ) {}
|
||||
void EventListenerBase::listListeners(
|
||||
std::vector<ListenerDescription> const& ) {}
|
||||
void EventListenerBase::listTests( std::vector<TestCaseHandle> const& ) {}
|
||||
void EventListenerBase::listTags( std::vector<TagInfo> const& ) {}
|
||||
void EventListenerBase::noMatchingTestCases( StringRef ) {}
|
||||
void EventListenerBase::reportInvalidTestSpec( StringRef ) {}
|
||||
void EventListenerBase::testRunStarting( TestRunInfo const& ) {}
|
||||
void EventListenerBase::testCaseStarting( TestCaseInfo const& ) {}
|
||||
void EventListenerBase::testCasePartialStarting(TestCaseInfo const&, uint64_t) {}
|
||||
void EventListenerBase::sectionStarting( SectionInfo const& ) {}
|
||||
void EventListenerBase::sectionEnded( SectionStats const& ) {}
|
||||
void EventListenerBase::testCasePartialEnded(TestCaseStats const&, uint64_t) {}
|
||||
void EventListenerBase::testCaseEnded( TestCaseStats const& ) {}
|
||||
void EventListenerBase::testRunEnded( TestRunStats const& ) {}
|
||||
void EventListenerBase::skipTest( TestCaseInfo const& ) {}
|
||||
} // namespace Catch
|
@ -5,17 +5,6 @@
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/** \file
|
||||
* This is a special TU that combines what would otherwise be a very
|
||||
* small reporter-related TUs into one bigger TU.
|
||||
*
|
||||
* The reason for this is compilation performance improvements by
|
||||
* avoiding reparsing headers for many small TUs, instead having this
|
||||
* one TU include bit more, but having it all parsed only once.
|
||||
*
|
||||
* To avoid heavy-tail problem with compilation times, each "subpart"
|
||||
* of Catch2 has its own combined TU like this.
|
||||
*/
|
||||
|
||||
#include <catch2/reporters/catch_reporter_helpers.hpp>
|
||||
#include <catch2/interfaces/catch_interfaces_config.hpp>
|
||||
@ -154,6 +143,12 @@ namespace Catch {
|
||||
|
||||
void defaultListListeners( std::ostream& out,
|
||||
std::vector<ListenerDescription> const& descriptions ) {
|
||||
out << "Registered listeners:\n";
|
||||
|
||||
if(descriptions.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto maxNameLen =
|
||||
std::max_element( descriptions.begin(),
|
||||
descriptions.end(),
|
||||
@ -163,7 +158,6 @@ namespace Catch {
|
||||
} )
|
||||
->name.size();
|
||||
|
||||
out << "Registered listeners:\n";
|
||||
for ( auto const& desc : descriptions ) {
|
||||
out << TextFlow::Column( static_cast<std::string>( desc.name ) +
|
||||
':' )
|
||||
@ -242,37 +236,3 @@ namespace Catch {
|
||||
}
|
||||
|
||||
} // namespace Catch
|
||||
|
||||
|
||||
#include <catch2/reporters/catch_reporter_event_listener.hpp>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
void EventListenerBase::fatalErrorEncountered( StringRef ) {}
|
||||
|
||||
void EventListenerBase::benchmarkPreparing( StringRef ) {}
|
||||
void EventListenerBase::benchmarkStarting( BenchmarkInfo const& ) {}
|
||||
void EventListenerBase::benchmarkEnded( BenchmarkStats<> const& ) {}
|
||||
void EventListenerBase::benchmarkFailed( StringRef ) {}
|
||||
|
||||
void EventListenerBase::assertionStarting( AssertionInfo const& ) {}
|
||||
|
||||
void EventListenerBase::assertionEnded( AssertionStats const& ) {}
|
||||
void EventListenerBase::listReporters(
|
||||
std::vector<ReporterDescription> const& ) {}
|
||||
void EventListenerBase::listListeners(
|
||||
std::vector<ListenerDescription> const& ) {}
|
||||
void EventListenerBase::listTests( std::vector<TestCaseHandle> const& ) {}
|
||||
void EventListenerBase::listTags( std::vector<TagInfo> const& ) {}
|
||||
void EventListenerBase::noMatchingTestCases( StringRef ) {}
|
||||
void EventListenerBase::reportInvalidTestSpec( StringRef ) {}
|
||||
void EventListenerBase::testRunStarting( TestRunInfo const& ) {}
|
||||
void EventListenerBase::testCaseStarting( TestCaseInfo const& ) {}
|
||||
void EventListenerBase::testCasePartialStarting(TestCaseInfo const&, uint64_t) {}
|
||||
void EventListenerBase::sectionStarting( SectionInfo const& ) {}
|
||||
void EventListenerBase::sectionEnded( SectionStats const& ) {}
|
||||
void EventListenerBase::testCasePartialEnded(TestCaseStats const&, uint64_t) {}
|
||||
void EventListenerBase::testCaseEnded( TestCaseStats const& ) {}
|
||||
void EventListenerBase::testRunEnded( TestRunStats const& ) {}
|
||||
void EventListenerBase::skipTest( TestCaseInfo const& ) {}
|
||||
} // namespace Catch
|
@ -67,6 +67,15 @@ namespace Catch {
|
||||
return rss.str();
|
||||
}
|
||||
|
||||
static void normalizeNamespaceMarkers(std::string& str) {
|
||||
std::size_t pos = str.find( "::" );
|
||||
while ( pos != str.npos ) {
|
||||
str.replace( pos, 2, "." );
|
||||
pos += 1;
|
||||
pos = str.find( "::", pos );
|
||||
}
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
JunitReporter::JunitReporter( ReporterConfig&& _config )
|
||||
@ -170,6 +179,8 @@ namespace Catch {
|
||||
if ( !m_config->name().empty() )
|
||||
className = static_cast<std::string>(m_config->name()) + '.' + className;
|
||||
|
||||
normalizeNamespaceMarkers(className);
|
||||
|
||||
writeSection( className, "", rootSection, stats.testInfo->okToFail() );
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@
|
||||
#ifndef CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED
|
||||
#define CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
|
||||
#include <catch2/reporters/catch_reporter_common_base.hpp>
|
||||
#include <catch2/internal/catch_move_and_forward.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -16,7 +18,11 @@ namespace Catch {
|
||||
|
||||
class StreamingReporterBase : public ReporterBase {
|
||||
public:
|
||||
using ReporterBase::ReporterBase;
|
||||
// GCC5 compat: we cannot use inherited constructor, because it
|
||||
// doesn't implement backport of P0136
|
||||
StreamingReporterBase(ReporterConfig&& _config):
|
||||
ReporterBase(CATCH_MOVE(_config))
|
||||
{}
|
||||
~StreamingReporterBase() override;
|
||||
|
||||
void benchmarkPreparing( StringRef ) override {}
|
||||
|
@ -311,6 +311,7 @@ add_test(
|
||||
$<TARGET_FILE:SelfTest> "#2025: same-level sections"
|
||||
-c "A"
|
||||
-c "B"
|
||||
--colour-mode none
|
||||
)
|
||||
set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
|
||||
PROPERTIES
|
||||
@ -394,6 +395,7 @@ add_test(NAME "Benchmarking::SkipBenchmarkMacros"
|
||||
$<TARGET_FILE:SelfTest> "Skip benchmark macros"
|
||||
--reporter console
|
||||
--skip-benchmarks
|
||||
--colour-mode none
|
||||
)
|
||||
set_tests_properties("Benchmarking::SkipBenchmarkMacros"
|
||||
PROPERTIES
|
||||
@ -501,6 +503,7 @@ add_test(NAME "Outputs::DashAsOutLocationSendsOutputToStdout"
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||
--out=-
|
||||
--colour-mode none
|
||||
)
|
||||
set_tests_properties("Outputs::DashAsOutLocationSendsOutputToStdout"
|
||||
PROPERTIES
|
||||
@ -511,6 +514,7 @@ add_test(NAME "Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||
--reporter console::out=-
|
||||
--colour-mode none
|
||||
)
|
||||
set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
|
||||
PROPERTIES
|
||||
@ -549,6 +553,17 @@ set_tests_properties("Colours::ColourModeCanBeExplicitlySetToAnsi"
|
||||
PASS_REGULAR_EXPRESSION "\\[1\;32mAll tests passed"
|
||||
)
|
||||
|
||||
add_test(NAME "Reporters::JUnit::NamespacesAreNormalized"
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest>
|
||||
--reporter junit
|
||||
"A TEST_CASE_METHOD testing junit classname normalization"
|
||||
)
|
||||
set_tests_properties("Reporters::JUnit::NamespacesAreNormalized"
|
||||
PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION "testcase classname=\"SelfTest(\.exe)?\\.A\\.B\\.TestClass\""
|
||||
)
|
||||
|
||||
if (CATCH_ENABLE_CONFIGURE_TESTS)
|
||||
foreach(testName "DefaultReporter" "Disable" "DisableStringification"
|
||||
"ExperimentalRedirect")
|
||||
|
@ -137,6 +137,18 @@ set_tests_properties(CATCH_CONFIG_BAZEL_REPORTER-1
|
||||
LABELS "uses-python"
|
||||
)
|
||||
|
||||
# We must now test this works without the build flag.
|
||||
add_executable( BazelReporterNoCatchConfig ${TESTS_DIR}/X30-BazelReporter.cpp )
|
||||
target_link_libraries(BazelReporterNoCatchConfig Catch2WithMain)
|
||||
add_test(NAME NO_CATCH_CONFIG_BAZEL_REPORTER-1
|
||||
COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "${CATCH_DIR}/tests/TestScripts/testBazelReporter.py" $<TARGET_FILE:BazelReporterNoCatchConfig> "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
set_tests_properties(NO_CATCH_CONFIG_BAZEL_REPORTER-1
|
||||
PROPERTIES
|
||||
LABELS "uses-python"
|
||||
ENVIRONMENT "BAZEL_TEST=1"
|
||||
)
|
||||
|
||||
# The default handler on Windows leads to the just-in-time debugger firing,
|
||||
# which makes this test unsuitable for CI and headless runs, as it opens
|
||||
@ -459,7 +471,10 @@ add_test(
|
||||
NAME TestSpecs::OverrideFailureWithEmptySpec
|
||||
COMMAND $<TARGET_FILE:NoTests> --allow-running-no-tests
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME List::Listeners::WorksWithoutRegisteredListeners
|
||||
COMMAND $<TARGET_FILE:NoTests> --list-listeners
|
||||
)
|
||||
set( EXTRA_TEST_BINARIES
|
||||
PrefixedMacros
|
||||
DisabledMacros
|
||||
|
@ -271,8 +271,11 @@ Message from section two
|
||||
:test-result: FAIL Unexpected exceptions can be translated
|
||||
:test-result: PASS Upcasting special member functions
|
||||
:test-result: PASS Usage of AllMatch range matcher
|
||||
:test-result: PASS Usage of AllTrue range matcher
|
||||
:test-result: PASS Usage of AnyMatch range matcher
|
||||
:test-result: PASS Usage of AnyTrue range matcher
|
||||
:test-result: PASS Usage of NoneMatch range matcher
|
||||
:test-result: PASS Usage of NoneTrue range matcher
|
||||
:test-result: PASS Usage of the SizeIs range matcher
|
||||
:test-result: PASS Use a custom approx
|
||||
:test-result: PASS Variadic macros
|
||||
|
@ -264,8 +264,11 @@
|
||||
:test-result: FAIL Unexpected exceptions can be translated
|
||||
:test-result: PASS Upcasting special member functions
|
||||
:test-result: PASS Usage of AllMatch range matcher
|
||||
:test-result: PASS Usage of AllTrue range matcher
|
||||
:test-result: PASS Usage of AnyMatch range matcher
|
||||
:test-result: PASS Usage of AnyTrue range matcher
|
||||
:test-result: PASS Usage of NoneMatch range matcher
|
||||
:test-result: PASS Usage of NoneTrue range matcher
|
||||
:test-result: PASS Usage of the SizeIs range matcher
|
||||
:test-result: PASS Use a custom approx
|
||||
:test-result: PASS Variadic macros
|
||||
|
@ -2013,6 +2013,25 @@ MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 )
|
||||
MatchersRanges.tests.cpp:<line number>: passed: needs_adl, AnyMatch( Predicate<int>( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate
|
||||
@ -2028,6 +2047,25 @@ MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[1]) for: !fal
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[2]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 )
|
||||
MatchersRanges.tests.cpp:<line number>: passed: needs_adl, NoneMatch( Predicate<int>( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate
|
||||
@ -2043,6 +2081,25 @@ MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[1]) for: !fal
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[2]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(0) for: { } has size == 0
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, !SizeIs(2) for: { } not has size == 2
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2
|
||||
|
@ -2006,6 +2006,25 @@ MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AllTrue() for: { false, false, false, false, false } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AllTrue() for: { true, true, true, true, true } contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, !AllTrue() for: { true, true, false, true, true } not contains only true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyMatch(SizeIs(5)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } any match has size == 5
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyMatch(Contains(0) && Contains(10)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 )
|
||||
MatchersRanges.tests.cpp:<line number>: passed: needs_adl, AnyMatch( Predicate<int>( []( int elem ) { return elem < 3; } ) ) for: { 1, 2, 3, 4, 5 } any match matches undescribed predicate
|
||||
@ -2021,6 +2040,25 @@ MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[1]) for: !fal
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[2]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { true, true, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, AnyTrue() for: { false, false, true, false, false } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !AnyTrue() for: { false, false, false, false, false } not contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AnyTrue() for: { false, false, false, false, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, AnyTrue() for: { false, false, true, true, true } contains at least one true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneMatch(SizeIs(6)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } none match has size == 6
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneMatch(Contains(0) && Contains(1)) for: { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 )
|
||||
MatchersRanges.tests.cpp:<line number>: passed: needs_adl, NoneMatch( Predicate<int>( []( int elem ) { return elem > 6; } ) ) for: { 1, 2, 3, 4, 5 } none match matches undescribed predicate
|
||||
@ -2036,6 +2074,25 @@ MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[1]) for: !fal
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[2]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { true, true, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, !NoneTrue() for: { false, false, true, false, false } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: data, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, NoneTrue() for: { false, false, false, false, false } contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[3] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[4] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked, !NoneTrue() for: { false, false, true, true, true } not contains no true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[0] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(0) for: { } has size == 0
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, !SizeIs(2) for: { } not has size == 2
|
||||
MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2
|
||||
|
@ -1394,6 +1394,6 @@ due to unexpected exception with message:
|
||||
Why would you throw a std::string?
|
||||
|
||||
===============================================================================
|
||||
test cases: 391 | 315 passed | 69 failed | 7 failed as expected
|
||||
assertions: 2227 | 2072 passed | 128 failed | 27 failed as expected
|
||||
test cases: 394 | 318 passed | 69 failed | 7 failed as expected
|
||||
assertions: 2284 | 2129 passed | 128 failed | 27 failed as expected
|
||||
|
||||
|
@ -14146,6 +14146,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
One false evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One false evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyMatch range matcher
|
||||
Basic usage
|
||||
@ -14254,6 +14421,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
One true evalutes to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One true evalutes to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, true } contains at least one true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, true, true } contains at least one true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneMatch range matcher
|
||||
Basic usage
|
||||
@ -14362,6 +14696,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
One true evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One true evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, true, true } not contains no true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of the SizeIs range matcher
|
||||
Some with stdlib containers
|
||||
@ -17949,6 +18450,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 391 | 301 passed | 83 failed | 7 failed as expected
|
||||
assertions: 2242 | 2072 passed | 143 failed | 27 failed as expected
|
||||
test cases: 394 | 304 passed | 83 failed | 7 failed as expected
|
||||
assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected
|
||||
|
||||
|
@ -14139,6 +14139,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
One false evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One false evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AllTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains only true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains only true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AllTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, !AllTrue() )
|
||||
with expansion:
|
||||
{ true, true, false, true, true } not contains only true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyMatch range matcher
|
||||
Basic usage
|
||||
@ -14247,6 +14414,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
One true evalutes to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One true evalutes to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } not contains at least one true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, true } contains at least one true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of AnyTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, AnyTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, true, true } contains at least one true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneMatch range matcher
|
||||
Basic usage
|
||||
@ -14355,6 +14689,173 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
All true evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
Empty evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
One true evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Basic usage
|
||||
All false evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All true evaluates to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ true, true, true, true, true } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
One true evalutes to false
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, false, false } not contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Contained type is convertible to bool
|
||||
All false evaluates to true
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( data, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Shortcircuiting
|
||||
All are read
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, false, false, false } contains no true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of NoneTrue range matcher
|
||||
Shortcircuiting
|
||||
Short-circuited
|
||||
-------------------------------------------------------------------------------
|
||||
MatchersRanges.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( mocked, !NoneTrue() )
|
||||
with expansion:
|
||||
{ false, false, true, true, true } not contains no true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[0] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[1] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( mocked.m_derefed[2] )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[3] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
MatchersRanges.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( mocked.m_derefed[4] )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Usage of the SizeIs range matcher
|
||||
Some with stdlib containers
|
||||
@ -17941,6 +18442,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 391 | 301 passed | 83 failed | 7 failed as expected
|
||||
assertions: 2242 | 2072 passed | 143 failed | 27 failed as expected
|
||||
test cases: 394 | 304 passed | 83 failed | 7 failed as expected
|
||||
assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuitesloose text artifact
|
||||
>
|
||||
<testsuite name="<exe-name>" errors="17" failures="126" tests="2242" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="126" tests="2299" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
|
||||
@ -1412,14 +1412,41 @@ Exception.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Basic usage" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Basic usage" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Some with stdlib containers" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type requires ADL found size free function" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type has size member" time="{duration}" status="run"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite name="<exe-name>" errors="17" failures="126" tests="2242" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="126" tests="2299" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<properties>
|
||||
<property name="random-seed" value="1"/>
|
||||
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
|
||||
@ -1411,14 +1411,41 @@ Exception.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Basic usage" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Basic usage" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Type requires ADL found begin and end" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Some with stdlib containers" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type requires ADL found size free function" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type has size member" time="{duration}" status="run"/>
|
||||
|
@ -1397,14 +1397,41 @@ Matchers.tests.cpp:<line number>
|
||||
<testCase name="Usage of AllMatch range matcher/Type requires ADL found begin and end" duration="{duration}"/>
|
||||
<testCase name="Usage of AllMatch range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyMatch range matcher/Basic usage" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyMatch range matcher/Type requires ADL found begin and end" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyMatch range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneMatch range matcher/Basic usage" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneMatch range matcher/Type requires ADL found begin and end" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneMatch range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/>
|
||||
<testCase name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/>
|
||||
<testCase name="Usage of the SizeIs range matcher/Some with stdlib containers" duration="{duration}"/>
|
||||
<testCase name="Usage of the SizeIs range matcher/Type requires ADL found size free function" duration="{duration}"/>
|
||||
<testCase name="Usage of the SizeIs range matcher/Type has size member" duration="{duration}"/>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user