diff --git a/packages/Catch2/.clang-format b/packages/Catch2/.clang-format new file mode 100644 index 0000000000000000000000000000000000000000..2a82aacfdcf07382b720d7706bf9ad60f4fc8402 --- /dev/null +++ b/packages/Catch2/.clang-format @@ -0,0 +1,25 @@ +--- +AccessModifierOffset: '-4' +AlignEscapedNewlines: Left +AllowAllConstructorInitializersOnNextLine: 'true' +BinPackArguments: 'false' +BinPackParameters: 'false' +BreakConstructorInitializers: AfterColon +ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' +DerivePointerAlignment: 'false' +FixNamespaceComments: 'true' +IncludeBlocks: Regroup +IndentCaseLabels: 'false' +IndentPPDirectives: AfterHash +IndentWidth: '4' +Language: Cpp +NamespaceIndentation: All +PointerAlignment: Left +SpaceBeforeCtorInitializerColon: 'false' +SpaceInEmptyParentheses: 'false' +SpacesInParentheses: 'true' +Standard: Cpp11 +TabWidth: '4' +UseTab: Never + +... diff --git a/packages/Catch2/.conan/build.py b/packages/Catch2/.conan/build.py index 272986516325e2af1e048f6c15b9f062829fda0e..37975a8a1e1caf2b326641a116cd4635760ac830 100644 --- a/packages/Catch2/.conan/build.py +++ b/packages/Catch2/.conan/build.py @@ -31,7 +31,7 @@ class BuilderSettings(object): not match the stable pattern. Otherwise it will upload to stable channel. """ - return os.getenv("CONAN_UPLOAD", "https://api.bintray.com/conan/catchorg/Catch2") + return os.getenv("CONAN_UPLOAD", "https://api.bintray.com/conan/catchorg/catch2") @property def upload_only_when_stable(self): diff --git a/packages/Catch2/.github/FUNDING.yml b/packages/Catch2/.github/FUNDING.yml index 01d384e8268e6a7e979bb2e73724bb336baf3a09..4d8a0e95ae59d78c522dd3422ed050c5946c8f3e 100644 --- a/packages/Catch2/.github/FUNDING.yml +++ b/packages/Catch2/.github/FUNDING.yml @@ -1 +1 @@ -patreon: horenmar +custom: "https://www.paypal.me/horenmar" diff --git a/packages/Catch2/.gitignore b/packages/Catch2/.gitignore index f017e9e09f991ed589a0f3b27b8bc490be28b5c1..dd12a74ba602982fa3cc1134f378b6cf2a69e79b 100644 --- a/packages/Catch2/.gitignore +++ b/packages/Catch2/.gitignore @@ -28,3 +28,4 @@ Build cmake-build-* benchmark-dir .conan/test_package/build +bazel-* diff --git a/packages/Catch2/.gitrepo b/packages/Catch2/.gitrepo index eeda199924a84e824ecd08a9d7917712ed180085..1371144f0d2ad5f34cada8849b25859d4a706020 100644 --- a/packages/Catch2/.gitrepo +++ b/packages/Catch2/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:catchorg/Catch2.git branch = master - commit = 38f897c88772d6640196d1bd617ebbcaf44bc05a - parent = 2f7310d11077fd2ebdcdc77443bb9560060372c3 + commit = 2b34b5c7d00ddd379ab62a8d37a7029f04223f45 + parent = e0c202c86c28b369cbfd00629417affe94cefec0 cmdver = 0.4.1 method = merge diff --git a/packages/Catch2/BUILD.bazel b/packages/Catch2/BUILD.bazel new file mode 100644 index 0000000000000000000000000000000000000000..2a412a8eb8994db6f7bfdcbd517ddf6aa585660c --- /dev/null +++ b/packages/Catch2/BUILD.bazel @@ -0,0 +1,10 @@ +# Load the cc_library rule. +load("@rules_cc//cc:defs.bzl", "cc_library") + +# Header-only rule to export catch2/catch.hpp. +cc_library( + name = "catch2", + hdrs = ["single_include/catch2/catch.hpp"], + visibility = ["//visibility:public"], + includes = ["single_include/"], +) diff --git a/packages/Catch2/CMakeLists.txt b/packages/Catch2/CMakeLists.txt index 55bf413d7a696088e1f9dc139b8c6b970b691410..e816058e9437cf5c96f6808d1cc4bad30889f548 100644 --- a/packages/Catch2/CMakeLists.txt +++ b/packages/Catch2/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) # detect if Catch is being bundled, # disable testsuite in that case if(NOT DEFINED PROJECT_NAME) - set(NOT_SUBPROJECT ON) + set(NOT_SUBPROJECT ON) endif() # Catch2's build breaks if done in-tree. You probably should not build @@ -14,14 +14,12 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif() -project(Catch2 LANGUAGES CXX VERSION 2.11.3) +project(Catch2 LANGUAGES CXX VERSION 2.13.0) # Provide path for scripts list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake") include(GNUInstallDirs) -include(CMakePackageConfigHelpers) -include(CTest) option(CATCH_USE_VALGRIND "Perform SelfTests with Valgrind" OFF) option(CATCH_BUILD_TESTING "Build SelfTest project" ON) @@ -33,8 +31,6 @@ option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON) option(CATCH_INSTALL_HELPERS "Install contrib alongside library" ON) -set_property(GLOBAL PROPERTY USE_FOLDERS ON) - # define some folders set(CATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest) @@ -45,12 +41,16 @@ if(USE_WMAIN) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup") endif() -if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT) - find_package(PythonInterp) - if (NOT PYTHONINTERP_FOUND) - message(FATAL_ERROR "Python not found, but required for tests") +if(NOT_SUBPROJECT) + include(CTest) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + if(BUILD_TESTING AND CATCH_BUILD_TESTING) + find_package(PythonInterp) + if (NOT PYTHONINTERP_FOUND) + message(FATAL_ERROR "Python not found, but required for tests") + endif() + add_subdirectory(projects) endif() - add_subdirectory(projects) endif() if(CATCH_BUILD_EXAMPLES) @@ -107,6 +107,7 @@ add_library(Catch2::Catch2 ALIAS Catch2) # a subproject via `add_subdirectory`, or the destinations will break, # see https://github.com/catchorg/Catch2/issues/1373 if (NOT_SUBPROJECT) + include(CMakePackageConfigHelpers) set(CATCH_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Catch2") configure_package_config_file( diff --git a/packages/Catch2/README.md b/packages/Catch2/README.md index e7469c7459b16a9f6ddf7c4538993810bc3b09ec..82541b54c491376fe269216594d6a28634081730 100644 --- a/packages/Catch2/README.md +++ b/packages/Catch2/README.md @@ -5,11 +5,11 @@ [](https://travis-ci.org/catchorg/Catch2) [](https://ci.appveyor.com/project/catchorg/catch2) [](https://codecov.io/gh/catchorg/Catch2) -[](https://wandbox.org/permlink/p9Pcgple8QWwgNR0) +[](https://wandbox.org/permlink/aavJBzemrxUgGV9S) [](https://discord.gg/4CWS9zD) -<a href="https://github.com/catchorg/Catch2/releases/download/v2.11.3/catch.hpp">The latest version of the single header can be downloaded directly using this link</a> +<a href="https://github.com/catchorg/Catch2/releases/download/v2.13.0/catch.hpp">The latest version of the single header can be downloaded directly using this link</a> ## Catch2 is released! diff --git a/packages/Catch2/WORKSPACE b/packages/Catch2/WORKSPACE new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/packages/Catch2/conanfile.py b/packages/Catch2/conanfile.py index 8d407bafd9d70dacf7489727a599ef8dc0cb9e6e..a904ce960f96d6fd09b04e9cae82c97866c689f4 100644 --- a/packages/Catch2/conanfile.py +++ b/packages/Catch2/conanfile.py @@ -25,3 +25,6 @@ class CatchConan(ConanFile): def package_id(self): self.info.header_only() + + def package_info(self): + self.cpp_info.builddirs.append("lib/cmake/Catch2") diff --git a/packages/Catch2/contrib/ParseAndAddCatchTests.cmake b/packages/Catch2/contrib/ParseAndAddCatchTests.cmake index 3c551f07d7841293582d97465661469324a0904c..5e89cb76199691be0f2fe70f304b40ded118b6f4 100644 --- a/packages/Catch2/contrib/ParseAndAddCatchTests.cmake +++ b/packages/Catch2/contrib/ParseAndAddCatchTests.cmake @@ -189,24 +189,29 @@ function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget) # Escape commas in the test spec string(REPLACE "," "\\," Name ${Name}) + # Work around CMake 3.18.0 change in `add_test()`, before the escaped quotes were neccessary, + # only with CMake 3.18.0 the escaped double quotes confuse the call. This change is reverted in 3.18.1 + if(NOT ${CMAKE_VERSION} VERSION_EQUAL "3.18") + set(CTestName "\"${CTestName}\"") + endif() # Add the test and set its properties - add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} $<TARGET_FILE:${TestTarget}> ${Name} ${AdditionalCatchParameters}) + add_test(NAME "${CTestName}" COMMAND ${OptionalCatchTestLauncher} $<TARGET_FILE:${TestTarget}> ${Name} ${AdditionalCatchParameters}) # Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8") ParseAndAddCatchTests_PrintDebugMessage("Setting DISABLED test property") - set_tests_properties("\"${CTestName}\"" PROPERTIES DISABLED ON) + set_tests_properties("${CTestName}" PROPERTIES DISABLED ON) else() - set_tests_properties("\"${CTestName}\"" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran" + set_tests_properties("${CTestName}" PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran" LABELS "${Labels}") endif() set_property( TARGET ${TestTarget} APPEND - PROPERTY ParseAndAddCatchTests_TESTS "\"${CTestName}\"") + PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}") set_property( SOURCE ${SourceFile} APPEND - PROPERTY ParseAndAddCatchTests_TESTS "\"${CTestName}\"") + PROPERTY ParseAndAddCatchTests_TESTS "${CTestName}") endif() diff --git a/packages/Catch2/docs/command-line.md b/packages/Catch2/docs/command-line.md index 2b506f167753b4d825953de78e24093482192740..a99a10726192748f3225f8172375171df38262f0 100644 --- a/packages/Catch2/docs/command-line.md +++ b/packages/Catch2/docs/command-line.md @@ -222,6 +222,16 @@ available warnings When set to ```yes``` Catch will report the duration of each test case, in milliseconds. Note that it does this regardless of whether a test case passes or fails. Note, also, the certain reporters (e.g. Junit) always report test case durations regardless of this option being set or not. +<pre>-D, --min-duration <value></pre> + +> `--min-duration` was [introduced](https://github.com/catchorg/Catch2/pull/1910) in Catch 2.13.0 + +When set, Catch will report the duration of each test case that took more +than <value> seconds, in milliseconds. This option is overriden by both +`-d yes` and `-d no`, so that either all durations are reported, or none +are. + + <a id="input-file"></a> ## Load test names to run from a file <pre>-f, --input-file <filename></pre> @@ -260,6 +270,8 @@ Randomly sorted. The order is dependent on Catch2's random seed (see is that as long as the random seed is fixed, running only some tests (e.g. via tag) does not change their relative order. +> The subset stability was introduced in Catch2 v2.12.0 + <a id="rng-seed"></a> ## Specify a seed for the Random Number Generator diff --git a/packages/Catch2/docs/contributing.md b/packages/Catch2/docs/contributing.md index 5429bf9dc18f48fdeae1ab2162120b1d23994ef6..5ac0d5585898e15336d89fb7de0422cf3b6d5d1f 100644 --- a/packages/Catch2/docs/contributing.md +++ b/packages/Catch2/docs/contributing.md @@ -1,117 +1,119 @@ <a id="top"></a> -# Contributing to Catch +# Contributing to Catch2 **Contents**<br> -[Branches](#branches)<br> -[Directory structure](#directory-structure)<br> +[Using Git(Hub)](#using-github)<br> [Testing your changes](#testing-your-changes)<br> -[Documenting your code](#documenting-your-code)<br> -[Code constructs to watch out for](#code-constructs-to-watch-out-for)<br> +[Writing documentation](#writing-documentation)<br> +[Writing code](#writing-code)<br> +[CoC](#coc)<br> -So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for -additional compilers - or just a fix to the documentation - all contributions are very welcome and very much appreciated. -Of course so are bug reports and other comments and questions. +So you want to contribute something to Catch2? That's great! Whether it's +a bug fix, a new feature, support for additional compilers - or just +a fix to the documentation - all contributions are very welcome and very +much appreciated. Of course so are bug reports, other comments, and +questions, but generally it is a better idea to ask questions in our +[Discord](https://discord.gg/4CWS9zD), than in the issue tracker. -If you are contributing to the code base there are a few simple guidelines to keep in mind. This also includes notes to -help you find your way around. As this is liable to drift out of date please raise an issue or, better still, a pull -request for this file, if you notice that. -## Branches +This page covers some guidelines and helpful tips for contributing +to the codebase itself. -Ongoing development is currently on _master_. At some point an integration branch will be set-up and PRs should target - that - but for now it's all against master. You may see feature branches come and go from time to time, too. +## Using Git(Hub) -## Directory structure +Ongoing development happens in the `master` branch for Catch2 v2, and in +`dev-v3` for the next major version, v3. -_Users_ of Catch primarily use the single header version. _Maintainers_ should work with the full source (which is still, -primarily, in headers). This can be found in the `include` folder. There are a set of test files, currently under -`projects/SelfTest`. The test app can be built via CMake from the `CMakeLists.txt` file in the root, or you can generate -project files for Visual Studio, XCode, and others (instructions in the `projects` folder). If you have access to CLion, -it can work with the CMake file directly. +Commits should be small and atomic. A commit is atomic when, after it is +applied, the codebase, tests and all, still works as expected. Small +commits are also prefered, as they make later operations with git history, +whether it is bisecting, reverting, or something else, easier. -As well as the runtime test files you'll also see a `SurrogateCpps` directory under `projects/SelfTest`. -This contains a set of .cpp files that each `#include` a single header. -While these files are not essential to compilation they help to keep the implementation headers self-contained. -At time of writing this set is not complete but has reasonable coverage. -If you add additional headers please try to remember to add a surrogate cpp for it. +_When submitting a pull request please do not include changes to the +single include. This means do not include them in your git commits!_ -The other directories are `scripts` which contains a set of python scripts to help in testing Catch as well as -generating the single include, and `docs`, which contains the documentation as a set of markdown files. -__When submitting a pull request please do not include changes to the single include, or to the version number file -as these are managed by the scripts!__ +When addressing review comments in a MR, please do not rebase/squash the +commits immediately. Doing so makes it harder to review the new changes, +slowing down the process of merging a MR. Instead, when addressing review +comments, you should append new commits to the branch and only squash +them into other commits when the MR is ready to be merged. We recommend +creating new commits with `git commit --fixup` (or `--squash`) and then +later squashing them with `git rebase --autosquash` to make things easier. + ## Testing your changes -Obviously all changes to Catch's code should be tested. If you added new -functionality, you should add tests covering and showcasing it. Even if you have -only made changes to Catch internals (i.e. you implemented some performance -improvements), you should still test your changes. +_Note: Running Catch2's tests requires Python3_ + + +Catch2 has multiple layers of tests that are then run as part of our CI. +The most obvious one are the unit tests compiled into the `SelfTest` +binary. These are then used in "Approval tests", which run (almost) all +tests from `SelfTest` through a specific reporter and then compare the +generated output with a known good output ("Baseline"). By default, new +tests should be placed here. + +However, not all tests can be written as plain unit tests. For example, +checking that Catch2 orders tests randomly when asked to, and that this +random ordering is subset-invariant, is better done as an integration +test using an external check script. Catch2 integration tests are written +using CTest, either as a direct command invocation + pass/fail regex, +or by delegating the check to a Python script. -This means 2 things +There are also two more kinds of tests, examples and "ExtraTests". +Examples serve as a compilation test on the single-header distribution, +and present a small and self-contained snippets of using Catch2 for +writing tests. ExtraTests then are tests that either take a long time +to run, or require separate compilation, e.g. because of testing compile +time configuration options, and take a long time because of that. -* Compiling Catch's SelfTest project: +Both of these are compiled against the single-header distribution of +Catch2, and thus might require you to regenerate it manually. This is +done by calling the `generateSingleHeader.py` script in `scripts`. + +Examples and ExtraTests are not compiled by default. To compile them, +add `-DCATCH_BUILD_EXAMPLES=ON` and `-DCATCH_BUILD_EXTRA_TESTS=ON` to +the invocation of CMake configuration step. + +Bringing this all together, the steps below should configure, build, +and run all tests in the `Debug` compilation. + +1. Regenerate the single header distribution ``` $ cd Catch2 -$ cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug +$ ./scripts/generateSingleHeader.py +``` +2. Configure the full test build +``` +$ cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON +``` +3. Run the actual build +``` $ cmake --build debug-build ``` -because code that does not compile is evidently incorrect. Obviously, -you are not expected to have access to all the compilers and platforms -supported by Catch2, but you should at least smoke test your changes -on your platform. Our CI pipeline will check your PR against most of -the supported platforms, but it takes an hour to finish -- compiling -locally takes just a few minutes. - - -* Running the tests via CTest: +4. Run the tests using CTest ``` $ cd debug-build -$ ctest -j 2 --output-on-failure +$ ctest -j 4 --output-on-failure -C Debug ``` -__Note:__ When running your tests with multi-configuration generators like -Visual Studio, you might get errors "Test not available without configuration." -You then have to pick one configuration (e.g. ` -C Debug`) in the `ctest` call. - -If you added new tests, approval tests are very likely to fail. If they -do not, it means that your changes weren't run as part of them. This -_might_ be intentional, but usually is not. - -The approval tests compare current output of the SelfTest binary in various -configurations against known good outputs. The reason it fails is, -_usually_, that you've added new tests but have not yet approved the changes -they introduce. This is done with the `scripts/approve.py` script, but -before you do so, you need to check that the introduced changes are indeed -intentional. -## Documenting your code +## Writing documentation If you have added new feature to Catch2, it needs documentation, so that other people can use it as well. This section collects some technical information that you will need for updating Catch2's documentation, and possibly some generic advise as well. +### Technicalities + First, the technicalities: -* We introduced version tags to the documentation, which show users in -which version a specific feature was introduced. This means that newly -written documentation should be tagged with a placeholder, that will -be replaced with the actual version upon release. There are 2 styles -of placeholders used through the documentation, you should pick one that -fits your text better (if in doubt, take a look at the existing version -tags for other features). - * `> [Introduced](link-to-issue-or-PR) in Catch X.Y.Z` - this - placeholder is usually used after a section heading - * `> X (Y and Z) was [introduced](link-to-issue-or-PR) in Catch X.Y.Z` - - this placeholder is used when you need to tag a subpart of something, - e.g. list -* Crosslinks to different pages should target the `top` anchor, like this -`[link to contributing](contributing.md#top)`. * If you have introduced a new document, there is a simple template you -should use. It provides you with the top anchor mentioned above, and also -with a backlink to the top of the documentation: +should use. It provides you with the top anchor mentioned to link to +(more below), and also with a backlink to the top of the documentation: ```markdown <a id="top"></a> # Cool feature @@ -123,6 +125,23 @@ Text that explains how to use the cool feature. [Home](Readme.md#top) ``` + +* Crosslinks to different pages should target the `top` anchor, like this +`[link to contributing](contributing.md#top)`. + +* We introduced version tags to the documentation, which show users in +which version a specific feature was introduced. This means that newly +written documentation should be tagged with a placeholder, that will +be replaced with the actual version upon release. There are 2 styles +of placeholders used through the documentation, you should pick one that +fits your text better (if in doubt, take a look at the existing version +tags for other features). + * `> [Introduced](link-to-issue-or-PR) in Catch X.Y.Z` - this + placeholder is usually used after a section heading + * `> X (Y and Z) was [introduced](link-to-issue-or-PR) in Catch X.Y.Z` + - this placeholder is used when you need to tag a subpart of something, + e.g. a list + * For pages with more than 4 subheadings, we provide a table of contents (ToC) at the top of the page. Because GitHub markdown does not support automatic generation of ToC, it has to be handled semi-manually. Thus, @@ -130,21 +149,54 @@ if you've added a new subheading to some page, you should add it to the ToC. This can be done either manually, or by running the `updateDocumentToC.py` script in the `scripts/` folder. +### Contents + +Now, for some content tips: + +* Usage examples are good. However, having large code snippets inline +can make the documentation less readable, and so the inline snippets +should be kept reasonably short. To provide more complex compilable +examples, consider adding new .cpp file to `examples/`. + +* Don't be afraid to introduce new pages. The current documentation +tends towards long pages, but a lot of that is caused by legacy, and +we know that some of the pages are overly big and unfocused. + +* When adding information to an existing page, please try to keep your +formatting, style and changes consistent with the rest of the page. + +* Any documentation has multiple different audiences, that desire +different information from the text. The 3 basic user-types to try and +cover are: + * A beginner to Catch2, who requires closer guidance for the usage of Catch2. + * Advanced user of Catch2, who want to customize their usage. + * Experts, looking for full reference of Catch2's capabilities. -Now, for the generic tips: - * Usage examples are good - * Don't be afraid to introduce new pages - * Try to be reasonably consistent with the surrounding documentation +## Writing code +If want to contribute code, this section contains some simple rules +and tips on things like code formatting, code constructions to avoid, +and so on. -## Code constructs to watch out for +### Formatting + +To make code formatting simpler for the contributors, Catch2 provides +its own config for `clang-format`. However, because it is currently +impossible to replicate existing Catch2's formatting in clang-format, +using it to reformat a whole file would cause massive diffs. To keep +the size of your diffs reasonable, you should only use clang-format +on the newly changed code. + + +### Code constructs to watch out for This section is a (sadly incomplete) listing of various constructs that are problematic and are not always caught by our CI infrastructure. -### Naked exceptions and exceptions-related function + +#### Naked exceptions and exceptions-related function If you are throwing an exception, it should be done via `CATCH_ERROR` or `CATCH_RUNTIME_ERROR` in `catch_enforce.h`. These macros will handle @@ -155,7 +207,8 @@ CI, but luckily there should not be too many reasons to use these. However, if you do, they should be kept behind a `CATCH_CONFIG_DISABLE_EXCEPTIONS` macro. -### Unqualified usage of functions from C's stdlib + +#### Unqualified usage of functions from C's stdlib If you are using a function from C's stdlib, please include the header as `<cfoo>` and call the function qualified. The common knowledge that @@ -163,7 +216,12 @@ there is no difference is wrong, QNX and VxWorks won't compile if you include the header as `<cfoo>` and call the function unqualified. ----- +## CoC + +This project has a [CoC](../CODE_OF_CONDUCT.md). Please adhere to it +while contributing to Catch2. + +----------- _This documentation will always be in-progress as new information comes up, but we are trying to keep it as up to date as possible._ diff --git a/packages/Catch2/docs/generators.md b/packages/Catch2/docs/generators.md index 55ff0ba541dfc0665e21b1726754d10e4f7904dd..96e322e6d0b846ac0ae9655c1d4a2c81e2b9107f 100644 --- a/packages/Catch2/docs/generators.md +++ b/packages/Catch2/docs/generators.md @@ -12,23 +12,88 @@ are run once per each value in a generator. This is best explained with an example: ```cpp TEST_CASE("Generators") { - auto i = GENERATE(1, 2, 3); - SECTION("one") { - auto j = GENERATE( -3, -2, -1 ); - REQUIRE(j < i); - } + auto i = GENERATE(1, 3, 5); + REQUIRE(is_odd(i)); } ``` -The assertion in this test case will be run 9 times, because there -are 3 possible values for `i` (1, 2, and 3) and there are 3 possible -values for `j` (-3, -2, and -1). +The "Generators" `TEST_CASE` will be entered 3 times, and the value of +`i` will be 1, 3, and 5 in turn. `GENERATE`s can also be used multiple +times at the same scope, in which case the result will be a cartesian +product of all elements in the generators. This means that in the snippet +below, the test case will be run 6 (2\*3) times. +```cpp +TEST_CASE("Generators") { + auto i = GENERATE(1, 2); + auto j = GENERATE(3, 4, 5); +} +``` There are 2 parts to generators in Catch2, the `GENERATE` macro together with the already provided generators, and the `IGenerator<T>` interface that allows users to implement their own generators. + +## Combining `GENERATE` and `SECTION`. + +`GENERATE` can be seen as an implicit `SECTION`, that goes from the place +`GENERATE` is used, to the end of the scope. This can be used for various +effects. The simplest usage is shown below, where the `SECTION` "one" +runs 4 (2\*2) times, and `SECTION` "two" is run 6 times (2\*3). + +``` +TEST_CASE("Generators") { + auto i = GENERATE(1, 2); + SECTION("one") { + auto j = GENERATE(-3, -2); + REQUIRE(j < i); + } + SECTION("two") { + auto k = GENERATE(4, 5, 6); + REQUIRE(j != k); + } +} +``` + +The specific order of the `SECTION`s will be "one", "one", "two", "two", +"two", "one"... + + +The fact that `GENERATE` introduces a virtual `SECTION` can also be used +to make a generator replay only some `SECTION`s, without having to +explicitly add a `SECTION`. As an example, the code below reports 3 +assertions, because the "first" section is run once, but the "second" +section is run twice. + +```cpp +TEST_CASE("GENERATE between SECTIONs") { + SECTION("first") { REQUIRE(true); } + auto _ = GENERATE(1, 2); + SECTION("second") { REQUIRE(true); } +} +``` + +This can lead to surprisingly complex test flows. As an example, the test +below will report 14 assertions: + +```cpp +TEST_CASE("Complex mix of sections and generates") { + auto i = GENERATE(1, 2); + SECTION("A") { + SUCCEED("A"); + } + auto j = GENERATE(3, 4); + SECTION("B") { + SUCCEED("B"); + } + auto k = GENERATE(5, 6); + SUCCEED(); +} +``` + +> The ability to place `GENERATE` between two `SECTION`s was [introduced](https://github.com/catchorg/Catch2/issues/1938) in Catch 2.13.0. + ## Provided generators Catch2's provided generator functionality consists of three parts, diff --git a/packages/Catch2/docs/list-of-examples.md b/packages/Catch2/docs/list-of-examples.md index 95e7bda0ce206f7a21583d61aab43de328cbd2a7..c3514ed5b51702dc43a4bdb146ac40e891aec02b 100644 --- a/packages/Catch2/docs/list-of-examples.md +++ b/packages/Catch2/docs/list-of-examples.md @@ -16,6 +16,7 @@ - Configuration: [Provide your own output streams](../examples/231-Cfg-OutputStreams.cpp) - Generators: [Create your own generator](../examples/300-Gen-OwnGenerator.cpp) - Generators: [Use map to convert types in GENERATE expression](../examples/301-Gen-MapTypeConversion.cpp) +- Generators: [Run test with a table of input values](../examples/302-Gen-Table.cpp) - Generators: [Use variables in generator expressions](../examples/310-Gen-VariablesInGenerators.cpp) - Generators: [Use custom variable capture in generator expressions](../examples/311-Gen-CustomCapture.cpp) diff --git a/packages/Catch2/docs/own-main.md b/packages/Catch2/docs/own-main.md index 6a9b1aadc7ab31ff3923adbf3ef3daf14d05bdb7..06ea243dab14025034ece1b045cc3c17f48bed46 100644 --- a/packages/Catch2/docs/own-main.md +++ b/packages/Catch2/docs/own-main.md @@ -11,9 +11,9 @@ The easiest way to use Catch is to let it supply ```main()``` for you and handle This is achieved by writing ```#define CATCH_CONFIG_MAIN``` before the ```#include "catch.hpp"``` in *exactly one* source file. -Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually. +Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually. You now have a lot of flexibility - but here are three recipes to get your started: -You now have a lot of flexibility - but here are three recipes to get your started: +**Important note: you can only provide `main` in the same file you defined `CATCH_CONFIG_RUNNER`.** ## Let Catch take full control of args and config diff --git a/packages/Catch2/docs/release-notes.md b/packages/Catch2/docs/release-notes.md index b6975b64caae477a2131d22d1ad6f03541d5c3c1..33e3d2558f56a0f7857077f0e8970879a9404145 100644 --- a/packages/Catch2/docs/release-notes.md +++ b/packages/Catch2/docs/release-notes.md @@ -2,6 +2,12 @@ # Release notes **Contents**<br> +[2.13.0](#2130)<br> +[2.12.4](#2124)<br> +[2.12.3](#2123)<br> +[2.12.2](#2122)<br> +[2.12.1](#2121)<br> +[2.12.0](#2120)<br> [2.11.3](#2113)<br> [2.11.2](#2112)<br> [2.11.1](#2111)<br> @@ -34,6 +40,89 @@ [Older versions](#older-versions)<br> [Even Older versions](#even-older-versions)<br> +## 2.13.0 + +### Improvements +* `GENERATE` can now follow a `SECTION` at the same level of nesting (#1938) + * The `SECTION`(s) before the `GENERATE` will not be run multiple times, the following ones will. +* Added `-D`/`--min-duration` command line flag (#1910) + * If a test takes longer to finish than the provided value, its name and duration will be printed. + * This flag is overriden by setting `-d`/`--duration`. + +### Fixes +* `TAPReporter` no longer skips successful assertions (#1983) + + +## 2.12.4 + +### Improvements +* Added support for MacOS on ARM (#1971) + + +## 2.12.3 + +### Fixes +* `GENERATE` nested in a for loop no longer creates multiple generators (#1913) +* Fixed copy paste error breaking `TEMPLATE_TEST_CASE_SIG` for 6 or more arguments (#1954) +* Fixed potential UB when handling non-ASCII characters in CLI args (#1943) + +### Improvements +* There can be multiple calls to `GENERATE` on a single line +* Improved `fno-except` support for platforms that do not provide shims for exception-related std functions (#1950) + * E.g. the Green Hills C++ compiler +* XmlReporter now also reports test-case-level statistics (#1958) + * This is done via a new element, `OverallResultsCases` + +### Miscellaneous +* Added `.clang-format` file to the repo (#1182, #1920) +* Rewrote contributing docs + * They should explain the different levels of testing and so on much better + + +## 2.12.2 + +### Fixes +* Fixed compilation failure if `is_range` ADL found deleted function (#1929) +* Fixed potential UB in `CAPTURE` if the expression contained non-ASCII characters (#1925) + +### Improvements +* `std::result_of` is not used if `std::invoke_result` is available (#1934) +* JUnit reporter writes out `status` attribute for tests (#1899) +* Suppresed clang-tidy's `hicpp-vararg` warning (#1921) + * Catch2 was already suppressing the `cppcoreguidelines-pro-type-vararg` alias of the warning + + +## 2.12.1 + +### Fixes +* Vector matchers now support initializer list literals better + +### Improvements +* Added support for `^` (bitwise xor) to `CHECK` and `REQUIRE` + + +## 2.12.0 + +### Improvements +* Running tests in random order (`--order rand`) has been reworked significantly (#1908) + * Given same seed, all platforms now produce the same order + * Given same seed, the relative order of tests does not change if you select only a subset of them +* Vector matchers support custom allocators (#1909) +* `|` and `&` (bitwise or and bitwise and) are now supported in `CHECK` and `REQUIRE` + * The resulting type must be convertible to `bool` + +### Fixes +* Fixed computation of benchmarking column widths in ConsoleReporter (#1885, #1886) +* Suppressed clang-tidy's `cppcoreguidelines-pro-type-vararg` in assertions (#1901) + * It was a false positive trigered by the new warning support workaround +* Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905) + +### Miscellaneous +* Worked around IBM XL's codegen bug (#1907) + * It would emit code for _destructors_ of temporaries in an unevaluated context +* Improved detection of stdlib's support for `std::uncaught_exceptions` (#1911) + + ## 2.11.3 ### Fixes diff --git a/packages/Catch2/examples/301-Gen-MapTypeConversion.cpp b/packages/Catch2/examples/301-Gen-MapTypeConversion.cpp index 88772971444e0cdb520139aeef16c224b16bddad..54eab571e2ba95db1bc9461e2df4b4e3bcd7e9c6 100644 --- a/packages/Catch2/examples/301-Gen-MapTypeConversion.cpp +++ b/packages/Catch2/examples/301-Gen-MapTypeConversion.cpp @@ -1,7 +1,9 @@ // 301-Gen-MapTypeConversion.cpp // Shows how to use map to modify generator's return type. -// TODO +// Specifically we wrap a std::string returning generator with a generator +// that converts the strings using stoi, so the returned type is actually +// an int. #include <catch2/catch.hpp> diff --git a/packages/Catch2/examples/302-Gen-Table.cpp b/packages/Catch2/examples/302-Gen-Table.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe226dc12bd62c7d45ff459260b7d0dc3d6e5a3e --- /dev/null +++ b/packages/Catch2/examples/302-Gen-Table.cpp @@ -0,0 +1,54 @@ +// 302-Gen-Table.cpp +// Shows how to use table to run a test many times with different inputs. Lifted from examples on +// issue #850. + +#include <catch2/catch.hpp> +#include <string> + +struct TestSubject { + // this is the method we are going to test. It returns the length of the + // input string. + size_t GetLength( const std::string& input ) const { return input.size(); } +}; + + +TEST_CASE("Table allows pre-computed test inputs and outputs", "[example][generator]") { + using std::make_tuple; + // do setup here as normal + TestSubject subj; + + SECTION("This section is run for each row in the table") { + std::string test_input; + size_t expected_output; + std::tie( test_input, expected_output ) = + GENERATE( table<std::string, size_t>( + { /* In this case one of the parameters to our test case is the + * expected output, but this is not required. There could be + * multiple expected values in the table, which can have any + * (fixed) number of columns. + */ + make_tuple( "one", 3 ), + make_tuple( "two", 3 ), + make_tuple( "three", 5 ), + make_tuple( "four", 4 ) } ) ); + + // run the test + auto result = subj.GetLength(test_input); + // capture the input data to go with the outputs. + CAPTURE(test_input); + // check it matches the pre-calculated data + REQUIRE(result == expected_output); + } // end section +} + +/* Possible simplifications where less legacy toolchain support is needed: + * + * - With libstdc++6 or newer, the make_tuple() calls can be ommitted + * (technically C++17 but does not require -std in GCC/Clang). See + * https://stackoverflow.com/questions/12436586/tuple-vector-and-initializer-list + * + * - In C++17 mode std::tie() and the preceeding variable delcarations can be + * replaced by structured bindings: auto [test_input, expected] = GENERATE( + * table<std::string, size_t>({ ... + */ +// Compiling and running this file will result in 4 successful assertions diff --git a/packages/Catch2/examples/311-Gen-CustomCapture.cpp b/packages/Catch2/examples/311-Gen-CustomCapture.cpp index da6d686f95c69a8ea30223927b3e493dfc06185b..970512c2cf96b519cf8ce85c663aa2511717e8ea 100644 --- a/packages/Catch2/examples/311-Gen-CustomCapture.cpp +++ b/packages/Catch2/examples/311-Gen-CustomCapture.cpp @@ -23,11 +23,11 @@ TEST_CASE("Generate random doubles across different ranges", })); auto r2(r1); - + // This will take r1 by reference and r2 by value. // Note that there are no advantages for doing so in this example, // it is done only for expository purposes. - auto number = Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, + auto number = Catch::Generators::generate( "custom capture generator", CATCH_INTERNAL_LINEINFO, [&r1, r2]{ using namespace Catch::Generators; return makeGenerators(take(50, random(std::get<0>(r1), std::get<1>(r2)))); diff --git a/packages/Catch2/examples/CMakeLists.txt b/packages/Catch2/examples/CMakeLists.txt index 65dc5f54ace8426fef8aebd2097a6417eec0524b..d9842486e7bb3130567228e003d748214eef7300 100644 --- a/packages/Catch2/examples/CMakeLists.txt +++ b/packages/Catch2/examples/CMakeLists.txt @@ -46,6 +46,7 @@ set( SOURCES_IDIOMATIC_TESTS 210-Evt-EventListeners.cpp 300-Gen-OwnGenerator.cpp 301-Gen-MapTypeConversion.cpp + 302-Gen-Table.cpp 310-Gen-VariablesInGenerators.cpp 311-Gen-CustomCapture.cpp ) diff --git a/packages/Catch2/include/catch.hpp b/packages/Catch2/include/catch.hpp index d0404a86ffbba9cf179ee5e55c123cdebcc000d5..18509248b4c14ca355f2224bceee7f951ce8c9b4 100644 --- a/packages/Catch2/include/catch.hpp +++ b/packages/Catch2/include/catch.hpp @@ -10,8 +10,8 @@ #define TWOBLUECUBES_CATCH_HPP_INCLUDED #define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 11 -#define CATCH_VERSION_PATCH 3 +#define CATCH_VERSION_MINOR 13 +#define CATCH_VERSION_PATCH 0 #ifdef __clang__ # pragma clang system_header diff --git a/packages/Catch2/include/external/clara.hpp b/packages/Catch2/include/external/clara.hpp index c7348bf95bb4e3108de759ff52ea185b2cb71650..a0836487d226ae830cf29ce4ddf20bb7e26d4466 100644 --- a/packages/Catch2/include/external/clara.hpp +++ b/packages/Catch2/include/external/clara.hpp @@ -667,7 +667,7 @@ namespace detail { } inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { std::string srcLC = source; - std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast<char>( std::tolower(c) ); } ); + std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } ); if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") target = true; else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off") diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp index abeb2ac71d6e6e76368f792ec67a4ccae5832f14..f6a083d486f1943b418cf99d980430b819229da5 100644 --- a/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp +++ b/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp @@ -12,6 +12,7 @@ #define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED #include "../../catch_enforce.h" +#include "../../catch_meta.hpp" #include <type_traits> #include <utility> @@ -42,20 +43,18 @@ namespace Catch { return {}; } }; - template <typename Sig> - using ResultOf_t = typename std::result_of<Sig>::type; // invoke and not return void :( template <typename Fun, typename... Args> - CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) { - return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); + CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) { + return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); } const std::string benchmarkErrorMsg = "a benchmark failed to run successfully"; } // namespace Detail template <typename Fun> - Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) { + Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) { CATCH_TRY{ return Detail::complete_invoke(std::forward<Fun>(fun)); } CATCH_CATCH_ALL{ diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp index 62ed2809633264ea2a6e449a88a46eb78294f5f8..c3bd35fab32fdeaa6ac00b0515f81b5f23304884 100644 --- a/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp +++ b/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp @@ -21,7 +21,7 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun, typename... Args> - TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) { + TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) { auto start = Clock::now(); auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...); auto end = Clock::now(); diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp index a41c6b4611546b0d4d2f4e74fd5814210f800428..339507bac74703652fd4893a419ff9cea1064831 100644 --- a/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp +++ b/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp @@ -25,11 +25,11 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun> - TimingOf<Clock, Fun(int)> measure_one(Fun&& fun, int iters, std::false_type) { + TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) { return Detail::measure<Clock>(fun, iters); } template <typename Clock, typename Fun> - TimingOf<Clock, Fun(Chronometer)> measure_one(Fun&& fun, int iters, std::true_type) { + TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) { Detail::ChronometerModel<Clock> meter; auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); @@ -46,7 +46,7 @@ namespace Catch { }; template <typename Clock, typename Fun> - TimingOf<Clock, Fun(run_for_at_least_argument_t<Clock, Fun>)> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { + TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { auto iters = seed; while (iters < (1 << 30)) { auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>()); diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp index 073cb74274bf9765d70e29bde279a3a6955d4964..fc24886a08c19a726f860e7f7e647d4fa4ca6895 100644 --- a/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp +++ b/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp @@ -25,8 +25,8 @@ namespace Catch { Result result; int iterations; }; - template <typename Clock, typename Sig> - using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>; + template <typename Clock, typename Func, typename... Args> + using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; } // namespace Benchmark } // namespace Catch diff --git a/packages/Catch2/include/internal/catch_assertionhandler.cpp b/packages/Catch2/include/internal/catch_assertionhandler.cpp index 77c3f1d4748db6aa4ad3c388f0c4203639923674..fd14c85a2fbf998c41f9087e884c8df3ebb7e498 100644 --- a/packages/Catch2/include/internal/catch_assertionhandler.cpp +++ b/packages/Catch2/include/internal/catch_assertionhandler.cpp @@ -15,6 +15,7 @@ #include "catch_interfaces_registry_hub.h" #include "catch_capture_matchers.h" #include "catch_run_context.h" +#include "catch_enforce.h" namespace Catch { diff --git a/packages/Catch2/include/internal/catch_commandline.cpp b/packages/Catch2/include/internal/catch_commandline.cpp index a4010850d0cf7bf914dabfe362ea3ade2f8442f5..673d3b70bc70d6452b8f94bb0d1fe7439d04c02b 100644 --- a/packages/Catch2/include/internal/catch_commandline.cpp +++ b/packages/Catch2/include/internal/catch_commandline.cpp @@ -170,6 +170,9 @@ namespace Catch { | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" ) ["-d"]["--durations"] ( "show test durations" ) + | Opt( config.minDuration, "seconds" ) + ["-D"]["--min-duration"] + ( "show test durations for tests taking at least the given number of seconds" ) | Opt( loadTestNamesFromFile, "filename" ) ["-f"]["--input-file"] ( "load test names to run from a file" ) diff --git a/packages/Catch2/include/internal/catch_compiler_capabilities.h b/packages/Catch2/include/internal/catch_compiler_capabilities.h index 26351c7acbfdcc7a664668080a656aa6c393fe14..52b41aae672376f2ac77caf409b229709658f4f6 100644 --- a/packages/Catch2/include/internal/catch_compiler_capabilities.h +++ b/packages/Catch2/include/internal/catch_compiler_capabilities.h @@ -70,7 +70,7 @@ // // Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. # if !defined(__ibmxl__) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg) */ +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ # endif @@ -240,7 +240,10 @@ // Check if byte is available and usable # if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # include <cstddef> + # if __cpp_lib_byte > 0 + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif # endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER) // Check if variant is available and usable diff --git a/packages/Catch2/include/internal/catch_config.cpp b/packages/Catch2/include/internal/catch_config.cpp index 21cd62965ba214fd7b6ed0aa2290c8d0d9b5e29e..252bec62ef1c03b1bda59097f2be931f6f91271d 100644 --- a/packages/Catch2/include/internal/catch_config.cpp +++ b/packages/Catch2/include/internal/catch_config.cpp @@ -64,6 +64,7 @@ namespace Catch { bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); } bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); } ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; } + double Config::minDuration() const { return m_data.minDuration; } RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; } unsigned int Config::rngSeed() const { return m_data.rngSeed; } UseColour::YesOrNo Config::useColour() const { return m_data.useColour; } diff --git a/packages/Catch2/include/internal/catch_config.hpp b/packages/Catch2/include/internal/catch_config.hpp index 64d2c035f9bb80e18fe3bffb8b558ffff9fa3b2c..fd7de5b2d44c9543dc2b39d7728dbf3b1587f162 100644 --- a/packages/Catch2/include/internal/catch_config.hpp +++ b/packages/Catch2/include/internal/catch_config.hpp @@ -52,6 +52,7 @@ namespace Catch { Verbosity verbosity = Verbosity::Normal; WarnAbout::What warnings = WarnAbout::Nothing; ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter; + double minDuration = -1; RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder; UseColour::YesOrNo useColour = UseColour::Auto; WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; @@ -103,6 +104,7 @@ namespace Catch { bool warnAboutMissingAssertions() const override; bool warnAboutNoTests() const override; ShowDurations::OrNot showDurations() const override; + double minDuration() const override; RunTests::InWhatOrder runOrder() const override; unsigned int rngSeed() const override; UseColour::YesOrNo useColour() const override; diff --git a/packages/Catch2/include/internal/catch_debugger.h b/packages/Catch2/include/internal/catch_debugger.h index 77db8aed2fb86c842fa49fa3d446c4201a89c1c8..a0148aa88fa442ecd973dcf0b0d8cd523000ef96 100644 --- a/packages/Catch2/include/internal/catch_debugger.h +++ b/packages/Catch2/include/internal/catch_debugger.h @@ -17,7 +17,11 @@ namespace Catch { #ifdef CATCH_PLATFORM_MAC - #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ + #if defined(__i386__) || defined(__x86_64__) + #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ + #elif defined(__aarch64__) + #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #endif #elif defined(CATCH_PLATFORM_IPHONE) diff --git a/packages/Catch2/include/internal/catch_decomposer.h b/packages/Catch2/include/internal/catch_decomposer.h index 08075f0e9ef4c7ef442d5948b30ea603dcae234e..9320c4ddf8bebd0b81444bbe1a205324115680ec 100644 --- a/packages/Catch2/include/internal/catch_decomposer.h +++ b/packages/Catch2/include/internal/catch_decomposer.h @@ -200,6 +200,18 @@ namespace Catch { auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs }; } + template <typename RhsT> + auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs }; + } + template <typename RhsT> + auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs }; + } + template <typename RhsT> + auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs }; + } template<typename RhsT> auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const { diff --git a/packages/Catch2/include/internal/catch_generators.cpp b/packages/Catch2/include/internal/catch_generators.cpp index 5fbe2d2384fc368657b070af9fda16c9e9a685b8..c6d60a70add2883dc2d8666bbc0b2b263986e78c 100644 --- a/packages/Catch2/include/internal/catch_generators.cpp +++ b/packages/Catch2/include/internal/catch_generators.cpp @@ -24,8 +24,8 @@ namespace Generators { GeneratorUntypedBase::~GeneratorUntypedBase() {} - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { - return getResultCapture().acquireGeneratorTracker( lineInfo ); + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); } } // namespace Generators diff --git a/packages/Catch2/include/internal/catch_generators.hpp b/packages/Catch2/include/internal/catch_generators.hpp index d0fbe8bf316a829ddd3f6e27b6225f81c032e1c1..e253ea096679a7af14c05452963e677ee728d699 100644 --- a/packages/Catch2/include/internal/catch_generators.hpp +++ b/packages/Catch2/include/internal/catch_generators.hpp @@ -10,6 +10,7 @@ #include "catch_interfaces_generatortracker.h" #include "catch_common.h" #include "catch_enforce.h" +#include "catch_stringref.h" #include <memory> #include <vector> @@ -181,16 +182,16 @@ namespace Generators { return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... ); } - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; template<typename L> // Note: The type after -> is weird, because VS2015 cannot parse // the expression used in the typedef inside, when it is in // return type. Yeah. - auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { + auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { using UnderlyingType = typename decltype(generatorExpression())::type; - IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo ); + IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); if (!tracker.hasGenerator()) { tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression())); } @@ -203,10 +204,16 @@ namespace Generators { } // namespace Catch #define GENERATE( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_COPY( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_REF( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #endif // TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED diff --git a/packages/Catch2/include/internal/catch_interfaces_capture.h b/packages/Catch2/include/internal/catch_interfaces_capture.h index 8c25c8cf7659e9ccf326a452412b1728158aba24..ccca73de303f8a3cd6f30ed10307fe927874be08 100644 --- a/packages/Catch2/include/internal/catch_interfaces_capture.h +++ b/packages/Catch2/include/internal/catch_interfaces_capture.h @@ -44,7 +44,7 @@ namespace Catch { virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) virtual void benchmarkPreparing( std::string const& name ) = 0; diff --git a/packages/Catch2/include/internal/catch_interfaces_config.h b/packages/Catch2/include/internal/catch_interfaces_config.h index 8fb986be467911c037231a5f92e8f1d0d7f16378..e9c2cf9662037731adc873ac41caa316c17a5917 100644 --- a/packages/Catch2/include/internal/catch_interfaces_config.h +++ b/packages/Catch2/include/internal/catch_interfaces_config.h @@ -69,6 +69,7 @@ namespace Catch { virtual int abortAfter() const = 0; virtual bool showInvisibles() const = 0; virtual ShowDurations::OrNot showDurations() const = 0; + virtual double minDuration() const = 0; virtual TestSpec const& testSpec() const = 0; virtual bool hasTestFilters() const = 0; virtual std::vector<std::string> const& getTestsOrTags() const = 0; diff --git a/packages/Catch2/include/internal/catch_interfaces_exception.h b/packages/Catch2/include/internal/catch_interfaces_exception.h index d3254d5f244cda720125d823589556f80c404c91..43840ea090577cd351d539192c733e1e085af65b 100644 --- a/packages/Catch2/include/internal/catch_interfaces_exception.h +++ b/packages/Catch2/include/internal/catch_interfaces_exception.h @@ -46,6 +46,9 @@ namespace Catch { {} std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + return ""; +#else try { if( it == itEnd ) std::rethrow_exception(std::current_exception()); @@ -55,6 +58,7 @@ namespace Catch { catch( T& ex ) { return m_translateFunction( ex ); } +#endif } protected: diff --git a/packages/Catch2/include/internal/catch_matchers_vector.h b/packages/Catch2/include/internal/catch_matchers_vector.h index 084130f5227d768f49417790c0db44e353927d99..bbe7c784752624cacd846262f124c1e903d96bc2 100644 --- a/packages/Catch2/include/internal/catch_matchers_vector.h +++ b/packages/Catch2/include/internal/catch_matchers_vector.h @@ -131,8 +131,6 @@ namespace Matchers { struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> { UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {} bool match(std::vector<T, AllocMatch> const& vec) const override { - // Note: This is a reimplementation of std::is_permutation, - // because I don't want to include <algorithm> inside the common path if (m_target.size() != vec.size()) { return false; } @@ -151,7 +149,7 @@ namespace Matchers { // The following functions create the actual matcher objects. // This allows the types to be inferred - template<typename T, typename AllocComp, typename AllocMatch = AllocComp> + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) { return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator ); } @@ -161,17 +159,17 @@ namespace Matchers { return Vector::ContainsElementMatcher<T, Alloc>( comparator ); } - template<typename T, typename AllocComp, typename AllocMatch = AllocComp> + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) { return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T, typename AllocComp, typename AllocMatch = AllocComp> + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) { return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T, typename AllocComp, typename AllocMatch = AllocComp> + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) { return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target ); } diff --git a/packages/Catch2/include/internal/catch_message.cpp b/packages/Catch2/include/internal/catch_message.cpp index 64c817b7005c86fafdc59cc7168f0d5bfa3b15f6..97983a1e8e6d1c179041b86f35050d411d2ed9d4 100644 --- a/packages/Catch2/include/internal/catch_message.cpp +++ b/packages/Catch2/include/internal/catch_message.cpp @@ -69,10 +69,10 @@ namespace Catch { Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { auto trimmed = [&] (size_t start, size_t end) { - while (names[start] == ',' || isspace(names[start])) { + while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; } - while (names[end] == ',' || isspace(names[end])) { + while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) { --end; } return names.substr(start, end - start + 1); diff --git a/packages/Catch2/include/internal/catch_meta.hpp b/packages/Catch2/include/internal/catch_meta.hpp index 4eca7efc2043079d773477c15bfb52b2f2666262..b54cecc20ad7e30ad0e3476342567ea628716ba1 100644 --- a/packages/Catch2/include/internal/catch_meta.hpp +++ b/packages/Catch2/include/internal/catch_meta.hpp @@ -32,13 +32,13 @@ namespace Catch { #if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is - // replaced with std::invoke_result here. Also *_t format is preferred over - // typename *::type format. - template <typename Func, typename U> - using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U>>>; + // replaced with std::invoke_result here. + template <typename Func, typename... U> + using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>; #else - template <typename Func, typename U> - using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U)>::type>::type>::type; + // Keep ::type here because we still support C++11 + template <typename Func, typename... U> + using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type; #endif } // namespace Catch diff --git a/packages/Catch2/include/internal/catch_preprocessor.hpp b/packages/Catch2/include/internal/catch_preprocessor.hpp index f1bd0905b05b3911ac94111c899600ac0e62e578..928384eb9915e41df35f39f618f77b0eaccfecf1 100644 --- a/packages/Catch2/include/internal/catch_preprocessor.hpp +++ b/packages/Catch2/include/internal/catch_preprocessor.hpp @@ -1,3 +1,4 @@ + /* * Created by Jozef on 12/11/2018. * Copyright 2017 Two Blue Cubes Ltd. All rights reserved. @@ -90,7 +91,7 @@ #define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) #define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) #define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) #define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) #define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) #define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) diff --git a/packages/Catch2/include/internal/catch_registry_hub.cpp b/packages/Catch2/include/internal/catch_registry_hub.cpp index 8a3c7a9793843a908ff155ad1064bc7afc9a679f..852b34e08f0ee31f118d2b53af92f39cf0d150a9 100644 --- a/packages/Catch2/include/internal/catch_registry_hub.cpp +++ b/packages/Catch2/include/internal/catch_registry_hub.cpp @@ -59,7 +59,11 @@ namespace Catch { m_tagAliasRegistry.add( alias, tag, lineInfo ); } void registerStartupException() noexcept override { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) m_exceptionRegistry.add(std::current_exception()); +#else + CATCH_INTERNAL_ERROR("Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); +#endif } IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override { return m_enumValuesRegistry; diff --git a/packages/Catch2/include/internal/catch_run_context.cpp b/packages/Catch2/include/internal/catch_run_context.cpp index 2eb84fb9afe0de0f97114bded95e2ddc6979a2db..c7a9f203f097172ce0a6c3a2231ece1be1d8879d 100644 --- a/packages/Catch2/include/internal/catch_run_context.cpp +++ b/packages/Catch2/include/internal/catch_run_context.cpp @@ -25,17 +25,32 @@ namespace Catch { std::shared_ptr<GeneratorTracker> tracker; ITracker& currentTracker = ctx.currentTracker(); - if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { + // Under specific circumstances, the generator we want + // to acquire is also the current tracker. If this is + // the case, we have to avoid looking through current + // tracker's children, and instead return the current + // tracker. + // A case where this check is important is e.g. + // for (int i = 0; i < 5; ++i) { + // int n = GENERATE(1, 2); + // } + // + // without it, the code above creates 5 nested generators. + if (currentTracker.nameAndLocation() == nameAndLocation) { + auto thisTracker = currentTracker.parent().findChild(nameAndLocation); + assert(thisTracker); + assert(thisTracker->isGeneratorTracker()); + tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker); + } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isGeneratorTracker() ); tracker = std::static_pointer_cast<GeneratorTracker>( childTracker ); - } - else { + } else { tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, ¤tTracker ); currentTracker.addChild( tracker ); } - if( !ctx.completedCycle() && !tracker->isComplete() ) { + if( !tracker->isComplete() ) { tracker->open(); } @@ -49,8 +64,28 @@ namespace Catch { } void close() override { TrackerBase::close(); - // Generator interface only finds out if it has another item on atual move - if (m_runState == CompletedSuccessfully && m_generator->next()) { + // If a generator has a child (it is followed by a section) + // and none of its children have started, then we must wait + // until later to start consuming its values. + // This catches cases where `GENERATE` is placed between two + // `SECTION`s. + // **The check for m_children.empty cannot be removed**. + // doing so would break `GENERATE` _not_ followed by `SECTION`s. + const bool should_wait_for_child = + !m_children.empty() && + std::find_if( m_children.begin(), + m_children.end(), + []( TestCaseTracking::ITrackerPtr tracker ) { + return tracker->hasStarted(); + } ) == m_children.end(); + + // This check is a bit tricky, because m_generator->next() + // has a side-effect, where it consumes generator's current + // value, but we do not want to invoke the side-effect if + // this generator is still waiting for any child to start. + if ( should_wait_for_child || + ( m_runState == CompletedSuccessfully && + m_generator->next() ) ) { m_children.clear(); m_runState = Executing; } @@ -187,10 +222,10 @@ namespace Catch { return true; } - auto RunContext::acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { using namespace Generators; - GeneratorTracker& tracker = GeneratorTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( "generator", lineInfo ) ); - assert( tracker.isOpen() ); + GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext, + TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) ); m_lastAssertionInfo.lineInfo = lineInfo; return tracker; } @@ -233,17 +268,17 @@ namespace Catch { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void RunContext::benchmarkPreparing(std::string const& name) { - m_reporter->benchmarkPreparing(name); - } + m_reporter->benchmarkPreparing(name); + } void RunContext::benchmarkStarting( BenchmarkInfo const& info ) { m_reporter->benchmarkStarting( info ); } void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) { m_reporter->benchmarkEnded( stats ); } - void RunContext::benchmarkFailed(std::string const & error) { - m_reporter->benchmarkFailed(error); - } + void RunContext::benchmarkFailed(std::string const & error) { + m_reporter->benchmarkFailed(error); + } #endif // CATCH_CONFIG_ENABLE_BENCHMARKING void RunContext::pushScopedMessage(MessageInfo const & message) { diff --git a/packages/Catch2/include/internal/catch_run_context.h b/packages/Catch2/include/internal/catch_run_context.h index 2a8e72dca8773519c8df3376b5e9f0224d8d25c3..044bdd817574b3a2bbed47102458d0a031bacf10 100644 --- a/packages/Catch2/include/internal/catch_run_context.h +++ b/packages/Catch2/include/internal/catch_run_context.h @@ -80,7 +80,7 @@ namespace Catch { void sectionEnded( SectionEndInfo const& endInfo ) override; void sectionEndedEarly( SectionEndInfo const& endInfo ) override; - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void benchmarkPreparing( std::string const& name ) override; diff --git a/packages/Catch2/include/internal/catch_startup_exception_registry.cpp b/packages/Catch2/include/internal/catch_startup_exception_registry.cpp index 3c5bd22f5f8353fe725bef16c0748a9e1b8230ff..04e46170d57bc5734903b9244459dddddc57d980 100644 --- a/packages/Catch2/include/internal/catch_startup_exception_registry.cpp +++ b/packages/Catch2/include/internal/catch_startup_exception_registry.cpp @@ -9,6 +9,7 @@ #include "catch_startup_exception_registry.h" #include "catch_compiler_capabilities.h" +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) namespace Catch { void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept { CATCH_TRY { @@ -24,3 +25,4 @@ void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexce } } // end namespace Catch +#endif diff --git a/packages/Catch2/include/internal/catch_startup_exception_registry.h b/packages/Catch2/include/internal/catch_startup_exception_registry.h index feb566019e2ba805814766b86cd41368de8ba848..366312adda16e0e5f0bb546e9457ed24be031215 100644 --- a/packages/Catch2/include/internal/catch_startup_exception_registry.h +++ b/packages/Catch2/include/internal/catch_startup_exception_registry.h @@ -15,11 +15,13 @@ namespace Catch { class StartupExceptionRegistry { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) public: void add(std::exception_ptr const& exception) noexcept; std::vector<std::exception_ptr> const& getExceptions() const noexcept; private: std::vector<std::exception_ptr> m_exceptions; +#endif }; } // end namespace Catch diff --git a/packages/Catch2/include/internal/catch_string_manip.cpp b/packages/Catch2/include/internal/catch_string_manip.cpp index 65be34d037c96907943659d87655b45b842cd807..accb3498e20c0a175057a6059e2080c649bc1dca 100644 --- a/packages/Catch2/include/internal/catch_string_manip.cpp +++ b/packages/Catch2/include/internal/catch_string_manip.cpp @@ -18,7 +18,7 @@ namespace Catch { namespace { char toLowerCh(char c) { - return static_cast<char>( std::tolower( c ) ); + return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) ); } } diff --git a/packages/Catch2/include/internal/catch_test_case_tracker.cpp b/packages/Catch2/include/internal/catch_test_case_tracker.cpp index 1fc820b13ec198da7e668cebdccd44a36fe75e4b..2541a3d17c1a04e81dcaee345b716796aacb972e 100644 --- a/packages/Catch2/include/internal/catch_test_case_tracker.cpp +++ b/packages/Catch2/include/internal/catch_test_case_tracker.cpp @@ -65,15 +65,12 @@ namespace TestCaseTracking { } - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : m_nameAndLocation( nameAndLocation ), + TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ): + ITracker(nameAndLocation), m_ctx( ctx ), m_parent( parent ) {} - NameAndLocation const& TrackerBase::nameAndLocation() const { - return m_nameAndLocation; - } bool TrackerBase::isComplete() const { return m_runState == CompletedSuccessfully || m_runState == Failed; } @@ -190,7 +187,8 @@ namespace TestCaseTracking { bool SectionTracker::isComplete() const { bool complete = true; - if ((m_filters.empty() || m_filters[0] == "") + if (m_filters.empty() + || m_filters[0] == "" || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) { complete = TrackerBase::isComplete(); } diff --git a/packages/Catch2/include/internal/catch_test_case_tracker.h b/packages/Catch2/include/internal/catch_test_case_tracker.h index 563dbef2c94b7ef9507b9c6f1bc77e99d1e98778..131e2ea04b53d179d03e9644f08b60bbbf14b9d1 100644 --- a/packages/Catch2/include/internal/catch_test_case_tracker.h +++ b/packages/Catch2/include/internal/catch_test_case_tracker.h @@ -23,23 +23,39 @@ namespace TestCaseTracking { SourceLineInfo location; NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); + friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) { + return lhs.name == rhs.name + && lhs.location == rhs.location; + } }; - struct ITracker; + class ITracker; using ITrackerPtr = std::shared_ptr<ITracker>; - struct ITracker { - virtual ~ITracker(); + class ITracker { + NameAndLocation m_nameAndLocation; + + public: + ITracker(NameAndLocation const& nameAndLoc) : + m_nameAndLocation(nameAndLoc) + {} + // static queries - virtual NameAndLocation const& nameAndLocation() const = 0; + NameAndLocation const& nameAndLocation() const { + return m_nameAndLocation; + } + + virtual ~ITracker(); + // dynamic queries virtual bool isComplete() const = 0; // Successfully completed or failed virtual bool isSuccessfullyCompleted() const = 0; virtual bool isOpen() const = 0; // Started but not complete virtual bool hasChildren() const = 0; + virtual bool hasStarted() const = 0; virtual ITracker& parent() = 0; @@ -94,7 +110,6 @@ namespace TestCaseTracking { }; using Children = std::vector<ITrackerPtr>; - NameAndLocation m_nameAndLocation; TrackerContext& m_ctx; ITracker* m_parent; Children m_children; @@ -103,12 +118,13 @@ namespace TestCaseTracking { public: TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); - NameAndLocation const& nameAndLocation() const override; bool isComplete() const override; bool isSuccessfullyCompleted() const override; bool isOpen() const override; bool hasChildren() const override; - + bool hasStarted() const override { + return m_runState != NotStarted; + } void addChild( ITrackerPtr const& child ) override; diff --git a/packages/Catch2/include/internal/catch_tostring.h b/packages/Catch2/include/internal/catch_tostring.h index 640fc8cbd0492672588b59567d6bee77384c5a89..8687c4a644f8cc7df559908f57abda0585b920af 100644 --- a/packages/Catch2/include/internal/catch_tostring.h +++ b/packages/Catch2/include/internal/catch_tostring.h @@ -469,20 +469,27 @@ namespace Catch { #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER namespace Catch { - struct not_this_one {}; // Tag type for detecting which begin/ end are being selected - - // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace + // Import begin/ end from std here using std::begin; using std::end; - not_this_one begin( ... ); - not_this_one end( ... ); + namespace detail { + template <typename...> + struct void_type { + using type = void; + }; + + template <typename T, typename = void> + struct is_range_impl : std::false_type { + }; + + template <typename T> + struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type { + }; + } // namespace detail template <typename T> - struct is_range { - static const bool value = - !std::is_same<decltype(begin(std::declval<T>())), not_this_one>::value && - !std::is_same<decltype(end(std::declval<T>())), not_this_one>::value; + struct is_range : detail::is_range_impl<T> { }; #if defined(_MANAGED) // Managed types are never ranges diff --git a/packages/Catch2/include/internal/catch_uncaught_exceptions.cpp b/packages/Catch2/include/internal/catch_uncaught_exceptions.cpp index b990ccd8f31202f40ae25926d1cc4918033e33a6..22b1ed43db179b446b0e1af518041dd102f5739b 100644 --- a/packages/Catch2/include/internal/catch_uncaught_exceptions.cpp +++ b/packages/Catch2/include/internal/catch_uncaught_exceptions.cpp @@ -12,7 +12,9 @@ namespace Catch { bool uncaught_exceptions() { -#if defined(CATCH_CONFIG_CPP17_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(); diff --git a/packages/Catch2/include/internal/catch_version.cpp b/packages/Catch2/include/internal/catch_version.cpp index db6425e803708cc15c106abcc2f93b6da6461a5c..ad3e800e2fb6fe620601706b8430637d9bc08113 100644 --- a/packages/Catch2/include/internal/catch_version.cpp +++ b/packages/Catch2/include/internal/catch_version.cpp @@ -37,7 +37,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 11, 3, "", 0 ); + static Version version( 2, 13, 0, "", 0 ); return version; } diff --git a/packages/Catch2/include/reporters/catch_reporter_bases.cpp b/packages/Catch2/include/reporters/catch_reporter_bases.cpp index fcbafef58b65a6829478181d6c88379e2f5b223f..0578e8abd2f00d6c8b76bea238fa42aa02119232 100644 --- a/packages/Catch2/include/reporters/catch_reporter_bases.cpp +++ b/packages/Catch2/include/reporters/catch_reporter_bases.cpp @@ -41,6 +41,17 @@ namespace Catch { return std::string(buffer); } + bool shouldShowDuration( IConfig const& config, double duration ) { + if ( config.showDurations() == ShowDurations::Always ) { + return true; + } + if ( config.showDurations() == ShowDurations::Never ) { + return false; + } + const double min = config.minDuration(); + return min >= 0 && duration >= min; + } + std::string serializeFilters( std::vector<std::string> const& container ) { ReusableStringStream oss; bool first = true; diff --git a/packages/Catch2/include/reporters/catch_reporter_bases.hpp b/packages/Catch2/include/reporters/catch_reporter_bases.hpp index 66a891ffd4cf56b30f69ba2e915757f221fc83e7..f62e14305f87bb4f2cb133b596bc93585b821d43 100644 --- a/packages/Catch2/include/reporters/catch_reporter_bases.hpp +++ b/packages/Catch2/include/reporters/catch_reporter_bases.hpp @@ -25,6 +25,9 @@ namespace Catch { // Returns double formatted as %.3f (format expected on output) std::string getFormattedDuration( double duration ); + //! Should the reporter show + bool shouldShowDuration( IConfig const& config, double duration ); + std::string serializeFilters( std::vector<std::string> const& container ); template<typename DerivedT> @@ -52,7 +55,7 @@ namespace Catch { void noMatchingTestCases(std::string const&) override {} void reportInvalidArguments(std::string const&) override {} - + void testRunStarting(TestRunInfo const& _testRunInfo) override { currentTestRunInfo = _testRunInfo; } diff --git a/packages/Catch2/include/reporters/catch_reporter_compact.cpp b/packages/Catch2/include/reporters/catch_reporter_compact.cpp index 017f521f483a10126ca0cc12c8f6718f9e9b3779..74df8d507014a5835e7574e4085cf7e88f4e292c 100644 --- a/packages/Catch2/include/reporters/catch_reporter_compact.cpp +++ b/packages/Catch2/include/reporters/catch_reporter_compact.cpp @@ -245,10 +245,6 @@ private: return "Reports test results on a single line, suitable for IDEs"; } - ReporterPreferences CompactReporter::getPreferences() const { - return m_reporterPrefs; - } - void CompactReporter::noMatchingTestCases( std::string const& spec ) { stream << "No test cases matched '" << spec << '\'' << std::endl; } @@ -275,8 +271,9 @@ private: } void CompactReporter::sectionEnded(SectionStats const& _sectionStats) { - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if ( shouldShowDuration( *m_config, dur ) ) { + stream << getFormattedDuration( dur ) << " s: " << _sectionStats.sectionInfo.name << std::endl; } } diff --git a/packages/Catch2/include/reporters/catch_reporter_compact.h b/packages/Catch2/include/reporters/catch_reporter_compact.h index 5002df7b1fb41f172eec6c959a557fb8bc18ae32..fe33a2205d35e1ed08c526811cb6e56827e07ed9 100644 --- a/packages/Catch2/include/reporters/catch_reporter_compact.h +++ b/packages/Catch2/include/reporters/catch_reporter_compact.h @@ -22,8 +22,6 @@ namespace Catch { static std::string getDescription(); - ReporterPreferences getPreferences() const override; - void noMatchingTestCases(std::string const& spec) override; void assertionStarting(AssertionInfo const&) override; diff --git a/packages/Catch2/include/reporters/catch_reporter_console.cpp b/packages/Catch2/include/reporters/catch_reporter_console.cpp index 0fa399d586cc567634658844ae17a0e20d0dfdd6..4f74ccb320411ddb1d1dd168e3ea7f98bd15b3d4 100644 --- a/packages/Catch2/include/reporters/catch_reporter_console.cpp +++ b/packages/Catch2/include/reporters/catch_reporter_console.cpp @@ -418,8 +418,9 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) { stream << "\nNo assertions in test case"; stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; } - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if (shouldShowDuration(*m_config, dur)) { + stream << getFormattedDuration(dur) << " s: " << _sectionStats.sectionInfo.name << std::endl; } if (m_headerPrinted) { m_headerPrinted = false; diff --git a/packages/Catch2/include/reporters/catch_reporter_junit.cpp b/packages/Catch2/include/reporters/catch_reporter_junit.cpp index 7416a523e7112a093cf2634d5910a1a9ffee8e15..31f0802f194c74d16b7d670fc462c8d36b1de102 100644 --- a/packages/Catch2/include/reporters/catch_reporter_junit.cpp +++ b/packages/Catch2/include/reporters/catch_reporter_junit.cpp @@ -193,6 +193,11 @@ namespace Catch { xml.writeAttribute( "name", name ); } xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); + // This is not ideal, but it should be enough to mimic gtest's + // junit output. + // Ideally the JUnit reporter would also handle `skipTest` + // events and write those out appropriately. + xml.writeAttribute( "status", "run" ); writeAssertions( sectionNode ); diff --git a/packages/Catch2/include/reporters/catch_reporter_tap.hpp b/packages/Catch2/include/reporters/catch_reporter_tap.hpp index 1bfe4f5e1ca732f9df75e922953ff70dc15df3ec..5ac8524ce7abebdf264a5584c509c71c2a1df2da 100644 --- a/packages/Catch2/include/reporters/catch_reporter_tap.hpp +++ b/packages/Catch2/include/reporters/catch_reporter_tap.hpp @@ -23,16 +23,17 @@ namespace Catch { using StreamingReporterBase::StreamingReporterBase; + TAPReporter( ReporterConfig const& config ): + StreamingReporterBase( config ) { + m_reporterPrefs.shouldReportAllAssertions = true; + } + ~TAPReporter() override; static std::string getDescription() { return "Reports test results in TAP format, suitable for test harnesses"; } - ReporterPreferences getPreferences() const override { - return m_reporterPrefs; - } - void noMatchingTestCases( std::string const& spec ) override { stream << "# No test cases matched '" << spec << "'" << std::endl; } @@ -203,16 +204,15 @@ namespace Catch { return; } - // using messages.end() directly (or auto) yields compilation error: - std::vector<MessageInfo>::const_iterator itEnd = messages.end(); - const std::size_t N = static_cast<std::size_t>( std::distance( itMessage, itEnd ) ); + const auto itEnd = messages.cend(); + const auto N = static_cast<std::size_t>( std::distance( itMessage, itEnd ) ); { Colour colourGuard( colour ); stream << " with " << pluralise( N, "message" ) << ":"; } - for(; itMessage != itEnd; ) { + while( itMessage != itEnd ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || itMessage->type != ResultWas::Info ) { stream << " '" << itMessage->message << "'"; @@ -220,7 +220,9 @@ namespace Catch { Colour colourGuard( dimColour() ); stream << " and"; } + continue; } + ++itMessage; } } @@ -234,10 +236,9 @@ namespace Catch { }; void printTotals( const Totals& totals ) const { + stream << "1.." << totals.assertions.total(); if( totals.testCases.total() == 0 ) { - stream << "1..0 # Skipped: No tests ran."; - } else { - stream << "1.." << counter; + stream << " # Skipped: No tests ran."; } } }; diff --git a/packages/Catch2/include/reporters/catch_reporter_xml.cpp b/packages/Catch2/include/reporters/catch_reporter_xml.cpp index 0fb78be03d472b542e8236224e27d2ee561b1dfd..b58becd8a5a4c3e772d0f015d9ba83fa6427c2de 100644 --- a/packages/Catch2/include/reporters/catch_reporter_xml.cpp +++ b/packages/Catch2/include/reporters/catch_reporter_xml.cpp @@ -207,6 +207,10 @@ namespace Catch { .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testGroupStats.totals.testCases.passed ) + .writeAttribute( "failures", testGroupStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testGroupStats.totals.testCases.failedButOk ); m_xml.endElement(); } @@ -216,6 +220,10 @@ namespace Catch { .writeAttribute( "successes", testRunStats.totals.assertions.passed ) .writeAttribute( "failures", testRunStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testRunStats.totals.testCases.passed ) + .writeAttribute( "failures", testRunStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testRunStats.totals.testCases.failedButOk ); m_xml.endElement(); } diff --git a/packages/Catch2/projects/CMakeLists.txt b/packages/Catch2/projects/CMakeLists.txt index 08badb809a995f317648e91c9f0b8a5aedcb5ac7..914af8d6b66e345cf029dcbf2b5306aa3a4d0d54 100644 --- a/packages/Catch2/projects/CMakeLists.txt +++ b/packages/Catch2/projects/CMakeLists.txt @@ -27,6 +27,7 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/IntrospectiveTests/StringManip.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Xml.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/ToString.tests.cpp + ${SELF_TEST_DIR}/TimingTests/Sleep.tests.cpp ${SELF_TEST_DIR}/UsageTests/Approx.tests.cpp ${SELF_TEST_DIR}/UsageTests/BDD.tests.cpp ${SELF_TEST_DIR}/UsageTests/Benchmark.tests.cpp diff --git a/packages/Catch2/projects/ExtraTests/CMakeLists.txt b/packages/Catch2/projects/ExtraTests/CMakeLists.txt index c8c975c00d65d10e1676b1eaf82bcfd7b9f06dd7..637dc692a6d1fd9f50f3157425049be2875e9741 100644 --- a/packages/Catch2/projects/ExtraTests/CMakeLists.txt +++ b/packages/Catch2/projects/ExtraTests/CMakeLists.txt @@ -10,6 +10,40 @@ project( Catch2ExtraTests LANGUAGES CXX ) message( STATUS "Extra tests included" ) +# The MinDuration reporting tests do not need separate compilation, but +# they have non-trivial execution time, so they are categorized as +# extra tests, so that they are run less. +add_test(NAME MinDuration::SimpleThreshold COMMAND $<TARGET_FILE:SelfTest> --min-duration 0.22 [min_duration_test]) +set_tests_properties( + MinDuration::SimpleThreshold + PROPERTIES + PASS_REGULAR_EXPRESSION "s: sleep_for_250ms" + FAIL_REGULAR_EXPRESSION "sleep_for_100ms" + RUN_SERIAL ON # The test is timing sensitive, so we want to run it + # serially to avoid false positives on oversubscribed machines +) + +# -d yes overrides the threshold, so we should see the faster test even +# with a ridiculous high min duration threshold +add_test(NAME MinDuration::DurationOverrideYes COMMAND $<TARGET_FILE:SelfTest> --min-duration 1.0 -d yes [min_duration_test]) +set_tests_properties( + MinDuration::DurationOverrideYes + PROPERTIES + PASS_REGULAR_EXPRESSION "s: sleep_for_100ms" +) + +# -d no overrides the threshold, so we should never see any tests even +# with ridiculously low min duration threshold +add_test(NAME MinDuration::DurationOverrideNo COMMAND $<TARGET_FILE:SelfTest> --min-duration 0.0001 -d no [min_duration_test]) +set_tests_properties( + MinDuration::DurationOverrideNo + PROPERTIES + FAIL_REGULAR_EXPRESSION "sleep_for_250ms" +) + + +# ------------ end of duration reporting tests + # define folders used: set( TESTS_DIR ${CATCH_DIR}/projects/ExtraTests ) diff --git a/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt index 280f697adbaaed137e65cd260bb2cb7d1a07f8b5..59a909b2f0277d9c8c54712076949caaaa1ac8e1 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -26,6 +26,61 @@ Compilation.tests.cpp:<line number>: passed: std::is_same<TypeList<int>, TypeLis CmdLine.tests.cpp:<line number>: passed: spec.matches(fakeTestCase("spec . char")) for: true CmdLine.tests.cpp:<line number>: passed: spec.matches(fakeTestCase("spec , char")) for: true CmdLine.tests.cpp:<line number>: passed: !(spec.matches(fakeTestCase(R"(spec \, char)"))) for: !false +CmdLine.tests.cpp:<line number>: passed: spec.matches(fakeTestCase(R"(spec {a} char)")) for: true +CmdLine.tests.cpp:<line number>: passed: spec.matches(fakeTestCase(R"(spec [a] char)")) for: true +CmdLine.tests.cpp:<line number>: passed: !(spec.matches(fakeTestCase("differs but has similar tag", "[a]"))) for: !false +CmdLine.tests.cpp:<line number>: passed: spec.matches(fakeTestCase(R"(spec \ char)")) for: true +Generators.tests.cpp:<line number>: passed: counter < 7 for: 3 < 7 +Generators.tests.cpp:<line number>: passed: counter < 7 for: 6 < 7 +Generators.tests.cpp:<line number>: passed: i != j for: 1 != 3 +Generators.tests.cpp:<line number>: passed: i != j for: 1 != 4 +Generators.tests.cpp:<line number>: passed: i != j for: 2 != 3 +Generators.tests.cpp:<line number>: passed: i != j for: 2 != 4 +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'A' +PartTracker.tests.cpp:<line number>: passed: m for: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: m for: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'A' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'B' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 1' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'B' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 1' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'A' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 5' +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'B' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 2' and 'j := 3' and 'k := 6' +PartTracker.tests.cpp:<line number>: passed: with 1 message: 'B' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 5' +PartTracker.tests.cpp:<line number>: passed: with 3 messages: 'i := 2' and 'j := 4' and 'k := 6' +PartTracker.tests.cpp:<line number>: passed: m for: 1 +PartTracker.tests.cpp:<line number>: passed: n for: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 1 +PartTracker.tests.cpp:<line number>: passed: n for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 1 +PartTracker.tests.cpp:<line number>: passed: n for: 3 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: n for: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: n for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 2 +PartTracker.tests.cpp:<line number>: passed: n for: 3 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: n for: 1 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: n for: 2 +PartTracker.tests.cpp:<line number>: passed: m for: 3 +PartTracker.tests.cpp:<line number>: passed: n for: 3 +Misc.tests.cpp:<line number>: passed: +Misc.tests.cpp:<line number>: passed: +Misc.tests.cpp:<line number>: passed: Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' Exception.tests.cpp:<line number>: passed: thisThrows() with 1 message: 'answer := 42' @@ -240,6 +295,11 @@ Matchers.tests.cpp:<line number>: passed: 1, Predicate<int>(alwaysTrue, "always Matchers.tests.cpp:<line number>: passed: 1, !Predicate<int>(alwaysFalse, "always false") for: 1 not matches predicate: "always false" Matchers.tests.cpp:<line number>: passed: "Hello olleH", Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); }, "First and last character should be equal") for: "Hello olleH" matches predicate: "First and last character should be equal" Matchers.tests.cpp:<line number>: passed: "This wouldn't pass", !Predicate<std::string>( [] (std::string const& str) -> bool { return str.front() == str.back(); } ) for: "This wouldn't pass" not matches undescribed predicate +Compilation.tests.cpp:<line number>: passed: lhs | rhs for: Val: 1 | Val: 2 +Compilation.tests.cpp:<line number>: passed: !(lhs & rhs) for: !(Val: 1 & Val: 2) +Compilation.tests.cpp:<line number>: passed: HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1 +Compilation.tests.cpp:<line number>: passed: lhs ^ rhs for: Val: 1 ^ Val: 2 +Compilation.tests.cpp:<line number>: passed: !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1) Tricky.tests.cpp:<line number>: passed: true Tricky.tests.cpp:<line number>: passed: true Tricky.tests.cpp:<line number>: passed: true @@ -317,6 +377,12 @@ Condition.tests.cpp:<line number>: passed: 6 == uc for: 6 == 6 Condition.tests.cpp:<line number>: passed: (std::numeric_limits<uint32_t>::max)() > ul for: 4294967295 (0x<hex digits>) > 4 Matchers.tests.cpp:<line number>: passed: testStringForMatching2(), !composed1 for: "some completely different text that contains one common word" not ( contains: "string" or contains: "random" ) Matchers.tests.cpp:<line number>: passed: testStringForMatching2(), composed2 for: "some completely different text that contains one common word" ( contains: "string" or contains: "random" or contains: "different" ) +Matchers.tests.cpp:<line number>: passed: 1, !(first && second) for: 1 not ( CheckedTestingMatcher set to fail and CheckedTestingMatcher set to fail ) +Matchers.tests.cpp:<line number>: passed: first.matchCalled for: true +Matchers.tests.cpp:<line number>: passed: !second.matchCalled for: true +Matchers.tests.cpp:<line number>: passed: 1, first || second for: 1 ( CheckedTestingMatcher set to succeed or CheckedTestingMatcher set to fail ) +Matchers.tests.cpp:<line number>: passed: first.matchCalled for: true +Matchers.tests.cpp:<line number>: passed: !second.matchCalled for: true Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains("STRING") for: "this string contains 'abc' as a substring" contains: "STRING" Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1 @@ -1522,6 +1588,7 @@ Approx.tests.cpp:<line number>: passed: approx( d ) != 1.25 for: Approx( 1.23 ) VariadicMacros.tests.cpp:<line number>: passed: with 1 message: 'no assertions' Matchers.tests.cpp:<line number>: passed: empty, Approx(empty) for: { } is approx: { } Matchers.tests.cpp:<line number>: passed: v1, Approx(v1) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:<line number>: passed: v1, Approx<double>({ 1., 2., 3. }) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } Matchers.tests.cpp:<line number>: passed: v1, !Approx(temp) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } Matchers.tests.cpp:<line number>: passed: v1, !Approx(v2) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 } Matchers.tests.cpp:<line number>: passed: v1, Approx(v2).margin(0.5) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } @@ -1533,6 +1600,7 @@ Matchers.tests.cpp:<line number>: passed: v, VectorContains(1) for: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v, VectorContains(2) for: { 1, 2, 3 } Contains: 2 Matchers.tests.cpp:<line number>: passed: v5, (VectorContains<int, CustomAllocator<int>>(2)) for: { 1, 2, 3 } Contains: 2 Matchers.tests.cpp:<line number>: passed: v, Contains(v2) for: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:<line number>: passed: v, Contains<int>({ 1, 2 }) for: { 1, 2, 3 } Contains: { 1, 2 } Matchers.tests.cpp:<line number>: passed: v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2)) for: { 1, 2, 3 } Contains: { 1, 2 } Matchers.tests.cpp:<line number>: passed: v, Contains(v2) for: { 1, 2, 3 } Contains: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v, Contains(empty) for: { 1, 2, 3 } Contains: { } @@ -1542,10 +1610,12 @@ Matchers.tests.cpp:<line number>: passed: v5, Contains(v6) for: { 1, 2, 3 } Cont Matchers.tests.cpp:<line number>: passed: v, VectorContains(1) && VectorContains(2) for: { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) Matchers.tests.cpp:<line number>: passed: v, Equals(v) for: { 1, 2, 3 } Equals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: empty, Equals(empty) for: { } Equals: { } +Matchers.tests.cpp:<line number>: passed: v, Equals<int>({ 1, 2, 3 }) for: { 1, 2, 3 } Equals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v, Equals(v2) for: { 1, 2, 3 } Equals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v5, (Equals<int, std::allocator<int>, CustomAllocator<int>>(v2)) for: { 1, 2, 3 } Equals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v5, Equals(v6) for: { 1, 2, 3 } Equals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: v, UnorderedEquals(v) for: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:<line number>: passed: v, UnorderedEquals<int>({ 3, 2, 1 }) for: { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } Matchers.tests.cpp:<line number>: passed: empty, UnorderedEquals(empty) for: { } UnorderedEquals: { } Matchers.tests.cpp:<line number>: passed: permuted, UnorderedEquals(v) for: { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } Matchers.tests.cpp:<line number>: passed: permuted, UnorderedEquals(v) for: { 2, 3, 1 } UnorderedEquals: { 1, 2, 3 } diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt index 6b29a98ca99fb8b15bc81bd0f2524d99fb0c8c8b..c1600545cbc77d06e75c2759a6e2c71ff97d160c 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt @@ -1380,6 +1380,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 308 | 234 passed | 70 failed | 4 failed as expected -assertions: 1688 | 1536 passed | 131 failed | 21 failed as expected +test cases: 321 | 247 passed | 70 failed | 4 failed as expected +assertions: 1758 | 1606 passed | 131 failed | 21 failed as expected diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt index fcb7a802dc7be5a9754550ae4d9b9701fde5f55a..3603215f9fd239cc59584811f8d90f67a24c7f2b 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt @@ -209,6 +209,548 @@ CmdLine.tests.cpp:<line number>: PASSED: with expansion: !false +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + Various parentheses +------------------------------------------------------------------------------- +CmdLine.tests.cpp:<line number> +............................................................................... + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec {a} char)")) ) +with expansion: + true + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec [a] char)")) ) +with expansion: + true + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( spec.matches(fakeTestCase("differs but has similar tag", "[a]")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + backslash in test name +------------------------------------------------------------------------------- +CmdLine.tests.cpp:<line number> +............................................................................... + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec \ char)")) ) +with expansion: + true + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 6 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 4 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 4 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( 1 ) + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + ------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions @@ -1900,6 +2442,37 @@ Matchers.tests.cpp:<line number>: PASSED: with expansion: "This wouldn't pass" not matches undescribed predicate +------------------------------------------------------------------------------- +Assertion macros support bit operators and bool conversions +------------------------------------------------------------------------------- +Compilation.tests.cpp:<line number> +............................................................................... + +Compilation.tests.cpp:<line number>: PASSED: + REQUIRE( lhs | rhs ) +with expansion: + Val: 1 | Val: 2 + +Compilation.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( lhs & rhs ) +with expansion: + !(Val: 1 & Val: 2) + +Compilation.tests.cpp:<line number>: PASSED: + REQUIRE( HasBitOperators{ 1 } & HasBitOperators{ 1 } ) +with expansion: + Val: 1 & Val: 1 + +Compilation.tests.cpp:<line number>: PASSED: + REQUIRE( lhs ^ rhs ) +with expansion: + Val: 1 ^ Val: 2 + +Compilation.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( lhs ^ lhs ) +with expansion: + !(Val: 1 ^ Val: 1) + ------------------------------------------------------------------------------- Assertions then sections ------------------------------------------------------------------------------- @@ -2429,6 +3002,52 @@ with expansion: "some completely different text that contains one common word" ( contains: "string" or contains: "random" or contains: "different" ) +------------------------------------------------------------------------------- +Composed matchers shortcircuit + && +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + CHECK_THAT( 1, !(first && second) ) +with expansion: + 1 not ( CheckedTestingMatcher set to fail and CheckedTestingMatcher set to + fail ) + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + +------------------------------------------------------------------------------- +Composed matchers shortcircuit + || +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + CHECK_THAT( 1, first || second ) +with expansion: + 1 ( CheckedTestingMatcher set to succeed or CheckedTestingMatcher set to fail + ) + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE( first.matchCalled ) +with expansion: + true + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE( !second.matchCalled ) +with expansion: + true + ------------------------------------------------------------------------------- Contains string matcher ------------------------------------------------------------------------------- @@ -11122,6 +11741,11 @@ Matchers.tests.cpp:<line number>: PASSED: with expansion: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( v1, Approx<double>({ 1., 2., 3. }) ) +with expansion: + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + ------------------------------------------------------------------------------- Vector Approx matcher Vectors with elements @@ -11221,6 +11845,11 @@ Matchers.tests.cpp:<line number>: PASSED: with expansion: { 1, 2, 3 } Contains: { 1, 2 } +Matchers.tests.cpp:<line number>: PASSED: + CHECK_THAT( v, Contains<int>({ 1, 2 }) ) +with expansion: + { 1, 2, 3 } Contains: { 1, 2 } + Matchers.tests.cpp:<line number>: PASSED: CHECK_THAT( v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2)) ) with expansion: @@ -11280,6 +11909,11 @@ Matchers.tests.cpp:<line number>: PASSED: with expansion: { } Equals: { } +Matchers.tests.cpp:<line number>: PASSED: + CHECK_THAT( v, Equals<int>({ 1, 2, 3 }) ) +with expansion: + { 1, 2, 3 } Equals: { 1, 2, 3 } + Matchers.tests.cpp:<line number>: PASSED: CHECK_THAT( v, Equals(v2) ) with expansion: @@ -11307,6 +11941,11 @@ Matchers.tests.cpp:<line number>: PASSED: with expansion: { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } +Matchers.tests.cpp:<line number>: PASSED: + CHECK_THAT( v, UnorderedEquals<int>({ 3, 2, 1 }) ) +with expansion: + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + Matchers.tests.cpp:<line number>: PASSED: CHECK_THAT( empty, UnorderedEquals(empty) ) with expansion: @@ -13488,6 +14127,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 308 | 218 passed | 86 failed | 4 failed as expected -assertions: 1705 | 1536 passed | 148 failed | 21 failed as expected +test cases: 321 | 231 passed | 86 failed | 4 failed as expected +assertions: 1775 | 1606 passed | 148 failed | 21 failed as expected diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt index e32fd88f425033e017773cc22799420740249562..599382255e988fca4e83ff8aff72ce71515eb5a2 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt @@ -209,6 +209,548 @@ CmdLine.tests.cpp:<line number>: PASSED: with expansion: !false +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + Various parentheses +------------------------------------------------------------------------------- +CmdLine.tests.cpp:<line number> +............................................................................... + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec {a} char)")) ) +with expansion: + true + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec [a] char)")) ) +with expansion: + true + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( spec.matches(fakeTestCase("differs but has similar tag", "[a]")) ) +with expansion: + !false + +------------------------------------------------------------------------------- +#1912 -- test spec parser handles escaping + backslash in test name +------------------------------------------------------------------------------- +CmdLine.tests.cpp:<line number> +............................................................................... + +CmdLine.tests.cpp:<line number>: PASSED: + REQUIRE( spec.matches(fakeTestCase(R"(spec \ char)")) ) +with expansion: + true + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 3 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATE inside a for loop should not keep recreating the generator +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( counter < 7 ) +with expansion: + 6 < 7 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 1 != 4 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 3 + +------------------------------------------------------------------------------- +#1913 - GENERATEs can share a line +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i != j ) +with expansion: + 2 != 4 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - GENERATE after a section + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( 1 ) + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - Section followed by flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - flat generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 1 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + A +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + A + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 3 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 3 + k := 6 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates + B +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with message: + B + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 4 + k := 5 + +------------------------------------------------------------------------------- +#1938 - mixed sections and generates +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: +with messages: + i := 2 + j := 4 + k := 6 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 1 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 2 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 1 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 2 + +------------------------------------------------------------------------------- +#1938 - nested generate +------------------------------------------------------------------------------- +PartTracker.tests.cpp:<line number> +............................................................................... + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( m ) +with expansion: + 3 + +PartTracker.tests.cpp:<line number>: PASSED: + REQUIRE( n ) +with expansion: + 3 + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + ------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions @@ -389,6 +931,6 @@ Condition.tests.cpp:<line number>: FAILED: CHECK( true != true ) =============================================================================== -test cases: 20 | 15 passed | 3 failed | 2 failed as expected -assertions: 45 | 38 passed | 4 failed | 3 failed as expected +test cases: 31 | 26 passed | 3 failed | 2 failed as expected +assertions: 100 | 93 passed | 4 failed | 3 failed as expected diff --git a/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt index 76284a2fba97b31bfed2bc87e48ecc4371b2f2cc..9c8505340c7e1dded90a28dd3c901b1a32de1c4c 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="132" tests="1706" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="132" tests="1776" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals]"/> <property name="random-seed" value="1"/> </properties> - <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1027" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1027: Bitfields can be captured" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1147" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1175 - Hidden Test" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1238" time="{duration}"/> - <testcase classname="<exe-name>.(Fixture_1245<int, int>)" name="#1245" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1403" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1455 - INFO and WARN can start with a linebreak" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1514: stderr/stdout is not captured in tests aborted by an exception" time="{duration}"> + <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1027" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1027: Bitfields can be captured" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1147" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1175 - Hidden Test" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1238" time="{duration}" status="run"/> + <testcase classname="<exe-name>.(Fixture_1245<int, int>)" name="#1245" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1403" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1455 - INFO and WARN can start with a linebreak" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1514: stderr/stdout is not captured in tests aborted by an exception" time="{duration}" status="run"> <failure type="FAIL"> FAILED: 1514 @@ -29,9 +29,25 @@ This would not be caught previously Nor would this </system-err> </testcase> - <testcase classname="<exe-name>.global" name="#1548" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#1905 -- test spec parser properly clears internal state between compound tests" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}"> + <testcase classname="<exe-name>.global" name="#1548" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1905 -- test spec parser properly clears internal state between compound tests" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1912 -- test spec parser handles escaping/Various parentheses" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1912 -- test spec parser handles escaping/backslash in test name" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1913 - GENERATE inside a for loop should not keep recreating the generator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1913 - GENERATEs can share a line" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - GENERATE after a section/A" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - GENERATE after a section/B" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - Section followed by flat generate" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - Section followed by flat generate/A" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - flat generate" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - mixed sections and generates" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - mixed sections and generates/A" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - mixed sections and generates/B" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1938 - nested generate" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: expected exception @@ -39,7 +55,7 @@ answer := 42 Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}"> + <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}" status="run"> <error message="thisThrows()" type="REQUIRE_NOTHROW"> FAILED: REQUIRE_NOTHROW( thisThrows() ) @@ -48,10 +64,10 @@ answer := 42 Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#809" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#833" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#835 -- errno should not be touched by Catch" time="{duration}"> + <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#809" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#833" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#835 -- errno should not be touched by Catch" time="{duration}" status="run"> <failure message="f() == 0" type="CHECK"> FAILED: CHECK( f() == 0 ) @@ -60,13 +76,13 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="#872" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 0" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 3" time="{duration}"/> - <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 4" time="{duration}"/> - <testcase classname="<exe-name>.global" name="'Not' checks that should fail" time="{duration}"> + <testcase classname="<exe-name>.global" name="#872" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 3" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 4" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="'Not' checks that should fail" time="{duration}" status="run"> <failure message="false != false" type="CHECK"> FAILED: CHECK( false != false ) @@ -118,14 +134,14 @@ FAILED: Condition.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="'Not' checks that should succeed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/compare to true" time="{duration}"/> - <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/compare to false" time="{duration}"/> - <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/negation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/double negation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/direct" time="{duration}"/> - <testcase classname="<exe-name>.global" name="3x3x3 ints" time="{duration}"/> - <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that fails" time="{duration}"> + <testcase classname="<exe-name>.global" name="'Not' checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/compare to true" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/compare to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/negation" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/double negation" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="(unimplemented) static bools can be evaluated/direct" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="3x3x3 ints" time="{duration}" status="run"/> + <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that fails" time="{duration}" status="run"> <failure message="s == "world"" type="REQUIRE"> FAILED: REQUIRE( s == "world" ) @@ -134,8 +150,8 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that succeeds" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>" time="{duration}"> + <testcase classname="<exe-name>.TestClass" name="A METHOD_AS_TEST_CASE based test run that succeeds" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>::m_a.size() == 1" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) @@ -144,7 +160,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>::m_a.size() == 1" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) @@ -153,7 +169,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>::m_a.size() == 1" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) @@ -162,7 +178,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>::m_a.size() == 1" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) @@ -171,11 +187,11 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<int>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<float>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>{}.m_a.size() < 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) @@ -184,7 +200,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>{}.m_a.size() < 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) @@ -193,7 +209,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>{}.m_a.size() < 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) @@ -202,7 +218,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" time="{duration}" status="run"> <failure message="Template_Fixture_2<TestType>{}.m_a.size() < 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) @@ -211,11 +227,11 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<int,2>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<float,6>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<int,2>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<float,6>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" time="{duration}" status="run"> <failure message="Template_Fixture<TestType>::m_a == 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) @@ -224,7 +240,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" time="{duration}" status="run"> <failure message="Template_Fixture<TestType>::m_a == 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) @@ -233,7 +249,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" time="{duration}" status="run"> <failure message="Template_Fixture<TestType>::m_a == 2" type="REQUIRE"> FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) @@ -242,10 +258,10 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int" time="{duration}"/> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" time="{duration}"> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" time="{duration}" status="run"> <failure message="Nttp_Fixture<V>::value == 0" type="REQUIRE"> FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) @@ -254,7 +270,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" time="{duration}"> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" time="{duration}" status="run"> <failure message="Nttp_Fixture<V>::value == 0" type="REQUIRE"> FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) @@ -263,7 +279,7 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" time="{duration}"> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" time="{duration}" status="run"> <failure message="Nttp_Fixture<V>::value == 0" type="REQUIRE"> FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) @@ -272,10 +288,10 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" time="{duration}"/> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" time="{duration}"/> - <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" time="{duration}"/> - <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that fails" time="{duration}"> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that fails" time="{duration}" status="run"> <failure message="m_a == 2" type="REQUIRE"> FAILED: REQUIRE( m_a == 2 ) @@ -284,25 +300,25 @@ with expansion: Class.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that succeeds" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case - Foo<float>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case - Foo<int>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case - std::vector<float>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case - std::vector<int>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar<float, 42>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar<int, 9>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array<float, 42>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array<int, 9>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A comparison that uses literals instead of the normal constructor" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A couple of nested sections followed by a failure" time="{duration}"> + <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that succeeds" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case - Foo<float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case - Foo<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case - std::vector<float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case - std::vector<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar<float, 42>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar<int, 9>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array<float, 42>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array<int, 9>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A comparison that uses literals instead of the normal constructor" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A couple of nested sections followed by a failure" time="{duration}" status="run"> <failure type="FAIL"> FAILED: to infinity and beyond Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="A couple of nested sections followed by a failure/Outer/Inner" time="{duration}"/> - <testcase classname="<exe-name>.global" name="A failing expression with a non streamable type is still captured" time="{duration}"> + <testcase classname="<exe-name>.global" name="A couple of nested sections followed by a failure/Outer/Inner" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="A failing expression with a non streamable type is still captured" time="{duration}" status="run"> <failure message="&o1 == &o2" type="CHECK"> FAILED: CHECK( &o1 == &o2 ) @@ -318,9 +334,9 @@ with expansion: Tricky.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Absolute margin" time="{duration}"/> - <testcase classname="<exe-name>.global" name="An expression with side-effects should only be evaluated once" time="{duration}"/> - <testcase classname="<exe-name>.global" name="An unchecked exception reports the line of the last assertion" time="{duration}"> + <testcase classname="<exe-name>.global" name="Absolute margin" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="An expression with side-effects should only be evaluated once" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="An unchecked exception reports the line of the last assertion" time="{duration}" status="run"> <error message="{Unknown expression after the reported line}"> FAILED: {Unknown expression after the reported line} @@ -328,37 +344,40 @@ unexpected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Anonymous test case 1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approx setters validate their arguments" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approx with exactly-representable margin" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approximate PI" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approximate comparisons with different epsilons" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approximate comparisons with floats" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approximate comparisons with ints" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Approximate comparisons with mixed numeric types" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Arbitrary predicate matcher/Function pointer" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Arbitrary predicate matcher/Lambdas + different type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Assertions then sections" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Assertions then sections/A section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another other section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions" time="{duration}"/> - <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions involving commas" time="{duration}"/> - <testcase classname="<exe-name>.global" name="CAPTURE parses string and character constants" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Capture and info messages/Capture should stringify like assertions" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Capture and info messages/Info should NOT stringify the way assertions do" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Character pretty printing/Specifically escaped" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Character pretty printing/General chars" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Character pretty printing/Low ASCII" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Commas in various macros are allowed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparing function pointers" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparison ops" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparison with explicitly convertible types" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparisons between ints where one side is computed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Comparisons with int literals don't warn when mixing signed/ unsigned" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Composed matchers are distinct" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Contains string matcher" time="{duration}"> + <testcase classname="<exe-name>.global" name="Anonymous test case 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approx setters validate their arguments" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approx with exactly-representable margin" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approximate PI" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approximate comparisons with different epsilons" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approximate comparisons with floats" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approximate comparisons with ints" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Approximate comparisons with mixed numeric types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Arbitrary predicate matcher/Function pointer" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Arbitrary predicate matcher/Lambdas + different type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Assertion macros support bit operators and bool conversions" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Assertions then sections" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Assertions then sections/A section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another other section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions involving commas" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="CAPTURE parses string and character constants" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Capture and info messages/Capture should stringify like assertions" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Capture and info messages/Info should NOT stringify the way assertions do" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Character pretty printing/Specifically escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Character pretty printing/General chars" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Character pretty printing/Low ASCII" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Commas in various macros are allowed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparing function pointers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparison ops" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparison with explicitly convertible types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparisons between ints where one side is computed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Comparisons with int literals don't warn when mixing signed/ unsigned" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Composed matchers are distinct" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Composed matchers shortcircuit/&&" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Composed matchers shortcircuit/||" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Contains string matcher" time="{duration}" status="run"> <failure message="testStringForMatching(), Contains("not there", Catch::CaseSensitive::No)" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) ) @@ -375,10 +394,10 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Copy and then generate a range/from var and iterators" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Copy and then generate a range/From a temporary container" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Copy and then generate a range/Final validation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Custom exceptions can be translated when testing for nothrow" time="{duration}"> + <testcase classname="<exe-name>.global" name="Copy and then generate a range/from var and iterators" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Copy and then generate a range/From a temporary container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Copy and then generate a range/Final validation" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Custom exceptions can be translated when testing for nothrow" time="{duration}" status="run"> <error message="throwCustom()" type="REQUIRE_NOTHROW"> FAILED: REQUIRE_NOTHROW( throwCustom() ) @@ -386,7 +405,7 @@ custom exception - not std Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Custom exceptions can be translated when testing for throwing as something else" time="{duration}"> + <testcase classname="<exe-name>.global" name="Custom exceptions can be translated when testing for throwing as something else" time="{duration}" status="run"> <error message="throwCustom(), std::exception" type="REQUIRE_THROWS_AS"> FAILED: REQUIRE_THROWS_AS( throwCustom(), std::exception ) @@ -394,16 +413,16 @@ custom exception - not std Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Custom std-exceptions can be custom translated" time="{duration}"> + <testcase classname="<exe-name>.global" name="Custom std-exceptions can be custom translated" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: custom std exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Default scale is invisible to comparison" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Directly creating an EnumInfo" time="{duration}"/> - <testcase classname="<exe-name>.global" name="EndsWith string matcher" time="{duration}"> + <testcase classname="<exe-name>.global" name="Default scale is invisible to comparison" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Directly creating an EnumInfo" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="EndsWith string matcher" time="{duration}" status="run"> <failure message="testStringForMatching(), EndsWith("Substring")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), EndsWith("Substring") ) @@ -420,10 +439,10 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Enums can quickly have stringification enabled using REGISTER_ENUM" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Epsilon only applies to Approx's value" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Equality checks that should fail" time="{duration}"> + <testcase classname="<exe-name>.global" name="Enums can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Epsilon only applies to Approx's value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Equality checks that should fail" time="{duration}" status="run"> <failure message="data.int_seven == 6" type="CHECK"> FAILED: CHECK( data.int_seven == 6 ) @@ -516,9 +535,9 @@ with expansion: Condition.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Equality checks that should succeed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Equals" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Equals string matcher" time="{duration}"> + <testcase classname="<exe-name>.global" name="Equality checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Equals" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Equals string matcher" time="{duration}" status="run"> <failure message="testStringForMatching(), Equals("this string contains 'ABC' as a substring")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), Equals("this string contains 'ABC' as a substring") ) @@ -536,8 +555,8 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Exception matchers that fail/No exception" time="{duration}"> + <testcase classname="<exe-name>.global" name="Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception matchers that fail/No exception" time="{duration}" status="run"> <failure message="doesNotThrow(), SpecialException, ExceptionMatcher{1}" type="CHECK_THROWS_MATCHES"> FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{1} ) @@ -549,7 +568,7 @@ FAILED: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Exception matchers that fail/Type mismatch" time="{duration}"> + <testcase classname="<exe-name>.global" name="Exception matchers that fail/Type mismatch" time="{duration}" status="run"> <error message="throwsAsInt(1), SpecialException, ExceptionMatcher{1}" type="CHECK_THROWS_MATCHES"> FAILED: CHECK_THROWS_MATCHES( throwsAsInt(1), SpecialException, ExceptionMatcher{1} ) @@ -563,7 +582,7 @@ Unknown exception Matchers.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Exception matchers that fail/Contents are wrong" time="{duration}"> + <testcase classname="<exe-name>.global" name="Exception matchers that fail/Contents are wrong" time="{duration}" status="run"> <failure message="throwsSpecialException(3), SpecialException, ExceptionMatcher{1}" type="CHECK_THROWS_MATCHES"> FAILED: CHECK_THROWS_MATCHES( throwsSpecialException(3), SpecialException, ExceptionMatcher{1} ) @@ -579,12 +598,12 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Exception matchers that succeed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Exception messages can be tested for/exact match" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Exception messages can be tested for/different case" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Exception messages can be tested for/wildcarded" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Exceptions matchers" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Expected exceptions that don't throw or unexpected exceptions fail the test" time="{duration}"> + <testcase classname="<exe-name>.global" name="Exception matchers that succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception messages can be tested for/exact match" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception messages can be tested for/different case" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception messages can be tested for/wildcarded" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exceptions matchers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Expected exceptions that don't throw or unexpected exceptions fail the test" time="{duration}" status="run"> <error message="thisThrows(), std::string" type="CHECK_THROWS_AS"> FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) @@ -603,77 +622,77 @@ expected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="FAIL aborts the test" time="{duration}"> + <testcase classname="<exe-name>.global" name="FAIL aborts the test" time="{duration}" status="run"> <failure type="FAIL"> FAILED: This is a failure Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="FAIL does not require an argument" time="{duration}"> + <testcase classname="<exe-name>.global" name="FAIL does not require an argument" time="{duration}" status="run"> <failure type="FAIL"> FAILED: Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="FAIL_CHECK does not abort the test" time="{duration}"> + <testcase classname="<exe-name>.global" name="FAIL_CHECK does not abort the test" time="{duration}" status="run"> <failure type="FAIL_CHECK"> FAILED: This is a failure Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Factorials are computed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative/Some subnormal values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/Margin" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/ULPs" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/Composed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: double/Constructor validation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative/Some subnormal values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/Margin" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/ULPs" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/Composed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Throws if there are no matching values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Shortening a range" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Same type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Different type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Different deduced type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Repeating a generator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is divisible by chunk size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is not divisible by chunk size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Chunk size of zero" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Throws on too small generators" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- simple/one" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators -- simple/two" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Single value" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Preset values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Generator combinator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Explicitly typed generator sequence" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Filter generator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Take generator/Take less" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Take generator/Take more" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Map with explicit return type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Map with deduced return type" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Repeat/Singular repeat" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Repeat/Actual repeat" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive auto step/Integer" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative auto step/Integer" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Exact" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Slightly over end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Slightly under end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Exact" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Slightly over end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Slightly under end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Exact" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Slightly over end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Slightly under end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Greater-than inequalities with different epsilons" time="{duration}"/> - <testcase classname="<exe-name>.global" name="INFO and WARN do not abort tests" time="{duration}"/> - <testcase classname="<exe-name>.global" name="INFO gets logged on failure" time="{duration}"> + <testcase classname="<exe-name>.global" name="Factorials are computed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative/Some subnormal values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/Margin" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/ULPs" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/Composed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: double/Constructor validation" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative/Some subnormal values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/Margin" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/ULPs" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/Composed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Floating point matchers: float/Constructor validation" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Basic usage" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Filtering by predicate/Throws if there are no matching values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Shortening a range" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Same type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Different type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Transforming elements/Different deduced type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Repeating a generator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is divisible by chunk size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is not divisible by chunk size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Chunk size of zero" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Throws on too small generators" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- simple/one" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators -- simple/two" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Single value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Preset values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Generator combinator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Explicitly typed generator sequence" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Filter generator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Take generator/Take less" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Take generator/Take more" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Map with explicit return type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Map with deduced return type" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Repeat/Singular repeat" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Repeat/Actual repeat" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive auto step/Integer" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative auto step/Integer" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Exact" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Slightly over end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Integer/Slightly under end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Exact" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Slightly over end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Positive manual step/Floating Point/Slightly under end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Exact" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Slightly over end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Generators internals/Range/Negative manual step/Integer/Slightly under end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Greater-than inequalities with different epsilons" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="INFO and WARN do not abort tests" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="INFO gets logged on failure" time="{duration}" status="run"> <failure message="a == 1" type="REQUIRE"> FAILED: REQUIRE( a == 1 ) @@ -684,7 +703,7 @@ so should this Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="INFO gets logged on failure, even if captured before successful assertions" time="{duration}"> + <testcase classname="<exe-name>.global" name="INFO gets logged on failure, even if captured before successful assertions" time="{duration}" status="run"> <failure message="a == 1" type="CHECK"> FAILED: CHECK( a == 1 ) @@ -705,7 +724,7 @@ and this, but later Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="INFO is reset for each loop" time="{duration}"> + <testcase classname="<exe-name>.global" name="INFO is reset for each loop" time="{duration}" status="run"> <failure message="i < 10" type="REQUIRE"> FAILED: REQUIRE( i < 10 ) @@ -716,7 +735,7 @@ i := 10 Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}"> + <testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}" status="run"> <failure message="data.int_seven != 7" type="CHECK"> FAILED: CHECK( data.int_seven != 7 ) @@ -753,14 +772,14 @@ with expansion: Condition.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Inequality checks that should succeed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Lambdas in assertions" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Less-than inequalities with different epsilons" time="{duration}"/> - <testcase classname="<exe-name>.global" name="ManuallyRegistered" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Matchers can be (AllOf) composed with the && operator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Matchers can be (AnyOf) composed with the || operator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Matchers can be composed with both && and ||" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Matchers can be composed with both && and || - failing" time="{duration}"> + <testcase classname="<exe-name>.global" name="Inequality checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Lambdas in assertions" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Less-than inequalities with different epsilons" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="ManuallyRegistered" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Matchers can be (AllOf) composed with the && operator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Matchers can be (AnyOf) composed with the || operator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Matchers can be composed with both && and ||" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Matchers can be composed with both && and || - failing" time="{duration}" status="run"> <failure message="testStringForMatching(), (Contains("string") || Contains("different")) && Contains("random")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), (Contains("string") || Contains("different")) && Contains("random") ) @@ -770,8 +789,8 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator - failing" time="{duration}"> + <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator - failing" time="{duration}" status="run"> <failure message="testStringForMatching(), !Contains("substring")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), !Contains("substring") ) @@ -780,7 +799,7 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}"> + <testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}" status="run"> <failure message="thisThrows(), "should fail"" type="REQUIRE_THROWS_WITH"> FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) @@ -789,18 +808,18 @@ with expansion: Exception.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Nested generators and captured variables" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Nice descriptive name" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Non-std exceptions can be translated" time="{duration}"> + <testcase classname="<exe-name>.global" name="Nested generators and captured variables" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Nice descriptive name" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Non-std exceptions can be translated" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: custom exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Objects that evaluated in boolean contexts can be checked" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Optionally static assertions" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Ordering comparison checks that should fail" time="{duration}"> + <testcase classname="<exe-name>.global" name="Objects that evaluated in boolean contexts can be checked" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Optionally static assertions" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Ordering comparison checks that should fail" time="{duration}" status="run"> <failure message="data.int_seven > 7" type="CHECK"> FAILED: CHECK( data.int_seven > 7 ) @@ -935,98 +954,98 @@ with expansion: Condition.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Ordering comparison checks that should succeed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Default seeded" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Specific seed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Output from all sections is reported/one" time="{duration}"> + <testcase classname="<exe-name>.global" name="Ordering comparison checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Default seeded" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Specific seed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Output from all sections is reported/one" time="{duration}" status="run"> <failure type="FAIL"> FAILED: Message from section one Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Output from all sections is reported/two" time="{duration}"> + <testcase classname="<exe-name>.global" name="Output from all sections is reported/two" time="{duration}" status="run"> <failure type="FAIL"> FAILED: Message from section two Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Empty test spec should have no filters" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from empty string should have no filters" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from just a comma should have no filters" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from name should have one filter" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from quoted name should have one filter" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from name should have one filter" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at the start" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at the end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at both ends" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at the start" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at the end" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at both ends" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at both ends, redundant at start" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Just wildcard" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag, two matches" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Two tags" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Two tags, spare separated" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcarded name and tag" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag exclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion and one tag inclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion and one wldcarded name inclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion, using exclude:, and one wldcarded name inclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/name exclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion with tag inclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion, using exclude:, with tag inclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/two wildcarded names" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/empty tag" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/empty quoted name" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/quoted string followed by tag exclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test spec" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test name" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags are split apart when parsing" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags also properly handle exclusion" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Pointers can be compared to null" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Floats" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Double" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Predicate matcher can accept const char*" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/empty args don't cause a crash" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/default - no arguments" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case using" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case exclusion using exclude:" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case exclusion using ~" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/-r/console" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/-r/xml" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/--reporter/junit" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/Only one reporter is accepted" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/must match one of the available ones" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/debugger/-b" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/debugger/--break" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-a aborts after first failure" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x 2 aborts after two failures" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x must be numeric" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/wait-for-keypress/Accepted options" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/wait-for-keypress/invalid options are reported" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/-e" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/--nothrow" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/output filename/-o filename" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/output filename/--out" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/combinations/Single character flags can be combined" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/without option" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/auto" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/yes" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/no" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/error" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/samples" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/resamples" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/confidence-interval" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/no-analysis" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/warmup-time" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int, double, float>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int, double>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}"> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Empty test spec should have no filters" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from empty string should have no filters" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from just a comma should have no filters" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from name should have one filter" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from quoted name should have one filter" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Test spec from name should have one filter" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at the start" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at the end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at both ends" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at the start" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at the end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Redundant wildcard at both ends" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcard at both ends, redundant at start" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Just wildcard" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag, two matches" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Two tags" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Two tags, spare separated" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Wildcarded name and tag" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Single tag exclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion and one tag inclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion and one wldcarded name inclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/One tag exclusion, using exclude:, and one wldcarded name inclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/name exclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion with tag inclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/wildcarded name exclusion, using exclude:, with tag inclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/two wildcarded names" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/empty tag" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/empty quoted name" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/quoted string followed by tag exclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test spec" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test name" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags are split apart when parsing" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Parse test names and tags/Shortened hide tags also properly handle exclusion" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Pointers can be compared to null" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Floats" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Double" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Predicate matcher can accept const char*" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/empty args don't cause a crash" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/default - no arguments" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case using" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case exclusion using exclude:" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/test lists/Specify one test case exclusion using ~" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/-r/console" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/-r/xml" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/--reporter/junit" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/Only one reporter is accepted" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/reporter/must match one of the available ones" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/debugger/-b" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/debugger/--break" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-a aborts after first failure" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x 2 aborts after two failures" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/-x must be numeric" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/wait-for-keypress/Accepted options" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/abort/wait-for-keypress/invalid options are reported" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/-e" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/nothrow/--nothrow" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/output filename/-o filename" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/output filename/--out" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/combinations/Single character flags can be combined" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/without option" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/auto" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/yes" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/no" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/error" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/samples" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/resamples" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/confidence-interval" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/no-analysis" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/warmup-time" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int, double, float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int, double>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reconstruction should be based on stringification: #914" time="{duration}" status="run"> <failure message="truthy(false)" type="CHECK"> FAILED: CHECK( truthy(false) ) @@ -1035,7 +1054,7 @@ with expansion: Decomposition.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Regex string matcher" time="{duration}"> + <testcase classname="<exe-name>.global" name="Regex string matcher" time="{duration}" status="run"> <failure message="testStringForMatching(), Matches("this STRING contains 'abc' as a substring")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), Matches("this STRING contains 'abc' as a substring") ) @@ -1061,19 +1080,19 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Regression test #1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="SUCCEED counts as a test pass" time="{duration}"/> - <testcase classname="<exe-name>.global" name="SUCCEED does not require an argument" time="{duration}"/> - <testcase classname="<exe-name>.Fixture" name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods/Given: No operations precede me" time="{duration}"/> - <testcase classname="<exe-name>.Fixture" name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods/Given: No operations precede me/When: We get the count/Then: Subsequently values are higher" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Do that thing with the thing/Given: This stuff exists/And given: And some assumption/When: I do this/Then: it should do this" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Do that thing with the thing/Given: This stuff exists/And given: And some assumption/When: I do this/Then: it should do this/And: do that" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: This is a really long scenario name to see how the list command deals with wrapping/Given: A section name that is so long that it cannot fit in a single console width/When: The test headers are printed as part of the normal running of the scenario/Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: it is made larger/Then: the size and capacity go up" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: it is made larger/Then: the size and capacity go up/And when: it is made smaller again/Then: the size goes down but the capacity stays the same" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: we reserve more space/Then: The capacity is increased but the size remains the same" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Sends stuff to stdout and stderr" time="{duration}"> + <testcase classname="<exe-name>.global" name="Regression test #1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="SUCCEED counts as a test pass" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="SUCCEED does not require an argument" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Fixture" name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods/Given: No operations precede me" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Fixture" name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods/Given: No operations precede me/When: We get the count/Then: Subsequently values are higher" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Do that thing with the thing/Given: This stuff exists/And given: And some assumption/When: I do this/Then: it should do this" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Do that thing with the thing/Given: This stuff exists/And given: And some assumption/When: I do this/Then: it should do this/And: do that" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: This is a really long scenario name to see how the list command deals with wrapping/Given: A section name that is so long that it cannot fit in a single console width/When: The test headers are printed as part of the normal running of the scenario/Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: it is made larger/Then: the size and capacity go up" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: it is made larger/Then: the size and capacity go up/And when: it is made smaller again/Then: the size goes down but the capacity stays the same" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Scenario: Vector resizing affects size and capacity/Given: an empty vector/When: we reserve more space/Then: The capacity is increased but the size remains the same" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Sends stuff to stdout and stderr" time="{duration}" status="run"> <system-out> A string sent directly to stdout </system-out> @@ -1082,14 +1101,14 @@ A string sent directly to stderr A string sent to stderr via clog </system-err> </testcase> - <testcase classname="<exe-name>.global" name="Some simple comparisons between doubles" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Standard output from all sections is reported/two" time="{duration}"> + <testcase classname="<exe-name>.global" name="Some simple comparisons between doubles" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Standard output from all sections is reported/two" time="{duration}" status="run"> <system-out> Message from section one Message from section two </system-out> </testcase> - <testcase classname="<exe-name>.global" name="StartsWith string matcher" time="{duration}"> + <testcase classname="<exe-name>.global" name="StartsWith string matcher" time="{duration}" status="run"> <failure message="testStringForMatching(), StartsWith("This String")" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), StartsWith("This String") ) @@ -1106,31 +1125,31 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Single item" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Multiple" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Non-trivial inner items" time="{duration}"/> - <testcase classname="<exe-name>.global" name="String matchers" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Empty string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/From string literal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should also match" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/Past the end substring" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Substrings/Substring off the end are trimmed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/Comparisons are deep" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/to std::string/explicitly constructed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/to std::string/assigned" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef at compilation time/Simple constructors" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef at compilation time/UDL construction" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration helpers" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration with weird ratios" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Stringifying std::chrono::time_point<system_clock>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tabs and newlines show in output" time="{duration}"> + <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Single item" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Multiple" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Non-trivial inner items" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="String matchers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Empty string" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/From string literal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should also match" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/Past the end substring" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Substrings/Substring off the end are trimmed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/Comparisons are deep" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/to std::string/explicitly constructed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef/to std::string/assigned" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef at compilation time/Simple constructors" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="StringRef at compilation time/UDL construction" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration helpers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration with weird ratios" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Stringifying std::chrono::time_point<system_clock>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tabs and newlines show in output" time="{duration}" status="run"> <failure message="s1 == s2" type="CHECK"> FAILED: CHECK( s1 == s2 ) @@ -1146,103 +1165,103 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/The same tag alias can only be registered once" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/Tag aliases must be of the form [@name]" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 0" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 1" time="{duration}"/> - <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 0" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 1" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Test case with one argument" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Test enum bit values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Test with special, characters "in name" time="{duration}"/> - <testcase classname="<exe-name>.global" name="The NO_FAIL macro reports a failure but does not fail the test" time="{duration}"/> - <testcase classname="<exe-name>.global" name="This test 'should' fail but doesn't" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Thrown string literals are translated" time="{duration}"> + <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/The same tag alias can only be registered once" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/Tag aliases must be of the form [@name]" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 0" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 1" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - int/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::string/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Test case with one argument" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Test enum bit values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Test with special, characters "in name" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="The NO_FAIL macro reports a failure but does not fail the test" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="This test 'should' fail but doesn't" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Thrown string literals are translated" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: For some reason someone is throwing a string literal! Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Tracker" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/successfully close one section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/fail one section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/fail one section/re-enter after failed section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/fail one section/re-enter after failed section and find next section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/Successfully close S2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/fail S2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Tracker/open a nested section" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Trim strings" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Unexpected exceptions can be translated" time="{duration}"> + <testcase classname="<exe-name>.global" name="Tracker" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/successfully close one section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/fail one section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/fail one section/re-enter after failed section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/fail one section/re-enter after failed section and find next section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/Successfully close S2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/fail S2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Tracker/open a nested section" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Trim strings" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Unexpected exceptions can be translated" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: 3.14 Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Use a custom approx" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Variadic macros/Section with one argument" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector Approx matcher/Empty vector is roughly equal to an empty vector" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/A vector is approx equal to itself" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Different length" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Same length, different elements" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Empty and non empty vectors are not approx equal" time="{duration}"> + <testcase classname="<exe-name>.global" name="Use a custom approx" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Variadic macros/Section with one argument" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector Approx matcher/Empty vector is roughly equal to an empty vector" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/A vector is approx equal to itself" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Different length" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Same length, different elements" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Empty and non empty vectors are not approx equal" time="{duration}" status="run"> <failure message="empty, Approx(t1)" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, Approx(t1) ) @@ -1251,7 +1270,7 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Just different vectors" time="{duration}"> + <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Just different vectors" time="{duration}" status="run"> <failure message="v1, Approx(v2)" type="CHECK_THAT"> FAILED: CHECK_THAT( v1, Approx(v2) ) @@ -1260,12 +1279,12 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector matchers/Contains (vector)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element), composed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector matchers/Equals" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector matchers/UnorderedEquals" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (element)" time="{duration}"> + <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector matchers/Contains (vector)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element), composed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector matchers/Equals" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector matchers/UnorderedEquals" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (element)" time="{duration}" status="run"> <failure message="v, VectorContains(-1)" type="CHECK_THAT"> FAILED: CHECK_THAT( v, VectorContains(-1) ) @@ -1281,7 +1300,7 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (vector)" time="{duration}"> + <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (vector)" time="{duration}" status="run"> <failure message="empty, Contains(v)" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, Contains(v) ) @@ -1297,7 +1316,7 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Vector matchers that fail/Equals" time="{duration}"> + <testcase classname="<exe-name>.global" name="Vector matchers that fail/Equals" time="{duration}" status="run"> <failure message="v, Equals(v2)" type="CHECK_THAT"> FAILED: CHECK_THAT( v, Equals(v2) ) @@ -1327,7 +1346,7 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="Vector matchers that fail/UnorderedEquals" time="{duration}"> + <testcase classname="<exe-name>.global" name="Vector matchers that fail/UnorderedEquals" time="{duration}" status="run"> <failure message="v, UnorderedEquals(empty)" type="CHECK_THAT"> FAILED: CHECK_THAT( v, UnorderedEquals(empty) ) @@ -1357,15 +1376,15 @@ with expansion: Matchers.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="When checked exceptions are thrown they can be expected or unexpected" time="{duration}"/> - <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown directly they are always failures" time="{duration}"> + <testcase classname="<exe-name>.global" name="When checked exceptions are thrown they can be expected or unexpected" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown directly they are always failures" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: unexpected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown during a CHECK the test should continue" time="{duration}"> + <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown during a CHECK the test should continue" time="{duration}" status="run"> <error message="thisThrows() == 0" type="CHECK"> FAILED: CHECK( thisThrows() == 0 ) @@ -1373,7 +1392,7 @@ expected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" time="{duration}"> + <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" time="{duration}" status="run"> <error message="thisThrows() == 0" type="REQUIRE"> FAILED: REQUIRE( thisThrows() == 0 ) @@ -1381,7 +1400,7 @@ expected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown from functions they are always failures" time="{duration}"> + <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown from functions they are always failures" time="{duration}" status="run"> <error message="thisThrows() == 0" type="CHECK"> FAILED: CHECK( thisThrows() == 0 ) @@ -1389,33 +1408,33 @@ expected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown from sections they are always failures/section name" time="{duration}"> + <testcase classname="<exe-name>.global" name="When unchecked exceptions are thrown from sections they are always failures/section name" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: unexpected exception Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="Where the LHS is not a simple value" time="{duration}"/> - <testcase classname="<exe-name>.global" name="Where there is more to the expression after the RHS" time="{duration}"/> - <testcase classname="<exe-name>.global" name="X/level/0/a" time="{duration}"/> - <testcase classname="<exe-name>.global" name="X/level/0/b" time="{duration}"/> - <testcase classname="<exe-name>.global" name="X/level/1/a" time="{duration}"/> - <testcase classname="<exe-name>.global" name="X/level/1/b" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/normal string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/empty string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with ampersand" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with less-than" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with greater-than" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with quotes" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with control char (1)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="XmlEncode/string with control char (x7F)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="adding a hide tag implicitly enables all others" time="{duration}"/> - <testcase classname="<exe-name>.global" name="array<int, N> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="atomic if" time="{duration}"/> - <testcase classname="<exe-name>.global" name="boolean member" time="{duration}"/> - <testcase classname="<exe-name>.global" name="checkedElse" time="{duration}"/> - <testcase classname="<exe-name>.global" name="checkedElse, failing" time="{duration}"> + <testcase classname="<exe-name>.global" name="Where the LHS is not a simple value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Where there is more to the expression after the RHS" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="X/level/0/a" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="X/level/0/b" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="X/level/1/a" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="X/level/1/b" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/normal string" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/empty string" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with ampersand" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with less-than" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with greater-than" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with quotes" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with control char (1)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="XmlEncode/string with control char (x7F)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="adding a hide tag implicitly enables all others" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="array<int, N> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="atomic if" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="boolean member" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="checkedElse" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="checkedElse, failing" time="{duration}" status="run"> <failure message="flag" type="CHECKED_ELSE"> FAILED: CHECKED_ELSE( flag ) @@ -1431,8 +1450,8 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="checkedIf" time="{duration}"/> - <testcase classname="<exe-name>.global" name="checkedIf, failing" time="{duration}"> + <testcase classname="<exe-name>.global" name="checkedIf" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="checkedIf, failing" time="{duration}" status="run"> <failure message="flag" type="CHECKED_IF"> FAILED: CHECKED_IF( flag ) @@ -1448,27 +1467,27 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="comparisons between const int variables" time="{duration}"/> - <testcase classname="<exe-name>.global" name="comparisons between int variables" time="{duration}"/> - <testcase classname="<exe-name>.global" name="even more nested SECTION tests/c/d (leaf)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="even more nested SECTION tests/c/e (leaf)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="even more nested SECTION tests/f (leaf)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="just failure" time="{duration}"> + <testcase classname="<exe-name>.global" name="comparisons between const int variables" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="comparisons between int variables" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="even more nested SECTION tests/c/d (leaf)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="even more nested SECTION tests/c/e (leaf)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="even more nested SECTION tests/f (leaf)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="just failure" time="{duration}" status="run"> <failure type="FAIL"> FAILED: Previous info should not be seen Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="just failure after unscoped info" time="{duration}"> + <testcase classname="<exe-name>.global" name="just failure after unscoped info" time="{duration}" status="run"> <failure type="FAIL"> FAILED: previous unscoped info SHOULD not be seen Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="long long" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 0" time="{duration}"> + <testcase classname="<exe-name>.global" name="long long" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 0" time="{duration}" status="run"> <failure message="b > a" type="CHECK"> FAILED: CHECK( b > a ) @@ -1477,7 +1496,7 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 1" time="{duration}"> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 1" time="{duration}" status="run"> <failure message="b > a" type="CHECK"> FAILED: CHECK( b > a ) @@ -1486,15 +1505,15 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 2" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 3" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 4" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 5" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 6" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 7" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 8" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 9" time="{duration}"/> - <testcase classname="<exe-name>.global" name="looped tests" time="{duration}"> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 2" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 3" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 4" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 5" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 6" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 7" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 8" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 9" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="looped tests" time="{duration}" status="run"> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: CHECK( ( fib[i] % 2 ) == 0 ) @@ -1544,8 +1563,8 @@ Testing if fib[7] (21) is even Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="mix info, unscoped info and warning" time="{duration}"/> - <testcase classname="<exe-name>.global" name="more nested SECTION tests/equal/doesn't equal" time="{duration}"> + <testcase classname="<exe-name>.global" name="mix info, unscoped info and warning" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="more nested SECTION tests/equal/doesn't equal" time="{duration}" status="run"> <failure message="a == b" type="REQUIRE"> FAILED: REQUIRE( a == b ) @@ -1554,14 +1573,14 @@ with expansion: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="more nested SECTION tests/doesn't equal/not equal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="more nested SECTION tests/doesn't equal/less than" time="{duration}"/> - <testcase classname="<exe-name>.global" name="nested SECTION tests/doesn't equal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="nested SECTION tests/doesn't equal/not equal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="non streamable - with conv. op" time="{duration}"/> - <testcase classname="<exe-name>.global" name="non-copyable objects" time="{duration}"/> - <testcase classname="<exe-name>.global" name="not allowed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="not prints unscoped info from previous failures" time="{duration}"> + <testcase classname="<exe-name>.global" name="more nested SECTION tests/doesn't equal/not equal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="more nested SECTION tests/doesn't equal/less than" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="nested SECTION tests/doesn't equal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="nested SECTION tests/doesn't equal/not equal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="non streamable - with conv. op" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="non-copyable objects" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="not allowed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="not prints unscoped info from previous failures" time="{duration}" status="run"> <failure message="false" type="REQUIRE"> FAILED: REQUIRE( false ) @@ -1569,15 +1588,15 @@ this SHOULD be seen Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="null strings" time="{duration}"/> - <testcase classname="<exe-name>.global" name="null_ptr" time="{duration}"/> - <testcase classname="<exe-name>.global" name="pair<pair<int,const char *,pair<std::string,int> > -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="parseEnums/No enums" time="{duration}"/> - <testcase classname="<exe-name>.global" name="parseEnums/One enum value" time="{duration}"/> - <testcase classname="<exe-name>.global" name="parseEnums/Multiple enum values" time="{duration}"/> - <testcase classname="<exe-name>.global" name="pointer to class" time="{duration}"/> - <testcase classname="<exe-name>.global" name="print unscoped info if passing unscoped info is printed" time="{duration}"/> - <testcase classname="<exe-name>.global" name="prints unscoped info on failure" time="{duration}"> + <testcase classname="<exe-name>.global" name="null strings" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="null_ptr" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="pair<pair<int,const char *,pair<std::string,int> > -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="parseEnums/No enums" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="parseEnums/One enum value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="parseEnums/Multiple enum values" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="pointer to class" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="print unscoped info if passing unscoped info is printed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="prints unscoped info on failure" time="{duration}" status="run"> <failure message="false" type="REQUIRE"> FAILED: REQUIRE( false ) @@ -1586,7 +1605,7 @@ this SHOULD also be seen Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="prints unscoped info only for the first assertion" time="{duration}"> + <testcase classname="<exe-name>.global" name="prints unscoped info only for the first assertion" time="{duration}" status="run"> <failure message="false" type="CHECK"> FAILED: CHECK( false ) @@ -1594,16 +1613,16 @@ this SHOULD be seen only ONCE Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="random SECTION tests/doesn't equal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="random SECTION tests/not equal" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace single char" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace two chars" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace first char" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace last char" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace all chars" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/replace no chars" time="{duration}"/> - <testcase classname="<exe-name>.global" name="replaceInPlace/escape '" time="{duration}"/> - <testcase classname="<exe-name>.global" name="send a single char to INFO" time="{duration}"> + <testcase classname="<exe-name>.global" name="random SECTION tests/doesn't equal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="random SECTION tests/not equal" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace single char" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace two chars" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace first char" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace last char" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace all chars" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/replace no chars" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="replaceInPlace/escape '" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="send a single char to INFO" time="{duration}" status="run"> <failure message="false" type="REQUIRE"> FAILED: REQUIRE( false ) @@ -1611,7 +1630,7 @@ FAILED: Misc.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="sends information to INFO" time="{duration}"> + <testcase classname="<exe-name>.global" name="sends information to INFO" time="{duration}" status="run"> <failure message="false" type="REQUIRE"> FAILED: REQUIRE( false ) @@ -1620,9 +1639,9 @@ i := 7 Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="shortened hide tags are split apart" time="{duration}"/> - <testcase classname="<exe-name>.global" name="splitString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stacks unscoped info in loops" time="{duration}"> + <testcase classname="<exe-name>.global" name="shortened hide tags are split apart" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="splitString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stacks unscoped info in loops" time="{duration}" status="run"> <failure message="false" type="CHECK"> FAILED: CHECK( false ) @@ -1642,16 +1661,16 @@ Count 4 to 6... Message.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="std::map is convertible string/empty" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::map is convertible string/single item" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::map is convertible string/several items" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::pair<int,const std::string> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::pair<int,std::string> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::set is convertible string/empty" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::set is convertible string/single item" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::set is convertible string/several items" time="{duration}"/> - <testcase classname="<exe-name>.global" name="std::vector<std::pair<std::string,int> > -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="string literals of different sizes can be compared" time="{duration}"> + <testcase classname="<exe-name>.global" name="std::map is convertible string/empty" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::map is convertible string/single item" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::map is convertible string/several items" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::pair<int,const std::string> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::pair<int,std::string> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::set is convertible string/empty" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::set is convertible string/single item" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::set is convertible string/several items" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="std::vector<std::pair<std::string,int> > -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="string literals of different sizes can be compared" time="{duration}" status="run"> <failure message="std::string( "first" ) == "second"" type="REQUIRE"> FAILED: REQUIRE( std::string( "first" ) == "second" ) @@ -1660,51 +1679,51 @@ with expansion: Tricky.tests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="stringify ranges" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( has_maker )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( has_maker_and_operator )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( has_neither )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( has_operator )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( has_template_operator )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker> )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker_and_operator> )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="stringify( vectors<has_operator> )" time="{duration}"/> - <testcase classname="<exe-name>.global" name="strlen3" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tables" time="{duration}"/> - <testcase classname="<exe-name>.global" name="thrown std::strings are translated" time="{duration}"> + <testcase classname="<exe-name>.global" name="stringify ranges" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( has_maker )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( has_maker_and_operator )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( has_neither )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( has_operator )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( has_template_operator )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker> )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( vectors<has_maker_and_operator> )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="stringify( vectors<has_operator> )" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="strlen3" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tables" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="thrown std::strings are translated" time="{duration}" status="run"> <error type="TEST_CASE"> FAILED: Why would you throw a std::string? Exception.tests.cpp:<line number> </error> </testcase> - <testcase classname="<exe-name>.global" name="toString on const wchar_t const pointer returns the string contents" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString on const wchar_t pointer returns the string contents" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString on wchar_t const pointer returns the string contents" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString on wchar_t returns the string contents" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString(enum class w/operator<<)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString(enum class)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString(enum w/operator<<)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="toString(enum)" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<float,int>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<int>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<0,int,const char *>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<string,string>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="tuple<tuple<int>,tuple<>,float>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vec<vec<string,alloc>> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vector<bool> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vector<int,allocator> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vector<int> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vector<string> -> toString" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing bigger changes size and capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing smaller changes size but not capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized/reserving bigger changes capacity but not size" time="{duration}"/> - <testcase classname="<exe-name>.global" name="vectors can be sized and resized/reserving smaller does not change size or capacity" time="{duration}"/> - <testcase classname="<exe-name>.global" name="xmlentitycheck/embedded xml: <test>it should be possible to embed xml characters, such as <, " or &, or even whole <xml>documents</xml> within an attribute</test>" time="{duration}"/> - <testcase classname="<exe-name>.global" name="xmlentitycheck/encoded chars: these should all be encoded: &&&"""<<<&"<<&"" time="{duration}"/> + <testcase classname="<exe-name>.global" name="toString on const wchar_t const pointer returns the string contents" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString on const wchar_t pointer returns the string contents" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString on wchar_t const pointer returns the string contents" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString on wchar_t returns the string contents" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString(enum class w/operator<<)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString(enum class)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString(enum w/operator<<)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="toString(enum)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<float,int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<int>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<0,int,const char *>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<string,string>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tuple<tuple<int>,tuple<>,float>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vec<vec<string,alloc>> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vector<bool> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vector<int,allocator> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vector<int> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vector<string> -> toString" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing bigger changes size and capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing smaller changes size but not capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized/reserving bigger changes capacity but not size" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="vectors can be sized and resized/reserving smaller does not change size or capacity" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="xmlentitycheck/embedded xml: <test>it should be possible to embed xml characters, such as <, " or &, or even whole <xml>documents</xml> within an attribute</test>" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="xmlentitycheck/encoded chars: these should all be encoded: &&&"""<<<&"<<&"" time="{duration}" status="run"/> <system-out> This would not be caught previously A string sent directly to stdout diff --git a/packages/Catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt index 72fdd780190ff3caa016fa9bc5cf172ea1566e03..35360ebcaca76e2109cfc776c198c4b39c0d922c 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -3,6 +3,8 @@ > <file path="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp"> <testCase name="#1905 -- test spec parser properly clears internal state between compound tests" duration="{duration}"/> + <testCase name="#1912 -- test spec parser handles escaping/Various parentheses" duration="{duration}"/> + <testCase name="#1912 -- test spec parser handles escaping/backslash in test name" duration="{duration}"/> <testCase name="Parse test names and tags/Empty test spec should have no filters" duration="{duration}"/> <testCase name="Parse test names and tags/Test spec from empty string should have no filters" duration="{duration}"/> <testCase name="Parse test names and tags/Test spec from just a comma should have no filters" duration="{duration}"/> @@ -97,6 +99,15 @@ <testCase name="Generators internals/Range/Negative manual step/Integer/Slightly under end" duration="{duration}"/> </file> <file path="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp"> + <testCase name="#1938 - GENERATE after a section/A" duration="{duration}"/> + <testCase name="#1938 - GENERATE after a section/B" duration="{duration}"/> + <testCase name="#1938 - Section followed by flat generate" duration="{duration}"/> + <testCase name="#1938 - Section followed by flat generate/A" duration="{duration}"/> + <testCase name="#1938 - flat generate" duration="{duration}"/> + <testCase name="#1938 - mixed sections and generates" duration="{duration}"/> + <testCase name="#1938 - mixed sections and generates/A" duration="{duration}"/> + <testCase name="#1938 - mixed sections and generates/B" duration="{duration}"/> + <testCase name="#1938 - nested generate" duration="{duration}"/> <testCase name="Tracker" duration="{duration}"/> <testCase name="Tracker/successfully close one section" duration="{duration}"/> <testCase name="Tracker/fail one section" duration="{duration}"/> @@ -370,6 +381,7 @@ Class.tests.cpp:<line number> <testCase name="#809" duration="{duration}"/> <testCase name="#833" duration="{duration}"/> <testCase name="#872" duration="{duration}"/> + <testCase name="Assertion macros support bit operators and bool conversions" duration="{duration}"/> <testCase name="Lambdas in assertions" duration="{duration}"/> <testCase name="Optionally static assertions" duration="{duration}"/> </file> @@ -872,6 +884,8 @@ Exception.tests.cpp:<line number> </testCase> </file> <file path="projects/<exe-name>/UsageTests/Generators.tests.cpp"> + <testCase name="#1913 - GENERATE inside a for loop should not keep recreating the generator" duration="{duration}"/> + <testCase name="#1913 - GENERATEs can share a line" duration="{duration}"/> <testCase name="3x3x3 ints" duration="{duration}"/> <testCase name="Copy and then generate a range/from var and iterators" duration="{duration}"/> <testCase name="Copy and then generate a range/From a temporary container" duration="{duration}"/> @@ -897,6 +911,8 @@ Exception.tests.cpp:<line number> <testCase name="Arbitrary predicate matcher/Function pointer" duration="{duration}"/> <testCase name="Arbitrary predicate matcher/Lambdas + different type" duration="{duration}"/> <testCase name="Composed matchers are distinct" duration="{duration}"/> + <testCase name="Composed matchers shortcircuit/&&" duration="{duration}"/> + <testCase name="Composed matchers shortcircuit/||" duration="{duration}"/> <testCase name="Contains string matcher" duration="{duration}"> <failure message="CHECK_THAT(testStringForMatching(), Contains("not there", Catch::CaseSensitive::No))"> FAILED: @@ -1347,6 +1363,9 @@ Message.tests.cpp:<line number> <file path="projects/<exe-name>/UsageTests/Misc.tests.cpp"> <testCase name="# A test name that starts with a #" duration="{duration}"/> <testCase name="#1175 - Hidden Test" duration="{duration}"/> + <testCase name="#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0" duration="{duration}"/> + <testCase name="#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0" duration="{duration}"/> + <testCase name="#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0" duration="{duration}"/> <testCase name="#835 -- errno should not be touched by Catch" duration="{duration}"> <skipped message="CHECK(f() == 0)"> FAILED: diff --git a/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt index 807a946e68e1da07a5710f2bf2580145cbb82426..30d113efe1a61d36ac262267043605dde5d08bfc 100644 --- a/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -223,6 +223,446 @@ Nor would this </Expression> <OverallResult success="true"/> </TestCase> + <TestCase name="#1912 -- test spec parser handles escaping" tags="[command-line][test-spec]" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Section name="Various parentheses" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Original> + spec.matches(fakeTestCase(R"(spec {a} char)")) + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Original> + spec.matches(fakeTestCase(R"(spec [a] char)")) + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Original> + !(spec.matches(fakeTestCase("differs but has similar tag", "[a]"))) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="backslash in test name" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > + <Original> + spec.matches(fakeTestCase(R"(spec \ char)")) + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1913 - GENERATE inside a for loop should not keep recreating the generator" tags="[generators][regression]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + counter < 7 + </Original> + <Expanded> + 3 < 7 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + counter < 7 + </Original> + <Expanded> + 6 < 7 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1913 - GENERATEs can share a line" tags="[generators][regression]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i != j + </Original> + <Expanded> + 1 != 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i != j + </Original> + <Expanded> + 1 != 4 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i != j + </Original> + <Expanded> + 2 != 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i != j + </Original> + <Expanded> + 2 != 4 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1938 - GENERATE after a section" tags="[!hide][.][generators][regression]" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Section name="A" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1938 - Section followed by flat generate" tags="[!hide][.][generators][regression]" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Section name="A" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + 1 + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1938 - flat generate" tags="[!hide][.][generators][regression]" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1938 - mixed sections and generates" tags="[!hide][.][generators][regression]" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Section name="A" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 1 + </Info> + <Info> + j := 3 + </Info> + <Info> + k := 5 + </Info> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 1 + </Info> + <Info> + j := 3 + </Info> + <Info> + k := 6 + </Info> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 1 + </Info> + <Info> + j := 4 + </Info> + <Info> + k := 5 + </Info> + <Info> + i := 1 + </Info> + <Info> + j := 4 + </Info> + <Info> + k := 6 + </Info> + <Section name="A" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 2 + </Info> + <Info> + j := 3 + </Info> + <Info> + k := 5 + </Info> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 2 + </Info> + <Info> + j := 3 + </Info> + <Info> + k := 6 + </Info> + <Section name="B" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0"/> + </Section> + <Info> + i := 2 + </Info> + <Info> + j := 4 + </Info> + <Info> + k := 5 + </Info> + <Info> + i := 2 + </Info> + <Info> + j := 4 + </Info> + <Info> + k := 6 + </Info> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1938 - nested generate" tags="[!hide][.][generators][regression]" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + m + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > + <Original> + n + </Original> + <Expanded> + 3 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0" tags="[!hide][.][compilation][regression]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0" tags="[!hide][.][compilation][regression]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" > + <OverallResult success="true"/> + </TestCase> + <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0" tags="[!hide][.][compilation][regression]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" > + <OverallResult success="true"/> + </TestCase> <TestCase name="#748 - captures with unexpected exceptions" tags="[!hide][!shouldfail][!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="outside assertions" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" > <Info> @@ -2136,6 +2576,49 @@ Nor would this </Section> <OverallResult success="true"/> </TestCase> + <TestCase name="Assertion macros support bit operators and bool conversions" tags="[bitops][compilation]" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Original> + lhs | rhs + </Original> + <Expanded> + Val: 1 | Val: 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Original> + !(lhs & rhs) + </Original> + <Expanded> + !(Val: 1 & Val: 2) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Original> + HasBitOperators{ 1 } & HasBitOperators{ 1 } + </Original> + <Expanded> + Val: 1 & Val: 1 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Original> + lhs ^ rhs + </Original> + <Expanded> + Val: 1 ^ Val: 2 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" > + <Original> + !(lhs ^ lhs) + </Original> + <Expanded> + !(Val: 1 ^ Val: 1) + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="Assertions then sections" tags="[Tricky]" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" > <Original> @@ -2878,6 +3361,63 @@ Nor would this </Expression> <OverallResult success="true"/> </TestCase> + <TestCase name="Composed matchers shortcircuit" tags="[composed][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Section name="&&" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1, !(first && second) + </Original> + <Expanded> + 1 not ( CheckedTestingMatcher set to fail and CheckedTestingMatcher set to fail ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + first.matchCalled + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + !second.matchCalled + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <Section name="||" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1, first || second + </Original> + <Expanded> + 1 ( CheckedTestingMatcher set to succeed or CheckedTestingMatcher set to fail ) + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + first.matchCalled + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + !second.matchCalled + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0"/> + </Section> + <OverallResult success="true"/> + </TestCase> <TestCase name="Contains string matcher" tags="[!hide][.][failing][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> @@ -13556,9 +14096,17 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + v1, Approx<double>({ 1., 2., 3. }) + </Original> + <Expanded> + { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0"/> </Section> <Section name="Vectors with elements" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Different length" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -13676,6 +14224,14 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2 } </Expanded> </Expression> + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + v, Contains<int>({ 1, 2 }) + </Original> + <Expanded> + { 1, 2, 3 } Contains: { 1, 2 } + </Expanded> + </Expression> <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2)) @@ -13724,7 +14280,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2 } </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0"/> </Section> <Section name="Contains (element), composed" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -13754,6 +14310,14 @@ There is no extra whitespace here { } Equals: { } </Expanded> </Expression> + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + v, Equals<int>({ 1, 2, 3 }) + </Original> + <Expanded> + { 1, 2, 3 } Equals: { 1, 2, 3 } + </Expanded> + </Expression> <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> v, Equals(v2) @@ -13778,7 +14342,7 @@ There is no extra whitespace here { 1, 2, 3 } Equals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0"/> </Section> <Section name="UnorderedEquals" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -13789,6 +14353,14 @@ There is no extra whitespace here { 1, 2, 3 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> + <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + v, UnorderedEquals<int>({ 3, 2, 1 }) + </Original> + <Expanded> + { 1, 2, 3 } UnorderedEquals: { 3, 2, 1 } + </Expanded> + </Expression> <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" > <Original> empty, UnorderedEquals(empty) @@ -13829,7 +14401,7 @@ There is no extra whitespace here { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0"/> </Section> <OverallResult success="true"/> </TestCase> @@ -16139,7 +16711,9 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="1536" failures="149" expectedFailures="21"/> + <OverallResults successes="1606" failures="149" expectedFailures="21"/> + <OverallResultsCases successes="231" failures="86" expectedFailures="4"/> </Group> - <OverallResults successes="1536" failures="148" expectedFailures="21"/> + <OverallResults successes="1606" failures="148" expectedFailures="21"/> + <OverallResultsCases successes="231" failures="86" expectedFailures="4"/> </Catch> diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index 0d8232e0a11c507a349d6f005e9e46bfca16ec3e..488957178e2411b945d70fead10fd1ef308d1609 100644 --- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -303,6 +303,24 @@ TEST_CASE("#1905 -- test spec parser properly clears internal state between comp REQUIRE_FALSE(spec.matches(fakeTestCase(R"(spec \, char)"))); } +TEST_CASE("#1912 -- test spec parser handles escaping", "[command-line][test-spec]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + + SECTION("Various parentheses") { + TestSpec spec = parseTestSpec(R"(spec {a} char,spec \[a] char)"); + + REQUIRE(spec.matches(fakeTestCase(R"(spec {a} char)"))); + REQUIRE(spec.matches(fakeTestCase(R"(spec [a] char)"))); + REQUIRE_FALSE(spec.matches(fakeTestCase("differs but has similar tag", "[a]"))); + } + SECTION("backslash in test name") { + TestSpec spec = parseTestSpec(R"(spec \\ char)"); + + REQUIRE(spec.matches(fakeTestCase(R"(spec \ char)"))); + } +} + TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) { #ifndef CATCH_CONFIG_DISABLE_MATCHERS diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp index 837d3661b1be400ff7342ffd188e40e83058c968..41a7bc0a89ffd7fd1488255cca45de83c8878ed5 100644 --- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp @@ -204,3 +204,50 @@ TEST_CASE("#1670 regression check", "[.approvals][tracker]") { SECTION("2") SUCCEED(); } } + +// #1938 required a rework on how generator tracking works, so that `GENERATE` +// supports being sandwiched between two `SECTION`s. The following tests check +// various other scenarios through checking output in approval tests. +TEST_CASE("#1938 - GENERATE after a section", "[.][regression][generators]") { + SECTION("A") { + SUCCEED("A"); + } + auto m = GENERATE(1, 2, 3); + SECTION("B") { + REQUIRE(m); + } +} + +TEST_CASE("#1938 - flat generate", "[.][regression][generators]") { + auto m = GENERATE(1, 2, 3); + REQUIRE(m); +} + +TEST_CASE("#1938 - nested generate", "[.][regression][generators]") { + auto m = GENERATE(1, 2, 3); + auto n = GENERATE(1, 2, 3); + REQUIRE(m); + REQUIRE(n); +} + +TEST_CASE("#1938 - mixed sections and generates", "[.][regression][generators]") { + auto i = GENERATE(1, 2); + SECTION("A") { + SUCCEED("A"); + } + auto j = GENERATE(3, 4); + SECTION("B") { + SUCCEED("B"); + } + auto k = GENERATE(5, 6); + CAPTURE(i, j, k); + SUCCEED(); +} + +TEST_CASE("#1938 - Section followed by flat generate", "[.][regression][generators]") { + SECTION("A") { + REQUIRE(1); + } + auto m = GENERATE(2, 3); + REQUIRE(m); +} diff --git a/packages/Catch2/projects/SelfTest/TimingTests/Sleep.tests.cpp b/packages/Catch2/projects/SelfTest/TimingTests/Sleep.tests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..672d9efb7c9a1f9d9e4fb8d9e10ed50e8059b935 --- /dev/null +++ b/packages/Catch2/projects/SelfTest/TimingTests/Sleep.tests.cpp @@ -0,0 +1,23 @@ +/* + * Copyright 2011 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ + +#include "catch.hpp" + +#include <chrono> +#include <thread> + +TEST_CASE( "sleep_for_100ms", "[.min_duration_test][approvals]" ) +{ + std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ); + CHECK( true ); +} + +TEST_CASE( "sleep_for_250ms", "[.min_duration_test][approvals]" ) +{ + std::this_thread::sleep_for( std::chrono::milliseconds( 250 ) ); + CHECK( true ); +} diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp index 0baf2842ba4de01494b6f8628d2c3fad3bf4c6de..850d5f9b1a2f8b76a975b205d60d6120c15c1a49 100644 --- a/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp +++ b/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp @@ -234,3 +234,36 @@ namespace { namespace CompilationTests { }} // namespace CompilationTests +namespace { + struct HasBitOperators { + int value; + + friend HasBitOperators operator| (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value | rhs.value }; + } + friend HasBitOperators operator& (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value & rhs.value }; + } + friend HasBitOperators operator^ (HasBitOperators lhs, HasBitOperators rhs) { + return { lhs.value ^ rhs.value }; + } + explicit operator bool() const { + return !!value; + } + + friend std::ostream& operator<<(std::ostream& out, HasBitOperators val) { + out << "Val: " << val.value; + return out; + } + }; +} + +TEST_CASE("Assertion macros support bit operators and bool conversions", "[compilation][bitops]") { + HasBitOperators lhs{ 1 }, rhs{ 2 }; + REQUIRE(lhs | rhs); + REQUIRE_FALSE(lhs & rhs); + REQUIRE(HasBitOperators{ 1 } & HasBitOperators{ 1 }); + REQUIRE(lhs ^ rhs); + REQUIRE_FALSE(lhs ^ lhs); +} + diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp index 0e39bd5cbfce337ead5e17e7604e1ceb7297a069..f2906dbf505a937f276b3a027e8fc87ff99050e4 100644 --- a/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp +++ b/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp @@ -251,6 +251,23 @@ TEST_CASE("Copy and then generate a range", "[generators]") { } } +TEST_CASE("#1913 - GENERATE inside a for loop should not keep recreating the generator", "[regression][generators]") { + static int counter = 0; + for (int i = 0; i < 3; ++i) { + int _ = GENERATE(1, 2); + (void)_; + ++counter; + } + // There should be at most 6 (3 * 2) counter increments + REQUIRE(counter < 7); +} + +TEST_CASE("#1913 - GENERATEs can share a line", "[regression][generators]") { + int i = GENERATE(1, 2); int j = GENERATE(3, 4); + REQUIRE(i != j); +} + + #if defined(__clang__) #pragma clang diagnostic pop #endif diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp index e7a1d5424f3956bd84604ff8470fae610ab445fe..1797d4a1c832350a5cfb642f4b7d3d768c1eb379 100644 --- a/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp +++ b/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp @@ -288,6 +288,7 @@ namespace { namespace MatchersTests { } SECTION("Contains (vector)") { CHECK_THAT(v, Contains(v2)); + CHECK_THAT(v, Contains<int>({ 1, 2 })); CHECK_THAT(v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2))); v2.push_back(3); // now exactly matches @@ -307,10 +308,10 @@ namespace { namespace MatchersTests { // Same vector CHECK_THAT(v, Equals(v)); - CHECK_THAT(empty, Equals(empty)); // Different vector with same elements + CHECK_THAT(v, Equals<int>({ 1, 2, 3 })); v2.push_back(3); CHECK_THAT(v, Equals(v2)); @@ -321,6 +322,7 @@ namespace { namespace MatchersTests { } SECTION("UnorderedEquals") { CHECK_THAT(v, UnorderedEquals(v)); + CHECK_THAT(v, UnorderedEquals<int>({ 3, 2, 1 })); CHECK_THAT(empty, UnorderedEquals(empty)); auto permuted = v; @@ -580,6 +582,7 @@ namespace { namespace MatchersTests { std::vector<double> v1({1., 2., 3.}); SECTION("A vector is approx equal to itself") { REQUIRE_THAT(v1, Approx(v1)); + REQUIRE_THAT(v1, Approx<double>({ 1., 2., 3. })); } std::vector<double> v2({1.5, 2.5, 3.5}); SECTION("Different length") { @@ -614,7 +617,7 @@ namespace { namespace MatchersTests { REQUIRE_THROWS_MATCHES(throwsSpecialException(2), SpecialException, !Message("DerivedException::what")); REQUIRE_THROWS_MATCHES(throwsSpecialException(2), SpecialException, Message("SpecialException::what")); } - + TEST_CASE("Composed matchers are distinct", "[matchers][composed]") { auto m1 = Contains("string"); auto m2 = Contains("random"); @@ -625,6 +628,45 @@ namespace { namespace MatchersTests { REQUIRE_THAT(testStringForMatching2(), composed2); } + struct CheckedTestingMatcher : Catch::MatcherBase<int> { + mutable bool matchCalled = false; + bool matchSucceeds = false; + + bool match(int const&) const override { + matchCalled = true; + return matchSucceeds; + } + std::string describe() const override { + return "CheckedTestingMatcher set to " + (matchSucceeds ? std::string("succeed") : std::string("fail")); + } + }; + + TEST_CASE("Composed matchers shortcircuit", "[matchers][composed]") { + // Check that if first returns false, second is not touched + CheckedTestingMatcher first, second; + SECTION("&&") { + first.matchSucceeds = false; + // This assertion doesn't actually test anything, we just + // want the composed matcher's `match` being called. + CHECK_THAT(1, !(first && second)); + + // These two assertions are the important ones + REQUIRE(first.matchCalled); + REQUIRE(!second.matchCalled); + } + // Check that if first returns true, second is not touched + SECTION("||") { + first.matchSucceeds = true; + // This assertion doesn't actually test anything, we just + // want the composed matcher's `match` being called. + CHECK_THAT(1, first || second); + + // These two assertions are the important ones + REQUIRE(first.matchCalled); + REQUIRE(!second.matchCalled); + } + } + } } // namespace MatchersTests #endif // CATCH_CONFIG_DISABLE_MATCHERS diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp index 808d1d0af13c2e52070d92ee628cd75fa9237c9b..dcd9fc8a8af8710dd2c6e2691243c50b772eedfc 100644 --- a/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp +++ b/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp @@ -484,4 +484,10 @@ TEST_CASE( "#1175 - Hidden Test", "[.]" ) { SUCCEED(); } +TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regression][.compilation]", + ((int Tnx, int Tnu, int Tny, int Tph, int Tch, int Tineq, int Teq), Tnx, Tnu, Tny, Tph, Tch, Tineq, Teq), + (1, 1, 1, 1, 1, 0, 0), (5, 1, 1, 1, 1, 0, 0), (5, 3, 1, 1, 1, 0, 0)) { + SUCCEED(); +} + }} // namespace MiscTests diff --git a/packages/Catch2/projects/TestScripts/testRandomOrder.py b/packages/Catch2/projects/TestScripts/testRandomOrder.py index a6ffb996d778be666ad3e8a1dfec3a1b0d459e00..fc245b85f39288721f0c04ec383c2c0f5649f616 100755 --- a/packages/Catch2/projects/TestScripts/testRandomOrder.py +++ b/packages/Catch2/projects/TestScripts/testRandomOrder.py @@ -15,9 +15,9 @@ import random def list_tests(self_test_exe, tags, rng_seed): cmd = [self_test_exe, '--list-test-names-only', '--order', 'rand', '--rng-seed', str(rng_seed)] - tags_arg = ','.join('[{}]'.format(t) for t in tags) + tags_arg = ','.join('[{}]~[.]'.format(t) for t in tags) if tags_arg: - cmd.append(tags_arg + '~[.]') + cmd.append(tags_arg) process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = process.communicate() diff --git a/packages/Catch2/scripts/updateDocumentToC.py b/packages/Catch2/scripts/updateDocumentToC.py old mode 100644 new mode 100755 diff --git a/packages/Catch2/single_include/catch2/catch.hpp b/packages/Catch2/single_include/catch2/catch.hpp index 51618b38e9e4706602c2ce267b12b419987730d9..cf1fae15aace281f5ca3a764e8a619878bd5790b 100644 --- a/packages/Catch2/single_include/catch2/catch.hpp +++ b/packages/Catch2/single_include/catch2/catch.hpp @@ -1,6 +1,6 @@ /* - * Catch v2.11.3 - * Generated: 2020-03-19 13:44:21.042491 + * Catch v2.13.0 + * Generated: 2020-07-12 20:07:49.015950 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved. @@ -14,8 +14,8 @@ #define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 11 -#define CATCH_VERSION_PATCH 3 +#define CATCH_VERSION_MINOR 13 +#define CATCH_VERSION_PATCH 0 #ifdef __clang__ # pragma clang system_header @@ -132,7 +132,7 @@ namespace Catch { #endif -#if defined(CATCH_CPP17_OR_GREATER) +#if defined(__cpp_lib_uncaught_exceptions) # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS #endif @@ -151,7 +151,20 @@ namespace Catch { # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) +// 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 +// like `std::string::~string` being called on an uninitialized value. +// +// For example, this code will likely segfault under IBM XL: +// ``` +// REQUIRE(std::string("12") + "34" == "1234") +// ``` +// +// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. +# if !defined(__ibmxl__) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ +# endif # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ @@ -762,7 +775,7 @@ constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) n #define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) #define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) #define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) #define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) #define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) #define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) @@ -931,13 +944,13 @@ namespace Catch { #if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is - // replaced with std::invoke_result here. Also *_t format is preferred over - // typename *::type format. - template <typename Func, typename U> - using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U>>>; + // replaced with std::invoke_result here. + template <typename Func, typename... U> + using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>; #else - template <typename Func, typename U> - using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U)>::type>::type>::type; + // Keep ::type here because we still support C++11 + template <typename Func, typename... U> + using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type; #endif } // namespace Catch @@ -1975,20 +1988,27 @@ namespace Catch { #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER namespace Catch { - struct not_this_one {}; // Tag type for detecting which begin/ end are being selected - - // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace + // Import begin/ end from std here using std::begin; using std::end; - not_this_one begin( ... ); - not_this_one end( ... ); + namespace detail { + template <typename...> + struct void_type { + using type = void; + }; + + template <typename T, typename = void> + struct is_range_impl : std::false_type { + }; + + template <typename T> + struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type { + }; + } // namespace detail template <typename T> - struct is_range { - static const bool value = - !std::is_same<decltype(begin(std::declval<T>())), not_this_one>::value && - !std::is_same<decltype(end(std::declval<T>())), not_this_one>::value; + struct is_range : detail::is_range_impl<T> { }; #if defined(_MANAGED) // Managed types are never ranges @@ -2356,6 +2376,18 @@ namespace Catch { auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs }; } + template <typename RhsT> + auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs }; + } + template <typename RhsT> + auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs }; + } + template <typename RhsT> + auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { + return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs }; + } template<typename RhsT> auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const { @@ -2436,7 +2468,7 @@ namespace Catch { virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) virtual void benchmarkPreparing( std::string const& name ) = 0; @@ -3000,6 +3032,9 @@ namespace Catch { {} std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + return ""; +#else try { if( it == itEnd ) std::rethrow_exception(std::current_exception()); @@ -3009,6 +3044,7 @@ namespace Catch { catch( T& ex ) { return m_translateFunction( ex ); } +#endif } protected: @@ -3571,12 +3607,12 @@ namespace Catch { namespace Matchers { namespace Vector { - template<typename T> - struct ContainsElementMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename Alloc> + struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> { ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, Alloc> const &v) const override { for (auto const& el : v) { if (el == m_comparator) { return true; @@ -3592,12 +3628,12 @@ namespace Matchers { T const& m_comparator; }; - template<typename T> - struct ContainsMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> { - ContainsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {} + ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { // !TBD: see note in EqualsMatcher if (m_comparator.size() > v.size()) return false; @@ -3619,18 +3655,18 @@ namespace Matchers { return "Contains: " + ::Catch::Detail::stringify( m_comparator ); } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; }; - template<typename T> - struct EqualsMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> { - EqualsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {} + EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { // !TBD: This currently works if all elements can be compared using != // - a more general approach would be via a compare template that defaults - // to using !=. but could be specialised for, e.g. std::vector<T> etc + // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc // - then just call that directly if (m_comparator.size() != v.size()) return false; @@ -3642,15 +3678,15 @@ namespace Matchers { std::string describe() const override { return "Equals: " + ::Catch::Detail::stringify( m_comparator ); } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; }; - template<typename T> - struct ApproxMatcher : MatcherBase<std::vector<T>> { + template<typename T, typename AllocComp, typename AllocMatch> + struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> { - ApproxMatcher(std::vector<T> const& comparator) : m_comparator( comparator ) {} + ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {} - bool match(std::vector<T> const &v) const override { + bool match(std::vector<T, AllocMatch> const &v) const override { if (m_comparator.size() != v.size()) return false; for (std::size_t i = 0; i < v.size(); ++i) @@ -3677,16 +3713,14 @@ namespace Matchers { return *this; } - std::vector<T> const& m_comparator; + std::vector<T, AllocComp> const& m_comparator; mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom(); }; - template<typename T> - struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> { - UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {} - bool match(std::vector<T> const& vec) const override { - // Note: This is a reimplementation of std::is_permutation, - // because I don't want to include <algorithm> inside the common path + template<typename T, typename AllocComp, typename AllocMatch> + struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> { + UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {} + bool match(std::vector<T, AllocMatch> const& vec) const override { if (m_target.size() != vec.size()) { return false; } @@ -3697,7 +3731,7 @@ namespace Matchers { return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target); } private: - std::vector<T> const& m_target; + std::vector<T, AllocComp> const& m_target; }; } // namespace Vector @@ -3705,29 +3739,29 @@ namespace Matchers { // The following functions create the actual matcher objects. // This allows the types to be inferred - template<typename T> - Vector::ContainsMatcher<T> Contains( std::vector<T> const& comparator ) { - return Vector::ContainsMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) { + return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::ContainsElementMatcher<T> VectorContains( T const& comparator ) { - return Vector::ContainsElementMatcher<T>( comparator ); + template<typename T, typename Alloc = std::allocator<T>> + Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) { + return Vector::ContainsElementMatcher<T, Alloc>( comparator ); } - template<typename T> - Vector::EqualsMatcher<T> Equals( std::vector<T> const& comparator ) { - return Vector::EqualsMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) { + return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) { - return Vector::ApproxMatcher<T>( comparator ); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) { + return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator ); } - template<typename T> - Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const& target) { - return Vector::UnorderedEqualsMatcher<T>(target); + template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp> + Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) { + return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target ); } } // namespace Matchers @@ -4046,16 +4080,16 @@ namespace Generators { return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... ); } - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; template<typename L> // Note: The type after -> is weird, because VS2015 cannot parse // the expression used in the typedef inside, when it is in // return type. Yeah. - auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { + auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { using UnderlyingType = typename decltype(generatorExpression())::type; - IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo ); + IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); if (!tracker.hasGenerator()) { tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression())); } @@ -4068,11 +4102,17 @@ namespace Generators { } // namespace Catch #define GENERATE( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_COPY( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) #define GENERATE_REF( ... ) \ - Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) + Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + CATCH_INTERNAL_LINEINFO, \ + [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) // end catch_generators.hpp // start catch_generators_generic.hpp @@ -4482,6 +4522,7 @@ namespace Catch { virtual int abortAfter() const = 0; virtual bool showInvisibles() const = 0; virtual ShowDurations::OrNot showDurations() const = 0; + virtual double minDuration() const = 0; virtual TestSpec const& testSpec() const = 0; virtual bool hasTestFilters() const = 0; virtual std::vector<std::string> const& getTestsOrTags() const = 0; @@ -5254,6 +5295,7 @@ namespace Catch { Verbosity verbosity = Verbosity::Normal; WarnAbout::What warnings = WarnAbout::Nothing; ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter; + double minDuration = -1; RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder; UseColour::YesOrNo useColour = UseColour::Auto; WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; @@ -5304,6 +5346,7 @@ namespace Catch { bool warnAboutMissingAssertions() const override; bool warnAboutNoTests() const override; ShowDurations::OrNot showDurations() const override; + double minDuration() const override; RunTests::InWhatOrder runOrder() const override; unsigned int rngSeed() const override; UseColour::YesOrNo useColour() const override; @@ -5681,6 +5724,9 @@ namespace Catch { // Returns double formatted as %.3f (format expected on output) std::string getFormattedDuration( double duration ); + //! Should the reporter show + bool shouldShowDuration( IConfig const& config, double duration ); + std::string serializeFilters( std::vector<std::string> const& container ); template<typename DerivedT> @@ -6074,8 +6120,6 @@ namespace Catch { static std::string getDescription(); - ReporterPreferences getPreferences() const override; - void noMatchingTestCases(std::string const& spec) override; void assertionStarting(AssertionInfo const&) override; @@ -6523,20 +6567,18 @@ namespace Catch { return {}; } }; - template <typename Sig> - using ResultOf_t = typename std::result_of<Sig>::type; // invoke and not return void :( template <typename Fun, typename... Args> - CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) { - return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); + CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) { + return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...); } const std::string benchmarkErrorMsg = "a benchmark failed to run successfully"; } // namespace Detail template <typename Fun> - Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) { + Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) { CATCH_TRY{ return Detail::complete_invoke(std::forward<Fun>(fun)); } CATCH_CATCH_ALL{ @@ -6781,8 +6823,8 @@ namespace Catch { Result result; int iterations; }; - template <typename Clock, typename Sig> - using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>; + template <typename Clock, typename Func, typename... Args> + using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; } // namespace Benchmark } // namespace Catch @@ -6793,7 +6835,7 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun, typename... Args> - TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) { + TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) { auto start = Clock::now(); auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...); auto end = Clock::now(); @@ -6812,11 +6854,11 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun> - TimingOf<Clock, Fun(int)> measure_one(Fun&& fun, int iters, std::false_type) { + TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) { return Detail::measure<Clock>(fun, iters); } template <typename Clock, typename Fun> - TimingOf<Clock, Fun(Chronometer)> measure_one(Fun&& fun, int iters, std::true_type) { + TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) { Detail::ChronometerModel<Clock> meter; auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); @@ -6833,7 +6875,7 @@ namespace Catch { }; template <typename Clock, typename Fun> - TimingOf<Clock, Fun(run_for_at_least_argument_t<Clock, Fun>)> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { + TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) { auto iters = seed; while (iters < (1 << 30)) { auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>()); @@ -7431,23 +7473,37 @@ namespace TestCaseTracking { SourceLineInfo location; NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); + friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) { + return lhs.name == rhs.name + && lhs.location == rhs.location; + } }; - struct ITracker; + class ITracker; using ITrackerPtr = std::shared_ptr<ITracker>; - struct ITracker { - virtual ~ITracker(); + class ITracker { + NameAndLocation m_nameAndLocation; + + public: + ITracker(NameAndLocation const& nameAndLoc) : + m_nameAndLocation(nameAndLoc) + {} // static queries - virtual NameAndLocation const& nameAndLocation() const = 0; + NameAndLocation const& nameAndLocation() const { + return m_nameAndLocation; + } + + virtual ~ITracker(); // dynamic queries virtual bool isComplete() const = 0; // Successfully completed or failed virtual bool isSuccessfullyCompleted() const = 0; virtual bool isOpen() const = 0; // Started but not complete virtual bool hasChildren() const = 0; + virtual bool hasStarted() const = 0; virtual ITracker& parent() = 0; @@ -7502,7 +7558,6 @@ namespace TestCaseTracking { }; using Children = std::vector<ITrackerPtr>; - NameAndLocation m_nameAndLocation; TrackerContext& m_ctx; ITracker* m_parent; Children m_children; @@ -7511,11 +7566,13 @@ namespace TestCaseTracking { public: TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); - NameAndLocation const& nameAndLocation() const override; bool isComplete() const override; bool isSuccessfullyCompleted() const override; bool isOpen() const override; bool hasChildren() const override; + bool hasStarted() const override { + return m_runState != NotStarted; + } void addChild( ITrackerPtr const& child ) override; @@ -7878,7 +7935,11 @@ namespace Catch { #ifdef CATCH_PLATFORM_MAC - #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ + #if defined(__i386__) || defined(__x86_64__) + #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ + #elif defined(__aarch64__) + #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #endif #elif defined(CATCH_PLATFORM_IPHONE) @@ -8063,7 +8124,7 @@ namespace Catch { void sectionEnded( SectionEndInfo const& endInfo ) override; void sectionEndedEarly( SectionEndInfo const& endInfo ) override; - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void benchmarkPreparing( std::string const& name ) override; @@ -9039,7 +9100,7 @@ namespace detail { } inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { std::string srcLC = source; - std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast<char>( std::tolower(c) ); } ); + std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } ); if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") target = true; else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off") @@ -9808,6 +9869,9 @@ namespace Catch { | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" ) ["-d"]["--durations"] ( "show test durations" ) + | Opt( config.minDuration, "seconds" ) + ["-D"]["--min-duration"] + ( "show test durations for tests taking at least the given number of seconds" ) | Opt( loadTestNamesFromFile, "filename" ) ["-f"]["--input-file"] ( "load test names to run from a file" ) @@ -9955,6 +10019,7 @@ namespace Catch { bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); } bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); } ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; } + double Config::minDuration() const { return m_data.minDuration; } RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; } unsigned int Config::rngSeed() const { return m_data.rngSeed; } UseColour::YesOrNo Config::useColour() const { return m_data.useColour; } @@ -10319,8 +10384,7 @@ namespace Catch { #if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE) -# include <assert.h> -# include <stdbool.h> +# include <cassert> # include <sys/types.h> # include <unistd.h> # include <cstddef> @@ -10852,8 +10916,8 @@ namespace Generators { GeneratorUntypedBase::~GeneratorUntypedBase() {} - auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { - return getResultCapture().acquireGeneratorTracker( lineInfo ); + auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); } } // namespace Generators @@ -11740,10 +11804,10 @@ namespace Catch { Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { auto trimmed = [&] (size_t start, size_t end) { - while (names[start] == ',' || isspace(names[start])) { + while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; } - while (names[end] == ',' || isspace(names[end])) { + while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) { --end; } return names.substr(start, end - start + 1); @@ -12273,11 +12337,13 @@ namespace Catch { namespace Catch { class StartupExceptionRegistry { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) public: void add(std::exception_ptr const& exception) noexcept; std::vector<std::exception_ptr> const& getExceptions() const noexcept; private: std::vector<std::exception_ptr> m_exceptions; +#endif }; } // end namespace Catch @@ -12360,7 +12426,11 @@ namespace Catch { m_tagAliasRegistry.add( alias, tag, lineInfo ); } void registerStartupException() noexcept override { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) m_exceptionRegistry.add(std::current_exception()); +#else + CATCH_INTERNAL_ERROR("Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); +#endif } IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override { return m_enumValuesRegistry; @@ -12464,17 +12534,32 @@ namespace Catch { std::shared_ptr<GeneratorTracker> tracker; ITracker& currentTracker = ctx.currentTracker(); - if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { + // Under specific circumstances, the generator we want + // to acquire is also the current tracker. If this is + // the case, we have to avoid looking through current + // tracker's children, and instead return the current + // tracker. + // A case where this check is important is e.g. + // for (int i = 0; i < 5; ++i) { + // int n = GENERATE(1, 2); + // } + // + // without it, the code above creates 5 nested generators. + if (currentTracker.nameAndLocation() == nameAndLocation) { + auto thisTracker = currentTracker.parent().findChild(nameAndLocation); + assert(thisTracker); + assert(thisTracker->isGeneratorTracker()); + tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker); + } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isGeneratorTracker() ); tracker = std::static_pointer_cast<GeneratorTracker>( childTracker ); - } - else { + } else { tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, ¤tTracker ); currentTracker.addChild( tracker ); } - if( !ctx.completedCycle() && !tracker->isComplete() ) { + if( !tracker->isComplete() ) { tracker->open(); } @@ -12488,8 +12573,28 @@ namespace Catch { } void close() override { TrackerBase::close(); - // Generator interface only finds out if it has another item on atual move - if (m_runState == CompletedSuccessfully && m_generator->next()) { + // If a generator has a child (it is followed by a section) + // and none of its children have started, then we must wait + // until later to start consuming its values. + // This catches cases where `GENERATE` is placed between two + // `SECTION`s. + // **The check for m_children.empty cannot be removed**. + // doing so would break `GENERATE` _not_ followed by `SECTION`s. + const bool should_wait_for_child = + !m_children.empty() && + std::find_if( m_children.begin(), + m_children.end(), + []( TestCaseTracking::ITrackerPtr tracker ) { + return tracker->hasStarted(); + } ) == m_children.end(); + + // This check is a bit tricky, because m_generator->next() + // has a side-effect, where it consumes generator's current + // value, but we do not want to invoke the side-effect if + // this generator is still waiting for any child to start. + if ( should_wait_for_child || + ( m_runState == CompletedSuccessfully && + m_generator->next() ) ) { m_children.clear(); m_runState = Executing; } @@ -12625,10 +12730,10 @@ namespace Catch { return true; } - auto RunContext::acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { using namespace Generators; - GeneratorTracker& tracker = GeneratorTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( "generator", lineInfo ) ); - assert( tracker.isOpen() ); + GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext, + TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) ); m_lastAssertionInfo.lineInfo = lineInfo; return tracker; } @@ -12671,17 +12776,17 @@ namespace Catch { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) void RunContext::benchmarkPreparing(std::string const& name) { - m_reporter->benchmarkPreparing(name); - } + m_reporter->benchmarkPreparing(name); + } void RunContext::benchmarkStarting( BenchmarkInfo const& info ) { m_reporter->benchmarkStarting( info ); } void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) { m_reporter->benchmarkEnded( stats ); } - void RunContext::benchmarkFailed(std::string const & error) { - m_reporter->benchmarkFailed(error); - } + void RunContext::benchmarkFailed(std::string const & error) { + m_reporter->benchmarkFailed(error); + } #endif // CATCH_CONFIG_ENABLE_BENCHMARKING void RunContext::pushScopedMessage(MessageInfo const & message) { @@ -13402,6 +13507,7 @@ namespace Catch { // end catch_singletons.cpp // start catch_startup_exception_registry.cpp +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) namespace Catch { void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept { CATCH_TRY { @@ -13417,6 +13523,7 @@ void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexce } } // end namespace Catch +#endif // end catch_startup_exception_registry.cpp // start catch_stream.cpp @@ -13601,7 +13708,7 @@ namespace Catch { namespace { char toLowerCh(char c) { - return static_cast<char>( std::tolower( c ) ); + return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) ); } } @@ -13977,27 +14084,77 @@ namespace Catch { // end catch_test_case_info.cpp // start catch_test_case_registry_impl.cpp +#include <algorithm> #include <sstream> namespace Catch { - std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) { + namespace { + struct TestHasher { + explicit TestHasher(Catch::SimplePcg32& rng) { + basis = rng(); + basis <<= 32; + basis |= rng(); + } - std::vector<TestCase> sorted = unsortedTestCases; + uint64_t basis; + uint64_t operator()(TestCase const& t) const { + // Modified FNV-1a hash + static constexpr uint64_t prime = 1099511628211; + uint64_t hash = basis; + for (const char c : t.name) { + hash ^= c; + hash *= prime; + } + return hash; + } + }; + } // end unnamed namespace + + std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) { switch( config.runOrder() ) { - case RunTests::InLexicographicalOrder: - std::sort( sorted.begin(), sorted.end() ); - break; - case RunTests::InRandomOrder: - seedRng( config ); - std::shuffle( sorted.begin(), sorted.end(), rng() ); - break; case RunTests::InDeclarationOrder: // already in declaration order break; + + case RunTests::InLexicographicalOrder: { + std::vector<TestCase> sorted = unsortedTestCases; + std::sort( sorted.begin(), sorted.end() ); + return sorted; + } + + case RunTests::InRandomOrder: { + seedRng( config ); + TestHasher h( rng() ); + + using hashedTest = std::pair<uint64_t, TestCase const*>; + std::vector<hashedTest> indexed_tests; + indexed_tests.reserve( unsortedTestCases.size() ); + + for (auto const& testCase : unsortedTestCases) { + indexed_tests.emplace_back(h(testCase), &testCase); + } + + std::sort(indexed_tests.begin(), indexed_tests.end(), + [](hashedTest const& lhs, hashedTest const& rhs) { + if (lhs.first == rhs.first) { + return lhs.second->name < rhs.second->name; + } + return lhs.first < rhs.first; + }); + + std::vector<TestCase> sorted; + sorted.reserve( indexed_tests.size() ); + + for (auto const& hashed : indexed_tests) { + sorted.emplace_back(*hashed.second); + } + + return sorted; + } } - return sorted; + return unsortedTestCases; } bool isThrowSafe( TestCase const& testCase, IConfig const& config ) { @@ -14134,15 +14291,12 @@ namespace TestCaseTracking { m_currentTracker = tracker; } - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : m_nameAndLocation( nameAndLocation ), + TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ): + ITracker(nameAndLocation), m_ctx( ctx ), m_parent( parent ) {} - NameAndLocation const& TrackerBase::nameAndLocation() const { - return m_nameAndLocation; - } bool TrackerBase::isComplete() const { return m_runState == CompletedSuccessfully || m_runState == Failed; } @@ -14258,7 +14412,8 @@ namespace TestCaseTracking { bool SectionTracker::isComplete() const { bool complete = true; - if ((m_filters.empty() || m_filters[0] == "") + if (m_filters.empty() + || m_filters[0] == "" || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) { complete = TrackerBase::isComplete(); } @@ -14591,6 +14746,7 @@ namespace Catch { m_pos = m_arg.size(); m_substring.clear(); m_patternName.clear(); + m_realPatternPos = 0; return false; } endMode(); @@ -14609,6 +14765,7 @@ namespace Catch { } m_patternName.clear(); + m_realPatternPos = 0; return token; } @@ -15039,7 +15196,9 @@ namespace Catch { namespace Catch { bool uncaught_exceptions() { -#if defined(CATCH_CONFIG_CPP17_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(); @@ -15079,7 +15238,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 11, 3, "", 0 ); + static Version version( 2, 13, 0, "", 0 ); return version; } @@ -15481,6 +15640,17 @@ namespace Catch { return std::string(buffer); } + bool shouldShowDuration( IConfig const& config, double duration ) { + if ( config.showDurations() == ShowDurations::Always ) { + return true; + } + if ( config.showDurations() == ShowDurations::Never ) { + return false; + } + const double min = config.minDuration(); + return min >= 0 && duration >= min; + } + std::string serializeFilters( std::vector<std::string> const& container ) { ReusableStringStream oss; bool first = true; @@ -15747,10 +15917,6 @@ private: return "Reports test results on a single line, suitable for IDEs"; } - ReporterPreferences CompactReporter::getPreferences() const { - return m_reporterPrefs; - } - void CompactReporter::noMatchingTestCases( std::string const& spec ) { stream << "No test cases matched '" << spec << '\'' << std::endl; } @@ -15777,8 +15943,9 @@ private: } void CompactReporter::sectionEnded(SectionStats const& _sectionStats) { - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if ( shouldShowDuration( *m_config, dur ) ) { + stream << getFormattedDuration( dur ) << " s: " << _sectionStats.sectionInfo.name << std::endl; } } @@ -16142,7 +16309,7 @@ ConsoleReporter::ConsoleReporter(ReporterConfig const& config) else { return{ - { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left }, + { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left }, { "samples mean std dev", 14, ColumnInfo::Right }, { "iterations low mean low std dev", 14, ColumnInfo::Right }, { "estimated high mean high std dev", 14, ColumnInfo::Right } @@ -16198,8 +16365,9 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) { stream << "\nNo assertions in test case"; stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; } - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + double dur = _sectionStats.durationInSeconds; + if (shouldShowDuration(*m_config, dur)) { + stream << getFormattedDuration(dur) << " s: " << _sectionStats.sectionInfo.name << std::endl; } if (m_headerPrinted) { m_headerPrinted = false; @@ -16658,6 +16826,11 @@ namespace Catch { xml.writeAttribute( "name", name ); } xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); + // This is not ideal, but it should be enough to mimic gtest's + // junit output. + // Ideally the JUnit reporter would also handle `skipTest` + // events and write those out appropriately. + xml.writeAttribute( "status", "run" ); writeAssertions( sectionNode ); @@ -17092,6 +17265,10 @@ namespace Catch { .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testGroupStats.totals.testCases.passed ) + .writeAttribute( "failures", testGroupStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testGroupStats.totals.testCases.failedButOk ); m_xml.endElement(); } @@ -17101,6 +17278,10 @@ namespace Catch { .writeAttribute( "successes", testRunStats.totals.assertions.passed ) .writeAttribute( "failures", testRunStats.totals.assertions.failed ) .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); + m_xml.scopedElement( "OverallResultsCases") + .writeAttribute( "successes", testRunStats.totals.testCases.passed ) + .writeAttribute( "failures", testRunStats.totals.testCases.failed ) + .writeAttribute( "expectedFailures", testRunStats.totals.testCases.failedButOk ); m_xml.endElement(); } diff --git a/packages/Catch2/single_include/catch2/catch_reporter_tap.hpp b/packages/Catch2/single_include/catch2/catch_reporter_tap.hpp index 1bfe4f5e1ca732f9df75e922953ff70dc15df3ec..5ac8524ce7abebdf264a5584c509c71c2a1df2da 100644 --- a/packages/Catch2/single_include/catch2/catch_reporter_tap.hpp +++ b/packages/Catch2/single_include/catch2/catch_reporter_tap.hpp @@ -23,16 +23,17 @@ namespace Catch { using StreamingReporterBase::StreamingReporterBase; + TAPReporter( ReporterConfig const& config ): + StreamingReporterBase( config ) { + m_reporterPrefs.shouldReportAllAssertions = true; + } + ~TAPReporter() override; static std::string getDescription() { return "Reports test results in TAP format, suitable for test harnesses"; } - ReporterPreferences getPreferences() const override { - return m_reporterPrefs; - } - void noMatchingTestCases( std::string const& spec ) override { stream << "# No test cases matched '" << spec << "'" << std::endl; } @@ -203,16 +204,15 @@ namespace Catch { return; } - // using messages.end() directly (or auto) yields compilation error: - std::vector<MessageInfo>::const_iterator itEnd = messages.end(); - const std::size_t N = static_cast<std::size_t>( std::distance( itMessage, itEnd ) ); + const auto itEnd = messages.cend(); + const auto N = static_cast<std::size_t>( std::distance( itMessage, itEnd ) ); { Colour colourGuard( colour ); stream << " with " << pluralise( N, "message" ) << ":"; } - for(; itMessage != itEnd; ) { + while( itMessage != itEnd ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || itMessage->type != ResultWas::Info ) { stream << " '" << itMessage->message << "'"; @@ -220,7 +220,9 @@ namespace Catch { Colour colourGuard( dimColour() ); stream << " and"; } + continue; } + ++itMessage; } } @@ -234,10 +236,9 @@ namespace Catch { }; void printTotals( const Totals& totals ) const { + stream << "1.." << totals.assertions.total(); if( totals.testCases.total() == 0 ) { - stream << "1..0 # Skipped: No tests ran."; - } else { - stream << "1.." << counter; + stream << " # Skipped: No tests ran."; } } }; diff --git a/packages/Catch2/third_party/clara.hpp b/packages/Catch2/third_party/clara.hpp index 9f4f1b2c317c9ded1d86ae5bca01c5edc19d794f..eb4c7275b103eb0638ad40c204766d445f1f175f 100644 --- a/packages/Catch2/third_party/clara.hpp +++ b/packages/Catch2/third_party/clara.hpp @@ -667,7 +667,7 @@ namespace detail { } inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { std::string srcLC = source; - std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast<char>( ::tolower(c) ); } ); + std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } ); if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") target = true; else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")