diff options
author | Yang Liu <[email protected]> | 2023-12-31 14:00:46 +0800 |
---|---|---|
committer | Yang Liu <[email protected]> | 2023-12-31 14:00:46 +0800 |
commit | ba06a404d1437c73ed3ba100d04a217fa69545b8 (patch) | |
tree | b2b624bde9ead96c0e448c8d6ba7dcba6e5ebb40 | |
parent | 6879e5bb1c598a9a517d7bdec8ba1a0bace3ef10 (diff) | |
download | dynarmic-ba06a404d1437c73ed3ba100d04a217fa69545b8.tar.gz dynarmic-ba06a404d1437c73ed3ba100d04a217fa69545b8.zip |
Squashed 'externals/catch/' changes from ab6c7375b..53d0d913a
53d0d913a v3.5.0
1648c30ec Look just for 'Catch2 X.Y.Z' in doc placeholder update
d4e9fb8aa Highlight that SECTIONs rerun the entire test case from beginning (#2749)
b606bc280 Remove obsolete section in limitations.md
4ab0af8ba Fix minor typos in documentation (#2769)
b7d70ddcd Ensure we always read 32 bit seed from std::random_device
a6f22c516 Remove static instance of std::random_device in Benchmark::analyse_samples
1887d42e3 Use our PCG32 RNG instead of mt19937 in Benchmark::analyse_samples
1774dbfd5 Make it clearer that the JSON reporter is WIP
cb07ff9a7 Fix uniform_floating_point_distribution for unit ranges
ae4fe16b8 Make the user-facing random Generators reproducible
28c66fdc5 Make uniform_floating_point_distribution reproducible
ed9d672b5 Add uniform_integer_distribution
04a829b0e Add helpers for implementing uniform integer distribution
ab1b079e4 Add uniform_floating_point_distribution
d139b4ff7 Add implementation of helpers for uniform float distribution
bfd9f0f5a Move nextafter polyfill to polyfills.hpp
9a1e73568 Add test showing literals and complex generators in one GENERATE
21d2da23b Fix typo in tostring.md
d1d7414eb Always run apt-get update before apt-get install
dacbf4fd6 Drop VS 2017 support
0520ff443 [DOC] Replaced broken link (fixes #2770)
4a7be16c8 Fix compilation on Xbox platforms
32d9ae24b JSONWriter deals in StringRefs instead of std::strings
de7ba4e88 fn need to be in parenthesis
733b901dd Fix special character escaping in JsonWriter
7bf136b50 Add JSON reporter (#2706)
2c68a0d05 lifted suggested version
01cac90c6 Bump up actions/checkout version to v4 (#2760)
b735dfce2 Increase build parallelism on macOS (#2759)
caffe79a3 Fix missing include in catch_message.hpp
a8cf3e671 Mark `CATCH_CONFIG_` options as advanced
79d39a195 Fix tests for C++23's multi-arg index operator
6ebc013b8 Fix UDL definitions for C++23
966d36155 Improve formatting of test specification docs
766541d12 why-catch.md: Add JetBrains survey link
7b793314e Catch.cmake: Support CMake multi-config with PRE_TEST discovery mode (#2739)
0fb817e41 fix some bugprone-macro-parentheses warnings
f161110be Merge pull request #2747 from xandox/devel
db495acdb correct argument references in CatchAddTests.cmake
9c541ca72 Add test for multiple streaming parts in UNSCOPED_INFO
92672591c Make jackknife TU-local to stats.cpp
56fcd584c Make directCompare TU-local to stats.cpp
aafe09bc1 Update meson.build to fix #2722 (#2742)
47a2c9693 Reduce the number of templates in Benchmarking
fb96279ae Remove superfluous stdlib includes from catch_benchmark.hpp
e14a08d73 Remove unused typedef from Benchmark::Environment
9bba07cb8 Replace vector iterator args in benchmarks with ptr args
b4ffba508 Update sample output in docs/benchmarks.md
3a5cde55b implement stringify for std::nullopt_t
2a19ae16b Rewrite commandline test spec docs
f24d39e42 Support C arrays and ADL ranges in from_range generator
85eb4652b Add nice license headers to files in examples/ and fuzzing/
5bba3e403 Edited amalgamated file generator, to block REUSE from getting confused
e09de7222 Small cleanup in XML reporter
a64ff326b Change 'estimated' to 'est run time' in console reporter output
ad5646347 Flush stream after benchmarkStarting in ConsoleReporter
9538d1600 Mention missing catch_user_config.hpp in FAQ
a94bee771 Add missing line for v3.4.0 to ToC in release-notes.md
d7304f0c4 Constify section hints in static-analysis mode
cd60a0301 Assert Info reset need to also reset result disposition to normal to handle uncaught exception correctly (#2723)
b593be211 Always default empty destructors
ed4acded3 Don't define tryTranslators function if exception are disabled
4acc51828 Introduce CATCH_CONFIG_PREFIX_MESSAGES to only prefix a few logging related macros. (#2544)
6e79e682b v3.4.0
683c85772 Clean up explanation in tests
1b049bdba 2 more TEST_CASEs to DiscoverTests/register-tests.cpp
e4b16053a Escape Catch2 test names in catch_discover_tests tests
42ee66b5e Fix handling of semicolon and backslash characters in CMake test discovery (#2676)
a0c6a2846 Fix possible FP in catch_discover_tests tests
c8363143e Add test scaffolding for catch_discover_tests
7a52dfa77 Fix typo in cross-docs links
913173663 Bazel support: Update skylib
0631b607e Test & document SKIP in generator constructor
dff7513b2 Static analysis cleanup in tests
bf5aa7b38 Experimental static analysis support in TEST_CASE and SECTION
dba9197ec Add new config option: STATIC_ANALYSIS_SUPPORT
f60c15364 Add macro for suppressing Wshadow
b3cf1bfb5 Avoid unused variable warning in GeneratorsImpl tests
73b93ce6b Include catch_user_config.hpp in all catch_config_* files
8008625d7 Merge pull request #2693 from Ali-Amir/u/ali/optional-meson-unit-tests
ce7b15302 Add option to disable building unit tests in Meson build file.
535205e2a Suppress -Wunused-result warning in gcc
689fdcd7d Fix some tests never being run
a153fce72 Improve error messages for TEST_CASE tag parsing errors
06c0e1cfa Merge pull request #2689 from ThePhD/fix/includes/header-exception
05d7eb5a0 🛠Add <exception> header where strictly necessary
f53bb3ae7 meson: require version >=0.54.1
ce8a7b339 Merge pull request #2687 from ChrisThrasher/sfml
6dce539fa Add SFML to the list of open source users
5a40b2275 Update CatchConfigOptions.cmake
598895d04 Fix Wredundant-decls
0dc82e08d Move CATCH_INTERNAL_STRINGIFY macro into its own header
8ca504cbc Move AssertionResult when passing it inside RunContext
c57b5cdf4 Move-enable Catch::optional
d84777c9c Fix assertionStarting events being sent after the expr is evaluated
51fdbedd1 Internal linkage for outlier_variance
10f0a5864 Some template instantiation reductions
fe64c2892 Reduce compilation costs of benchmarks
7d07efc92 Clean up iterator usage in benchmarks
f3c678c0a Constexprify constants in estimate_clock.hpp
46539b6d9 Fix spelling
10596b227 Fix unreachable-code-return warnings
897fe2a01 cmake: Improve unreachable-code warnings
aad926baf Catch.cmake: Add new DISCOVERY_MODE option to catch_discover_tests
4e8399d83 CatchAddTests.cmake: Refactor into callable method
9a2a4eadc Bump xml-format-version in XML reporter
fb806da76 Add lineinfo to XML reporter output for INFO/WARN
50bf00e26 Fix reporter detection in catch_discover_tests
9f08097f5 Cleanup internal includes by splitting out some event structs
1f881ab46 Split ITestInvoker into its own header
c487b27d9 Reduce misc includes all around
3230760db Cleanup in translating exceptions to messages
b3ebce715 Cleanup benchmarking includes
d0f70fdfd Unify IReporterRegistry and ReporterRegistry
4f4ad8ada Sprinkle some constexpr around
5b665be64 Cut out catch_interfaces_capture.hpp include from the main include
2598116aa Mark various anonymous classes final
173aa3f1f Devirtualize Context
28437e121 Remove pointless member variable from RunContext
3c8fb6bbb Internal linkage for generator trackers
72f3ce4db Outline the actual registering of listener factories to cpp file
62167d756 Reduce internal includes
678341134 Fixed extras installation and shard impl location
7b4dd326c Remove obsolete comment in multireporter
1dfaa8abe Outline throwing of TestSkipException
ba94278bd Inline trivial function in AssertionHandler
8e5a4b6f7 Remove superfluous pointer copy in AssertionStats constructor
9b884d810 Fix refactoring
8a1b3b81c Add wxWidgets as another Open Source project using Catch
e5aabb671 Add xmlwrapp to the list of Open Source projects using Catch
3a1ef1409 Use hasMessage() instead of getMessage().empty()
13fae1e2f Move exception's translation into AssertionResultData message
3220ae6d4 Add support for the IAR compiler
0a0ebf500 Support elements without op!= in VectorEquals
69f35a5ac Bazel support: Update skylib version
3f0283de7 v3.3.2
6fbb3f072 Add IsNaN matcher
9ff3cde87 Simplify test name creation for list-templated test cases
4d802ca58 Use StringRef UDL in more preprocessor-generated strings
13711be7c Use StringRef UDL for generated generator names
27ba26f74 Merge pull request #2643 from kisielk/patch-1
a209bcfb5 Update build instructions in contributing.md
584973a48 Early evaluate line loc in NameAndLoc::operator==
4f7c8cb28 Avoid copying NameAndLocationRef when passed as argument
e1dbad4c9 Inline StringRef::operator==
2befd98da Inline some non-virtual functions in ITracker and TrackerContext
00f259aeb Move captured output into TestCaseStats when sending testCaseEnded
fed143624 Avoid allocating trimmed name for SectionTracker
0477326ad Directly construct empty string for invalid SectionInfo
f04c93462 Small refactoring in AssertionResult
1af351cea Remove unused TrackerContext::endRun function
dcc9fa3f3 Use StringRef UDL for more string literals when expanding macros
bf6a15a69 Rewrite -# docs
6135a78c3 Don't insert the foo part of [.foo] tag twice when parsing test spec
e8ba329b6 Add support for iterator+sentinel pairs in Contains matcher
4aa88299a Preconstruct error message in RunContext::handleIncomplete
4ff9be3bc cmake-integration.md: Use "tests" as test target name in all examples.
76cdaa3b5 Merge pull request #2637 from jbadwaik/nvhpc_unused_warning
644294df6 Suppress declared_but_not_referenced warning for NVHPC
cefa8fcf3 Enable use of UnorderedRangeEquals with iterator+sentinel pairs
772fa3f79 Add Catch::Detail::is_permutation that supports sentinels
f3c0a3cd0 Fix RangeEquals matcher to handle iterator + sentinel ranges
42d9d4533 Add test for empty result of filter generator
618d44c44 Update docs about thread safe assertions
388f7e173 Cleanup unneeded allocations from reporters
2ab20a0e0 v3.3.1
60264b880 Avoid copying strings in sonarqube when sorting tests by file
65ffee518 Don't take ownership of SECTION's name for inactive sections
43f02027e Avoid allocations when looking for trackers
906552f8c Clean up extraneous copies in Messages
356dfc143 Move name and sample analysis in benchmarks into BenchmarkStats
e5d1eb757 Move AssertionResultData into AssertionResult in RunContext
2403f5620 Move SectionEndInfo into sectionEnded call in SECTION's destructor
d58491c85 Move sectionInfo into sectionEndInfo when SECTION ends
c837cb4a8 v3.3.0
8359a6b24 Stop exceptions in generator constructors from aborting the binary
adf43494e Add missing version information to matchers.md
efca9a0f1 Added ElementsAre and UnorderedElementsAre (#2377)
dd36f83b8 Merge pull request #2630 from ChrisThrasher/export_all_symbols
baab9e8d2 Export symbols for all compilers on Windows
2d3c9713a Remove VS2015 workaround from Detail::generate
956f915e3 Document template macros are in spearate header
aa8da505e Fix compatibility with previous CUDA versions
e27bb7198 Fix macro-redefinition issue with MSVC+CUDA
3486f8ed9 Update generator docs
b5be64204 catch_debugger.hpp: restore PPC support (#2619)
d59572f46 Reword the SKIP docs a bit
16f48f8c7 Add SUCCEED and FAIL docs next to SKIP docs
367c2cb24 Update doc about what counts as unique test case
d548be26e Add new SKIP macro for skipping tests at runtime (#2360)
52066dbc2 Fix build with GCC 13 (add missing <cstdint> include)
cdf604f30 Update command-line.md
04382af4c Slightly better clang-format
ac93f1943 Improved path normalization in approvalTests.py
72b60dfd2 Cleanup the Windows GHA builds
0c62167fe Merge pull request #2604 from ChrisThrasher/generated_includes_directory
1be954ff7 Keep generated headers within project binary directory
78bb4fda0 Mention that the benchmarks are not run by default next to example
e6ec1c238 Fix benchmarking example in the main readme
477c1f515 Fixed typo in code example in top level README.md
f8b9f7725 Prune Appveyor builds
77fbacb03 Add VS 2019-2022 C+14/17 jobs to GHA
e3fc97dff fix compiler warning in parseUint and catch only relevant exceptions (#2572)
9c0533a90 Add MessageMatches matcher for exception (#2570)
ed02710b8 Make AutoReg in test registration macros const
8b84438be Avoid usage of master when possible
git-subtree-dir: externals/catch
git-subtree-split: 53d0d913a422d356b23dd927547febdf69ee9081
272 files changed, 22209 insertions, 7920 deletions
diff --git a/.clang-format b/.clang-format index f67a5862..9efb854d 100644 --- a/.clang-format +++ b/.clang-format @@ -4,41 +4,42 @@ Standard: c++14 # Note that we cannot use IncludeIsMainRegex functionality, because it # does not support includes in angle brackets (<>) -SortIncludes: True +SortIncludes: true IncludeBlocks: Regroup IncludeCategories: - - Regex: '<catch2/.*\.hpp>' + - Regex: <catch2/.*\.hpp> Priority: 1 - - Regex: '<.*/.*\.hpp>' + - Regex: <.*/.*\.hpp> Priority: 2 - - Regex: '<.*>' + - Regex: <.*> Priority: 3 - AllowShortBlocksOnASingleLine: Always AllowShortEnumsOnASingleLine: false AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: Inline -AccessModifierOffset: '-4' +AccessModifierOffset: "-4" AlignEscapedNewlines: Left -AllowAllConstructorInitializersOnNextLine: 'true' -BinPackArguments: 'false' -BinPackParameters: 'false' +AllowAllConstructorInitializersOnNextLine: "true" +BinPackArguments: "false" +BinPackParameters: "false" BreakConstructorInitializers: AfterColon -ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' -DerivePointerAlignment: 'false' -FixNamespaceComments: 'true' -IndentCaseLabels: 'false' +ConstructorInitializerAllOnOneLineOrOnePerLine: "true" +DerivePointerAlignment: "false" +FixNamespaceComments: "true" +IndentCaseLabels: "false" IndentPPDirectives: AfterHash -IndentWidth: '4' +IndentWidth: "4" NamespaceIndentation: All PointerAlignment: Left -SpaceBeforeCtorInitializerColon: 'false' -SpaceInEmptyParentheses: 'false' -SpacesInParentheses: 'true' -TabWidth: '4' +SpaceBeforeCtorInitializerColon: "false" +SpaceInEmptyParentheses: "false" +SpacesInParentheses: "true" +TabWidth: "4" UseTab: Never - -... +AlwaysBreakTemplateDeclarations: Yes +SpaceAfterTemplateKeyword: true +SortUsingDeclarations: true +ReflowComments: true diff --git a/.github/workflows/linux-bazel-builds.yml b/.github/workflows/linux-bazel-builds.yml index 9006652e..dc826ac0 100644 --- a/.github/workflows/linux-bazel-builds.yml +++ b/.github/workflows/linux-bazel-builds.yml @@ -11,7 +11,7 @@ jobs: compilation_mode: [fastbuild, dbg, opt] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Mount bazel cache uses: actions/cache@v3 diff --git a/.github/workflows/linux-meson-builds.yml b/.github/workflows/linux-meson-builds.yml index dec701b6..4ffa0243 100644 --- a/.github/workflows/linux-meson-builds.yml +++ b/.github/workflows/linux-meson-builds.yml @@ -18,10 +18,12 @@ jobs: other_pkgs: clang-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Prepare environment - run: sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}} + run: | + sudo apt-get update + sudo apt-get install -y meson ninja-build ${{matrix.other_pkgs}} - name: Configure build env: diff --git a/.github/workflows/linux-other-builds.yml b/.github/workflows/linux-other-builds.yml index cf4e2c06..4a7f5ecc 100644 --- a/.github/workflows/linux-other-builds.yml +++ b/.github/workflows/linux-other-builds.yml @@ -29,13 +29,13 @@ jobs: build_type: Debug std: 14 other_pkgs: g++-7 - cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON - cxx: g++-7 build_description: Extras + Examples build_type: Release std: 14 other_pkgs: g++-7 - cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON # Extras and examples with Clang-10 - cxx: clang++-10 @@ -43,13 +43,13 @@ jobs: build_type: Debug std: 17 other_pkgs: clang-10 - cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON - cxx: clang++-10 build_description: Extras + Examples build_type: Release std: 17 other_pkgs: clang-10 - cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON + cmake_configurations: -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_ENABLE_CMAKE_HELPER_TESTS=ON # Configure tests with Clang-10 - cxx: clang++-10 @@ -70,10 +70,12 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Prepare environment - run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} - name: Configure build working-directory: ${{runner.workspace}} diff --git a/.github/workflows/linux-simple-builds.yml b/.github/workflows/linux-simple-builds.yml index 989c4942..a32eb597 100644 --- a/.github/workflows/linux-simple-builds.yml +++ b/.github/workflows/linux-simple-builds.yml @@ -83,7 +83,7 @@ jobs: other_pkgs: g++-10 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Add repositories for older GCC run: | @@ -92,7 +92,9 @@ jobs: if: ${{ matrix.cxx == 'g++-5' || matrix.cxx == 'g++-6' }} - name: Prepare environment - run: sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ${{matrix.other_pkgs}} - name: Configure build working-directory: ${{runner.workspace}} diff --git a/.github/workflows/mac-builds.yml b/.github/workflows/mac-builds.yml index 955b81fc..259d8b36 100644 --- a/.github/workflows/mac-builds.yml +++ b/.github/workflows/mac-builds.yml @@ -22,7 +22,7 @@ jobs: extra_tests: ON steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Configure build working-directory: ${{runner.workspace}} @@ -42,11 +42,10 @@ jobs: - name: Build tests + lib working-directory: ${{runner.workspace}}/build - run: make -j 2 + run: make -j `sysctl -n hw.ncpu` - name: Run tests env: CTEST_OUTPUT_ON_FAILURE: 1 working-directory: ${{runner.workspace}}/build - # Hardcode 2 cores we know are there - run: ctest -C ${{matrix.build_type}} -j 2 + run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` diff --git a/.github/workflows/validate-header-guards.yml b/.github/workflows/validate-header-guards.yml index c02b5d49..fa9d1574 100644 --- a/.github/workflows/validate-header-guards.yml +++ b/.github/workflows/validate-header-guards.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Checkout source code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Dependencies uses: actions/setup-python@v2 diff --git a/.github/workflows/windows-simple-builds.yml b/.github/workflows/windows-simple-builds.yml new file mode 100644 index 00000000..5fb7b8fe --- /dev/null +++ b/.github/workflows/windows-simple-builds.yml @@ -0,0 +1,37 @@ +name: Windows builds (basic) + +on: [push, pull_request] + +jobs: + build: + name: ${{matrix.os}}, ${{matrix.std}}, ${{matrix.build_type}}, ${{matrix.platform}} + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [windows-2019, windows-2022] + platform: [Win32, x64] + build_type: [Debug, Release] + std: [14, 17] + steps: + - uses: actions/checkout@v4 + + - name: Configure build + working-directory: ${{runner.workspace}} + run: | + cmake -S $Env:GITHUB_WORKSPACE ` + -B ${{runner.workspace}}/build ` + -DCMAKE_CXX_STANDARD=${{matrix.std}} ` + -A ${{matrix.platform}} ` + --preset all-tests + + - name: Build tests + working-directory: ${{runner.workspace}} + run: cmake --build build --config ${{matrix.build_type}} --parallel %NUMBER_OF_PROCESSORS% + shell: cmd + + - name: Run tests + working-directory: ${{runner.workspace}}/build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + run: ctest -C ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS% + shell: cmd diff --git a/BUILD.bazel b/BUILD.bazel index 3125e7c5..c51bf57e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -43,12 +43,15 @@ expand_template( "#cmakedefine CATCH_CONFIG_NO_GLOBAL_NEXTAFTER": "", "#cmakedefine CATCH_CONFIG_NO_POSIX_SIGNALS": "", "#cmakedefine CATCH_CONFIG_NO_USE_ASYNC": "", + "#cmakedefine CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT": "", "#cmakedefine CATCH_CONFIG_NO_WCHAR": "", "#cmakedefine CATCH_CONFIG_NO_WINDOWS_SEH": "", "#cmakedefine CATCH_CONFIG_NOSTDOUT": "", "#cmakedefine CATCH_CONFIG_POSIX_SIGNALS": "", "#cmakedefine CATCH_CONFIG_PREFIX_ALL": "", + "#cmakedefine CATCH_CONFIG_PREFIX_MESSAGES": "", "#cmakedefine CATCH_CONFIG_SHARED_LIBRARY": "", + "#cmakedefine CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT": "", "#cmakedefine CATCH_CONFIG_USE_ASYNC": "", "#cmakedefine CATCH_CONFIG_WCHAR": "", "#cmakedefine CATCH_CONFIG_WINDOWS_CRTDBG": "", diff --git a/CMake/CatchConfigOptions.cmake b/CMake/CatchConfigOptions.cmake index 733ec65e..6eae220d 100644 --- a/CMake/CatchConfigOptions.cmake +++ b/CMake/CatchConfigOptions.cmake @@ -18,10 +18,12 @@ macro(AddOverridableConfigOption OptionBaseName) option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF) option(CATCH_CONFIG_NO_${OptionBaseName} "Read docs/configuration.md for details" OFF) + mark_as_advanced(CATCH_CONFIG_${OptionBaseName} CATCH_CONFIG_NO_${OptionBaseName}) endmacro() macro(AddConfigOption OptionBaseName) option(CATCH_CONFIG_${OptionBaseName} "Read docs/configuration.md for details" OFF) + mark_as_advanced(CATCH_CONFIG_${OptionBaseName}) endmacro() set(_OverridableOptions @@ -41,6 +43,7 @@ set(_OverridableOptions "WCHAR" "WINDOWS_SEH" "GETENV" + "EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT" ) foreach(OptionName ${_OverridableOptions}) @@ -61,6 +64,7 @@ set(_OtherConfigOptions "FAST_COMPILE" "NOSTDOUT" "PREFIX_ALL" + "PREFIX_MESSAGES" "WINDOWS_CRTDBG" ) @@ -68,11 +72,17 @@ set(_OtherConfigOptions foreach(OptionName ${_OtherConfigOptions}) AddConfigOption(${OptionName}) endforeach() -set(CATCH_CONFIG_SHARED_LIBRARY ${BUILD_SHARED_LIBS}) +if(DEFINED BUILD_SHARED_LIBS) + set(CATCH_CONFIG_SHARED_LIBRARY ${BUILD_SHARED_LIBS}) +else() + set(CATCH_CONFIG_SHARED_LIBRARY "") +endif() set(CATCH_CONFIG_DEFAULT_REPORTER "console" CACHE STRING "Read docs/configuration.md for details. The name of the reporter should be without quotes.") set(CATCH_CONFIG_CONSOLE_WIDTH "80" CACHE STRING "Read docs/configuration.md for details. Must form a valid integer literal.") +mark_as_advanced(CATCH_CONFIG_SHARED_LIBRARY CATCH_CONFIG_DEFAULT_REPORTER CATCH_CONFIG_CONSOLE_WIDTH) + # There is no good way to both turn this into a CMake cache variable, # and keep reasonable default semantics inside the project. Thus we do # not define it and users have to provide it as an outside variable. diff --git a/CMake/CatchMiscFunctions.cmake b/CMake/CatchMiscFunctions.cmake index 3758d956..de6b7ae3 100644 --- a/CMake/CatchMiscFunctions.cmake +++ b/CMake/CatchMiscFunctions.cmake @@ -46,7 +46,6 @@ function(add_warnings_to_targets targets) set(CHECKED_WARNING_FLAGS "-Wabsolute-value" "-Wall" - "-Wc++20-compat" "-Wcall-to-pure-virtual-from-ctor-dtor" "-Wcast-align" "-Wcatch-value" @@ -74,6 +73,7 @@ function(add_warnings_to_targets targets) "-Woverloaded-virtual" "-Wparentheses" "-Wpedantic" + "-Wredundant-decls" "-Wreorder" "-Wreturn-std-move" "-Wshadow" @@ -83,7 +83,7 @@ function(add_warnings_to_targets targets) "-Wundef" "-Wuninitialized" "-Wunneeded-internal-declaration" - "-Wunreachable-code" + "-Wunreachable-code-aggressive" "-Wunused" "-Wunused-function" "-Wunused-parameter" diff --git a/CMakeLists.txt b/CMakeLists.txt index d5a6b67a..2cfb6cd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ cmake_dependent_option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" cmake_dependent_option(CATCH_ENABLE_WERROR "Enables Werror during build" ON "CATCH_DEVELOPMENT_BUILD" OFF) cmake_dependent_option(CATCH_BUILD_SURROGATES "Enable generating and building surrogate TUs for the main headers" OFF "CATCH_DEVELOPMENT_BUILD" OFF) cmake_dependent_option(CATCH_ENABLE_CONFIGURE_TESTS "Enable CMake configuration tests. WARNING: VERY EXPENSIVE" OFF "CATCH_DEVELOPMENT_BUILD" OFF) +cmake_dependent_option(CATCH_ENABLE_CMAKE_HELPER_TESTS "Enable CMake helper tests. WARNING: VERY EXPENSIVE" OFF "CATCH_DEVELOPMENT_BUILD" OFF) # Catch2's build breaks if done in-tree. You probably should not build @@ -31,7 +32,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif() project(Catch2 - VERSION 3.2.1 # CML version placeholder, don't delete + VERSION 3.5.0 # CML version placeholder, don't delete LANGUAGES CXX # HOMEPAGE_URL is not supported until CMake version 3.12, which # we do not target yet. @@ -148,6 +149,8 @@ if (NOT_SUBPROJECT) "extras/ParseAndAddCatchTests.cmake" "extras/Catch.cmake" "extras/CatchAddTests.cmake" + "extras/CatchShardTests.cmake" + "extras/CatchShardTestsImpl.cmake" DESTINATION ${CATCH_CMAKE_CONFIG_DESTINATION} ) diff --git a/CMakePresets.json b/CMakePresets.json index 00f3a6d3..88541285 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -18,7 +18,8 @@ "CATCH_BUILD_EXAMPLES": "ON", "CATCH_BUILD_EXTRA_TESTS": "ON", "CATCH_BUILD_SURROGATES": "ON", - "CATCH_ENABLE_CONFIGURE_TESTS": "ON" + "CATCH_ENABLE_CONFIGURE_TESTS": "ON", + "CATCH_ENABLE_CMAKE_HELPER_TESTS": "ON" } } ] @@ -1319,7 +1319,7 @@ CHM_FILE = HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -47,24 +47,28 @@ TEST_CASE( "Factorials are computed", "[factorial]" ) { #include <cstdint> uint64_t fibonacci(uint64_t number) { - return number < 2 ? 1 : fibonacci(number - 1) + fibonacci(number - 2); + return number < 2 ? number : fibonacci(number - 1) + fibonacci(number - 2); } TEST_CASE("Benchmark Fibonacci", "[!benchmark]") { - REQUIRE(Fibonacci(5) == 5); + REQUIRE(fibonacci(5) == 5); - REQUIRE(Fibonacci(20) == 6'765); - BENCHMARK("Fibonacci 20") { - return Fibonacci(20); + REQUIRE(fibonacci(20) == 6'765); + BENCHMARK("fibonacci 20") { + return fibonacci(20); }; - REQUIRE(Fibonacci(25) == 75'025); - BENCHMARK("Fibonacci 25") { - return Fibonacci(25); + REQUIRE(fibonacci(25) == 75'025); + BENCHMARK("fibonacci 25") { + return fibonacci(25); }; } ``` +_Note that benchmarks are not run by default, so you need to run it explicitly +with the `[!benchmark]` tag._ + + ## Catch2 v3 has been released! You are on the `devel` branch, where the v3 version is being developed. diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 6fd2ffa5..a5c6182d 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -4,12 +4,13 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel_skylib", + sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", ], - sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + bazel_skylib_workspace() diff --git a/appveyor.yml b/appveyor.yml index a8f77df0..7a0ad83f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,18 +51,6 @@ test_script: # build explicitly. environment: matrix: - - FLAVOR: VS 2019 x64 Debug Surrogates Configure Tests - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - surrogates: 1 - configure_tests: 1 - platform: x64 - configuration: Debug - - - FLAVOR: VS 2019 x64 Release - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - platform: x64 - configuration: Release - - FLAVOR: VS 2019 x64 Debug Coverage Examples APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 examples: 1 @@ -77,53 +65,8 @@ environment: platform: x64 configuration: Debug - - FLAVOR: VS 2019 Win32 Debug - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - platform: Win32 - configuration: Debug - - FLAVOR: VS 2019 x64 Debug Latest Strict APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 additional_flags: "/permissive- /std:c++latest" platform: x64 configuration: Debug - - - FLAVOR: VS 2017 x64 Debug - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - platform: x64 - configuration: Debug - - - FLAVOR: VS 2017 x64 Release - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - platform: x64 - configuration: Release - - - FLAVOR: VS 2017 x64 Release Coverage - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - coverage: 1 - platform: x64 - configuration: Debug - - - FLAVOR: VS 2017 Win32 Debug - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - platform: Win32 - configuration: Debug - - - FLAVOR: VS 2017 Win32 Debug Examples - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - examples: 1 - platform: Win32 - configuration: Debug - - - FLAVOR: VS 2017 Win32 Debug WMain - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - wmain: 1 - additional_flags: "/D_UNICODE /DUNICODE" - platform: Win32 - configuration: Debug - - - FLAVOR: VS 2017 x64 Debug Latest Strict - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - additional_flags: "/permissive- /std:c++latest" - platform: x64 - configuration: Debug diff --git a/docs/Readme.md b/docs/Readme.md index 52eb64a5..d84b4bfd 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -11,6 +11,7 @@ Once you're up and running consider the following reference material. * [Logging macros](logging.md#top) * [Test cases and sections](test-cases-and-sections.md#top) * [Test fixtures](test-fixtures.md#top) +* [Explicitly skipping, passing, and failing tests at runtime](skipping-passing-failing.md#top) * [Reporters (output customization)](reporters.md#top) * [Event Listeners](event-listeners.md#top) * [Data Generators (value parameterized tests)](generators.md#top) diff --git a/docs/benchmarks.md b/docs/benchmarks.md index 548913c7..9edbb93c 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -93,7 +93,7 @@ Fibonacci ------------------------------------------------------------------------------- C:\path\to\Catch2\Benchmark.tests.cpp(10) ............................................................................... -benchmark name samples iterations estimated +benchmark name samples iterations est run time mean low mean high mean std dev low std dev high std dev ------------------------------------------------------------------------------- diff --git a/docs/ci-and-misc.md b/docs/ci-and-misc.md index c07da29f..49bbd989 100644 --- a/docs/ci-and-misc.md +++ b/docs/ci-and-misc.md @@ -82,7 +82,7 @@ variable set to "1". ### CodeCoverage module (GCOV, LCOV...) -If you are using GCOV tool to get testing coverage of your code, and are not sure how to integrate it with CMake and Catch, there should be an external example over at https://github.com/fkromer/catch_cmake_coverage +If you are using GCOV tool to get testing coverage of your code, and are not sure how to integrate it with CMake and Catch, there should be an external example over at https://github.com/claremacrae/catch_cmake_coverage ### pkg-config diff --git a/docs/cmake-integration.md b/docs/cmake-integration.md index dd0f9e26..86666efe 100644 --- a/docs/cmake-integration.md +++ b/docs/cmake-integration.md @@ -51,7 +51,7 @@ Include(FetchContent) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.0.1 # or a later release + GIT_TAG v3.4.0 # or a later release ) FetchContent_MakeAvailable(Catch2) @@ -90,12 +90,12 @@ cmake_minimum_required(VERSION 3.5) project(baz LANGUAGES CXX VERSION 0.0.1) find_package(Catch2 REQUIRED) -add_executable(foo test.cpp) -target_link_libraries(foo PRIVATE Catch2::Catch2) +add_executable(tests test.cpp) +target_link_libraries(tests PRIVATE Catch2::Catch2) include(CTest) include(Catch) -catch_discover_tests(foo) +catch_discover_tests(tests) ``` When using `FetchContent`, `include(Catch)` will fail unless @@ -108,7 +108,7 @@ directory. list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) include(CTest) include(Catch) -catch_discover_tests() +catch_discover_tests(tests) ``` #### Customization @@ -126,6 +126,7 @@ catch_discover_tests(target [OUTPUT_DIR dir] [OUTPUT_PREFIX prefix] [OUTPUT_SUFFIX suffix] + [DISCOVERY_MODE <POST_BUILD|PRE_TEST>] ) ``` @@ -198,6 +199,16 @@ If specified, `suffix` is added to each output file name, like so `--out dir/<test_name>suffix`. This can be used to add a file extension to the output file name e.g. ".xml". +* `DISCOVERY_MODE mode` + +If specified allows control over when test discovery is performed. +For a value of `POST_BUILD` (default) test discovery is performed at build time. +For a value of `PRE_TEST` test discovery is delayed until just prior to test +execution (useful e.g. in cross-compilation environments). +``DISCOVERY_MODE`` defaults to the value of the +``CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE`` variable if it is not passed when +calling ``catch_discover_tests``. This provides a mechanism for globally +selecting a preferred test discovery behavior. ### `ParseAndAddCatchTests.cmake` @@ -222,12 +233,12 @@ cmake_minimum_required(VERSION 3.5) project(baz LANGUAGES CXX VERSION 0.0.1) find_package(Catch2 REQUIRED) -add_executable(foo test.cpp) -target_link_libraries(foo PRIVATE Catch2::Catch2) +add_executable(tests test.cpp) +target_link_libraries(tests PRIVATE Catch2::Catch2) include(CTest) include(ParseAndAddCatchTests) -ParseAndAddCatchTests(foo) +ParseAndAddCatchTests(tests) ``` diff --git a/docs/command-line.md b/docs/command-line.md index 21a0da4c..bb483959 100644 --- a/docs/command-line.md +++ b/docs/command-line.md @@ -85,43 +85,102 @@ Click one of the following links to take you straight to that option - or scroll <pre><test-spec> ...</pre> -Test cases, wildcarded test cases, tags and tag expressions are all passed directly as arguments. Tags are distinguished by being enclosed in square brackets. +By providing a test spec, you filter which tests will be run. If you call +Catch2 without any test spec, then it will run all non-hidden test +cases. A test case is hidden if it has the `[!benchmark]` tag, any tag +with a dot at the start, e.g. `[.]` or `[.foo]`. -If no test specs are supplied then all test cases, except "hidden" tests, are run. -A test is hidden by giving it any tag starting with (or just) a period (```.```) - or, in the deprecated case, tagged ```[hide]``` or given name starting with `'./'`. To specify hidden tests from the command line ```[.]``` or ```[hide]``` can be used *regardless of how they were declared*. +There are three basic test specs that can then be combined into more +complex specs: -Specs must be enclosed in quotes if they contain spaces. If they do not contain spaces the quotes are optional. + * Full test name, e.g. `"Test 1"`. -Wildcards consist of the `*` character at the beginning and/or end of test case names and can substitute for any number of any characters (including none). + This allows only test cases whose name is "Test 1". -Test specs are case insensitive. + * Wildcarded test name, e.g. `"*Test"`, or `"Test*"`, or `"*Test*"`. -If a spec is prefixed with `exclude:` or the `~` character then the pattern matches an exclusion. This means that tests matching the pattern are excluded from the set - even if a prior inclusion spec included them. Subsequent inclusion specs will take precedence, however. -Inclusions and exclusions are evaluated in left-to-right order. + This allows any test case whose name ends with, starts with, or contains + in the middle the string "Test". Note that the wildcard can only be at + the start or end. -Test case examples: + * Tag name, e.g. `[some-tag]`. + This allows any test case tagged with "[some-tag]". Remember that some + tags are special, e.g. those that start with "." or with "!". + + +You can also combine the basic test specs to create more complex test +specs. You can: + + * Concatenate specs to apply all of them, e.g. `[some-tag][other-tag]`. + + This allows test cases that are tagged with **both** "[some-tag]" **and** + "[other-tag]". A test case with just "[some-tag]" will not pass the filter, + nor will test case with just "[other-tag]". + + * Comma-join specs to apply any of them, e.g. `[some-tag],[other-tag]`. + + This allows test cases that are tagged with **either** "[some-tag]" **or** + "[other-tag]". A test case with both will obviously also pass the filter. + + Note that commas take precendence over simple concatenation. This means + that `[a][b],[c]` accepts tests that are tagged with either both "[a]" and + "[b]", or tests that are tagged with just "[c]". + + * Negate the spec by prepending it with `~`, e.g. `~[some-tag]`. + + This rejects any test case that is tagged with "[some-tag]". Note that + rejection takes precedence over other filters. + + Note that negations always binds to the following _basic_ test spec. + This means that `~[foo][bar]` negates only the "[foo]" tag and not the + "[bar]" tag. + +Note that when Catch2 is deciding whether to include a test, first it +checks whether the test matches any negative filters. If it does, +the test is rejected. After that, the behaviour depends on whether there +are positive filters as well. If there are no positive filters, all +remaining non-hidden tests are included. If there are positive filters, +only tests that match the positive filters are included. + +You can also match test names with special characters by escaping them +with a backslash (`"\"`), e.g. a test named `"Do A, then B"` is matched +by "Do A\, then B" test spec. Backslash also escapes itself. + + +### Examples + +Given these TEST_CASEs, ``` -thisTestOnly Matches the test case called, 'thisTestOnly' -"this test only" Matches the test case called, 'this test only' -these* Matches all cases starting with 'these' -exclude:notThis Matches all tests except, 'notThis' -~notThis Matches all tests except, 'notThis' -~*private* Matches all tests except those that contain 'private' -a* ~ab* abc Matches all tests that start with 'a', except those that - start with 'ab', except 'abc', which is included -~[tag1] Matches all tests except those tagged with '[tag1]' --# [#somefile] Matches all tests from the file 'somefile.cpp' +TEST_CASE("Test 1") {} + +TEST_CASE("Test 2", "[.foo]") {} + +TEST_CASE("Test 3", "[.bar]") {} + +TEST_CASE("Test 4", "[.][foo][bar]") {} ``` -Names within square brackets are interpreted as tags. -A series of tags form an AND expression whereas a comma-separated sequence forms an OR expression. e.g.: +this is the result of these filters +``` +./tests # Selects only the first test, others are hidden +./tests "Test 1" # Selects only the first test, other do not match +./tests ~"Test 1" # Selects no tests. Test 1 is rejected, other tests are hidden +./tests "Test *" # Selects all tests. +./tests [bar] # Selects tests 3 and 4. Other tests are not tagged [bar] +./tests ~[foo] # Selects test 1, because it is the only non-hidden test without [foo] tag +./tests [foo][bar] # Selects test 4. +./tests [foo],[bar] # Selects tests 2, 3, 4. +./tests ~[foo][bar] # Selects test 3. 2 and 4 are rejected due to having [foo] tag +./tests ~"Test 2"[foo] # Selects test 4, because test 2 is explicitly rejected +./tests [foo][bar],"Test 1" # Selects tests 1 and 4. +./tests "Test 1*" # Selects test 1, wildcard can match zero characters +``` -<pre>[one][two],[three]</pre> -This matches all tests tagged `[one]` and `[two]`, as well as all tests tagged `[three]` +_Note: Using plain asterisk on a command line can cause issues with shell +expansion. Make sure that the asterisk is passed to Catch2 and is not +interpreted by the shell._ -Test names containing special characters, such as `,` or `[` can specify them on the command line using `\`. -`\` also escapes itself. <a id="choosing-a-reporter-to-use"></a> ## Choosing a reporter to use @@ -148,7 +207,7 @@ validity, and throw an error if they are wrong._ > Support for passing arguments to reporters through the `-r`, `--reporter` flag was introduced in Catch2 3.0.1 There are multiple built-in reporters, you can see what they do by using the -[`--list-reporter`](command-line.md#listing-available-tests-tags-or-reporters) +[`--list-reporters`](command-line.md#listing-available-tests-tags-or-reporters) flag. If you need a reporter providing custom format outside of the already provided ones, look at the ["write your own reporter" part of the reporter documentation](reporters.md#writing-your-own-reporter). @@ -507,10 +566,13 @@ start of the first section.</br> ## Filenames as tags <pre>-#, --filenames-as-tags</pre> -When this option is used then every test is given an additional tag which is formed of the unqualified -filename it is found in, with any extension stripped, prefixed with the `#` character. +This option adds an extra tag to all test cases. The tag is `#` followed +by the unqualified filename the test case is defined in, with the _last_ +extension stripped out. + +For example, tests within the file `tests\SelfTest\UsageTests\BDD.tests.cpp` +will be given the `[#BDD.tests]` tag. -So, for example, tests within the file `~\Dev\MyProject\Ferrets.cpp` would be tagged `[#Ferrets]`. <a id="colour-mode"></a> ## Override output colouring @@ -561,10 +623,10 @@ processes, as is done with the [Bazel test sharding](https://docs.bazel.build/ve > Introduced in Catch2 3.0.1. -By default, Catch2 test binaries return non-0 exit code if no tests were -run, e.g. if the binary was compiled with no tests, or the provided test -spec matched no tests. This flag overrides that, so a test run with no -tests still returns 0. +By default, Catch2 test binaries return non-0 exit code if no tests were run, +e.g. if the binary was compiled with no tests, the provided test spec matched no +tests, or all tests [were skipped at runtime](skipping-passing-failing.md#top). This flag +overrides that, so a test run with no tests still returns 0. ## Output verbosity ``` diff --git a/docs/configuration.md b/docs/configuration.md index d4421f3c..8a3ddfab 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -15,6 +15,7 @@ [Enabling stringification](#enabling-stringification)<br> [Disabling exceptions](#disabling-exceptions)<br> [Overriding Catch's debug break (`-b`)](#overriding-catchs-debug-break--b)<br> +[Static analysis support](#static-analysis-support)<br> Catch2 is designed to "just work" as much as possible, and most of the configuration options below are changed automatically during compilation, @@ -25,7 +26,8 @@ with the same name. ## Prefixing Catch macros - CATCH_CONFIG_PREFIX_ALL + CATCH_CONFIG_PREFIX_ALL // Prefix all macros with CATCH_ + CATCH_CONFIG_PREFIX_MESSAGES // Prefix only INFO, UNSCOPED_INFO, WARN and CAPTURE To keep test code clean and uncluttered Catch uses short macro names (e.g. ```TEST_CASE``` and ```REQUIRE```). Occasionally these may conflict with identifiers from platform headers or the system under test. In this case the above identifier can be defined. This will cause all the Catch user macros to be prefixed with ```CATCH_``` (e.g. ```CATCH_TEST_CASE``` and ```CATCH_REQUIRE```). @@ -264,6 +266,31 @@ The macro will be used as is, that is, `CATCH_BREAK_INTO_DEBUGGER();` must compile and must break into debugger. +## Static analysis support + +> Introduced in Catch2 3.4.0. + +Some parts of Catch2, e.g. `SECTION`s, can be hard for static analysis +tools to reason about. Catch2 can change its internals to help static +analysis tools reason about the tests. + +Catch2 automatically detects some static analysis tools (initial +implementation checks for clang-tidy and Coverity), but you can override +its detection (in either direction) via + +``` +CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT // force enables static analysis help +CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT // force disables static analysis help +``` + +_As the name suggests, this is currently experimental, and thus we provide +no backwards compatibility guarantees._ + +**DO NOT ENABLE THIS FOR BUILDS YOU INTEND TO RUN.** The changed internals +are not meant to be runnable, only "scannable". + + + --- [Home](Readme.md#top) diff --git a/docs/contributing.md b/docs/contributing.md index a4c9220b..d9f87fc1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -55,6 +55,15 @@ 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. +To configure a Catch2 build with just the basic tests, use the `basic-tests` +preset, like so: + +``` +# Assuming you are in Catch2's root folder + +cmake -B basic-test-build -S . -DCMAKE_BUILD_TYPE=Debug --preset basic-tests +``` + 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 @@ -76,21 +85,23 @@ configuration and require separate compilation. Finally, CMake config tests test that you set Catch2's compile-time configuration options through CMake, using CMake options of the same name. -None of these tests are enabled by default. To enable them, add +These test categories can be enabled one by one, by passing `-DCATCH_BUILD_EXAMPLES=ON`, `-DCATCH_BUILD_EXTRA_TESTS=ON`, and -`-DCATCH_ENABLE_CONFIGURE_TESTS=ON` when configuration the CMake build. +`-DCATCH_ENABLE_CONFIGURE_TESTS=ON` when configuring the build. + +Catch2 also provides a preset that promises to enable _all_ test types, +`all-tests`. -Bringing this all together, the steps below should configure, build, -and run all tests in the `Debug` compilation. +The snippet below will build & run all tests, in `Debug` compilation mode. <!-- snippet: catch2-build-and-test --> <a id='snippet-catch2-build-and-test'></a> ```sh -# 1. Regenerate the amalgamated distribution +# 1. Regenerate the amalgamated distribution (some tests are built against it) ./tools/scripts/generateAmalgamatedFiles.py # 2. Configure the full test build -cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON +cmake -B debug-build -S . -DCMAKE_BUILD_TYPE=Debug --preset all-tests # 3. Run the actual build cmake --build debug-build diff --git a/docs/deprecations.md b/docs/deprecations.md index 2c9bf551..1fb79aaa 100644 --- a/docs/deprecations.md +++ b/docs/deprecations.md @@ -26,6 +26,15 @@ to accurately probe the environment for this information so the flag where it will export `BAZEL_TEST=1` for purposes like the above. Catch2 will now instead inspect the environment instead of relying on build configuration. +### `IEventLister::skipTest( TestCaseInfo const& testInfo )` + +This event (including implementations in derived classes such as `ReporterBase`) +is deprecated and will be removed in the next major release. It is currently +invoked for all test cases that are not going to be executed due to the test run +being aborted (when using `--abort` or `--abortx`). It is however +**NOT** invoked for test cases that are [explicitly skipped using the `SKIP` +macro](skipping-passing-failing.md#top). + --- [Home](Readme.md#top) diff --git a/docs/faq.md b/docs/faq.md index 0f303ee5..80923d26 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -10,6 +10,7 @@ [Does Catch2 support running tests in parallel?](#does-catch2-support-running-tests-in-parallel)<br> [Can I compile Catch2 into a dynamic library?](#can-i-compile-catch2-into-a-dynamic-library)<br> [What repeatability guarantees does Catch2 provide?](#what-repeatability-guarantees-does-catch2-provide)<br> +[My build cannot find `catch2/catch_user_config.hpp`, how can I fix it?](#my-build-cannot-find-catch2catch_user_confighpp-how-can-i-fix-it)<br> ## How do I run global setup/teardown only if tests will be run? @@ -28,7 +29,7 @@ depending on how often the cleanup needs to happen. ## Why cannot I derive from the built-in reporters? They are not made to be overridden, in that we do not attempt to maintain -a consistent internal state if a member function is overriden, and by +a consistent internal state if a member function is overridden, and by forbidding users from using them as a base class, we can refactor them as needed later. @@ -83,12 +84,30 @@ and it is also generally repeatable across versions, but we might break it from time to time. E.g. we broke repeatability with previous versions in v2.13.4 so that test cases with similar names are shuffled better. -Random generators currently rely on platform's stdlib, specifically -the distributions from `<random>`. We thus provide no extra guarantee -above what your platform does. **Important: `<random>`'s distributions +Since Catch2 3.5.0 the random generators use custom distributions, +that should be repeatable across different platforms, with few caveats. +For details see the section on random generators in the [Generator +documentation](generators.md#random-number-generators-details). + +Before this version, random generators relied on distributions from +platform's stdlib. We thus can provide no extra guarantee on top of the +ones given by your platform. **Important: `<random>`'s distributions are not specified to be repeatable across different platforms.** +## My build cannot find `catch2/catch_user_config.hpp`, how can I fix it? + +`catch2/catch_user_config.hpp` is a generated header that contains user +compile time configuration. It is generated by CMake/Meson/Bazel during +build. If you are not using either of these, your three options are to + +1) Build Catch2 separately using build tool that will generate the header +2) Use the amalgamated files to build Catch2 +3) Use CMake to configure a build. This will generate the header and you + can copy it into your own checkout of Catch2. + + + --- [Home](Readme.md#top) diff --git a/docs/generators.md b/docs/generators.md index 7a865d43..8bca54c7 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -134,7 +134,7 @@ type, making their usage much nicer. These are * `map<T>(func, GeneratorWrapper<U>&&)` for `MapGenerator<T, U, Func>` (map `U` to `T`) * `chunk(chunk-size, GeneratorWrapper<T>&&)` for `ChunkGenerator<T>` * `random(IntegerOrFloat a, IntegerOrFloat b)` for `RandomIntegerGenerator` or `RandomFloatGenerator` -* `range(Arithemtic start, Arithmetic end)` for `RangeGenerator<Arithmetic>` with a step size of `1` +* `range(Arithmetic start, Arithmetic end)` for `RangeGenerator<Arithmetic>` with a step size of `1` * `range(Arithmetic start, Arithmetic end, Arithmetic step)` for `RangeGenerator<Arithmetic>` with a custom step size * `from_range(InputIterator from, InputIterator to)` for `IteratorGenerator<T>` * `from_range(Container const&)` for `IteratorGenerator<T>` @@ -189,6 +189,31 @@ TEST_CASE("type conversion", "[generators]") { } ``` + +### Random number generators: details + +> This section applies from Catch2 3.5.0. Before that, random generators +> were a thin wrapper around distributions from `<random>`. + +All of the `random(a, b)` generators in Catch2 currently generate uniformly +distributed number in closed interval \[a; b\]. This is different from +`std::uniform_real_distribution`, which should return numbers in interval +\[a; b) (but due to rounding can end up returning b anyway), but the +difference is intentional, so that `random(a, a)` makes sense. If there is +enough interest from users, we can provide API to pick any of CC, CO, OC, +or OO ranges. + +Unlike `std::uniform_int_distribution`, Catch2's generators also support +various single-byte integral types, such as `char` or `bool`. + +Given the same seed, the output from the integral generators is +reproducible across different platforms. For floating point generators, +we only promise reproducibility on platforms that obey the IEEE 754 +standard, and where `float` is 4 bytes and `double` is 8 bytes. We provide +no guarantees for `long double`, as the internals of `long double` can +vary wildly across different platforms. + + ## Generator interface You can also implement your own generators, by deriving from the @@ -205,15 +230,37 @@ struct IGenerator : GeneratorUntypedBase { // Precondition: // The generator is either freshly constructed or the last call to next() returned true virtual T const& get() const = 0; + + // Returns user-friendly string showing the current generator element + // Does not have to be overridden, IGenerator provides default implementation + virtual std::string stringifyImpl() const; }; ``` However, to be able to use your custom generator inside `GENERATE`, it will need to be wrapped inside a `GeneratorWrapper<T>`. `GeneratorWrapper<T>` is a value wrapper around a -`std::unique_ptr<IGenerator<T>>`. +`Catch::Detail::unique_ptr<IGenerator<T>>`. For full example of implementing your own generator, look into Catch2's examples, specifically [Generators: Create your own generator](../examples/300-Gen-OwnGenerator.cpp). + +### Handling empty generators + +The generator interface assumes that a generator always has at least one +element. This is not always true, e.g. if the generator depends on an external +datafile, the file might be missing. + +There are two ways to handle this, depending on whether you want this +to be an error or not. + + * If empty generator **is** an error, throw an exception in constructor. + * If empty generator **is not** an error, use the [`SKIP`](skipping-passing-failing.md#skipping-test-cases-at-runtime) in constructor. + + + +--- + +[Home](Readme.md#top) diff --git a/docs/limitations.md b/docs/limitations.md index 80471865..099dd82a 100644 --- a/docs/limitations.md +++ b/docs/limitations.md @@ -88,8 +88,8 @@ because only one thread passes the `REQUIRE` macro and this is not REQUIRE(cnt == 16); ``` -Because C++11 provides the necessary tools to do this, we are planning -to remove this limitation in the future. +We currently do not plan to support thread-safe assertions. + ### Process isolation in a test Catch does not support running tests in isolated (forked) processes. While this might in the future, the fact that Windows does not support forking and only allows full-on process creation and the desire to keep code as similar as possible across platforms, mean that this is likely to take significant development time, that is not currently available. @@ -155,7 +155,7 @@ with expansion: ### Clang/G++ -- skipping leaf sections after an exception -Some versions of `libc++` and `libstdc++` (or their runtimes) have a bug with `std::uncaught_exception()` getting stuck returning `true` after rethrow, even if there are no active exceptions. One such case is this snippet, which skipped the sections "a" and "b", when compiled against `libcxxrt` from master +Some versions of `libc++` and `libstdc++` (or their runtimes) have a bug with `std::uncaught_exception()` getting stuck returning `true` after rethrow, even if there are no active exceptions. One such case is this snippet, which skipped the sections "a" and "b", when compiled against `libcxxrt` from the master branch ```cpp #include <catch2/catch_test_macros.hpp> @@ -173,13 +173,3 @@ TEST_CASE("b") { If you are seeing a problem like this, i.e. weird test paths that trigger only under Clang with `libc++`, or only under very specific version of `libstdc++`, it is very likely you are seeing this. The only known workaround is to use a fixed version of your standard library. - -### libstdc++, `_GLIBCXX_DEBUG` macro and random ordering of tests - -Running a Catch2 binary compiled against libstdc++ with `_GLIBCXX_DEBUG` -macro defined with `--order rand` will cause a debug check to trigger and -abort the run due to self-assignment. -[This is a known bug inside libstdc++](https://stackoverflow.com/questions/22915325/avoiding-self-assignment-in-stdshuffle/23691322) - -Workaround: Don't use `--order rand` when compiling against debug-enabled -libstdc++. diff --git a/docs/matchers.md b/docs/matchers.md index d3afe0f4..b96cc5f4 100644 --- a/docs/matchers.md +++ b/docs/matchers.md @@ -141,18 +141,27 @@ are a permutation of the ones in `some_vec`. ### Floating point matchers -Catch2 provides 3 matchers that target floating point numbers. These +Catch2 provides 4 matchers that target floating point numbers. These are: * `WithinAbs(double target, double margin)`, * `WithinULP(FloatingPoint target, uint64_t maxUlpDiff)`, and * `WithinRel(FloatingPoint target, FloatingPoint eps)`. +* `IsNaN()` > `WithinRel` matcher was introduced in Catch2 2.10.0 -For more details, read [the docs on comparing floating point +> `IsNaN` matcher was introduced in Catch2 3.3.2. + +The first three serve to compare two floating pointe numbers. For more +details about how they work, read [the docs on comparing floating point numbers](comparing-floating-point-numbers.md#floating-point-matchers). +`IsNaN` then does exactly what it says on the tin. It matches the input +if it is a NaN (Not a Number). The advantage of using it over just plain +`REQUIRE(std::isnan(x))`, is that if the check fails, with `REQUIRE` you +won't see the value of `x`, but with `REQUIRE_THAT(x, IsNaN())`, you will. + ### Miscellaneous matchers @@ -190,13 +199,23 @@ properties. The macro is `REQUIRE_THROWS_MATCHES(expr, ExceptionType, Matcher)`. > `REQUIRE_THROWS_MATCHES` macro lives in `catch2/matchers/catch_matchers.hpp` -Catch2 currently provides only one matcher for exceptions, -`Message(std::string message)`. `Message` checks that the exception's +Catch2 currently provides two matchers for exceptions. +These are: +* `Message(std::string message)`. +* `MessageMatches(Matcher matcher)`. + +> `MessageMatches` was [introduced](https://github.com/catchorg/Catch2/pull/2570) in Catch2 3.3.0 + +`Message` checks that the exception's message, as returned from `what` is exactly equal to `message`. +`MessageMatches` applies the provided matcher on the exception's +message, as returned from `what`. This is useful in conjunctions with the `std::string` matchers (e.g. `StartsWith`) + Example use: ```cpp REQUIRE_THROWS_MATCHES(throwsDerivedException(), DerivedException, Message("DerivedException::what")); +REQUIRE_THROWS_MATCHES(throwsDerivedException(), DerivedException, MessageMatches(StartsWith("DerivedException"))); ``` Note that `DerivedException` in the example above has to derive from @@ -218,11 +237,19 @@ definitions to handle generic range-like types. These are: * `Contains(T&& target_element, Comparator = std::equal_to<>{})` * `Contains(Matcher element_matcher)` * `AllMatch(Matcher element_matcher)` -* `NoneMatch(Matcher element_matcher)` * `AnyMatch(Matcher element_matcher)` -* `AllTrue()` -* `NoneTrue()` -* `AnyTrue()` +* `NoneMatch(Matcher element_matcher)` +* `AllTrue()`, `AnyTrue()`, `NoneTrue()` +* `RangeEquals(TargetRangeLike&&, Comparator = std::equal_to<>{})` +* `UnorderedRangeEquals(TargetRangeLike&&, Comparator = std::equal_to<>{})` + +> `IsEmpty`, `SizeIs`, `Contains` were introduced in Catch2 3.0.1 + +> `All/Any/NoneMatch` were introduced in Catch2 3.0.1 + +> `All/Any/NoneTrue` were introduced in Catch2 3.1.0 + +> `RangeEquals` and `UnorderedRangeEquals` matchers were [introduced](https://github.com/catchorg/Catch2/pull/2377) in Catch2 3.3.0 `IsEmpty` should be self-explanatory. It successfully matches objects that are empty according to either `std::empty`, or ADL-found `empty` @@ -249,6 +276,25 @@ all, none, or any of the contained elements are `true`, respectively. It works for ranges of `bool`s and ranges of elements (explicitly) convertible to `bool`. +`RangeEquals` compares the range that the matcher is constructed with +(the "target range") against the range to be tested, element-wise. The +match succeeds if all elements from the two ranges compare equal (using +`operator==` by default). The ranges do not need to be the same type, +and the element types do not need to be the same, as long as they are +comparable. (e.g. you may compare `std::vector<int>` to `std::array<char>`). + +`UnorderedRangeEquals` is similar to `RangeEquals`, but the order +does not matter. For example "1, 2, 3" would match "3, 2, 1", but not +"1, 1, 2, 3" As with `RangeEquals`, `UnorderedRangeEquals` compares +the individual elements using `operator==` by default. + +Both `RangeEquals` and `UnorderedRangeEquals` optionally accept a +predicate which can be used to compare the containers element-wise. + +To check a container elementwise against a given matcher, use +`AllMatch`. + + ## Writing custom matchers (old style) The old style of writing matchers has been introduced back in Catch diff --git a/docs/opensource-users.md b/docs/opensource-users.md index 12b4551c..a02d0b98 100644 --- a/docs/opensource-users.md +++ b/docs/opensource-users.md @@ -95,6 +95,9 @@ A C++ client library for Consul. Consul is a distributed tool for discovering an ### [Reactive-Extensions/ RxCpp](https://github.com/Reactive-Extensions/RxCpp) A library of algorithms for values-distributed-in-time. +### [SFML](https://github.com/SFML/SFML) +Simple and Fast Multimedia Library. + ### [SOCI](https://github.com/SOCI/soci) The C++ Database Access Library. @@ -110,6 +113,12 @@ A header-only TOML parser and serializer for modern C++. ### [Trompeloeil](https://github.com/rollbear/trompeloeil) A thread-safe header-only mocking framework for C++14. +### [wxWidgets](https://www.wxwidgets.org/) +Cross-Platform C++ GUI Library. + +### [xmlwrapp](https://github.com/vslavik/xmlwrapp) +C++ XML parsing library using libxml2. + ## Applications & Tools ### [App Mesh](https://github.com/laoshanxi/app-mesh) @@ -137,7 +146,7 @@ Newsbeuter is an open-source RSS/Atom feed reader for text terminals. A 2D, Zombie, RPG game which is being made on our own engine. ### [raspigcd](https://github.com/pantadeusz/raspigcd) -Low level CLI app and library for execution of GCODE on Raspberry Pi without any additional microcontrolers (just RPi + Stepsticks). +Low level CLI app and library for execution of GCODE on Raspberry Pi without any additional microcontrollers (just RPi + Stepsticks). ### [SpECTRE](https://github.com/sxs-collaboration/spectre) SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics. diff --git a/docs/release-notes.md b/docs/release-notes.md index 7659404b..d263487f 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2,6 +2,11 @@ # Release notes **Contents**<br> +[3.5.0](#350)<br> +[3.4.0](#340)<br> +[3.3.2](#332)<br> +[3.3.1](#331)<br> +[3.3.0](#330)<br> [3.2.1](#321)<br> [3.2.0](#320)<br> [3.1.1](#311)<br> @@ -54,6 +59,130 @@ +## 3.5.0 + +### Improvements +* Introduced `CATCH_CONFIG_PREFIX_MESSAGES` to prefix only logging macros (#2544) + * This means `INFO`, `UNSCOPED_INFO`, `WARN` and `CAPTURE`. +* Section hints in static analysis mode are now `const` + * This prevents Clang-Tidy from complaining about `misc-const-correctness`. +* `from_range` generator supports C arrays and ranges that require ADL (#2737) +* Stringification support for `std::optional` now also includes `std::nullopt` (#2740) +* The Console reporter flushes output after writing benchmark runtime estimate. + * This means that you can immediately see for how long the benchmark is expected to run. +* Added workaround to enable compilation with ICC 19.1 (#2551, #2766) +* Compiling Catch2 for XBox should work out of the box (#2772) + * Catch2 should automatically disable getenv when compiled for XBox. +* Compiling Catch2 with exceptions disabled no longer triggers `Wunused-function` (#2726) +* **`random` Generators for integral types are now reproducible across different platforms** + * Unlike `<rando>`, Catch2's generators also support 1 byte integral types (`char`, `bool`, ...) +* **`random` Generators for `float` and `double` are now reproducible across different platforms** + * `long double` varies across different platforms too much to be reproducible + * This guarantee applies only to platforms with IEEE 754 floats. + +### Fixes +* UDL declaration inside Catch2 are now strictly conforming to the standard + * `operator "" _a` is UB, `operator ""_a` is fine. Seriously. +* Fixed `CAPTURE` tests failing to compile in C++23 mode (#2744) +* Fixed missing include in `catch_message.hpp` (#2758) +* Fixed `CHECK_ELSE` suppressing failure from uncaught exceptions(#2723) + +### Miscellaneous +* The documentation for specifying which tests to run through commandline has been completely rewritten (#2738) +* Fixed installation when building Catch2 with meson (#2722, #2742) +* Fixed `catch_discover_tests` when using custom reporter and `PRE_TEST` discovery mode (#2747) +* `catch_discover_tests` supports multi-config CMake generator in `PRE_TEST` discovery mode (#2739, #2746) + + +## 3.4.0 + +### Improvements +* `VectorEquals` supports elements that provide only `==` and not `!=` (#2648) +* Catch2 supports compiling with IAR compiler (#2651) +* Various small internal performance improvements +* Various small internal compilation time improvements +* XMLReporter now reports location info for INFO and WARN (#1251) + * This bumps up the xml format version to 3 +* Documented that `SKIP` in generator constructor can be used to handle empty generator (#1593) +* Added experimental static analysis support to `TEST_CASE` and `SECTION` macros (#2681) + * The two macros are redefined in a way that helps the SA tools reason about the possible paths through a test case with sections. + * The support is controlled by the `CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT` option and autodetects clang-tidy and Coverity. +* `*_THROWS`, `*_THROWS_AS`, etc now suppress warning coming from `__attribute__((warn_unused_result))` on GCC (#2691) + * Unlike plain `[[nodiscard]]`, this warning is not silenced by void cast. WTF GCC? + +### Fixes +* Fixed `assertionStarting` events being sent after the expr is evaluated (#2678) +* Errors in `TEST_CASE` tags are now reported nicely (#2650) + +### Miscellaneous +* Bunch of improvements to `catch_discover_tests` + * Added DISCOVERY_MODE option, so the discovery can happen either post build or pre-run. + * Fixed handling of semicolons and backslashes in test names (#2674, #2676) +* meson build can disable building tests (#2693) +* meson build properly sets meson version 0.54.1 as the minimal supported version (#2688) + + +## 3.3.2 + +### Improvements +* Further reduced allocations + * The compact, console, TAP and XML reporters perform less allocations in various cases + * Removed 1 allocation per entered `SECTION`/`TEST_CASE`. + * Removed 2 allocations per test case exit, if stdout/stderr is captured +* Improved performance + * Section tracking is 10%-25% faster than in v3.3.0 + * Assertion handling is 5%-10% faster than in v3.3.0 + * Test case registration is 1%-2% faster than in v3.3.0 + * Tiny speedup for registering listeners + * Tiny speedup for `CAPTURE`, `TEST_CASE_METHOD`, `METHOD_AS_TEST_CASE`, and `TEMPLATE_LIST_TEST_*` macros. +* `Contains`, `RangeEquals` and `UnorderedRangeEquals` matchers now support ranges with iterator + sentinel pair +* Added `IsNaN` matcher + * Unlike `REQUIRE(isnan(x))`, `REQUIRE_THAT(x, IsNaN())` shows you the value of `x`. +* Suppressed `declared_but_not_referenced` warning for NVHPC (#2637) + +### Fixes +* Fixed performance regression in section tracking introduced in v3.3.1 + * Extreme cases would cause the tracking to run about 4x slower than in 3.3.0 + + +## 3.3.1 + +### Improvements +* Reduced allocations and improved performance + * The exact improvements are dependent on your usage of Catch2. + * For example running Catch2's SelfTest binary performs 8k less allocations. + * The main improvement comes from smarter handling of `SECTION`s, especially sibling `SECTION`s + + +## 3.3.0 + +### Improvements + +* Added `MessageMatches` exception matcher (#2570) +* Added `RangeEquals` and `UnorderedRangeEquals` generic range matchers (#2377) +* Added `SKIP` macro for skipping tests from within the test body (#2360) + * All built-in reporters have been extended to handle it properly, whether your custom reporter needs changes depends on how it was written + * `skipTest` reporter event **is unrelated** to this, and has been deprecated since it has practically no uses +* Restored support for PPC Macs in the break-into-debugger functionality (#2619) +* Made our warning suppression compatible with CUDA toolkit pre 11.5 (#2626) +* Cleaned out some static analysis complaints + + +### Fixes + +* Fixed macro redefinition warning when NVCC was reporting as MSVC (#2603) +* Fixed throws in generator constructor causing the whole binary to abort (#2615) + * Now it just fails the test +* Fixed missing transitive include with libstdc++13 (#2611) + + +### Miscellaneous + +* Improved support for dynamic library build with non-MSVC compilers on Windows (#2630) +* When used as a subproject, Catch2 keeps its generated header in a separate directory from the main project (#2604) + + + ## 3.2.1 ### Improvements @@ -85,7 +214,7 @@ ### Fixes * Cleaned out some warnings and static analysis issues - * Suppressed `-Wcomma` warning rarely occuring in templated test cases (#2543) + * Suppressed `-Wcomma` warning rarely occurring in templated test cases (#2543) * Constified implementation details in `INFO` (#2564) * Made `MatcherGenericBase` copy constructor const (#2566) * Fixed serialization of test filters so the output roundtrips @@ -288,7 +417,7 @@ v3 releases. * Added `STATIC_CHECK` macro, similar to `STATIC_REQUIRE` (#2318) * When deferred tu runtime, it behaves like `CHECK`, and not like `REQUIRE`. * You can have multiple tests with the same name, as long as other parts of the test identity differ (#1915, #1999, #2175) - * Test identity includes test's name, test's tags and and test's class name if applicable. + * Test identity includes test's name, test's tags and test's class name if applicable. * Added new warning, `UnmatchedTestSpec`, to error on test specs with no matching tests * The `-w`, `--warn` warning flags can now be provided multiple times to enable multiple warnings * The case-insensitive handling of tags is now more reliable and takes up less memory @@ -453,7 +582,7 @@ v3 releases. * 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`. + * This flag is overridden by setting `-d`/`--duration`. ### Fixes * `TAPReporter` no longer skips successful assertions (#1983) @@ -521,7 +650,7 @@ v3 releases. ### 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 + * It was a false positive triggered by the new warning support workaround * Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905) ### Miscellaneous @@ -858,7 +987,7 @@ v3 releases. ### Contrib * `ParseAndAddCatchTests` has learned how to use `DISABLED` CTest property (#1452) -* `ParseAndAddCatchTests` now works when there is a whitspace before the test name (#1493) +* `ParseAndAddCatchTests` now works when there is a whitespace before the test name (#1493) ### Miscellaneous diff --git a/docs/reporter-events.md b/docs/reporter-events.md index 32a0ae50..015f67be 100644 --- a/docs/reporter-events.md +++ b/docs/reporter-events.md @@ -96,12 +96,12 @@ void assertionStarting( AssertionInfo const& assertionInfo ); void assertionEnded( AssertionStats const& assertionStats ); ``` -`assertionStarting` is called after the expression is captured, but before -the assertion expression is evaluated. This might seem like a minor -distinction, but what it means is that if you have assertion like -`REQUIRE( a + b == c + d )`, then what happens is that `a + b` and `c + d` -are evaluated before `assertionStarting` is emitted, while the `==` is -evaluated after the event. +The `assertionStarting` event is emitted before the expression in the +assertion is captured or evaluated and `assertionEnded` is emitted +afterwards. This means that given assertion like `REQUIRE(a + b == c + d)`, +Catch2 first emits `assertionStarting` event, then `a + b` and `c + d` +are evaluated, then their results are captured, the comparison is evaluated, +and then `assertionEnded` event is emitted. ## Benchmarking events diff --git a/docs/reporters.md b/docs/reporters.md index 496c61a9..e2abfe34 100644 --- a/docs/reporters.md +++ b/docs/reporters.md @@ -52,7 +52,7 @@ its machine-readable XML output to file `result-junit.xml`, and the uses ANSI colour codes for colouring the output. Using multiple reporters (or one reporter and one-or-more [event -listeners](event-listener.md#top)) can have surprisingly complex semantics +listeners](event-listeners.md#top)) can have surprisingly complex semantics when using customization points provided to reporters by Catch2, namely capturing stdout/stderr from test cases. diff --git a/docs/skipping-passing-failing.md b/docs/skipping-passing-failing.md new file mode 100644 index 00000000..52bb18f7 --- /dev/null +++ b/docs/skipping-passing-failing.md @@ -0,0 +1,135 @@ +<a id="top"></a> +# Explicitly skipping, passing, and failing tests at runtime + +## Skipping Test Cases at Runtime + +> [Introduced](https://github.com/catchorg/Catch2/pull/2360) in Catch2 3.3.0. + +In some situations it may not be possible to meaningfully execute a test case, +for example when the system under test is missing certain hardware capabilities. +If the required conditions can only be determined at runtime, it often +doesn't make sense to consider such a test case as either passed or failed, +because it simply cannot run at all. + +To properly express such scenarios, Catch2 provides a way to explicitly +_skip_ test cases, using the `SKIP` macro: + +``` +SKIP( [streamable expression] ) +``` + +Example usage: + +```c++ +TEST_CASE("copy files between drives") { + if(getNumberOfHardDrives() < 2) { + SKIP("at least two hard drives required"); + } + // ... +} +``` + +This test case is then reported as _skipped_ instead of _passed_ or _failed_. + +The `SKIP` macro behaves similarly to an explicit [`FAIL`](#passing-and-failing-test-cases), +in that it is the last expression that will be executed: + +```c++ +TEST_CASE("my test") { + printf("foo"); + SKIP(); + printf("bar"); // not printed +} +``` + +However a failed assertion _before_ a `SKIP` still causes the entire +test case to fail: + +```c++ +TEST_CASE("failing test") { + CHECK(1 == 2); + SKIP(); +} +``` + +### Interaction with Sections and Generators + +Sections, nested sections as well as specific outputs from [generators](generators.md#top) +can all be individually skipped, with the rest executing as usual: + +```c++ +TEST_CASE("complex test case") { + int value = GENERATE(2, 4, 6); + SECTION("a") { + SECTION("a1") { CHECK(value < 8); } + SECTION("a2") { + if (value == 4) { + SKIP(); + } + CHECK(value % 2 == 0); + } + } +} +``` + +This test case will report 5 passing assertions; one for each of the three +values in section `a1`, and then two in section `a2`, from values 2 and 4. + +Note that as soon as one section is skipped, the entire test case will +be reported as _skipped_ (unless there is a failing assertion, in which +case the test is handled as _failed_ instead). + +Note that if all test cases in a run are skipped, Catch2 returns a non-zero +exit code, same as it does if no test cases have run. This behaviour can +be overridden using the [--allow-running-no-tests](command-line.md#no-tests-override) +flag. + +### `SKIP` inside generators + +You can also use the `SKIP` macro inside generator's constructor to handle +cases where the generator is empty, but you do not want to fail the test +case. + + +## Passing and failing test cases + +Test cases can also be explicitly passed or failed, without the use of +assertions, and with a specific message. This can be useful to handle +complex preconditions/postconditions and give useful error messages +when they fail. + +* `SUCCEED( [streamable expression] )` + +`SUCCEED` is morally equivalent with `INFO( [streamable expression] ); REQUIRE( true );`. +Note that it does not stop further test execution, so it cannot be used +to guard failing assertions from being executed. + +_In practice, `SUCCEED` is usually used as a test placeholder, to avoid +[failing a test case due to missing assertions](command-line.md#warnings)._ + +```cpp +TEST_CASE( "SUCCEED showcase" ) { + int I = 1; + SUCCEED( "I is " << I ); + // ... execution continues here ... +} +``` + +* `FAIL( [streamable expression] )` + +`FAIL` is morally equivalent with `INFO( [streamable expression] ); REQUIRE( false );`. + +_In practice, `FAIL` is usually used to stop executing test that is currently +known to be broken, but has to be fixed later._ + +```cpp +TEST_CASE( "FAIL showcase" ) { + FAIL( "This test case causes segfault, which breaks CI." ); + // ... this will not be executed ... +} +``` + + +--- + +[Home](Readme.md#top) diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md index 613bbd14..01c898bb 100644 --- a/docs/test-cases-and-sections.md +++ b/docs/test-cases-and-sections.md @@ -25,7 +25,8 @@ _section description_ can be used to provide long form description of a section while keeping the _section name_ short for use with the [`-c` command line parameter](command-line.md#specify-the-section-to-run). -**Test names must be unique within the Catch executable.** +**The combination of test names and tags must be unique within the Catch2 +executable.** For examples see the [Tutorial](tutorial.md#top) @@ -68,7 +69,8 @@ All tag names beginning with non-alphanumeric characters are reserved by Catch. * `[!nonportable]` - Indicates that behaviour may vary between platforms or compilers. -* `[#<filename>]` - running with `-#` or `--filenames-as-tags` causes Catch to add the filename, prefixed with `#` (and with any extension stripped), as a tag to all contained tests, e.g. tests in testfile.cpp would all be tagged `[#testfile]`. +* `[#<filename>]` - these tags are added to test cases when you run Catch2 + with [`-#` or `--filenames-as-tags`](command-line.md#filenames-as-tags). * `[@<alias>]` - tag aliases all begin with `@` (see below). @@ -167,7 +169,11 @@ Other than the additional prefixes and the formatting in the console reporter th In addition to `TEST_CASE`s, Catch2 also supports test cases parametrised by types, in the form of `TEMPLATE_TEST_CASE`, -`TEMPLATE_PRODUCT_TEST_CASE` and `TEMPLATE_LIST_TEST_CASE`. +`TEMPLATE_PRODUCT_TEST_CASE` and `TEMPLATE_LIST_TEST_CASE`. These macros +are defined in the `catch_template_test_macros.hpp` header, so compiling +the code examples below also requires +`#include <catch2/catch_template_test_macros.hpp>`. + * **TEMPLATE_TEST_CASE(** _test name_ , _tags_, _type1_, _type2_, ..., _typen_ **)** @@ -225,7 +231,7 @@ TEMPLATE_TEST_CASE( "vectors can be sized and resized", "[vector][template]", in > [Introduced](https://github.com/catchorg/Catch2/issues/1468) in Catch2 2.6.0. -_template-type1_ through _template-typen_ is list of template template +_template-type1_ through _template-typen_ is list of template types which should be combined with each of _template-arg1_ through _template-argm_, resulting in _n * m_ test cases. Inside the test case, the resulting type is available under the name of `TestType`. @@ -289,7 +295,9 @@ TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside std In addition to [type parametrised test cases](#type-parametrised-test-cases) Catch2 also supports signature base parametrised test cases, in form of `TEMPLATE_TEST_CASE_SIG` and `TEMPLATE_PRODUCT_TEST_CASE_SIG`. These test cases have similar syntax like [type parametrised test cases](#type-parametrised-test-cases), with one -additional positional argument which specifies the signature. +additional positional argument which specifies the signature. These macros are defined in the +`catch_template_test_macros.hpp` header, so compiling the code examples below also requires +`#include <catch2/catch_template_test_macros.hpp>`. ### Signature Signature has some strict rules for these tests cases to work properly: diff --git a/docs/tostring.md b/docs/tostring.md index adce3cc7..b99b6742 100644 --- a/docs/tostring.md +++ b/docs/tostring.md @@ -75,7 +75,7 @@ CATCH_TRANSLATE_EXCEPTION( MyType const& ex ) { Enums that already have a `<<` overload for `std::ostream` will convert to strings as expected. If you only need to convert enums to strings for test reporting purposes you can provide a `StringMaker` specialisations as any other type. -However, as a convenience, Catch provides the `REGISTER_ENUM` helper macro that will generate the `StringMaker` specialiation for you with minimal code. +However, as a convenience, Catch provides the `REGISTER_ENUM` helper macro that will generate the `StringMaker` specialisation for you with minimal code. Simply provide it the (qualified) enum name, followed by all the enum values, and you're done! E.g. diff --git a/docs/tutorial.md b/docs/tutorial.md index 342c7381..dfccac88 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -119,7 +119,7 @@ This is best explained through an example ([code](../examples/100-Fix-Section.cp ```c++ TEST_CASE( "vectors can be sized and resized", "[vector]" ) { - + // This setup will be done 4 times in total, once for each section std::vector<int> v( 5 ); REQUIRE( v.size() == 5 ); @@ -152,11 +152,12 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) { } ``` -For each `SECTION` the `TEST_CASE` is executed from the start. This means +For each `SECTION` the `TEST_CASE` is **executed from the start**. This means that each section is entered with a freshly constructed vector `v`, that we know has size 5 and capacity at least 5, because the two assertions -are also checked before the section is entered. Each run through a test -case will execute one, and only one, leaf section. +are also checked before the section is entered. This behaviour may not be +ideal for tests where setup is expensive. Each run through a test case will +execute one, and only one, leaf section. Section can also be nested, in which case the parent section can be entered multiple times, once for each leaf section. Nested sections are diff --git a/docs/why-catch.md b/docs/why-catch.md index 2c0178ca..b7367496 100644 --- a/docs/why-catch.md +++ b/docs/why-catch.md @@ -30,7 +30,7 @@ So what does Catch2 bring to the party that differentiates it from these? Apart * Output is through modular reporter objects. Basic textual and XML reporters are included. Custom reporters can easily be added. * JUnit xml output is supported for integration with third-party tools, such as CI servers. * A default main() function is provided, but you can supply your own for complete control (e.g. integration into your own test runner GUI). -* A command line parser is provided and can still be used if you choose to provided your own main() function. +* A command line parser is provided and can still be used if you choose to provide your own main() function. * Alternative assertion macro(s) report failures but don't abort the test case * Good set of facilities for floating point comparisons (`Catch::Approx` and full set of matchers) * Internal and friendly macros are isolated so name clashes can be managed @@ -41,8 +41,8 @@ So what does Catch2 bring to the party that differentiates it from these? Apart ## Who else is using Catch2? -A whole lot of people. According to the 2021 JetBrains C++ ecosystem survey, -about 11% of C++ programmers use Catch2 for unit testing, making it the +A whole lot of people. According to [the 2022 JetBrains C++ ecosystem survey](https://www.jetbrains.com/lp/devecosystem-2022/cpp/#Which-unit-testing-frameworks-do-you-regularly-use), +about 12% of C++ programmers use Catch2 for unit testing, making it the second most popular unit testing framework. You can also take a look at the (incomplete) list of [open source projects](opensource-users.md#top) diff --git a/examples/010-TestCase.cpp b/examples/010-TestCase.cpp index 7ec208d5..9e5cd8cd 100644 --- a/examples/010-TestCase.cpp +++ b/examples/010-TestCase.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 010-TestCase.cpp // And write tests in the same file: #include <catch2/catch_test_macros.hpp> diff --git a/examples/020-TestCase-1.cpp b/examples/020-TestCase-1.cpp index cec55799..a9d87dbc 100644 --- a/examples/020-TestCase-1.cpp +++ b/examples/020-TestCase-1.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 020-TestCase-1.cpp #include <catch2/catch_test_macros.hpp> diff --git a/examples/020-TestCase-2.cpp b/examples/020-TestCase-2.cpp index 3f5767b3..72dd0ffb 100644 --- a/examples/020-TestCase-2.cpp +++ b/examples/020-TestCase-2.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 020-TestCase-2.cpp // main() provided by Catch in file 020-TestCase-1.cpp. diff --git a/examples/030-Asn-Require-Check.cpp b/examples/030-Asn-Require-Check.cpp index 0d027ca9..62cd3cfc 100644 --- a/examples/030-Asn-Require-Check.cpp +++ b/examples/030-Asn-Require-Check.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 030-Asn-Require-Check.cpp // Catch has two natural expression assertion macro's: diff --git a/examples/100-Fix-Section.cpp b/examples/100-Fix-Section.cpp index cfbfa79f..7c8d8aa8 100644 --- a/examples/100-Fix-Section.cpp +++ b/examples/100-Fix-Section.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 100-Fix-Section.cpp // Catch has two ways to express fixtures: diff --git a/examples/110-Fix-ClassFixture.cpp b/examples/110-Fix-ClassFixture.cpp index 75c10da6..614c3797 100644 --- a/examples/110-Fix-ClassFixture.cpp +++ b/examples/110-Fix-ClassFixture.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 110-Fix-ClassFixture.cpp // Catch has two ways to express fixtures: diff --git a/examples/120-Bdd-ScenarioGivenWhenThen.cpp b/examples/120-Bdd-ScenarioGivenWhenThen.cpp index 99cdf9ab..345d53c3 100644 --- a/examples/120-Bdd-ScenarioGivenWhenThen.cpp +++ b/examples/120-Bdd-ScenarioGivenWhenThen.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 120-Bdd-ScenarioGivenWhenThen.cpp // main() provided by linkage with Catch2WithMain diff --git a/examples/210-Evt-EventListeners.cpp b/examples/210-Evt-EventListeners.cpp index 6cedb885..56b050d4 100644 --- a/examples/210-Evt-EventListeners.cpp +++ b/examples/210-Evt-EventListeners.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 210-Evt-EventListeners.cpp // Contents: diff --git a/examples/231-Cfg-OutputStreams.cpp b/examples/231-Cfg-OutputStreams.cpp index b77c1273..da1713cf 100644 --- a/examples/231-Cfg-OutputStreams.cpp +++ b/examples/231-Cfg-OutputStreams.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 231-Cfg-OutputStreams.cpp // Show how to replace the streams with a simple custom made streambuf. diff --git a/examples/300-Gen-OwnGenerator.cpp b/examples/300-Gen-OwnGenerator.cpp index 09643d6f..b5d951ac 100644 --- a/examples/300-Gen-OwnGenerator.cpp +++ b/examples/300-Gen-OwnGenerator.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 300-Gen-OwnGenerator.cpp // Shows how to define a custom generator. diff --git a/examples/301-Gen-MapTypeConversion.cpp b/examples/301-Gen-MapTypeConversion.cpp index ba55f65f..a065d87a 100644 --- a/examples/301-Gen-MapTypeConversion.cpp +++ b/examples/301-Gen-MapTypeConversion.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 301-Gen-MapTypeConversion.cpp // Shows how to use map to modify generator's return type. diff --git a/examples/302-Gen-Table.cpp b/examples/302-Gen-Table.cpp index 74319518..3cdb1430 100644 --- a/examples/302-Gen-Table.cpp +++ b/examples/302-Gen-Table.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 302-Gen-Table.cpp // Shows how to use table to run a test many times with different inputs. Lifted from examples on // issue #850. @@ -44,11 +52,11 @@ TEST_CASE("Table allows pre-computed test inputs and outputs", "[example][genera /* Possible simplifications where less legacy toolchain support is needed: * - * - With libstdc++6 or newer, the make_tuple() calls can be ommitted + * - With libstdc++6 or newer, the make_tuple() calls can be omitted * (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 preceding variable delcarations can be + * - In C++17 mode std::tie() and the preceding variable declarations can be * replaced by structured bindings: auto [test_input, expected] = GENERATE( * table<std::string, size_t>({ ... */ diff --git a/examples/310-Gen-VariablesInGenerators.cpp b/examples/310-Gen-VariablesInGenerators.cpp index 0339c5f1..5d24d45a 100644 --- a/examples/310-Gen-VariablesInGenerators.cpp +++ b/examples/310-Gen-VariablesInGenerators.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 310-Gen-VariablesInGenerator.cpp // Shows how to use variables when creating generators. diff --git a/examples/311-Gen-CustomCapture.cpp b/examples/311-Gen-CustomCapture.cpp index d12ee709..ee310383 100644 --- a/examples/311-Gen-CustomCapture.cpp +++ b/examples/311-Gen-CustomCapture.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + // 311-Gen-CustomCapture.cpp // Shows how to provide custom capture list to the generator expression diff --git a/extras/Catch.cmake b/extras/Catch.cmake index bc553591..8f30688c 100644 --- a/extras/Catch.cmake +++ b/extras/Catch.cmake @@ -35,8 +35,9 @@ same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``. [TEST_LIST var] [REPORTER reporter] [OUTPUT_DIR dir] - [OUTPUT_PREFIX prefix} + [OUTPUT_PREFIX prefix] [OUTPUT_SUFFIX suffix] + [DISCOVERY_MODE <POST_BUILD|PRE_TEST>] ) ``catch_discover_tests`` sets up a post-build command on the test executable @@ -123,14 +124,28 @@ same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``. test executable and when the tests are executed themselves. This requires cmake/ctest >= 3.22. + `DISCOVERY_MODE mode`` + Provides control over when ``catch_discover_tests`` performs test discovery. + By default, ``POST_BUILD`` sets up a post-build command to perform test discovery + at build time. In certain scenarios, like cross-compiling, this ``POST_BUILD`` + behavior is not desirable. By contrast, ``PRE_TEST`` delays test discovery until + just prior to test execution. This way test discovery occurs in the target environment + where the test has a better chance at finding appropriate runtime dependencies. + + ``DISCOVERY_MODE`` defaults to the value of the + ``CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE`` variable if it is not passed when + calling ``catch_discover_tests``. This provides a mechanism for globally selecting + a preferred test discovery behavior without having to modify each call site. + #]=======================================================================] #------------------------------------------------------------------------------ function(catch_discover_tests TARGET) + cmake_parse_arguments( "" "" - "TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;REPORTER;OUTPUT_DIR;OUTPUT_PREFIX;OUTPUT_SUFFIX" + "TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;REPORTER;OUTPUT_DIR;OUTPUT_PREFIX;OUTPUT_SUFFIX;DISCOVERY_MODE" "TEST_SPEC;EXTRA_ARGS;PROPERTIES;DL_PATHS" ${ARGN} ) @@ -141,57 +156,128 @@ function(catch_discover_tests TARGET) if(NOT _TEST_LIST) set(_TEST_LIST ${TARGET}_TESTS) endif() - if (_DL_PATHS) if(${CMAKE_VERSION} VERSION_LESS "3.22.0") message(FATAL_ERROR "The DL_PATHS option requires at least cmake 3.22") endif() endif() + if(NOT _DISCOVERY_MODE) + if(NOT CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE) + set(CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE "POST_BUILD") + endif() + set(_DISCOVERY_MODE ${CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE}) + endif() + if (NOT _DISCOVERY_MODE MATCHES "^(POST_BUILD|PRE_TEST)$") + message(FATAL_ERROR "Unknown DISCOVERY_MODE: ${_DISCOVERY_MODE}") + endif() ## Generate a unique name based on the extra arguments string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS} ${_REPORTER} ${_OUTPUT_DIR} ${_OUTPUT_PREFIX} ${_OUTPUT_SUFFIX}") string(SUBSTRING ${args_hash} 0 7 args_hash) # Define rule to generate test list for aforementioned test executable - set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake") - set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake") + set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-${args_hash}") + set(ctest_include_file "${ctest_file_base}_include.cmake") + set(ctest_tests_file "${ctest_file_base}_tests.cmake") + get_property(crosscompiling_emulator TARGET ${TARGET} PROPERTY CROSSCOMPILING_EMULATOR ) - add_custom_command( - TARGET ${TARGET} POST_BUILD - BYPRODUCTS "${ctest_tests_file}" - COMMAND "${CMAKE_COMMAND}" - -D "TEST_TARGET=${TARGET}" - -D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>" - -D "TEST_EXECUTOR=${crosscompiling_emulator}" - -D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}" - -D "TEST_SPEC=${_TEST_SPEC}" - -D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}" - -D "TEST_PROPERTIES=${_PROPERTIES}" - -D "TEST_PREFIX=${_TEST_PREFIX}" - -D "TEST_SUFFIX=${_TEST_SUFFIX}" - -D "TEST_LIST=${_TEST_LIST}" - -D "TEST_REPORTER=${_REPORTER}" - -D "TEST_OUTPUT_DIR=${_OUTPUT_DIR}" - -D "TEST_OUTPUT_PREFIX=${_OUTPUT_PREFIX}" - -D "TEST_OUTPUT_SUFFIX=${_OUTPUT_SUFFIX}" - -D "TEST_DL_PATHS=${_DL_PATHS}" - -D "CTEST_FILE=${ctest_tests_file}" - -P "${_CATCH_DISCOVER_TESTS_SCRIPT}" - VERBATIM - ) - file(WRITE "${ctest_include_file}" - "if(EXISTS \"${ctest_tests_file}\")\n" - " include(\"${ctest_tests_file}\")\n" - "else()\n" - " add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n" - "endif()\n" - ) + if(_DISCOVERY_MODE STREQUAL "POST_BUILD") + add_custom_command( + TARGET ${TARGET} POST_BUILD + BYPRODUCTS "${ctest_tests_file}" + COMMAND "${CMAKE_COMMAND}" + -D "TEST_TARGET=${TARGET}" + -D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>" + -D "TEST_EXECUTOR=${crosscompiling_emulator}" + -D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}" + -D "TEST_SPEC=${_TEST_SPEC}" + -D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}" + -D "TEST_PROPERTIES=${_PROPERTIES}" + -D "TEST_PREFIX=${_TEST_PREFIX}" + -D "TEST_SUFFIX=${_TEST_SUFFIX}" + -D "TEST_LIST=${_TEST_LIST}" + -D "TEST_REPORTER=${_REPORTER}" + -D "TEST_OUTPUT_DIR=${_OUTPUT_DIR}" + -D "TEST_OUTPUT_PREFIX=${_OUTPUT_PREFIX}" + -D "TEST_OUTPUT_SUFFIX=${_OUTPUT_SUFFIX}" + -D "TEST_DL_PATHS=${_DL_PATHS}" + -D "CTEST_FILE=${ctest_tests_file}" + -P "${_CATCH_DISCOVER_TESTS_SCRIPT}" + VERBATIM + ) + + file(WRITE "${ctest_include_file}" + "if(EXISTS \"${ctest_tests_file}\")\n" + " include(\"${ctest_tests_file}\")\n" + "else()\n" + " add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n" + "endif()\n" + ) - if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + elseif(_DISCOVERY_MODE STREQUAL "PRE_TEST") + + get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL + PROPERTY GENERATOR_IS_MULTI_CONFIG + ) + + if(GENERATOR_IS_MULTI_CONFIG) + set(ctest_tests_file "${ctest_file_base}_tests-$<CONFIG>.cmake") + endif() + + string(CONCAT ctest_include_content + "if(EXISTS \"$<TARGET_FILE:${TARGET}>\")" "\n" + " if(NOT EXISTS \"${ctest_tests_file}\" OR" "\n" + " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"$<TARGET_FILE:${TARGET}>\" OR\n" + " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"\${CMAKE_CURRENT_LIST_FILE}\")\n" + " include(\"${_CATCH_DISCOVER_TESTS_SCRIPT}\")" "\n" + " catch_discover_tests_impl(" "\n" + " TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n" + " TEST_EXECUTOR" " [==[" "${crosscompiling_emulator}" "]==]" "\n" + " TEST_WORKING_DIR" " [==[" "${_WORKING_DIRECTORY}" "]==]" "\n" + " TEST_SPEC" " [==[" "${_TEST_SPEC}" "]==]" "\n" + " TEST_EXTRA_ARGS" " [==[" "${_EXTRA_ARGS}" "]==]" "\n" + " TEST_PROPERTIES" " [==[" "${_PROPERTIES}" "]==]" "\n" + " TEST_PREFIX" " [==[" "${_TEST_PREFIX}" "]==]" "\n" + " TEST_SUFFIX" " [==[" "${_TEST_SUFFIX}" "]==]" "\n" + " TEST_LIST" " [==[" "${_TEST_LIST}" "]==]" "\n" + " TEST_REPORTER" " [==[" "${_REPORTER}" "]==]" "\n" + " TEST_OUTPUT_DIR" " [==[" "${_OUTPUT_DIR}" "]==]" "\n" + " TEST_OUTPUT_PREFIX" " [==[" "${_OUTPUT_PREFIX}" "]==]" "\n" + " TEST_OUTPUT_SUFFIX" " [==[" "${_OUTPUT_SUFFIX}" "]==]" "\n" + " CTEST_FILE" " [==[" "${ctest_tests_file}" "]==]" "\n" + " TEST_DL_PATHS" " [==[" "${_DL_PATHS}" "]==]" "\n" + " CTEST_FILE" " [==[" "${CTEST_FILE}" "]==]" "\n" + " )" "\n" + " endif()" "\n" + " include(\"${ctest_tests_file}\")" "\n" + "else()" "\n" + " add_test(${TARGET}_NOT_BUILT ${TARGET}_NOT_BUILT)" "\n" + "endif()" "\n" + ) + + if(GENERATOR_IS_MULTI_CONFIG) + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) + file(GENERATE OUTPUT "${ctest_file_base}_include-${_config}.cmake" CONTENT "${ctest_include_content}" CONDITION $<CONFIG:${_config}>) + endforeach() + string(CONCAT ctest_include_multi_content + "if(NOT CTEST_CONFIGURATION_TYPE)" "\n" + " message(\"No configuration for testing specified, use '-C <cfg>'.\")" "\n" + "else()" "\n" + " include(\"${ctest_file_base}_include-\${CTEST_CONFIGURATION_TYPE}.cmake\")" "\n" + "endif()" "\n" + ) + file(GENERATE OUTPUT "${ctest_include_file}" CONTENT "${ctest_include_multi_content}") + else() + file(GENERATE OUTPUT "${ctest_file_base}_include.cmake" CONTENT "${ctest_include_content}") + file(WRITE "${ctest_include_file}" "include(\"${ctest_file_base}_include.cmake\")") + endif() + endif() + + if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") # Add discovered tests to directory TEST_INCLUDE_FILES set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}" @@ -204,9 +290,7 @@ function(catch_discover_tests TARGET) PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}" ) else() - message(FATAL_ERROR - "Cannot set more than one TEST_INCLUDE_FILE" - ) + message(FATAL_ERROR "Cannot set more than one TEST_INCLUDE_FILE") endif() endif() diff --git a/extras/CatchAddTests.cmake b/extras/CatchAddTests.cmake index beec3aed..692e3405 100644 --- a/extras/CatchAddTests.cmake +++ b/extras/CatchAddTests.cmake @@ -1,28 +1,6 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -set(prefix "${TEST_PREFIX}") -set(suffix "${TEST_SUFFIX}") -set(spec ${TEST_SPEC}) -set(extra_args ${TEST_EXTRA_ARGS}) -set(properties ${TEST_PROPERTIES}) -set(reporter ${TEST_REPORTER}) -set(output_dir ${TEST_OUTPUT_DIR}) -set(output_prefix ${TEST_OUTPUT_PREFIX}) -set(output_suffix ${TEST_OUTPUT_SUFFIX}) -set(dl_paths ${TEST_DL_PATHS}) -set(script) -set(suite) -set(tests) - -if(WIN32) - set(dl_paths_variable_name PATH) -elseif(APPLE) - set(dl_paths_variable_name DYLD_LIBRARY_PATH) -else() - set(dl_paths_variable_name LD_LIBRARY_PATH) -endif() - function(add_command NAME) set(_args "") # use ARGV* instead of ARGN, because ARGN splits arrays into multiple arguments @@ -38,119 +16,177 @@ function(add_command NAME) set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE) endfunction() -# Run test executable to get list of available tests -if(NOT EXISTS "${TEST_EXECUTABLE}") - message(FATAL_ERROR - "Specified test executable '${TEST_EXECUTABLE}' does not exist" +function(catch_discover_tests_impl) + + cmake_parse_arguments( + "" + "" + "TEST_EXECUTABLE;TEST_WORKING_DIR;TEST_DL_PATHS;TEST_OUTPUT_DIR;TEST_OUTPUT_PREFIX;TEST_OUTPUT_SUFFIX;TEST_PREFIX;TEST_REPORTER;TEST_SPEC;TEST_SUFFIX;TEST_LIST;CTEST_FILE" + "TEST_EXTRA_ARGS;TEST_PROPERTIES;TEST_EXECUTOR" + ${ARGN} ) -endif() -if(dl_paths) - cmake_path(CONVERT "${dl_paths}" TO_NATIVE_PATH_LIST paths) - set(ENV{${dl_paths_variable_name}} "${paths}") -endif() + set(prefix "${_TEST_PREFIX}") + set(suffix "${_TEST_SUFFIX}") + set(spec ${_TEST_SPEC}) + set(extra_args ${_TEST_EXTRA_ARGS}) + set(properties ${_TEST_PROPERTIES}) + set(reporter ${_TEST_REPORTER}) + set(output_dir ${_TEST_OUTPUT_DIR}) + set(output_prefix ${_TEST_OUTPUT_PREFIX}) + set(output_suffix ${_TEST_OUTPUT_SUFFIX}) + set(dl_paths ${_TEST_DL_PATHS}) + set(script) + set(suite) + set(tests) + + if(WIN32) + set(dl_paths_variable_name PATH) + elseif(APPLE) + set(dl_paths_variable_name DYLD_LIBRARY_PATH) + else() + set(dl_paths_variable_name LD_LIBRARY_PATH) + endif() -execute_process( - COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-tests --verbosity quiet - OUTPUT_VARIABLE output - RESULT_VARIABLE result - WORKING_DIRECTORY "${TEST_WORKING_DIR}" -) -if(NOT ${result} EQUAL 0) - message(FATAL_ERROR - "Error running test executable '${TEST_EXECUTABLE}':\n" - " Result: ${result}\n" - " Output: ${output}\n" - ) -endif() + # Run test executable to get list of available tests + if(NOT EXISTS "${_TEST_EXECUTABLE}") + message(FATAL_ERROR + "Specified test executable '${_TEST_EXECUTABLE}' does not exist" + ) + endif() -string(REPLACE "\n" ";" output "${output}") - -# Run test executable to get list of available reporters -execute_process( - COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-reporters - OUTPUT_VARIABLE reporters_output - RESULT_VARIABLE reporters_result - WORKING_DIRECTORY "${TEST_WORKING_DIR}" -) -if(NOT ${reporters_result} EQUAL 0) - message(FATAL_ERROR - "Error running test executable '${TEST_EXECUTABLE}':\n" - " Result: ${reporters_result}\n" - " Output: ${reporters_output}\n" - ) -endif() -string(FIND "${reporters_output}" "${reporter}" reporter_is_valid) -if(reporter AND ${reporter_is_valid} EQUAL -1) - message(FATAL_ERROR - "\"${reporter}\" is not a valid reporter!\n" - ) -endif() + if(dl_paths) + cmake_path(CONVERT "${dl_paths}" TO_NATIVE_PATH_LIST paths) + set(ENV{${dl_paths_variable_name}} "${paths}") + endif() -# Prepare reporter -if(reporter) - set(reporter_arg "--reporter ${reporter}") -endif() + execute_process( + COMMAND ${_TEST_EXECUTOR} "${_TEST_EXECUTABLE}" ${spec} --list-tests --verbosity quiet + OUTPUT_VARIABLE output + RESULT_VARIABLE result + WORKING_DIRECTORY "${_TEST_WORKING_DIR}" + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR + "Error running test executable '${_TEST_EXECUTABLE}':\n" + " Result: ${result}\n" + " Output: ${output}\n" + ) + endif() -# Prepare output dir -if(output_dir AND NOT IS_ABSOLUTE ${output_dir}) - set(output_dir "${TEST_WORKING_DIR}/${output_dir}") - if(NOT EXISTS ${output_dir}) - file(MAKE_DIRECTORY ${output_dir}) + # Make sure to escape ; (semicolons) in test names first, because + # that'd break the foreach loop for "Parse output" later and create + # wrongly splitted and thus failing test cases (false positives) + string(REPLACE ";" "\;" output "${output}") + string(REPLACE "\n" ";" output "${output}") + + # Prepare reporter + if(reporter) + set(reporter_arg "--reporter ${reporter}") + + # Run test executable to check whether reporter is available + # note that the use of --list-reporters is not the important part, + # we only want to check whether the execution succeeds with ${reporter_arg} + execute_process( + COMMAND ${_TEST_EXECUTOR} "${_TEST_EXECUTABLE}" ${spec} ${reporter_arg} --list-reporters + OUTPUT_VARIABLE reporter_check_output + RESULT_VARIABLE reporter_check_result + WORKING_DIRECTORY "${_TEST_WORKING_DIR}" + ) + if(${reporter_check_result} EQUAL 255) + message(FATAL_ERROR + "\"${reporter}\" is not a valid reporter!\n" + ) + elseif(NOT ${reporter_check_result} EQUAL 0) + message(FATAL_ERROR + "Error running test executable '${_TEST_EXECUTABLE}':\n" + " Result: ${reporter_check_result}\n" + " Output: ${reporter_check_output}\n" + ) + endif() endif() -endif() -if(dl_paths) - foreach(path ${dl_paths}) - cmake_path(NATIVE_PATH path native_path) - list(APPEND environment_modifications "${dl_paths_variable_name}=path_list_prepend:${native_path}") - endforeach() -endif() + # Prepare output dir + if(output_dir AND NOT IS_ABSOLUTE ${output_dir}) + set(output_dir "${_TEST_WORKING_DIR}/${output_dir}") + if(NOT EXISTS ${output_dir}) + file(MAKE_DIRECTORY ${output_dir}) + endif() + endif() -# Parse output -foreach(line ${output}) - set(test ${line}) - # Escape characters in test case names that would be parsed by Catch2 - set(test_name ${test}) - foreach(char , [ ]) - string(REPLACE ${char} "\\${char}" test_name ${test_name}) - endforeach(char) - # ...add output dir - if(output_dir) - string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean ${test_name}) - set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}") + if(dl_paths) + foreach(path ${dl_paths}) + cmake_path(NATIVE_PATH path native_path) + list(APPEND environment_modifications "${dl_paths_variable_name}=path_list_prepend:${native_path}") + endforeach() endif() - - # ...and add to script - add_command(add_test - "${prefix}${test}${suffix}" - ${TEST_EXECUTOR} - "${TEST_EXECUTABLE}" - "${test_name}" - ${extra_args} - "${reporter_arg}" - "${output_dir_arg}" - ) - add_command(set_tests_properties - "${prefix}${test}${suffix}" - PROPERTIES - WORKING_DIRECTORY "${TEST_WORKING_DIR}" - ${properties} - ) - if(environment_modifications) - add_command(set_tests_properties - "${prefix}${test}${suffix}" - PROPERTIES - ENVIRONMENT_MODIFICATION "${environment_modifications}") - endif() + # Parse output + foreach(line ${output}) + set(test "${line}") + # Escape characters in test case names that would be parsed by Catch2 + # Note that the \ escaping must happen FIRST! Do not change the order. + set(test_name "${test}") + foreach(char \\ , [ ]) + string(REPLACE ${char} "\\${char}" test_name "${test_name}") + endforeach(char) + # ...add output dir + if(output_dir) + string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean "${test_name}") + set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}") + endif() + + # ...and add to script + add_command(add_test + "${prefix}${test}${suffix}" + ${_TEST_EXECUTOR} + "${_TEST_EXECUTABLE}" + "${test_name}" + ${extra_args} + "${reporter_arg}" + "${output_dir_arg}" + ) + add_command(set_tests_properties + "${prefix}${test}${suffix}" + PROPERTIES + WORKING_DIRECTORY "${_TEST_WORKING_DIR}" + ${properties} + ) + + if(environment_modifications) + add_command(set_tests_properties + "${prefix}${test}${suffix}" + PROPERTIES + ENVIRONMENT_MODIFICATION "${environment_modifications}") + endif() + + list(APPEND tests "${prefix}${test}${suffix}") + endforeach() - list(APPEND tests "${prefix}${test}${suffix}") -endforeach() + # Create a list of all discovered tests, which users may use to e.g. set + # properties on the tests + add_command(set ${_TEST_LIST} ${tests}) -# Create a list of all discovered tests, which users may use to e.g. set -# properties on the tests -add_command(set ${TEST_LIST} ${tests}) + # Write CTest script + file(WRITE "${_CTEST_FILE}" "${script}") +endfunction() -# Write CTest script -file(WRITE "${CTEST_FILE}" "${script}") +if(CMAKE_SCRIPT_MODE_FILE) + catch_discover_tests_impl( + TEST_EXECUTABLE ${TEST_EXECUTABLE} + TEST_EXECUTOR ${TEST_EXECUTOR} + TEST_WORKING_DIR ${TEST_WORKING_DIR} + TEST_SPEC ${TEST_SPEC} + TEST_EXTRA_ARGS ${TEST_EXTRA_ARGS} + TEST_PROPERTIES ${TEST_PROPERTIES} + TEST_PREFIX ${TEST_PREFIX} + TEST_SUFFIX ${TEST_SUFFIX} + TEST_LIST ${TEST_LIST} + TEST_REPORTER ${TEST_REPORTER} + TEST_OUTPUT_DIR ${TEST_OUTPUT_DIR} + TEST_OUTPUT_PREFIX ${TEST_OUTPUT_PREFIX} + TEST_OUTPUT_SUFFIX ${TEST_OUTPUT_SUFFIX} + TEST_DL_PATHS ${TEST_DL_PATHS} + CTEST_FILE ${CTEST_FILE} + ) +endif() diff --git a/extras/CatchShardTests.cmake b/extras/CatchShardTests.cmake index 5e043cf0..68228f5a 100644 --- a/extras/CatchShardTests.cmake +++ b/extras/CatchShardTests.cmake @@ -46,7 +46,7 @@ function(catch_add_sharded_tests TARGET) APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}" ) - set(shard_impl_script_file "${CMAKE_CURRENT_LIST_DIR}/CatchShardTestsImpl.cmake") + set(shard_impl_script_file "${_CATCH_DISCOVER_SHARD_TESTS_IMPL_SCRIPT}") add_custom_command( TARGET ${TARGET} POST_BUILD @@ -64,3 +64,11 @@ function(catch_add_sharded_tests TARGET) endfunction() + + +############################################################################### + +set(_CATCH_DISCOVER_SHARD_TESTS_IMPL_SCRIPT + ${CMAKE_CURRENT_LIST_DIR}/CatchShardTestsImpl.cmake + CACHE INTERNAL "Catch2 full path to CatchShardTestsImpl.cmake helper file" +) diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp index b27c4ec8..cfc38a46 100644 --- a/extras/catch_amalgamated.cpp +++ b/extras/catch_amalgamated.cpp @@ -1,3 +1,4 @@ + // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at @@ -5,8 +6,8 @@ // SPDX-License-Identifier: BSL-1.0 -// Catch v3.2.1 -// Generated: 2022-12-09 23:01:15.713081 +// Catch v3.5.0 +// Generated: 2023-12-11 00:51:07.662625 // ---------------------------------------------------------- // This file is an amalgamation of multiple different files. // You probably shouldn't edit it directly. @@ -48,6 +49,80 @@ namespace Catch { } // namespace Catch +// Adapted from donated nonius code. + + +#include <vector> + +namespace Catch { + namespace Benchmark { + namespace Detail { + SampleAnalysis analyse(const IConfig &cfg, FDuration* first, FDuration* last) { + if (!cfg.benchmarkNoAnalysis()) { + std::vector<double> samples; + samples.reserve(static_cast<size_t>(last - first)); + for (auto current = first; current != last; ++current) { + samples.push_back( current->count() ); + } + + auto analysis = Catch::Benchmark::Detail::analyse_samples( + cfg.benchmarkConfidenceInterval(), + cfg.benchmarkResamples(), + samples.data(), + samples.data() + samples.size() ); + auto outliers = Catch::Benchmark::Detail::classify_outliers( + samples.data(), samples.data() + samples.size() ); + + auto wrap_estimate = [](Estimate<double> e) { + return Estimate<FDuration> { + FDuration(e.point), + FDuration(e.lower_bound), + FDuration(e.upper_bound), + e.confidence_interval, + }; + }; + std::vector<FDuration> samples2; + samples2.reserve(samples.size()); + for (auto s : samples) { + samples2.push_back( FDuration( s ) ); + } + + return { + CATCH_MOVE(samples2), + wrap_estimate(analysis.mean), + wrap_estimate(analysis.standard_deviation), + outliers, + analysis.outlier_variance, + }; + } else { + std::vector<FDuration> samples; + samples.reserve(static_cast<size_t>(last - first)); + + FDuration mean = FDuration(0); + int i = 0; + for (auto it = first; it < last; ++it, ++i) { + samples.push_back(FDuration(*it)); + mean += FDuration(*it); + } + mean /= i; + + return SampleAnalysis{ + CATCH_MOVE(samples), + Estimate<FDuration>{ mean, mean, mean, 0.0 }, + Estimate<FDuration>{ FDuration( 0 ), + FDuration( 0 ), + FDuration( 0 ), + 0.0 }, + OutlierClassification{}, + 0.0 + }; + } + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + + namespace Catch { @@ -60,6 +135,7 @@ namespace Catch { + #include <exception> namespace Catch { @@ -86,9 +162,11 @@ namespace Catch { +#include <algorithm> #include <cassert> +#include <cmath> #include <cstddef> -#include <iterator> +#include <numeric> #include <random> @@ -96,139 +174,204 @@ namespace Catch { #include <future> #endif -namespace { +namespace Catch { + namespace Benchmark { + namespace Detail { + namespace { + + template <typename URng, typename Estimator> + static sample + resample( URng& rng, + unsigned int resamples, + double const* first, + double const* last, + Estimator& estimator ) { + auto n = static_cast<size_t>( last - first ); + std::uniform_int_distribution<decltype( n )> dist( 0, + n - 1 ); + + sample out; + out.reserve( resamples ); + // We allocate the vector outside the loop to avoid realloc + // per resample + std::vector<double> resampled; + resampled.reserve( n ); + for ( size_t i = 0; i < resamples; ++i ) { + resampled.clear(); + for ( size_t s = 0; s < n; ++s ) { + resampled.push_back( + first[static_cast<std::ptrdiff_t>( + dist( rng ) )] ); + } + const auto estimate = + estimator( resampled.data(), resampled.data() + resampled.size() ); + out.push_back( estimate ); + } + std::sort( out.begin(), out.end() ); + return out; + } -using Catch::Benchmark::Detail::sample; - - template <typename URng, typename Estimator> - sample resample(URng& rng, unsigned int resamples, std::vector<double>::iterator first, std::vector<double>::iterator last, Estimator& estimator) { - auto n = static_cast<size_t>(last - first); - std::uniform_int_distribution<decltype(n)> dist(0, n - 1); - - sample out; - out.reserve(resamples); - std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] { - std::vector<double> resampled; - resampled.reserve(n); - std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[static_cast<std::ptrdiff_t>(dist(rng))]; }); - return estimator(resampled.begin(), resampled.end()); - }); - std::sort(out.begin(), out.end()); - return out; - } - - - double erf_inv(double x) { - // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2 - double w, p; - - w = -log((1.0 - x) * (1.0 + x)); - - if (w < 6.250000) { - w = w - 3.125000; - p = -3.6444120640178196996e-21; - p = -1.685059138182016589e-19 + p * w; - p = 1.2858480715256400167e-18 + p * w; - p = 1.115787767802518096e-17 + p * w; - p = -1.333171662854620906e-16 + p * w; - p = 2.0972767875968561637e-17 + p * w; - p = 6.6376381343583238325e-15 + p * w; - p = -4.0545662729752068639e-14 + p * w; - p = -8.1519341976054721522e-14 + p * w; - p = 2.6335093153082322977e-12 + p * w; - p = -1.2975133253453532498e-11 + p * w; - p = -5.4154120542946279317e-11 + p * w; - p = 1.051212273321532285e-09 + p * w; - p = -4.1126339803469836976e-09 + p * w; - p = -2.9070369957882005086e-08 + p * w; - p = 4.2347877827932403518e-07 + p * w; - p = -1.3654692000834678645e-06 + p * w; - p = -1.3882523362786468719e-05 + p * w; - p = 0.0001867342080340571352 + p * w; - p = -0.00074070253416626697512 + p * w; - p = -0.0060336708714301490533 + p * w; - p = 0.24015818242558961693 + p * w; - p = 1.6536545626831027356 + p * w; - } else if (w < 16.000000) { - w = sqrt(w) - 3.250000; - p = 2.2137376921775787049e-09; - p = 9.0756561938885390979e-08 + p * w; - p = -2.7517406297064545428e-07 + p * w; - p = 1.8239629214389227755e-08 + p * w; - p = 1.5027403968909827627e-06 + p * w; - p = -4.013867526981545969e-06 + p * w; - p = 2.9234449089955446044e-06 + p * w; - p = 1.2475304481671778723e-05 + p * w; - p = -4.7318229009055733981e-05 + p * w; - p = 6.8284851459573175448e-05 + p * w; - p = 2.4031110387097893999e-05 + p * w; - p = -0.0003550375203628474796 + p * w; - p = 0.00095328937973738049703 + p * w; - p = -0.0016882755560235047313 + p * w; - p = 0.0024914420961078508066 + p * w; - p = -0.0037512085075692412107 + p * w; - p = 0.005370914553590063617 + p * w; - p = 1.0052589676941592334 + p * w; - p = 3.0838856104922207635 + p * w; - } else { - w = sqrt(w) - 5.000000; - p = -2.7109920616438573243e-11; - p = -2.5556418169965252055e-10 + p * w; - p = 1.5076572693500548083e-09 + p * w; - p = -3.7894654401267369937e-09 + p * w; - p = 7.6157012080783393804e-09 + p * w; - p = -1.4960026627149240478e-08 + p * w; - p = 2.9147953450901080826e-08 + p * w; - p = -6.7711997758452339498e-08 + p * w; - p = 2.2900482228026654717e-07 + p * w; - p = -9.9298272942317002539e-07 + p * w; - p = 4.5260625972231537039e-06 + p * w; - p = -1.9681778105531670567e-05 + p * w; - p = 7.5995277030017761139e-05 + p * w; - p = -0.00021503011930044477347 + p * w; - p = -0.00013871931833623122026 + p * w; - p = 1.0103004648645343977 + p * w; - p = 4.8499064014085844221 + p * w; - } - return p * x; - } - - double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) { - auto m = Catch::Benchmark::Detail::mean(first, last); - double variance = std::accumulate( first, - last, - 0., - [m]( double a, double b ) { - double diff = b - m; - return a + diff * diff; - } ) / - ( last - first ); - return std::sqrt( variance ); - } + static double outlier_variance( Estimate<double> mean, + Estimate<double> stddev, + int n ) { + double sb = stddev.point; + double mn = mean.point / n; + double mg_min = mn / 2.; + double sg = (std::min)( mg_min / 4., sb / std::sqrt( n ) ); + double sg2 = sg * sg; + double sb2 = sb * sb; + + auto c_max = [n, mn, sb2, sg2]( double x ) -> double { + double k = mn - x; + double d = k * k; + double nd = n * d; + double k0 = -n * nd; + double k1 = sb2 - n * sg2 + nd; + double det = k1 * k1 - 4 * sg2 * k0; + return static_cast<int>( -2. * k0 / + ( k1 + std::sqrt( det ) ) ); + }; + + auto var_out = [n, sb2, sg2]( double c ) { + double nc = n - c; + return ( nc / n ) * ( sb2 - nc * sg2 ); + }; + + return (std::min)( var_out( 1 ), + var_out( + (std::min)( c_max( 0. ), + c_max( mg_min ) ) ) ) / + sb2; + } -} + static double erf_inv( double x ) { + // Code accompanying the article "Approximating the erfinv + // function" in GPU Computing Gems, Volume 2 + double w, p; + + w = -log( ( 1.0 - x ) * ( 1.0 + x ) ); + + if ( w < 6.250000 ) { + w = w - 3.125000; + p = -3.6444120640178196996e-21; + p = -1.685059138182016589e-19 + p * w; + p = 1.2858480715256400167e-18 + p * w; + p = 1.115787767802518096e-17 + p * w; + p = -1.333171662854620906e-16 + p * w; + p = 2.0972767875968561637e-17 + p * w; + p = 6.6376381343583238325e-15 + p * w; + p = -4.0545662729752068639e-14 + p * w; + p = -8.1519341976054721522e-14 + p * w; + p = 2.6335093153082322977e-12 + p * w; + p = -1.2975133253453532498e-11 + p * w; + p = -5.4154120542946279317e-11 + p * w; + p = 1.051212273321532285e-09 + p * w; + p = -4.1126339803469836976e-09 + p * w; + p = -2.9070369957882005086e-08 + p * w; + p = 4.2347877827932403518e-07 + p * w; + p = -1.3654692000834678645e-06 + p * w; + p = -1.3882523362786468719e-05 + p * w; + p = 0.0001867342080340571352 + p * w; + p = -0.00074070253416626697512 + p * w; + p = -0.0060336708714301490533 + p * w; + p = 0.24015818242558961693 + p * w; + p = 1.6536545626831027356 + p * w; + } else if ( w < 16.000000 ) { + w = sqrt( w ) - 3.250000; + p = 2.2137376921775787049e-09; + p = 9.0756561938885390979e-08 + p * w; + p = -2.7517406297064545428e-07 + p * w; + p = 1.8239629214389227755e-08 + p * w; + p = 1.5027403968909827627e-06 + p * w; + p = -4.013867526981545969e-06 + p * w; + p = 2.9234449089955446044e-06 + p * w; + p = 1.2475304481671778723e-05 + p * w; + p = -4.7318229009055733981e-05 + p * w; + p = 6.8284851459573175448e-05 + p * w; + p = 2.4031110387097893999e-05 + p * w; + p = -0.0003550375203628474796 + p * w; + p = 0.00095328937973738049703 + p * w; + p = -0.0016882755560235047313 + p * w; + p = 0.0024914420961078508066 + p * w; + p = -0.0037512085075692412107 + p * w; + p = 0.005370914553590063617 + p * w; + p = 1.0052589676941592334 + p * w; + p = 3.0838856104922207635 + p * w; + } else { + w = sqrt( w ) - 5.000000; + p = -2.7109920616438573243e-11; + p = -2.5556418169965252055e-10 + p * w; + p = 1.5076572693500548083e-09 + p * w; + p = -3.7894654401267369937e-09 + p * w; + p = 7.6157012080783393804e-09 + p * w; + p = -1.4960026627149240478e-08 + p * w; + p = 2.9147953450901080826e-08 + p * w; + p = -6.7711997758452339498e-08 + p * w; + p = 2.2900482228026654717e-07 + p * w; + p = -9.9298272942317002539e-07 + p * w; + p = 4.5260625972231537039e-06 + p * w; + p = -1.9681778105531670567e-05 + p * w; + p = 7.5995277030017761139e-05 + p * w; + p = -0.00021503011930044477347 + p * w; + p = -0.00013871931833623122026 + p * w; + p = 1.0103004648645343977 + p * w; + p = 4.8499064014085844221 + p * w; + } + return p * x; + } + + static double + standard_deviation( double const* first, double const* last ) { + auto m = Catch::Benchmark::Detail::mean( first, last ); + double variance = + std::accumulate( first, + last, + 0., + [m]( double a, double b ) { + double diff = b - m; + return a + diff * diff; + } ) / + ( last - first ); + return std::sqrt( variance ); + } + + static sample jackknife( double ( *estimator )( double const*, + double const* ), + double* first, + double* last ) { + const auto second = first + 1; + sample results; + results.reserve( static_cast<size_t>( last - first ) ); + + for ( auto it = first; it != last; ++it ) { + std::iter_swap( it, first ); + results.push_back( estimator( second, last ) ); + } + + return results; + } + + + } // namespace + } // namespace Detail + } // namespace Benchmark +} // namespace Catch namespace Catch { namespace Benchmark { namespace Detail { -#if defined( __GNUC__ ) || defined( __clang__ ) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - bool directCompare( double lhs, double rhs ) { return lhs == rhs; } -#if defined( __GNUC__ ) || defined( __clang__ ) -# pragma GCC diagnostic pop -#endif - - double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) { + double weighted_average_quantile( int k, + int q, + double* first, + double* last ) { auto count = last - first; double idx = (count - 1) * k / static_cast<double>(q); int j = static_cast<int>(idx); double g = idx - j; std::nth_element(first, first + j, last); auto xj = first[j]; - if ( directCompare( g, 0 ) ) { + if ( Catch::Detail::directCompare( g, 0 ) ) { return xj; } @@ -236,6 +379,48 @@ namespace Catch { return xj + g * (xj1 - xj); } + OutlierClassification + classify_outliers( double const* first, double const* last ) { + std::vector<double> copy( first, last ); + + auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.data() + copy.size() ); + auto q3 = weighted_average_quantile( 3, 4, copy.data(), copy.data() + copy.size() ); + auto iqr = q3 - q1; + auto los = q1 - ( iqr * 3. ); + auto lom = q1 - ( iqr * 1.5 ); + auto him = q3 + ( iqr * 1.5 ); + auto his = q3 + ( iqr * 3. ); + + OutlierClassification o; + for ( ; first != last; ++first ) { + const double t = *first; + if ( t < los ) { + ++o.low_severe; + } else if ( t < lom ) { + ++o.low_mild; + } else if ( t > his ) { + ++o.high_severe; + } else if ( t > him ) { + ++o.high_mild; + } + ++o.samples_seen; + } + return o; + } + + double mean( double const* first, double const* last ) { + auto count = last - first; + double sum = 0.; + while (first != last) { + sum += *first; + ++first; + } + return sum / static_cast<double>(count); + } + + double normal_cdf( double x ) { + return std::erfc( -x / std::sqrt( 2.0 ) ) / 2.0; + } double erfc_inv(double x) { return erf_inv(1.0 - x); @@ -257,50 +442,77 @@ namespace Catch { return result; } + Estimate<double> + bootstrap( double confidence_level, + double* first, + double* last, + sample const& resample, + double ( *estimator )( double const*, double const* ) ) { + auto n_samples = last - first; + + double point = estimator( first, last ); + // Degenerate case with a single sample + if ( n_samples == 1 ) + return { point, point, point, confidence_level }; + + sample jack = jackknife( estimator, first, last ); + double jack_mean = + mean( jack.data(), jack.data() + jack.size() ); + double sum_squares = 0, sum_cubes = 0; + for ( double x : jack ) { + auto difference = jack_mean - x; + auto square = difference * difference; + auto cube = square * difference; + sum_squares += square; + sum_cubes += cube; + } + + double accel = sum_cubes / ( 6 * std::pow( sum_squares, 1.5 ) ); + long n = static_cast<long>( resample.size() ); + double prob_n = + std::count_if( resample.begin(), + resample.end(), + [point]( double x ) { return x < point; } ) / + static_cast<double>( n ); + // degenerate case with uniform samples + if ( Catch::Detail::directCompare( prob_n, 0. ) ) { + return { point, point, point, confidence_level }; + } - double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) { - double sb = stddev.point; - double mn = mean.point / n; - double mg_min = mn / 2.; - double sg = (std::min)(mg_min / 4., sb / std::sqrt(n)); - double sg2 = sg * sg; - double sb2 = sb * sb; + double bias = normal_quantile( prob_n ); + double z1 = normal_quantile( ( 1. - confidence_level ) / 2. ); - auto c_max = [n, mn, sb2, sg2](double x) -> double { - double k = mn - x; - double d = k * k; - double nd = n * d; - double k0 = -n * nd; - double k1 = sb2 - n * sg2 + nd; - double det = k1 * k1 - 4 * sg2 * k0; - return static_cast<int>(-2. * k0 / (k1 + std::sqrt(det))); + auto cumn = [n]( double x ) -> long { + return std::lround( normal_cdf( x ) * + static_cast<double>( n ) ); }; - - auto var_out = [n, sb2, sg2](double c) { - double nc = n - c; - return (nc / n) * (sb2 - nc * sg2); + auto a = [bias, accel]( double b ) { + return bias + b / ( 1. - accel * b ); }; - - return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2; - } - - - bootstrap_analysis analyse_samples(double confidence_level, unsigned int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) { - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS - static std::random_device entropy; - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION - - auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++ - - auto mean = &Detail::mean<std::vector<double>::iterator>; + double b1 = bias + z1; + double b2 = bias - z1; + double a1 = a( b1 ); + double a2 = a( b2 ); + auto lo = static_cast<size_t>( (std::max)( cumn( a1 ), 0l ) ); + auto hi = + static_cast<size_t>( (std::min)( cumn( a2 ), n - 1 ) ); + + return { point, resample[lo], resample[hi], confidence_level }; + } + + bootstrap_analysis analyse_samples(double confidence_level, + unsigned int n_resamples, + double* first, + double* last) { + auto mean = &Detail::mean; auto stddev = &standard_deviation; #if defined(CATCH_CONFIG_USE_ASYNC) - auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) { - auto seed = entropy(); + auto Estimate = [=](double(*f)(double const*, double const*)) { + std::random_device rd; + auto seed = rd(); return std::async(std::launch::async, [=] { - std::mt19937 rng(seed); + SimplePcg32 rng( seed ); auto resampled = resample(rng, n_resamples, first, last, f); return bootstrap(confidence_level, first, last, resampled, f); }); @@ -312,9 +524,10 @@ namespace Catch { auto mean_estimate = mean_future.get(); auto stddev_estimate = stddev_future.get(); #else - auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) { - auto seed = entropy(); - std::mt19937 rng(seed); + auto Estimate = [=](double(*f)(double const* , double const*)) { + std::random_device rd; + auto seed = rd(); + SimplePcg32 rng( seed ); auto resampled = resample(rng, n_resamples, first, last, f); return bootstrap(confidence_level, first, last, resampled, f); }; @@ -323,6 +536,7 @@ namespace Catch { auto stddev_estimate = Estimate(stddev); #endif // CATCH_USE_ASYNC + auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++ double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n); return { mean_estimate, stddev_estimate, outlier_variance }; @@ -394,10 +608,10 @@ namespace Catch { } namespace literals { - Approx operator "" _a(long double val) { + Approx operator ""_a(long double val) { return Approx(val); } - Approx operator "" _a(unsigned long long val) { + Approx operator ""_a(unsigned long long val) { return Approx(val); } } // end namespace literals @@ -428,9 +642,9 @@ namespace Catch { return reconstructedExpression; } - AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data ) + AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData&& data ) : m_info( info ), - m_resultData( data ) + m_resultData( CATCH_MOVE(data) ) {} // Result was a success @@ -469,16 +683,15 @@ namespace Catch { } std::string AssertionResult::getExpressionInMacro() const { - std::string expr; - if( m_info.macroName.empty() ) - expr = static_cast<std::string>(m_info.capturedExpression); - else { - expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); - expr += m_info.macroName; - expr += "( "; - expr += m_info.capturedExpression; - expr += " )"; + if ( m_info.macroName.empty() ) { + return static_cast<std::string>( m_info.capturedExpression ); } + std::string expr; + expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); + expr += m_info.macroName; + expr += "( "; + expr += m_info.capturedExpression; + expr += " )"; return expr; } @@ -597,7 +810,7 @@ namespace Catch { elem = trim(elem); } - // Insert the default reporter if user hasn't asked for a specfic one + // Insert the default reporter if user hasn't asked for a specific one if ( m_data.reporterSpecifications.empty() ) { m_data.reporterSpecifications.push_back( { #if defined( CATCH_CONFIG_DEFAULT_REPORTER ) @@ -758,8 +971,8 @@ namespace Catch { //////////////////////////////////////////////////////////////////////////// - ScopedMessage::ScopedMessage( MessageBuilder const& builder ): - m_info( builder.m_info ) { + ScopedMessage::ScopedMessage( MessageBuilder&& builder ): + m_info( CATCH_MOVE(builder.m_info) ) { m_info.message = builder.m_stream.str(); getResultCapture().pushScopedMessage( m_info ); } @@ -776,7 +989,11 @@ namespace Catch { } - Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { + Capturer::Capturer( StringRef macroName, + SourceLineInfo const& lineInfo, + ResultWas::OfType resultType, + StringRef names ): + m_resultCapture( getResultCapture() ) { auto trimmed = [&] (size_t start, size_t end) { while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; @@ -853,6 +1070,8 @@ namespace Catch { +#include <exception> + namespace Catch { namespace { @@ -863,7 +1082,7 @@ namespace Catch { public: // IRegistryHub RegistryHub() = default; - IReporterRegistry const& getReporterRegistry() const override { + ReporterRegistry const& getReporterRegistry() const override { return m_reporterRegistry; } ITestCaseRegistry const& getTestCaseRegistry() const override { @@ -939,6 +1158,7 @@ namespace Catch { #include <algorithm> #include <cassert> +#include <exception> #include <iomanip> #include <set> @@ -1253,6 +1473,12 @@ namespace Catch { return 2; } + if ( totals.testCases.total() > 0 && + totals.testCases.total() == totals.testCases.skipped + && !m_config->zeroTestsCountAsSuccess() ) { + return 4; + } + // Note that on unices only the lower 8 bits are usually used, clamping // the return value to 255 prevents false negative when some multiple // of 256 tests has failed @@ -1415,12 +1641,20 @@ namespace Catch { for (size_t idx = 0; idx < originalTags.size(); ++idx) { auto c = originalTags[idx]; if (c == '[') { - assert(!inTag); + CATCH_ENFORCE( + !inTag, + "Found '[' inside a tag while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + inTag = true; tagStart = idx; } if (c == ']') { - assert(inTag); + CATCH_ENFORCE( + inTag, + "Found unmatched ']' while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + inTag = false; tagEnd = idx; assert(tagStart < tagEnd); @@ -1429,7 +1663,11 @@ namespace Catch { // it over to backing storage and actually reference the // backing storage in the saved tags StringRef tagStr = originalTags.substr(tagStart+1, tagEnd - tagStart - 1); - CATCH_ENFORCE(!tagStr.empty(), "Empty tags are not allowed"); + CATCH_ENFORCE( !tagStr.empty(), + "Found an empty tag while registering test case '" + << _nameAndTags.name << "' at " + << _lineInfo ); + enforceNotReservedTag(tagStr, lineInfo); properties |= parseSpecialTag(tagStr); // When copying a tag to the backing storage, we need to @@ -1443,8 +1681,12 @@ namespace Catch { // the tags. internalAppendTag(tagStr); } - (void)inTag; // Silence "set-but-unused" warning in release mode. } + CATCH_ENFORCE( !inTag, + "Found an unclosed tag while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + + // Add [.] if relevant if (isHidden()) { internalAppendTag("."_sr); @@ -1620,16 +1862,18 @@ namespace Catch { return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } ); } - TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCaseHandle> const& testCases, IConfig const& config ) const - { - Matches matches( m_filters.size() ); - std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){ + TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCaseHandle> const& testCases, IConfig const& config ) const { + Matches matches; + matches.reserve( m_filters.size() ); + for ( auto const& filter : m_filters ) { std::vector<TestCaseHandle const*> currentMatches; - for( auto const& test : testCases ) - if( isThrowSafe( test, config ) && filter.matches( test.getTestCaseInfo() ) ) + for ( auto const& test : testCases ) + if ( isThrowSafe( test, config ) && + filter.matches( test.getTestCaseInfo() ) ) currentMatches.emplace_back( &test ); - return FilterMatch{ extractFilterName(filter), currentMatches }; - } ); + matches.push_back( + FilterMatch{ extractFilterName( filter ), currentMatches } ); + } return matches; } @@ -1935,6 +2179,7 @@ namespace Catch { diff.passed = passed - other.passed; diff.failed = failed - other.failed; diff.failedButOk = failedButOk - other.failedButOk; + diff.skipped = skipped - other.skipped; return diff; } @@ -1942,14 +2187,15 @@ namespace Catch { passed += other.passed; failed += other.failed; failedButOk += other.failedButOk; + skipped += other.skipped; return *this; } std::uint64_t Counts::total() const { - return passed + failed + failedButOk; + return passed + failed + failedButOk + skipped; } bool Counts::allPassed() const { - return failed == 0 && failedButOk == 0; + return failed == 0 && failedButOk == 0 && skipped == 0; } bool Counts::allOk() const { return failed == 0; @@ -1974,6 +2220,8 @@ namespace Catch { ++diff.testCases.failed; else if( diff.assertions.failedButOk > 0 ) ++diff.testCases.failedButOk; + else if ( diff.assertions.skipped > 0 ) + ++ diff.testCases.skipped; else ++diff.testCases.passed; return diff; @@ -1982,6 +2230,19 @@ namespace Catch { } + + +namespace Catch { + namespace Detail { + void registerTranslatorImpl( + Detail::unique_ptr<IExceptionTranslator>&& translator ) { + getMutableRegistryHub().registerTranslator( + CATCH_MOVE( translator ) ); + } + } // namespace Detail +} // namespace Catch + + #include <ostream> namespace Catch { @@ -2012,7 +2273,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 3, 2, 1, "", 0 ); + static Version version( 3, 5, 0, "", 0 ); return version; } @@ -2048,18 +2309,53 @@ namespace Detail { GeneratorUntypedBase::~GeneratorUntypedBase() = default; - auto acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + IGeneratorTracker* acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const& lineInfo ) { return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); } + IGeneratorTracker* createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + GeneratorBasePtr&& generator ) { + return getResultCapture().createGeneratorTracker( + generatorName, lineInfo, CATCH_MOVE( generator ) ); + } + } // namespace Generators } // namespace Catch +#include <random> -std::uint32_t Catch::Generators::Detail::getSeed() { return sharedRng()(); } +namespace Catch { + namespace Generators { + namespace Detail { + std::uint32_t getSeed() { return sharedRng()(); } + } // namespace Detail + + struct RandomFloatingGenerator<long double>::PImpl { + PImpl( long double a, long double b, uint32_t seed ): + rng( seed ), dist( a, b ) {} + + Catch::SimplePcg32 rng; + std::uniform_real_distribution<long double> dist; + }; + + RandomFloatingGenerator<long double>::RandomFloatingGenerator( + long double a, long double b, std::uint32_t seed) : + m_pimpl(Catch::Detail::make_unique<PImpl>(a, b, seed)) { + static_cast<void>( next() ); + } + + RandomFloatingGenerator<long double>::~RandomFloatingGenerator() = + default; + bool RandomFloatingGenerator<long double>::next() { + m_current_number = m_pimpl->dist( m_pimpl->rng ); + return true; + } + } // namespace Generators +} // namespace Catch @@ -2156,24 +2452,21 @@ namespace Catch { infoMessages( _infoMessages ), totals( _totals ) { - assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression; - if( assertionResult.hasMessage() ) { // Copy message into messages list. // !TBD This should have been done earlier, somewhere MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() ); - builder << assertionResult.getMessage(); - builder.m_info.message = builder.m_stream.str(); + builder.m_info.message = static_cast<std::string>(assertionResult.getMessage()); - infoMessages.push_back( builder.m_info ); + infoMessages.push_back( CATCH_MOVE(builder.m_info) ); } } - SectionStats::SectionStats( SectionInfo const& _sectionInfo, + SectionStats::SectionStats( SectionInfo&& _sectionInfo, Counts const& _assertions, double _durationInSeconds, bool _missingAssertions ) - : sectionInfo( _sectionInfo ), + : sectionInfo( CATCH_MOVE(_sectionInfo) ), assertions( _assertions ), durationInSeconds( _durationInSeconds ), missingAssertions( _missingAssertions ) @@ -2182,13 +2475,13 @@ namespace Catch { TestCaseStats::TestCaseStats( TestCaseInfo const& _testInfo, Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, + std::string&& _stdOut, + std::string&& _stdErr, bool _aborting ) : testInfo( &_testInfo ), totals( _totals ), - stdOut( _stdOut ), - stdErr( _stdErr ), + stdOut( CATCH_MOVE(_stdOut) ), + stdErr( CATCH_MOVE(_stdErr) ), aborting( _aborting ) {} @@ -2217,14 +2510,6 @@ namespace Catch { namespace Catch { - IReporterRegistry::~IReporterRegistry() = default; -} - - - - -namespace Catch { - ITestInvoker::~ITestInvoker() = default; ITestCaseRegistry::~ITestCaseRegistry() = default; } @@ -2239,7 +2524,9 @@ namespace Catch { ResultDisposition::Flags resultDisposition ) : m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition }, m_resultCapture( getResultCapture() ) - {} + { + m_resultCapture.notifyAssertionStarted( m_assertionInfo ); + } void AssertionHandler::handleExpr( ITransientExpression const& expr ) { m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction ); @@ -2253,7 +2540,7 @@ namespace Catch { } void AssertionHandler::complete() { - setCompleted(); + m_completed = true; if( m_reaction.shouldDebugBreak ) { // If you find your debugger stopping you here then go one level up on the @@ -2265,9 +2552,9 @@ namespace Catch { if (m_reaction.shouldThrow) { throw_test_failure_exception(); } - } - void AssertionHandler::setCompleted() { - m_completed = true; + if ( m_reaction.shouldSkip ) { + throw_test_skip_exception(); + } } void AssertionHandler::handleUnexpectedInflightException() { @@ -2895,7 +3182,7 @@ namespace Catch { auto const& reporterSpec = *parsed; - IReporterRegistry::FactoryMap const& factories = + auto const& factories = getRegistryHub().getReporterRegistry().getFactories(); auto result = factories.find( reporterSpec.name() ); @@ -3133,7 +3420,7 @@ namespace Catch { namespace { //! A do-nothing implementation of colour, used as fallback for unknown //! platforms, and when the user asks to deactivate all colours. - class NoColourImpl : public ColourImpl { + class NoColourImpl final : public ColourImpl { public: NoColourImpl( IStream* stream ): ColourImpl( stream ) {} @@ -3151,7 +3438,7 @@ namespace Catch { namespace Catch { namespace { - class Win32ColourImpl : public ColourImpl { + class Win32ColourImpl final : public ColourImpl { public: Win32ColourImpl(IStream* stream): ColourImpl(stream) { @@ -3217,7 +3504,7 @@ namespace { namespace Catch { namespace { - class ANSIColourImpl : public ColourImpl { + class ANSIColourImpl final : public ColourImpl { public: ANSIColourImpl( IStream* stream ): ColourImpl( stream ) {} @@ -3333,49 +3620,27 @@ namespace Catch { namespace Catch { - class Context : public IMutableContext, private Detail::NonCopyable { - - public: // IContext - IResultCapture* getResultCapture() override { - return m_resultCapture; - } - - IConfig const* getConfig() const override { - return m_config; - } - - ~Context() override; - - public: // IMutableContext - void setResultCapture( IResultCapture* resultCapture ) override { - m_resultCapture = resultCapture; - } - void setConfig( IConfig const* config ) override { - m_config = config; - } - - friend IMutableContext& getCurrentMutableContext(); - - private: - IConfig const* m_config = nullptr; - IResultCapture* m_resultCapture = nullptr; - }; - - IMutableContext *IMutableContext::currentContext = nullptr; + Context* Context::currentContext = nullptr; - void IMutableContext::createContext() - { + void cleanUpContext() { + delete Context::currentContext; + Context::currentContext = nullptr; + } + void Context::createContext() { currentContext = new Context(); } - void cleanUpContext() { - delete IMutableContext::currentContext; - IMutableContext::currentContext = nullptr; + Context& getCurrentMutableContext() { + if ( !Context::currentContext ) { Context::createContext(); } + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return *Context::currentContext; } - IContext::~IContext() = default; - IMutableContext::~IMutableContext() = default; - Context::~Context() = default; + void Context::setResultCapture( IResultCapture* resultCapture ) { + m_resultCapture = resultCapture; + } + + void Context::setConfig( IConfig const* config ) { m_config = config; } SimplePcg32& sharedRng() { static SimplePcg32 s_rng; @@ -3613,7 +3878,7 @@ namespace Catch { return parsed; } - EnumInfo::~EnumInfo() {} + EnumInfo::~EnumInfo() = default; StringRef EnumInfo::lookup( int value ) const { for( auto const& valueToName : m_values ) { @@ -3658,10 +3923,27 @@ namespace Catch { +#include <exception> + namespace Catch { - ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + namespace { + static std::string tryTranslators( + std::vector< + Detail::unique_ptr<IExceptionTranslator const>> const& translators ) { + if ( translators.empty() ) { + std::rethrow_exception( std::current_exception() ); + } else { + return translators[0]->translate( translators.begin() + 1, + translators.end() ); + } + } + } +#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + + ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() = default; void ExceptionTranslatorRegistry::registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) { m_translators.push_back( CATCH_MOVE( translator ) ); @@ -3684,13 +3966,16 @@ namespace Catch { // First we try user-registered translators. If none of them can // handle the exception, it will be rethrown handled by our defaults. try { - return tryTranslators(); + return tryTranslators(m_translators); } // To avoid having to handle TFE explicitly everywhere, we just // rethrow it so that it goes back up the caller. catch( TestFailureException& ) { std::rethrow_exception(std::current_exception()); } + catch( TestSkipException& ) { + std::rethrow_exception(std::current_exception()); + } catch( std::exception const& ex ) { return ex.what(); } @@ -3705,25 +3990,12 @@ namespace Catch { } } - std::string ExceptionTranslatorRegistry::tryTranslators() const { - if (m_translators.empty()) { - std::rethrow_exception(std::current_exception()); - } else { - return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end()); - } - } - #else // ^^ Exceptions are enabled // Exceptions are disabled vv std::string ExceptionTranslatorRegistry::translateActiveException() const { CATCH_INTERNAL_ERROR("Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); } - - std::string ExceptionTranslatorRegistry::tryTranslators() const { - CATCH_INTERNAL_ERROR("Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); - } #endif - } @@ -3980,6 +4252,17 @@ namespace Catch { return i; } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + bool directCompare( float lhs, float rhs ) { return lhs == rhs; } + bool directCompare( double lhs, double rhs ) { return lhs == rhs; } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + + } // end namespace Detail } // end namespace Catch @@ -4028,7 +4311,7 @@ namespace Catch { namespace Detail { namespace { template<typename WriterF, std::size_t bufferSize=256> - class StreamBufImpl : public std::streambuf { + class StreamBufImpl final : public std::streambuf { char data[bufferSize]; WriterF m_writer; @@ -4076,7 +4359,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class FileStream : public IStream { + class FileStream final : public IStream { std::ofstream m_ofs; public: FileStream( std::string const& filename ) { @@ -4093,7 +4376,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class CoutStream : public IStream { + class CoutStream final : public IStream { std::ostream m_os; public: // Store the streambuf from cout up-front because @@ -4122,7 +4405,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class DebugOutStream : public IStream { + class DebugOutStream final : public IStream { Detail::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf; std::ostream m_os; public: @@ -4164,6 +4447,147 @@ namespace Detail { +namespace Catch { + void JsonUtils::indent( std::ostream& os, std::uint64_t level ) { + for ( std::uint64_t i = 0; i < level; ++i ) { + os << " "; + } + } + void JsonUtils::appendCommaNewline( std::ostream& os, + bool& should_comma, + std::uint64_t level ) { + if ( should_comma ) { os << ','; } + should_comma = true; + os << '\n'; + indent( os, level ); + } + + JsonObjectWriter::JsonObjectWriter( std::ostream& os ): + JsonObjectWriter{ os, 0 } {} + + JsonObjectWriter::JsonObjectWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } { + m_os << '{'; + } + JsonObjectWriter::JsonObjectWriter( JsonObjectWriter&& source ): + m_os{ source.m_os }, + m_indent_level{ source.m_indent_level }, + m_should_comma{ source.m_should_comma }, + m_active{ source.m_active } { + source.m_active = false; + } + + JsonObjectWriter::~JsonObjectWriter() { + if ( !m_active ) { return; } + + m_os << '\n'; + JsonUtils::indent( m_os, m_indent_level ); + m_os << '}'; + } + + JsonValueWriter JsonObjectWriter::write( StringRef key ) { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + + m_os << '"' << key << "\": "; + return JsonValueWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter::JsonArrayWriter( std::ostream& os ): + JsonArrayWriter{ os, 0 } {} + JsonArrayWriter::JsonArrayWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } { + m_os << '['; + } + JsonArrayWriter::JsonArrayWriter( JsonArrayWriter&& source ): + m_os{ source.m_os }, + m_indent_level{ source.m_indent_level }, + m_should_comma{ source.m_should_comma }, + m_active{ source.m_active } { + source.m_active = false; + } + JsonArrayWriter::~JsonArrayWriter() { + if ( !m_active ) { return; } + + m_os << '\n'; + JsonUtils::indent( m_os, m_indent_level ); + m_os << ']'; + } + + JsonObjectWriter JsonArrayWriter::writeObject() { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + return JsonObjectWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter JsonArrayWriter::writeArray() { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + return JsonArrayWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter& JsonArrayWriter::write( bool value ) { + return writeImpl( value ); + } + + JsonValueWriter::JsonValueWriter( std::ostream& os ): + JsonValueWriter{ os, 0 } {} + + JsonValueWriter::JsonValueWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } {} + + JsonObjectWriter JsonValueWriter::writeObject() && { + return JsonObjectWriter{ m_os, m_indent_level }; + } + + JsonArrayWriter JsonValueWriter::writeArray() && { + return JsonArrayWriter{ m_os, m_indent_level }; + } + + void JsonValueWriter::write( Catch::StringRef value ) && { + writeImpl( value, true ); + } + + void JsonValueWriter::write( bool value ) && { + writeImpl( value ? "true"_sr : "false"_sr, false ); + } + + void JsonValueWriter::writeImpl( Catch::StringRef value, bool quote ) { + if ( quote ) { m_os << '"'; } + for (char c : value) { + // Escape list taken from https://www.json.org/json-en.html, + // string definition. + // Note that while forward slash _can_ be escaped, it does + // not have to be, if JSON is not further embedded somewhere + // where forward slash is meaningful. + if ( c == '"' ) { + m_os << "\\\""; + } else if ( c == '\\' ) { + m_os << "\\\\"; + } else if ( c == '\b' ) { + m_os << "\\b"; + } else if ( c == '\f' ) { + m_os << "\\f"; + } else if ( c == '\n' ) { + m_os << "\\n"; + } else if ( c == '\r' ) { + m_os << "\\r"; + } else if ( c == '\t' ) { + m_os << "\\t"; + } else { + m_os << c; + } + } + if ( quote ) { m_os << '"'; } + } + +} // namespace Catch + + + namespace Catch { @@ -4206,7 +4630,7 @@ namespace Catch { #else // ^^ Windows crt debug heap enabled // Windows crt debug heap disabled vv - Catch::LeakDetector::LeakDetector() {} + Catch::LeakDetector::LeakDetector() = default; #endif // CATCH_CONFIG_WINDOWS_CRTDBG @@ -4252,7 +4676,7 @@ namespace Catch { void listReporters(IEventListener& reporter) { std::vector<ReporterDescription> descriptions; - IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); + auto const& factories = getRegistryHub().getReporterRegistry().getFactories(); descriptions.reserve(factories.size()); for (auto const& fac : factories) { descriptions.push_back({ fac.first, fac.second->getDescription() }); @@ -4509,8 +4933,8 @@ namespace Catch { - #include <limits> +#include <stdexcept> namespace Catch { @@ -4538,11 +4962,14 @@ namespace Catch { return {}; } return static_cast<unsigned int>(ret); - } CATCH_CATCH_ANON( std::exception const& ) { - // There was a larger issue with the input, e.g. the parsed - // number would be too large to fit within ull. - return {}; } + CATCH_CATCH_ANON( std::invalid_argument const& ) { + // no conversion could be performed + } + CATCH_CATCH_ANON( std::out_of_range const& ) { + // the input does not fit into an unsigned long long + } + return {}; } } // namespace Catch @@ -4571,6 +4998,14 @@ namespace Catch { } #endif +#if !defined( CATCH_CONFIG_GLOBAL_NEXTAFTER ) + float nextafter( float x, float y ) { return std::nextafter( x, y ); } + double nextafter( double x, double y ) { return std::nextafter( x, y ); } +#else + float nextafter( float x, float y ) { return ::nextafterf( x, y ); } + double nextafter( double x, double y ) { return ::nextafter( x, y ); } +#endif + } // end namespace Catch @@ -4652,10 +5087,10 @@ namespace Catch { return static_cast<std::uint32_t>( std::time( nullptr ) ); case GenerateFrom::Default: - case GenerateFrom::RandomDevice: - // In theory, a platform could have random_device that returns just - // 16 bits. That is still some randomness, so we don't care too much - return static_cast<std::uint32_t>( std::random_device{}() ); + case GenerateFrom::RandomDevice: { + std::random_device rd; + return Detail::fillBitsFrom<std::uint32_t>( rd ); + } default: CATCH_ERROR("Unknown generation method"); @@ -4668,49 +5103,73 @@ namespace Catch { namespace Catch { + struct ReporterRegistry::ReporterRegistryImpl { + std::vector<Detail::unique_ptr<EventListenerFactory>> listeners; + std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess> + factories; + }; - ReporterRegistry::ReporterRegistry() { + ReporterRegistry::ReporterRegistry(): + m_impl( Detail::make_unique<ReporterRegistryImpl>() ) { // Because it is impossible to move out of initializer list, // we have to add the elements manually - m_factories["Automake"] = Detail::make_unique<ReporterFactory<AutomakeReporter>>(); - m_factories["compact"] = Detail::make_unique<ReporterFactory<CompactReporter>>(); - m_factories["console"] = Detail::make_unique<ReporterFactory<ConsoleReporter>>(); - m_factories["JUnit"] = Detail::make_unique<ReporterFactory<JunitReporter>>(); - m_factories["SonarQube"] = Detail::make_unique<ReporterFactory<SonarQubeReporter>>(); - m_factories["TAP"] = Detail::make_unique<ReporterFactory<TAPReporter>>(); - m_factories["TeamCity"] = Detail::make_unique<ReporterFactory<TeamCityReporter>>(); - m_factories["XML"] = Detail::make_unique<ReporterFactory<XmlReporter>>(); + m_impl->factories["Automake"] = + Detail::make_unique<ReporterFactory<AutomakeReporter>>(); + m_impl->factories["compact"] = + Detail::make_unique<ReporterFactory<CompactReporter>>(); + m_impl->factories["console"] = + Detail::make_unique<ReporterFactory<ConsoleReporter>>(); + m_impl->factories["JUnit"] = + Detail::make_unique<ReporterFactory<JunitReporter>>(); + m_impl->factories["SonarQube"] = + Detail::make_unique<ReporterFactory<SonarQubeReporter>>(); + m_impl->factories["TAP"] = + Detail::make_unique<ReporterFactory<TAPReporter>>(); + m_impl->factories["TeamCity"] = + Detail::make_unique<ReporterFactory<TeamCityReporter>>(); + m_impl->factories["XML"] = + Detail::make_unique<ReporterFactory<XmlReporter>>(); + m_impl->factories["JSON"] = + Detail::make_unique<ReporterFactory<JsonReporter>>(); } ReporterRegistry::~ReporterRegistry() = default; - - IEventListenerPtr ReporterRegistry::create( std::string const& name, ReporterConfig&& config ) const { - auto it = m_factories.find( name ); - if( it == m_factories.end() ) - return nullptr; - return it->second->create( CATCH_MOVE(config) ); + IEventListenerPtr + ReporterRegistry::create( std::string const& name, + ReporterConfig&& config ) const { + auto it = m_impl->factories.find( name ); + if ( it == m_impl->factories.end() ) return nullptr; + return it->second->create( CATCH_MOVE( config ) ); } - void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr factory ) { + void ReporterRegistry::registerReporter( std::string const& name, + IReporterFactoryPtr factory ) { CATCH_ENFORCE( name.find( "::" ) == name.npos, - "'::' is not allowed in reporter name: '" + name + '\'' ); - auto ret = m_factories.emplace(name, CATCH_MOVE(factory)); - CATCH_ENFORCE( ret.second, "reporter using '" + name + "' as name was already registered" ); + "'::' is not allowed in reporter name: '" + name + + '\'' ); + auto ret = m_impl->factories.emplace( name, CATCH_MOVE( factory ) ); + CATCH_ENFORCE( ret.second, + "reporter using '" + name + + "' as name was already registered" ); } void ReporterRegistry::registerListener( Detail::unique_ptr<EventListenerFactory> factory ) { - m_listeners.push_back( CATCH_MOVE(factory) ); + m_impl->listeners.push_back( CATCH_MOVE( factory ) ); } - IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const { - return m_factories; - } - IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const { - return m_listeners; + std::map<std::string, + IReporterFactoryPtr, + Detail::CaseInsensitiveLess> const& + ReporterRegistry::getFactories() const { + return m_impl->factories; } -} + std::vector<Detail::unique_ptr<EventListenerFactory>> const& + ReporterRegistry::getListeners() const { + return m_impl->listeners; + } +} // namespace Catch @@ -4726,9 +5185,9 @@ namespace Catch { }; kvPair splitKVPair(StringRef kvString) { - auto splitPos = static_cast<size_t>( std::distance( - kvString.begin(), - std::find( kvString.begin(), kvString.end(), '=' ) ) ); + auto splitPos = static_cast<size_t>( + std::find( kvString.begin(), kvString.end(), '=' ) - + kvString.begin() ); return { kvString.substr( 0, splitPos ), kvString.substr( splitPos + 1, kvString.size() ) }; @@ -4960,149 +5419,152 @@ namespace Catch { namespace Catch { namespace Generators { - struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker { - GeneratorBasePtr m_generator; + namespace { + struct GeneratorTracker final : TestCaseTracking::TrackerBase, + IGeneratorTracker { + GeneratorBasePtr m_generator; + + GeneratorTracker( + TestCaseTracking::NameAndLocation&& nameAndLocation, + TrackerContext& ctx, + ITracker* parent ): + TrackerBase( CATCH_MOVE( nameAndLocation ), ctx, parent ) {} + ~GeneratorTracker() override = default; + + static GeneratorTracker* + acquire( TrackerContext& ctx, + TestCaseTracking::NameAndLocationRef const& + nameAndLocation ) { + GeneratorTracker* tracker; + + ITracker& currentTracker = ctx.currentTracker(); + // 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 = static_cast<GeneratorTracker*>( thisTracker ); + } else if ( ITracker* childTracker = + currentTracker.findChild( + nameAndLocation ) ) { + assert( childTracker ); + assert( childTracker->isGeneratorTracker() ); + tracker = + static_cast<GeneratorTracker*>( childTracker ); + } else { + return nullptr; + } - GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( nameAndLocation, ctx, parent ) - {} - ~GeneratorTracker() override; - - static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) { - GeneratorTracker* tracker; - - ITracker& currentTracker = ctx.currentTracker(); - // 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 = static_cast<GeneratorTracker*>( thisTracker ); - } else if ( ITracker* childTracker = - currentTracker.findChild( nameAndLocation ) ) { - assert( childTracker ); - assert( childTracker->isGeneratorTracker() ); - tracker = static_cast<GeneratorTracker*>( childTracker ); - } else { - auto newTracker = - Catch::Detail::make_unique<GeneratorTracker>( - nameAndLocation, ctx, ¤tTracker ); - tracker = newTracker.get(); - currentTracker.addChild( CATCH_MOVE(newTracker) ); - } + if ( !tracker->isComplete() ) { tracker->open(); } - if( !tracker->isComplete() ) { - tracker->open(); + return tracker; } - return *tracker; - } - - // TrackerBase interface - bool isGeneratorTracker() const override { return true; } - auto hasGenerator() const -> bool override { - return !!m_generator; - } - void close() override { - TrackerBase::close(); - // 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 = [&]() { - // No children -> nobody to wait for - if ( m_children.empty() ) { - return false; - } - // If at least one child started executing, don't wait - if ( std::find_if( - m_children.begin(), - m_children.end(), - []( TestCaseTracking::ITrackerPtr const& tracker ) { - return tracker->hasStarted(); - } ) != m_children.end() ) { - return false; - } - - // No children have started. We need to check if they _can_ - // start, and thus we should wait for them, or they cannot - // start (due to filters), and we shouldn't wait for them - ITracker* parent = m_parent; - // This is safe: there is always at least one section - // tracker in a test case tracking tree - while ( !parent->isSectionTracker() ) { - parent = parent->parent(); - } - assert( parent && - "Missing root (test case) level section" ); - - auto const& parentSection = - static_cast<SectionTracker const&>( *parent ); - auto const& filters = parentSection.getFilters(); - // No filters -> no restrictions on running sections - if ( filters.empty() ) { - return true; - } + // TrackerBase interface + bool isGeneratorTracker() const override { return true; } + auto hasGenerator() const -> bool override { + return !!m_generator; + } + void close() override { + TrackerBase::close(); + // 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 = [&]() { + // No children -> nobody to wait for + if ( m_children.empty() ) { return false; } + // If at least one child started executing, don't wait + if ( std::find_if( + m_children.begin(), + m_children.end(), + []( TestCaseTracking::ITrackerPtr const& + tracker ) { + return tracker->hasStarted(); + } ) != m_children.end() ) { + return false; + } - for ( auto const& child : m_children ) { - if ( child->isSectionTracker() && - std::find( - filters.begin(), - filters.end(), - static_cast<SectionTracker const&>( *child ) - .trimmedName() ) != filters.end() ) { - return true; + // No children have started. We need to check if they + // _can_ start, and thus we should wait for them, or + // they cannot start (due to filters), and we shouldn't + // wait for them + ITracker* parent = m_parent; + // This is safe: there is always at least one section + // tracker in a test case tracking tree + while ( !parent->isSectionTracker() ) { + parent = parent->parent(); + } + assert( parent && + "Missing root (test case) level section" ); + + auto const& parentSection = + static_cast<SectionTracker const&>( *parent ); + auto const& filters = parentSection.getFilters(); + // No filters -> no restrictions on running sections + if ( filters.empty() ) { return true; } + + for ( auto const& child : m_children ) { + if ( child->isSectionTracker() && + std::find( filters.begin(), + filters.end(), + static_cast<SectionTracker const&>( + *child ) + .trimmedName() ) != + filters.end() ) { + return true; + } } + return false; + }(); + + // 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. + assert( m_generator && "Tracker without generator" ); + if ( should_wait_for_child || + ( m_runState == CompletedSuccessfully && + m_generator->countedNext() ) ) { + m_children.clear(); + m_runState = Executing; } - return false; - }(); - - // 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->countedNext() ) ) { - m_children.clear(); - m_runState = Executing; } - } - // IGeneratorTracker interface - auto getGenerator() const -> GeneratorBasePtr const& override { - return m_generator; - } - void setGenerator( GeneratorBasePtr&& generator ) override { - m_generator = CATCH_MOVE( generator ); - } - }; - GeneratorTracker::~GeneratorTracker() = default; + // IGeneratorTracker interface + auto getGenerator() const -> GeneratorBasePtr const& override { + return m_generator; + } + void setGenerator( GeneratorBasePtr&& generator ) override { + m_generator = CATCH_MOVE( generator ); + } + }; + } // namespace } RunContext::RunContext(IConfig const* _config, IEventListenerPtr&& reporter) : m_runInfo(_config->name()), - m_context(getCurrentMutableContext()), m_config(_config), m_reporter(CATCH_MOVE(reporter)), m_lastAssertionInfo{ StringRef(), SourceLineInfo("",0), StringRef(), ResultDisposition::Normal }, m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions ) { - m_context.setResultCapture(this); + getCurrentMutableContext().setResultCapture( this ); m_reporter->testRunStarting(m_runInfo); } @@ -5113,13 +5575,8 @@ namespace Catch { Totals RunContext::runTest(TestCaseHandle const& testCase) { const Totals prevTotals = m_totals; - std::string redirectedCout; - std::string redirectedCerr; - auto const& testInfo = testCase.getTestCaseInfo(); - m_reporter->testCaseStarting(testInfo); - m_activeTestCase = &testCase; @@ -5161,9 +5618,11 @@ namespace Catch { seedRng( *m_config ); uint64_t testRuns = 0; + std::string redirectedCout; + std::string redirectedCerr; do { m_trackerContext.startCycle(); - m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo)); + m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocationRef(testInfo.name, testInfo.lineInfo)); m_reporter->testCasePartialStarting(testInfo, testRuns); @@ -5174,7 +5633,7 @@ namespace Catch { redirectedCerr += oneRunCerr; const auto singleRunTotals = m_totals.delta(beforeRunTotals); - auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, oneRunCout, oneRunCerr, aborting()); + auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, CATCH_MOVE(oneRunCout), CATCH_MOVE(oneRunCerr), aborting()); m_reporter->testCasePartialEnded(statsForOneRun, testRuns); ++testRuns; @@ -5189,8 +5648,8 @@ namespace Catch { m_totals.testCases += deltaTotals.testCases; m_reporter->testCaseEnded(TestCaseStats(testInfo, deltaTotals, - redirectedCout, - redirectedCerr, + CATCH_MOVE(redirectedCout), + CATCH_MOVE(redirectedCerr), aborting())); m_activeTestCase = nullptr; @@ -5200,10 +5659,13 @@ namespace Catch { } - void RunContext::assertionEnded(AssertionResult const & result) { + void RunContext::assertionEnded(AssertionResult&& result) { if (result.getResultType() == ResultWas::Ok) { m_totals.assertions.passed++; m_lastAssertionPassed = true; + } else if (result.getResultType() == ResultWas::ExplicitSkip) { + m_totals.assertions.skipped++; + m_lastAssertionPassed = true; } else if (!result.succeeded()) { m_lastAssertionPassed = false; if (result.isOk()) { @@ -5219,24 +5681,37 @@ namespace Catch { m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)); - if (result.getResultType() != ResultWas::Warning) + if ( result.getResultType() != ResultWas::Warning ) { m_messageScopes.clear(); + } - // Reset working state - resetAssertionInfo(); - m_lastResult = result; + // Reset working state. assertion info will be reset after + // populateReaction is run if it is needed + m_lastResult = CATCH_MOVE( result ); } void RunContext::resetAssertionInfo() { m_lastAssertionInfo.macroName = StringRef(); m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr; + m_lastAssertionInfo.resultDisposition = ResultDisposition::Normal; + } + + void RunContext::notifyAssertionStarted( AssertionInfo const& info ) { + m_reporter->assertionStarting( info ); } - bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) { - ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo)); + bool RunContext::sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) { + ITracker& sectionTracker = + SectionTracker::acquire( m_trackerContext, + TestCaseTracking::NameAndLocationRef( + sectionName, sectionLineInfo ) ); + if (!sectionTracker.isOpen()) return false; m_activeSections.push_back(§ionTracker); + SectionInfo sectionInfo( sectionLineInfo, static_cast<std::string>(sectionName) ); m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; m_reporter->sectionStarting(sectionInfo); @@ -5245,14 +5720,39 @@ namespace Catch { return true; } - auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + IGeneratorTracker* + RunContext::acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) { using namespace Generators; - GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext, - TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) ); + GeneratorTracker* tracker = GeneratorTracker::acquire( + m_trackerContext, + TestCaseTracking::NameAndLocationRef( + generatorName, lineInfo ) ); m_lastAssertionInfo.lineInfo = lineInfo; return tracker; } + IGeneratorTracker* RunContext::createGeneratorTracker( + StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) { + + auto nameAndLoc = TestCaseTracking::NameAndLocation( static_cast<std::string>( generatorName ), lineInfo ); + auto& currentTracker = m_trackerContext.currentTracker(); + assert( + currentTracker.nameAndLocation() != nameAndLoc && + "Trying to create tracker for a genreator that already has one" ); + + auto newTracker = Catch::Detail::make_unique<Generators::GeneratorTracker>( + CATCH_MOVE(nameAndLoc), m_trackerContext, ¤tTracker ); + auto ret = newTracker.get(); + currentTracker.addChild( CATCH_MOVE( newTracker ) ); + + ret->setGenerator( CATCH_MOVE( generator ) ); + ret->open(); + return ret; + } + bool RunContext::testForMissingAssertions(Counts& assertions) { if (assertions.total() != 0) return false; @@ -5265,7 +5765,7 @@ namespace Catch { return true; } - void RunContext::sectionEnded(SectionEndInfo const & endInfo) { + void RunContext::sectionEnded(SectionEndInfo&& endInfo) { Counts assertions = m_totals.assertions - endInfo.prevAssertions; bool missingAssertions = testForMissingAssertions(assertions); @@ -5274,19 +5774,20 @@ namespace Catch { m_activeSections.pop_back(); } - m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions)); + m_reporter->sectionEnded(SectionStats(CATCH_MOVE(endInfo.sectionInfo), assertions, endInfo.durationInSeconds, missingAssertions)); m_messages.clear(); m_messageScopes.clear(); } - void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) { - if (m_unfinishedSections.empty()) + void RunContext::sectionEndedEarly(SectionEndInfo&& endInfo) { + if ( m_unfinishedSections.empty() ) { m_activeSections.back()->fail(); - else + } else { m_activeSections.back()->close(); + } m_activeSections.pop_back(); - m_unfinishedSections.push_back(endInfo); + m_unfinishedSections.push_back(CATCH_MOVE(endInfo)); } void RunContext::benchmarkPreparing( StringRef name ) { @@ -5310,8 +5811,8 @@ namespace Catch { m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end()); } - void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) { - m_messageScopes.emplace_back( builder ); + void RunContext::emplaceUnscopedMessage( MessageBuilder&& builder ) { + m_messageScopes.emplace_back( CATCH_MOVE(builder) ); } std::string RunContext::getCurrentTestName() const { @@ -5336,9 +5837,10 @@ namespace Catch { // Instead, fake a result data. AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } ); tempResult.message = static_cast<std::string>(message); - AssertionResult result(m_lastAssertionInfo, tempResult); + AssertionResult result(m_lastAssertionInfo, CATCH_MOVE(tempResult)); - assertionEnded(result); + assertionEnded(CATCH_MOVE(result) ); + resetAssertionInfo(); handleUnfinishedSections(); @@ -5348,7 +5850,7 @@ namespace Catch { Counts assertions; assertions.failed = 1; - SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false); + SectionStats testCaseSectionStats(CATCH_MOVE(testCaseSection), assertions, 0, false); m_reporter->sectionEnded(testCaseSectionStats); auto const& testInfo = m_activeTestCase->getTestCaseInfo(); @@ -5409,6 +5911,8 @@ namespace Catch { duration = timer.getElapsedSeconds(); } CATCH_CATCH_ANON (TestFailureException&) { // This just means the test was aborted due to failure + } CATCH_CATCH_ANON (TestSkipException&) { + // This just means the test was explicitly skipped } CATCH_CATCH_ALL { // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions // are reported without translation at the point of origin. @@ -5425,7 +5929,7 @@ namespace Catch { m_messages.clear(); m_messageScopes.clear(); - SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions); + SectionStats testCaseSectionStats(CATCH_MOVE(testCaseSection), assertions, duration, missingAssertions); m_reporter->sectionEnded(testCaseSectionStats); } @@ -5449,7 +5953,7 @@ namespace Catch { itEnd = m_unfinishedSections.rend(); it != itEnd; ++it) - sectionEnded(*it); + sectionEnded(CATCH_MOVE(*it)); m_unfinishedSections.clear(); } @@ -5458,8 +5962,6 @@ namespace Catch { ITransientExpression const& expr, AssertionReaction& reaction ) { - m_reporter->assertionStarting( info ); - bool negated = isFalseTest( info.resultDisposition ); bool result = expr.getResult() != negated; @@ -5475,6 +5977,7 @@ namespace Catch { reportExpr(info, ResultWas::ExpressionFailed, &expr, negated ); populateReaction( reaction ); } + resetAssertionInfo(); } void RunContext::reportExpr( AssertionInfo const &info, @@ -5485,10 +5988,10 @@ namespace Catch { m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( negated ) ); - AssertionResult assertionResult{ info, data }; + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; assertionResult.m_resultData.lazyExpression.m_transientExpression = expr; - assertionEnded( assertionResult ); + assertionEnded( CATCH_MOVE(assertionResult) ); } void RunContext::handleMessage( @@ -5497,16 +6000,23 @@ namespace Catch { StringRef message, AssertionReaction& reaction ) { - m_reporter->assertionStarting( info ); - m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( false ) ); data.message = static_cast<std::string>(message); - AssertionResult assertionResult{ m_lastAssertionInfo, data }; - assertionEnded( assertionResult ); - if( !assertionResult.isOk() ) + AssertionResult assertionResult{ m_lastAssertionInfo, + CATCH_MOVE( data ) }; + + const auto isOk = assertionResult.isOk(); + assertionEnded( CATCH_MOVE(assertionResult) ); + if ( !isOk ) { populateReaction( reaction ); + } else if ( resultType == ResultWas::ExplicitSkip ) { + // TODO: Need to handle this explicitly, as ExplicitSkip is + // considered "OK" + reaction.shouldSkip = true; + } + resetAssertionInfo(); } void RunContext::handleUnexpectedExceptionNotThrown( AssertionInfo const& info, @@ -5517,16 +6027,17 @@ namespace Catch { void RunContext::handleUnexpectedInflightException( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) { m_lastAssertionInfo = info; AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = message; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + data.message = CATCH_MOVE(message); + AssertionResult assertionResult{ info, CATCH_MOVE(data) }; + assertionEnded( CATCH_MOVE(assertionResult) ); populateReaction( reaction ); + resetAssertionInfo(); } void RunContext::populateReaction( AssertionReaction& reaction ) { @@ -5537,12 +6048,14 @@ namespace Catch { void RunContext::handleIncomplete( AssertionInfo const& info ) { + using namespace std::string_literals; m_lastAssertionInfo = info; AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"s; + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; + assertionEnded( CATCH_MOVE(assertionResult) ); + resetAssertionInfo(); } void RunContext::handleNonExpr( AssertionInfo const &info, @@ -5552,11 +6065,12 @@ namespace Catch { m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( false ) ); - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; - if( !assertionResult.isOk() ) - populateReaction( reaction ); + const auto isOk = assertionResult.isOk(); + assertionEnded( CATCH_MOVE(assertionResult) ); + if ( !isOk ) { populateReaction( reaction ); } + resetAssertionInfo(); } @@ -5584,7 +6098,7 @@ namespace Catch { Section::Section( SectionInfo&& info ): m_info( CATCH_MOVE( info ) ), m_sectionIncluded( - getResultCapture().sectionStarted( m_info, m_assertions ) ) { + getResultCapture().sectionStarted( m_info.name, m_info.lineInfo, m_assertions ) ) { // Non-"included" sections will not use the timing information // anyway, so don't bother with the potential syscall. if (m_sectionIncluded) { @@ -5592,13 +6106,31 @@ namespace Catch { } } + Section::Section( SourceLineInfo const& _lineInfo, + StringRef _name, + const char* const ): + m_info( { "invalid", static_cast<std::size_t>( -1 ) }, std::string{} ), + m_sectionIncluded( + getResultCapture().sectionStarted( _name, _lineInfo, m_assertions ) ) { + // We delay initialization the SectionInfo member until we know + // this section needs it, so we avoid allocating std::string for name. + // We also delay timer start to avoid the potential syscall unless we + // will actually use the result. + if ( m_sectionIncluded ) { + m_info.name = static_cast<std::string>( _name ); + m_info.lineInfo = _lineInfo; + m_timer.start(); + } + } + Section::~Section() { if( m_sectionIncluded ) { - SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() }; - if( uncaught_exceptions() ) - getResultCapture().sectionEndedEarly( endInfo ); - else - getResultCapture().sectionEnded( endInfo ); + SectionEndInfo endInfo{ CATCH_MOVE(m_info), m_assertions, m_timer.getElapsedSeconds() }; + if ( uncaught_exceptions() ) { + getResultCapture().sectionEndedEarly( CATCH_MOVE(endInfo) ); + } else { + getResultCapture().sectionEnded( CATCH_MOVE( endInfo ) ); + } } } @@ -5707,7 +6239,6 @@ namespace Catch { -#include <algorithm> #include <ostream> #include <cstring> #include <cctype> @@ -5731,9 +6262,9 @@ namespace Catch { return s.find( infix ) != std::string::npos; } void toLowerInPlace( std::string& s ) { - std::transform( s.begin(), s.end(), s.begin(), []( char c ) { - return toLower( c ); - } ); + for ( char& c : s ) { + c = toLower( c ); + } } std::string toLower( std::string const& s ) { std::string lc = s; @@ -5814,10 +6345,6 @@ namespace Catch { : StringRef( rawChars, std::strlen(rawChars) ) {} - auto StringRef::operator == ( StringRef other ) const noexcept -> bool { - return m_size == other.m_size - && (std::memcmp( m_start, other.m_start, m_size ) == 0); - } bool StringRef::operator<(StringRef rhs) const noexcept { if (m_size < rhs.m_size) { @@ -5870,7 +6397,7 @@ namespace Catch { namespace Catch { - TagAliasRegistry::~TagAliasRegistry() {} + TagAliasRegistry::~TagAliasRegistry() = default; TagAlias const* TagAliasRegistry::find( std::string const& alias ) const { auto it = m_registry.find( alias ); @@ -5951,6 +6478,38 @@ namespace Catch { namespace Catch { + namespace { + static void enforceNoDuplicateTestCases( + std::vector<TestCaseHandle> const& tests ) { + auto testInfoCmp = []( TestCaseInfo const* lhs, + TestCaseInfo const* rhs ) { + return *lhs < *rhs; + }; + std::set<TestCaseInfo const*, decltype( testInfoCmp )&> seenTests( + testInfoCmp ); + for ( auto const& test : tests ) { + const auto infoPtr = &test.getTestCaseInfo(); + const auto prev = seenTests.insert( infoPtr ); + CATCH_ENFORCE( prev.second, + "error: test case \"" + << infoPtr->name << "\", with tags \"" + << infoPtr->tagsAsString() + << "\" already defined.\n" + << "\tFirst seen at " + << ( *prev.first )->lineInfo << "\n" + << "\tRedefined at " << infoPtr->lineInfo ); + } + } + + static bool matchTest( TestCaseHandle const& testCase, + TestSpec const& testSpec, + IConfig const& config ) { + return testSpec.matches( testCase.getTestCaseInfo() ) && + isThrowSafe( testCase, config ); + } + + } // end unnamed namespace + std::vector<TestCaseHandle> sortTests( IConfig const& config, std::vector<TestCaseHandle> const& unsortedTestCases ) { switch (config.runOrder()) { case TestRunOrder::Declared: @@ -6007,29 +6566,6 @@ namespace Catch { return !testCase.getTestCaseInfo().throws() || config.allowThrows(); } - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ) { - return testSpec.matches( testCase.getTestCaseInfo() ) && isThrowSafe( testCase, config ); - } - - void - enforceNoDuplicateTestCases( std::vector<TestCaseHandle> const& tests ) { - auto testInfoCmp = []( TestCaseInfo const* lhs, - TestCaseInfo const* rhs ) { - return *lhs < *rhs; - }; - std::set<TestCaseInfo const*, decltype(testInfoCmp) &> seenTests(testInfoCmp); - for ( auto const& test : tests ) { - const auto infoPtr = &test.getTestCaseInfo(); - const auto prev = seenTests.insert( infoPtr ); - CATCH_ENFORCE( - prev.second, - "error: test case \"" << infoPtr->name << "\", with tags \"" - << infoPtr->tagsAsString() << "\" already defined.\n" - << "\tFirst seen at " << ( *prev.first )->lineInfo << "\n" - << "\tRedefined at " << infoPtr->lineInfo ); - } - } - std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ) { std::vector<TestCaseHandle> filtered; filtered.reserve( testCases.size() ); @@ -6070,13 +6606,6 @@ namespace Catch { return m_sortedFunctions; } - - - /////////////////////////////////////////////////////////////////////////// - void TestInvokerAsFunction::invoke() const { - m_testAsFunction(); - } - } // end namespace Catch @@ -6093,8 +6622,8 @@ namespace Catch { namespace Catch { namespace TestCaseTracking { - NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) - : name( _name ), + NameAndLocation::NameAndLocation( std::string&& _name, SourceLineInfo const& _location ) + : name( CATCH_MOVE(_name) ), location( _location ) {} @@ -6109,14 +6638,17 @@ namespace TestCaseTracking { m_children.push_back( CATCH_MOVE(child) ); } - ITracker* ITracker::findChild( NameAndLocation const& nameAndLocation ) { + ITracker* ITracker::findChild( NameAndLocationRef const& nameAndLocation ) { auto it = std::find_if( m_children.begin(), m_children.end(), [&nameAndLocation]( ITrackerPtr const& tracker ) { - return tracker->nameAndLocation().location == - nameAndLocation.location && - tracker->nameAndLocation().name == nameAndLocation.name; + auto const& tnameAndLoc = tracker->nameAndLocation(); + if ( tnameAndLoc.location.line != + nameAndLocation.location.line ) { + return false; + } + return tnameAndLoc == nameAndLocation; } ); return ( it != m_children.end() ) ? it->get() : nullptr; } @@ -6124,10 +6656,6 @@ namespace TestCaseTracking { bool ITracker::isSectionTracker() const { return false; } bool ITracker::isGeneratorTracker() const { return false; } - bool ITracker::isSuccessfullyCompleted() const { - return m_runState == CompletedSuccessfully; - } - bool ITracker::isOpen() const { return m_runState != NotStarted && !isComplete(); } @@ -6154,16 +6682,6 @@ namespace TestCaseTracking { return *m_rootTracker; } - void TrackerContext::endRun() { - m_rootTracker.reset(); - m_currentTracker = nullptr; - m_runState = NotStarted; - } - - void TrackerContext::startCycle() { - m_currentTracker = m_rootTracker.get(); - m_runState = Executing; - } void TrackerContext::completeCycle() { m_runState = CompletedCycle; } @@ -6171,16 +6689,13 @@ namespace TestCaseTracking { bool TrackerContext::completedCycle() const { return m_runState == CompletedCycle; } - ITracker& TrackerContext::currentTracker() { - return *m_currentTracker; - } void TrackerContext::setCurrentTracker( ITracker* tracker ) { m_currentTracker = tracker; } - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ): - ITracker(nameAndLocation, parent), + TrackerBase::TrackerBase( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ): + ITracker(CATCH_MOVE(nameAndLocation), parent), m_ctx( ctx ) {} @@ -6240,13 +6755,14 @@ namespace TestCaseTracking { m_ctx.setCurrentTracker( this ); } - SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( nameAndLocation, ctx, parent ), - m_trimmed_name(trim(nameAndLocation.name)) + SectionTracker::SectionTracker( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : TrackerBase( CATCH_MOVE(nameAndLocation), ctx, parent ), + m_trimmed_name(trim(StringRef(ITracker::nameAndLocation().name))) { if( parent ) { - while( !parent->isSectionTracker() ) + while ( !parent->isSectionTracker() ) { parent = parent->parent(); + } SectionTracker& parentSection = static_cast<SectionTracker&>( *parent ); addNextFilters( parentSection.m_filters ); @@ -6266,24 +6782,30 @@ namespace TestCaseTracking { bool SectionTracker::isSectionTracker() const { return true; } - SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { - SectionTracker* section; + SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocationRef const& nameAndLocation ) { + SectionTracker* tracker; ITracker& currentTracker = ctx.currentTracker(); if ( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isSectionTracker() ); - section = static_cast<SectionTracker*>( childTracker ); + tracker = static_cast<SectionTracker*>( childTracker ); } else { - auto newSection = Catch::Detail::make_unique<SectionTracker>( - nameAndLocation, ctx, ¤tTracker ); - section = newSection.get(); - currentTracker.addChild( CATCH_MOVE( newSection ) ); + auto newTracker = Catch::Detail::make_unique<SectionTracker>( + NameAndLocation{ static_cast<std::string>(nameAndLocation.name), + nameAndLocation.location }, + ctx, + ¤tTracker ); + tracker = newTracker.get(); + currentTracker.addChild( CATCH_MOVE( newTracker ) ); + } + + if ( !ctx.completedCycle() ) { + tracker->tryOpen(); } - if( !ctx.completedCycle() ) - section->tryOpen(); - return *section; + + return *tracker; } void SectionTracker::tryOpen() { @@ -6304,10 +6826,6 @@ namespace TestCaseTracking { m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() ); } - std::vector<StringRef> const& SectionTracker::getFilters() const { - return m_filters; - } - StringRef SectionTracker::trimmedName() const { return m_trimmed_name; } @@ -6333,6 +6851,14 @@ namespace Catch { #endif } + void throw_test_skip_exception() { +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + throw Catch::TestSkipException(); +#else + CATCH_ERROR( "Explicitly skipping tests during runtime requires exceptions" ); +#endif + } + } // namespace Catch @@ -6341,9 +6867,10 @@ namespace Catch { #include <iterator> namespace Catch { + ITestInvoker::~ITestInvoker() = default; namespace { - StringRef extractClassName( StringRef classOrMethodName ) { + static StringRef extractClassName( StringRef classOrMethodName ) { if ( !startsWith( classOrMethodName, '&' ) ) { return classOrMethodName; } @@ -6370,6 +6897,18 @@ namespace Catch { static_cast<std::size_t>( startIdx ), static_cast<std::size_t>( classNameSize ) ); } + + class TestInvokerAsFunction final : public ITestInvoker { + using TestType = void ( * )(); + TestType m_testAsFunction; + + public: + TestInvokerAsFunction( TestType testAsFunction ) noexcept: + m_testAsFunction( testAsFunction ) {} + + void invoke() const override { m_testAsFunction(); } + }; + } // namespace Detail::unique_ptr<ITestInvoker> makeTestInvoker( void(*testAsFunction)() ) { @@ -6606,10 +7145,8 @@ namespace Catch { token.erase(token.begin()); if (m_exclusion) { m_currentFilter.m_forbidden.emplace_back(Detail::make_unique<TestSpec::TagPattern>(".", m_substring)); - m_currentFilter.m_forbidden.emplace_back(Detail::make_unique<TestSpec::TagPattern>(token, m_substring)); } else { m_currentFilter.m_required.emplace_back(Detail::make_unique<TestSpec::TagPattern>(".", m_substring)); - m_currentFilter.m_required.emplace_back(Detail::make_unique<TestSpec::TagPattern>(token, m_substring)); } } if (m_exclusion) { @@ -6935,6 +7472,7 @@ namespace Catch { // while in /permissive- mode. No, I don't know why. // Tested on VS 2019, 18.{3, 4}.x +#include <cstdint> #include <iomanip> #include <type_traits> @@ -7364,26 +7902,11 @@ namespace { return ulpDist <= maxUlpDiff; } -#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) - - float nextafter(float x, float y) { - return ::nextafterf(x, y); - } - - double nextafter(double x, double y) { - return ::nextafter(x, y); - } - -#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^ template <typename FP> FP step(FP start, FP direction, uint64_t steps) { for (uint64_t i = 0; i < steps; ++i) { -#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) start = Catch::nextafter(start, direction); -#else - start = std::nextafter(start, direction); -#endif } return start; } @@ -7551,7 +8074,19 @@ WithinRelMatcher WithinRel(float target) { } -} // namespace Matchers + +bool IsNaNMatcher::match( double const& matchee ) const { + return std::isnan( matchee ); +} + +std::string IsNaNMatcher::describe() const { + using namespace std::string_literals; + return "is NaN"s; +} + +IsNaNMatcher IsNaN() { return IsNaNMatcher(); } + + } // namespace Matchers } // namespace Catch @@ -7745,12 +8280,14 @@ namespace Catch { namespace Catch { - AutomakeReporter::~AutomakeReporter() {} + AutomakeReporter::~AutomakeReporter() = default; void AutomakeReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { // Possible values to emit are PASS, XFAIL, SKIP, FAIL, XPASS and ERROR. m_stream << ":test-result: "; - if (_testCaseStats.totals.assertions.allPassed()) { + if ( _testCaseStats.totals.testCases.skipped > 0 ) { + m_stream << "SKIP"; + } else if (_testCaseStats.totals.assertions.allPassed()) { m_stream << "PASS"; } else if (_testCaseStats.totals.assertions.allOk()) { m_stream << "XFAIL"; @@ -7899,6 +8436,11 @@ public: printIssue("explicitly"); printRemainingMessages(Colour::None); break; + case ResultWas::ExplicitSkip: + printResultType(Colour::Skip, "skipped"_sr); + printMessage(); + printRemainingMessages(); + break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: case ResultWas::FailureBit: @@ -7960,7 +8502,7 @@ private: return; const auto itEnd = messages.cend(); - const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd)); + const auto N = static_cast<std::size_t>(itEnd - itMessage); stream << colourImpl->guardColour( colour ) << " with " << pluralise( N, "message"_sr ) << ':'; @@ -7981,7 +8523,7 @@ private: private: std::ostream& stream; AssertionResult const& result; - std::vector<MessageInfo> messages; + std::vector<MessageInfo> const& messages; std::vector<MessageInfo>::const_iterator itMessage; bool printInfoMessages; ColourImpl* colourImpl; @@ -8014,7 +8556,7 @@ private: // Drop out if result was successful and we're not printing those if( !m_config->includeSuccessfulResults() && result.isOk() ) { - if( result.getResultType() != ResultWas::Warning ) + if( result.getResultType() != ResultWas::Warning && result.getResultType() != ResultWas::ExplicitSkip ) return; printInfoMessages = false; } @@ -8038,7 +8580,7 @@ private: StreamingReporterBase::testRunEnded( _testRunStats ); } - CompactReporter::~CompactReporter() {} + CompactReporter::~CompactReporter() = default; } // end namespace Catch @@ -8075,7 +8617,6 @@ public: stats(_stats), result(_stats.assertionResult), colour(Colour::None), - message(result.getMessage()), messages(_stats.infoMessages), colourImpl(colourImpl_), printInfoMessages(_printInfoMessages) { @@ -8084,10 +8625,10 @@ public: colour = Colour::Success; passOrFail = "PASSED"_sr; //if( result.hasMessage() ) - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; + if (messages.size() == 1) + messageLabel = "with message"_sr; + if (messages.size() > 1) + messageLabel = "with messages"_sr; break; case ResultWas::ExpressionFailed: if (result.isOk()) { @@ -8097,43 +8638,57 @@ public: colour = Colour::Error; passOrFail = "FAILED"_sr; } - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; + if (messages.size() == 1) + messageLabel = "with message"_sr; + if (messages.size() > 1) + messageLabel = "with messages"_sr; break; case ResultWas::ThrewException: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "due to unexpected exception with "; - if (_stats.infoMessages.size() == 1) - messageLabel += "message"; - if (_stats.infoMessages.size() > 1) - messageLabel += "messages"; + // todo switch + switch (messages.size()) { case 0: + messageLabel = "due to unexpected exception with "_sr; + break; + case 1: + messageLabel = "due to unexpected exception with message"_sr; + break; + default: + messageLabel = "due to unexpected exception with messages"_sr; + break; + } break; case ResultWas::FatalErrorCondition: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "due to a fatal error condition"; + messageLabel = "due to a fatal error condition"_sr; break; case ResultWas::DidntThrowException: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "because no exception was thrown where one was expected"; + messageLabel = "because no exception was thrown where one was expected"_sr; break; case ResultWas::Info: - messageLabel = "info"; + messageLabel = "info"_sr; break; case ResultWas::Warning: - messageLabel = "warning"; + messageLabel = "warning"_sr; break; case ResultWas::ExplicitFailure: passOrFail = "FAILED"_sr; colour = Colour::Error; - if (_stats.infoMessages.size() == 1) - messageLabel = "explicitly with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "explicitly with messages"; + if (messages.size() == 1) + messageLabel = "explicitly with message"_sr; + if (messages.size() > 1) + messageLabel = "explicitly with messages"_sr; + break; + case ResultWas::ExplicitSkip: + colour = Colour::Skip; + passOrFail = "SKIPPED"_sr; + if (messages.size() == 1) + messageLabel = "explicitly with message"_sr; + if (messages.size() > 1) + messageLabel = "explicitly with messages"_sr; break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: @@ -8197,9 +8752,8 @@ private: AssertionResult const& result; Colour::Code colour; StringRef passOrFail; - std::string messageLabel; - std::string message; - std::vector<MessageInfo> messages; + StringRef messageLabel; + std::vector<MessageInfo> const& messages; ColourImpl* colourImpl; bool printInfoMessages; }; @@ -8209,13 +8763,16 @@ std::size_t makeRatio( std::uint64_t number, std::uint64_t total ) { return (ratio == 0 && number > 0) ? 1 : static_cast<std::size_t>(ratio); } -std::size_t& findMax( std::size_t& i, std::size_t& j, std::size_t& k ) { - if (i > j && i > k) +std::size_t& +findMax( std::size_t& i, std::size_t& j, std::size_t& k, std::size_t& l ) { + if (i > j && i > k && i > l) return i; - else if (j > k) + else if (j > k && j > l) return j; - else + else if (k > l) return k; + else + return l; } enum class Justification { Left, Right }; @@ -8227,6 +8784,7 @@ struct ColumnInfo { }; struct ColumnBreak {}; struct RowBreak {}; +struct OutputFlush {}; class Duration { enum class Unit { @@ -8343,12 +8901,12 @@ public: } template<typename T> - friend TablePrinter& operator << (TablePrinter& tp, T const& value) { + friend TablePrinter& operator<< (TablePrinter& tp, T const& value) { tp.m_oss << value; return tp; } - friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) { + friend TablePrinter& operator<< (TablePrinter& tp, ColumnBreak) { auto colStr = tp.m_oss.str(); const auto strSize = colStr.size(); tp.m_oss.str(""); @@ -8370,13 +8928,18 @@ public: return tp; } - friend TablePrinter& operator << (TablePrinter& tp, RowBreak) { + friend TablePrinter& operator<< (TablePrinter& tp, RowBreak) { if (tp.m_currentColumn > 0) { tp.m_os << '\n'; tp.m_currentColumn = -1; } return tp; } + + friend TablePrinter& operator<<(TablePrinter& tp, OutputFlush) { + tp.m_os << std::flush; + return tp; + } }; ConsoleReporter::ConsoleReporter(ReporterConfig&& config): @@ -8398,7 +8961,7 @@ ConsoleReporter::ConsoleReporter(ReporterConfig&& config): { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, Justification::Left }, { "samples mean std dev", 14, Justification::Right }, { "iterations low mean low std dev", 14, Justification::Right }, - { "estimated high mean high std dev", 14, Justification::Right } + { "est run time high mean high std dev", 14, Justification::Right } }; } }())) {} @@ -8424,7 +8987,8 @@ void ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) { bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); // Drop out if result was successful but we're not printing them. - if (!includeResults && result.getResultType() != ResultWas::Warning) + // TODO: Make configurable whether skips should be printed + if (!includeResults && result.getResultType() != ResultWas::Warning && result.getResultType() != ResultWas::ExplicitSkip) return; lazyPrint(); @@ -8481,8 +9045,11 @@ void ConsoleReporter::benchmarkPreparing( StringRef name ) { void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) { (*m_tablePrinter) << info.samples << ColumnBreak() << info.iterations << ColumnBreak(); - if (!m_config->benchmarkNoAnalysis()) - (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak(); + if ( !m_config->benchmarkNoAnalysis() ) { + ( *m_tablePrinter ) + << Duration( info.estimatedDuration ) << ColumnBreak(); + } + ( *m_tablePrinter ) << OutputFlush{}; } void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) { if (m_config->benchmarkNoAnalysis()) @@ -8627,10 +9194,11 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total()); std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total()); - while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)++; + std::size_t skippedRatio = makeRatio(totals.testCases.skipped, totals.testCases.total()); + while (failedRatio + failedButOkRatio + passedRatio + skippedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) + findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)++; while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)--; + findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)--; m_stream << m_colour->guardColour( Colour::Error ) << std::string( failedRatio, '=' ) @@ -8643,6 +9211,8 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { m_stream << m_colour->guardColour( Colour::Success ) << std::string( passedRatio, '=' ); } + m_stream << m_colour->guardColour( Colour::Skip ) + << std::string( skippedRatio, '=' ); } else { m_stream << m_colour->guardColour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH - 1, '=' ); @@ -8724,7 +9294,8 @@ namespace Catch { void CumulativeReporterBase::sectionStarting( SectionInfo const& sectionInfo ) { - SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); + // We need a copy, because SectionStats expect to take ownership + SectionStats incompleteStats( SectionInfo(sectionInfo), Counts(), 0, false ); SectionNode* node; if ( m_sectionStack.empty() ) { if ( !m_rootSection ) { @@ -9147,15 +9718,22 @@ namespace Catch { } std::vector<SummaryColumn> columns; + // Don't include "skipped assertions" in total count + const auto totalAssertionCount = + totals.assertions.total() - totals.assertions.skipped; columns.push_back( SummaryColumn( "", Colour::None ) .addRow( totals.testCases.total() ) - .addRow( totals.assertions.total() ) ); + .addRow( totalAssertionCount ) ); columns.push_back( SummaryColumn( "passed", Colour::Success ) .addRow( totals.testCases.passed ) .addRow( totals.assertions.passed ) ); columns.push_back( SummaryColumn( "failed", Colour::ResultError ) .addRow( totals.testCases.failed ) .addRow( totals.assertions.failed ) ); + columns.push_back( SummaryColumn( "skipped", Colour::Skip ) + .addRow( totals.testCases.skipped ) + // Don't print "skipped assertions" + .addRow( 0 ) ); columns.push_back( SummaryColumn( "failed as expected", Colour::ResultExpectedFailure ) .addRow( totals.testCases.failedButOk ) @@ -9167,6 +9745,366 @@ namespace Catch { } // namespace Catch +// + +namespace Catch { + namespace { + void writeSourceInfo( JsonObjectWriter& writer, + SourceLineInfo const& sourceInfo ) { + auto source_location_writer = + writer.write( "source-location"_sr ).writeObject(); + source_location_writer.write( "filename"_sr ) + .write( sourceInfo.file ); + source_location_writer.write( "line"_sr ).write( sourceInfo.line ); + } + + void writeTags( JsonArrayWriter writer, std::vector<Tag> const& tags ) { + for ( auto const& tag : tags ) { + writer.write( tag.original ); + } + } + + void writeProperties( JsonArrayWriter writer, + TestCaseInfo const& info ) { + if ( info.isHidden() ) { writer.write( "is-hidden"_sr ); } + if ( info.okToFail() ) { writer.write( "ok-to-fail"_sr ); } + if ( info.expectedToFail() ) { + writer.write( "expected-to-fail"_sr ); + } + if ( info.throws() ) { writer.write( "throws"_sr ); } + } + + } // namespace + + JsonReporter::JsonReporter( ReporterConfig&& config ): + StreamingReporterBase{ CATCH_MOVE( config ) } { + + m_preferences.shouldRedirectStdOut = true; + // TBD: Do we want to report all assertions? XML reporter does + // not, but for machine-parseable reporters I think the answer + // should be yes. + m_preferences.shouldReportAllAssertions = true; + + m_objectWriters.emplace( m_stream ); + m_writers.emplace( Writer::Object ); + auto& writer = m_objectWriters.top(); + + writer.write( "version"_sr ).write( 1 ); + + { + auto metadata_writer = writer.write( "metadata"_sr ).writeObject(); + metadata_writer.write( "name"_sr ).write( m_config->name() ); + metadata_writer.write( "rng-seed"_sr ).write( m_config->rngSeed() ); + metadata_writer.write( "catch2-version"_sr ) + .write( libraryVersion() ); + if ( m_config->testSpec().hasFilters() ) { + metadata_writer.write( "filters"_sr ) + .write( m_config->testSpec() ); + } + } + } + + JsonReporter::~JsonReporter() { + endListing(); + // TODO: Ensure this closes the top level object, add asserts + assert( m_writers.size() == 1 && "Only the top level object should be open" ); + assert( m_writers.top() == Writer::Object ); + endObject(); + m_stream << '\n' << std::flush; + assert( m_writers.empty() ); + } + + JsonArrayWriter& JsonReporter::startArray() { + m_arrayWriters.emplace( m_arrayWriters.top().writeArray() ); + m_writers.emplace( Writer::Array ); + return m_arrayWriters.top(); + } + JsonArrayWriter& JsonReporter::startArray( StringRef key ) { + m_arrayWriters.emplace( + m_objectWriters.top().write( key ).writeArray() ); + m_writers.emplace( Writer::Array ); + return m_arrayWriters.top(); + } + + JsonObjectWriter& JsonReporter::startObject() { + m_objectWriters.emplace( m_arrayWriters.top().writeObject() ); + m_writers.emplace( Writer::Object ); + return m_objectWriters.top(); + } + JsonObjectWriter& JsonReporter::startObject( StringRef key ) { + m_objectWriters.emplace( + m_objectWriters.top().write( key ).writeObject() ); + m_writers.emplace( Writer::Object ); + return m_objectWriters.top(); + } + + void JsonReporter::endObject() { + assert( isInside( Writer::Object ) ); + m_objectWriters.pop(); + m_writers.pop(); + } + void JsonReporter::endArray() { + assert( isInside( Writer::Array ) ); + m_arrayWriters.pop(); + m_writers.pop(); + } + + bool JsonReporter::isInside( Writer writer ) { + return !m_writers.empty() && m_writers.top() == writer; + } + + void JsonReporter::startListing() { + if ( !m_startedListing ) { startObject( "listings"_sr ); } + m_startedListing = true; + } + void JsonReporter::endListing() { + if ( m_startedListing ) { endObject(); } + m_startedListing = false; + } + + std::string JsonReporter::getDescription() { + return "Outputs listings as JSON. Test listing is Work-in-Progress!"; + } + + void JsonReporter::testRunStarting( TestRunInfo const& testInfo ) { + StreamingReporterBase::testRunStarting( testInfo ); + endListing(); + + assert( isInside( Writer::Object ) ); + startObject( "test-run"_sr ); + startArray( "test-cases"_sr ); + } + + static void writeCounts( JsonObjectWriter&& writer, Counts const& counts ) { + writer.write( "passed"_sr ).write( counts.passed ); + writer.write( "failed"_sr ).write( counts.failed ); + writer.write( "fail-but-ok"_sr ).write( counts.failedButOk ); + writer.write( "skipped"_sr ).write( counts.skipped ); + } + + void JsonReporter::testRunEnded(TestRunStats const& runStats) { + assert( isInside( Writer::Array ) ); + // End "test-cases" + endArray(); + + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + runStats.totals.assertions ); + writeCounts( totals.write( "test-cases"_sr ).writeObject(), + runStats.totals.testCases ); + } + + // End the "test-run" object + endObject(); + } + + void JsonReporter::testCaseStarting( TestCaseInfo const& tcInfo ) { + StreamingReporterBase::testCaseStarting( tcInfo ); + + assert( isInside( Writer::Array ) && + "We should be in the 'test-cases' array" ); + startObject(); + // "test-info" prelude + { + auto testInfo = + m_objectWriters.top().write( "test-info"_sr ).writeObject(); + // TODO: handle testName vs className!! + testInfo.write( "name"_sr ).write( tcInfo.name ); + writeSourceInfo(testInfo, tcInfo.lineInfo); + writeTags( testInfo.write( "tags"_sr ).writeArray(), tcInfo.tags ); + writeProperties( testInfo.write( "properties"_sr ).writeArray(), + tcInfo ); + } + + + // Start the array for individual test runs (testCasePartial pairs) + startArray( "runs"_sr ); + } + + void JsonReporter::testCaseEnded( TestCaseStats const& tcStats ) { + StreamingReporterBase::testCaseEnded( tcStats ); + + // We need to close the 'runs' array before finishing the test case + assert( isInside( Writer::Array ) ); + endArray(); + + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + tcStats.totals.assertions ); + // We do not write the test case totals, because there will always be just one test case here. + // TODO: overall "result" -> success, skip, fail here? Or in partial result? + } + // We do not write out stderr/stdout, because we instead wrote those out in partial runs + + // TODO: aborting? + + // And we also close this test case's object + assert( isInside( Writer::Object ) ); + endObject(); + } + + void JsonReporter::testCasePartialStarting( TestCaseInfo const& /*tcInfo*/, + uint64_t index ) { + startObject(); + m_objectWriters.top().write( "run-idx"_sr ).write( index ); + startArray( "path"_sr ); + // TODO: we want to delay most of the printing to the 'root' section + // TODO: childSection key name? + } + + void JsonReporter::testCasePartialEnded( TestCaseStats const& tcStats, + uint64_t /*index*/ ) { + // Fixme: the top level section handles this. + //// path object + endArray(); + if ( !tcStats.stdOut.empty() ) { + m_objectWriters.top() + .write( "captured-stdout"_sr ) + .write( tcStats.stdOut ); + } + if ( !tcStats.stdErr.empty() ) { + m_objectWriters.top() + .write( "captured-stderr"_sr ) + .write( tcStats.stdErr ); + } + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + tcStats.totals.assertions ); + // We do not write the test case totals, because there will + // always be just one test case here. + // TODO: overall "result" -> success, skip, fail here? Or in + // partial result? + } + // TODO: aborting? + // run object + endObject(); + } + + void JsonReporter::sectionStarting( SectionInfo const& sectionInfo ) { + assert( isInside( Writer::Array ) && + "Section should always start inside an object" ); + // We want to nest top level sections, even though it shares name + // and source loc with the TEST_CASE + auto& sectionObject = startObject(); + sectionObject.write( "kind"_sr ).write( "section"_sr ); + sectionObject.write( "name"_sr ).write( sectionInfo.name ); + writeSourceInfo( m_objectWriters.top(), sectionInfo.lineInfo ); + + + // TBD: Do we want to create this event lazily? It would become + // rather complex, but we could do it, and it would look + // better for empty sections. OTOH, empty sections should + // be rare. + startArray( "path"_sr ); + } + void JsonReporter::sectionEnded( SectionStats const& /*sectionStats */) { + // End the subpath array + endArray(); + // TODO: metadata + // TODO: what info do we have here? + + // End the section object + endObject(); + } + + void JsonReporter::assertionStarting( AssertionInfo const& /*assertionInfo*/ ) {} + void JsonReporter::assertionEnded( AssertionStats const& assertionStats ) { + // TODO: There is lot of different things to handle here, but + // we can fill it in later, after we show that the basic + // outline and streaming reporter impl works well enough. + //if ( !m_config->includeSuccessfulResults() + // && assertionStats.assertionResult.isOk() ) { + // return; + //} + assert( isInside( Writer::Array ) ); + auto assertionObject = m_arrayWriters.top().writeObject(); + + assertionObject.write( "kind"_sr ).write( "assertion"_sr ); + writeSourceInfo( assertionObject, + assertionStats.assertionResult.getSourceInfo() ); + assertionObject.write( "status"_sr ) + .write( assertionStats.assertionResult.isOk() ); + // TODO: handling of result. + // TODO: messages + // TODO: totals? + } + + + void JsonReporter::benchmarkPreparing( StringRef name ) { (void)name; } + void JsonReporter::benchmarkStarting( BenchmarkInfo const& ) {} + void JsonReporter::benchmarkEnded( BenchmarkStats<> const& ) {} + void JsonReporter::benchmarkFailed( StringRef error ) { (void)error; } + + void JsonReporter::listReporters( + std::vector<ReporterDescription> const& descriptions ) { + startListing(); + + auto writer = + m_objectWriters.top().write( "reporters"_sr ).writeArray(); + for ( auto const& desc : descriptions ) { + auto desc_writer = writer.writeObject(); + desc_writer.write( "name"_sr ).write( desc.name ); + desc_writer.write( "description"_sr ).write( desc.description ); + } + } + void JsonReporter::listListeners( + std::vector<ListenerDescription> const& descriptions ) { + startListing(); + + auto writer = + m_objectWriters.top().write( "listeners"_sr ).writeArray(); + + for ( auto const& desc : descriptions ) { + auto desc_writer = writer.writeObject(); + desc_writer.write( "name"_sr ).write( desc.name ); + desc_writer.write( "description"_sr ).write( desc.description ); + } + } + void JsonReporter::listTests( std::vector<TestCaseHandle> const& tests ) { + startListing(); + + auto writer = m_objectWriters.top().write( "tests"_sr ).writeArray(); + + for ( auto const& test : tests ) { + auto desc_writer = writer.writeObject(); + auto const& info = test.getTestCaseInfo(); + + desc_writer.write( "name"_sr ).write( info.name ); + desc_writer.write( "class-name"_sr ).write( info.className ); + { + auto tag_writer = desc_writer.write( "tags"_sr ).writeArray(); + for ( auto const& tag : info.tags ) { + tag_writer.write( tag.original ); + } + } + writeSourceInfo( desc_writer, info.lineInfo ); + } + } + void JsonReporter::listTags( std::vector<TagInfo> const& tags ) { + startListing(); + + auto writer = m_objectWriters.top().write( "tags"_sr ).writeArray(); + for ( auto const& tag : tags ) { + auto tag_writer = writer.writeObject(); + { + auto aliases_writer = + tag_writer.write( "aliases"_sr ).writeArray(); + for ( auto alias : tag.spellings ) { + aliases_writer.write( alias ); + } + } + tag_writer.write( "count"_sr ).write( tag.count ); + } + } +} // namespace Catch + + #include <cassert> @@ -9186,6 +10124,8 @@ namespace Catch { gmtime_s(&timeInfo, &rawtime); #elif defined (CATCH_PLATFORM_PLAYSTATION) gmtime_s(&rawtime, &timeInfo); +#elif defined (__IAR_SYSTEMS_ICC__) + timeInfo = *std::gmtime(&rawtime); #else gmtime_r(&rawtime, &timeInfo); #endif @@ -9285,6 +10225,7 @@ namespace Catch { xml.writeAttribute( "name"_sr, stats.runInfo.name ); xml.writeAttribute( "errors"_sr, unexpectedExceptions ); xml.writeAttribute( "failures"_sr, stats.totals.assertions.failed-unexpectedExceptions ); + xml.writeAttribute( "skipped"_sr, stats.totals.assertions.skipped ); xml.writeAttribute( "tests"_sr, stats.totals.assertions.total() ); xml.writeAttribute( "hostname"_sr, "tbd"_sr ); // !TBD if( m_config->showDurations() == ShowDurations::Never ) @@ -9397,7 +10338,8 @@ namespace Catch { void JunitReporter::writeAssertion( AssertionStats const& stats ) { AssertionResult const& result = stats.assertionResult; - if( !result.isOk() ) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { std::string elementName; switch( result.getResultType() ) { case ResultWas::ThrewException: @@ -9409,7 +10351,9 @@ namespace Catch { case ResultWas::DidntThrowException: elementName = "failure"; break; - + case ResultWas::ExplicitSkip: + elementName = "skipped"; + break; // We should never see these here: case ResultWas::Info: case ResultWas::Warning: @@ -9427,7 +10371,9 @@ namespace Catch { xml.writeAttribute( "type"_sr, result.getTestMacroName() ); ReusableStringStream rss; - if (stats.totals.assertions.total() > 0) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + rss << "SKIPPED\n"; + } else { rss << "FAILED" << ":\n"; if (result.hasExpression()) { rss << " "; @@ -9438,11 +10384,9 @@ namespace Catch { rss << "with expansion:\n"; rss << TextFlow::Column(result.getExpandedExpression()).indent(2) << '\n'; } - } else { - rss << '\n'; } - if( !result.getMessage().empty() ) + if( result.hasMessage() ) rss << result.getMessage() << '\n'; for( auto const& msg : stats.infoMessages ) if( msg.type == ResultWas::Info ) @@ -9561,7 +10505,6 @@ namespace Catch { } } - // The return value indicates if the messages buffer should be cleared: void MultiReporter::assertionEnded( AssertionStats const& assertionStats ) { const bool reportByDefault = assertionStats.assertionResult.getResultType() != ResultWas::Ok || @@ -9664,6 +10607,11 @@ namespace Catch { } } + void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory ) { + getMutableRegistryHub().registerListener( CATCH_MOVE(listenerFactory) ); + } + + } // namespace Detail } // namespace Catch @@ -9696,7 +10644,7 @@ namespace Catch { } void SonarQubeReporter::writeRun( TestRunNode const& runNode ) { - std::map<std::string, std::vector<TestCaseNode const*>> testsPerFile; + std::map<StringRef, std::vector<TestCaseNode const*>> testsPerFile; for ( auto const& child : runNode.children ) { testsPerFile[child->value.testInfo->lineInfo.file].push_back( @@ -9708,7 +10656,7 @@ namespace Catch { } } - void SonarQubeReporter::writeTestFile(std::string const& filename, std::vector<TestCaseNode const*> const& testCaseNodes) { + void SonarQubeReporter::writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes) { XmlWriter::ScopedElement e = xml.scopedElement("file"); xml.writeAttribute("path"_sr, filename); @@ -9753,7 +10701,8 @@ namespace Catch { void SonarQubeReporter::writeAssertion(AssertionStats const& stats, bool okToFail) { AssertionResult const& result = stats.assertionResult; - if (!result.isOk()) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { std::string elementName; if (okToFail) { elementName = "skipped"; @@ -9764,15 +10713,13 @@ namespace Catch { elementName = "error"; break; case ResultWas::ExplicitFailure: - elementName = "failure"; - break; case ResultWas::ExpressionFailed: - elementName = "failure"; - break; case ResultWas::DidntThrowException: elementName = "failure"; break; - + case ResultWas::ExplicitSkip: + elementName = "skipped"; + break; // We should never see these here: case ResultWas::Info: case ResultWas::Warning: @@ -9792,7 +10739,9 @@ namespace Catch { xml.writeAttribute("message"_sr, messageRss.str()); ReusableStringStream textRss; - if (stats.totals.assertions.total() > 0) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + textRss << "SKIPPED\n"; + } else { textRss << "FAILED:\n"; if (result.hasExpression()) { textRss << '\t' << result.getExpressionInMacro() << '\n'; @@ -9802,7 +10751,7 @@ namespace Catch { } } - if (!result.getMessage().empty()) + if (result.hasMessage()) textRss << result.getMessage() << '\n'; for (auto const& msg : stats.infoMessages) @@ -9836,7 +10785,6 @@ namespace Catch { #include <algorithm> -#include <iterator> #include <ostream> namespace Catch { @@ -9922,6 +10870,12 @@ namespace Catch { printIssue("explicitly"_sr); printRemainingMessages(Colour::None); break; + case ResultWas::ExplicitSkip: + printResultType(tapPassedString); + printIssue(" # SKIP"_sr); + printMessage(); + printRemainingMessages(); + break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: case ResultWas::FailureBit: @@ -9981,7 +10935,7 @@ namespace Catch { // 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 std::size_t N = static_cast<std::size_t>(itEnd - itMessage); stream << colourImpl->guardColour( colour ) << " with " << pluralise( N, "message"_sr ) << ':'; @@ -10000,7 +10954,7 @@ namespace Catch { private: std::ostream& stream; AssertionResult const& result; - std::vector<MessageInfo> messages; + std::vector<MessageInfo> const& messages; std::vector<MessageInfo>::const_iterator itMessage; bool printInfoMessages; std::size_t counter; @@ -10079,7 +11033,7 @@ namespace Catch { } // end anonymous namespace - TeamCityReporter::~TeamCityReporter() {} + TeamCityReporter::~TeamCityReporter() = default; void TeamCityReporter::testRunStarting( TestRunInfo const& runInfo ) { m_stream << "##teamcity[testSuiteStarted name='" << escape( runInfo.name ) @@ -10093,7 +11047,8 @@ namespace Catch { void TeamCityReporter::assertionEnded(AssertionStats const& assertionStats) { AssertionResult const& result = assertionStats.assertionResult; - if (!result.isOk()) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { ReusableStringStream msg; if (!m_headerPrintedForThisSection) @@ -10118,6 +11073,9 @@ namespace Catch { case ResultWas::ExplicitFailure: msg << "explicit failure"; break; + case ResultWas::ExplicitSkip: + msg << "explicit skip"; + break; // We shouldn't get here because of the isOk() test case ResultWas::Ok: @@ -10145,18 +11103,16 @@ namespace Catch { " " << result.getExpandedExpression() << '\n'; } - if (currentTestCaseInfo->okToFail()) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + m_stream << "##teamcity[testIgnored"; + } else if ( currentTestCaseInfo->okToFail() ) { msg << "- failure ignore as test marked as 'ok to fail'\n"; - m_stream << "##teamcity[testIgnored" - << " name='" << escape(currentTestCaseInfo->name) << '\'' - << " message='" << escape(msg.str()) << '\'' - << "]\n"; + m_stream << "##teamcity[testIgnored"; } else { - m_stream << "##teamcity[testFailed" - << " name='" << escape(currentTestCaseInfo->name) << '\'' - << " message='" << escape(msg.str()) << '\'' - << "]\n"; + m_stream << "##teamcity[testFailed"; } + m_stream << " name='" << escape( currentTestCaseInfo->name ) << '\'' + << " message='" << escape( msg.str() ) << '\'' << "]\n"; } m_stream.flush(); } @@ -10251,7 +11207,7 @@ namespace Catch { m_xml.startElement("Catch2TestRun") .writeAttribute("name"_sr, m_config->name()) .writeAttribute("rng-seed"_sr, m_config->rngSeed()) - .writeAttribute("xml-format-version"_sr, 2) + .writeAttribute("xml-format-version"_sr, 3) .writeAttribute("catch2-version"_sr, libraryVersion()); if ( m_config->testSpec().hasFilters() ) { m_xml.writeAttribute( "filters"_sr, m_config->testSpec() ); @@ -10261,7 +11217,7 @@ namespace Catch { void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { StreamingReporterBase::testCaseStarting(testInfo); m_xml.startElement( "TestCase" ) - .writeAttribute( "name"_sr, trim( testInfo.name ) ) + .writeAttribute( "name"_sr, trim( StringRef(testInfo.name) ) ) .writeAttribute( "tags"_sr, testInfo.tagsAsString() ); writeSourceInfo( testInfo.lineInfo ); @@ -10275,7 +11231,7 @@ namespace Catch { StreamingReporterBase::sectionStarting( sectionInfo ); if( m_sectionDepth++ > 0 ) { m_xml.startElement( "Section" ) - .writeAttribute( "name"_sr, trim( sectionInfo.name ) ); + .writeAttribute( "name"_sr, trim( StringRef(sectionInfo.name) ) ); writeSourceInfo( sectionInfo.lineInfo ); m_xml.ensureTagClosed(); } @@ -10293,19 +11249,22 @@ namespace Catch { // Print any info messages in <Info> tags. for( auto const& msg : assertionStats.infoMessages ) { if( msg.type == ResultWas::Info && includeResults ) { - m_xml.scopedElement( "Info" ) - .writeText( msg.message ); + auto t = m_xml.scopedElement( "Info" ); + writeSourceInfo( msg.lineInfo ); + t.writeText( msg.message ); } else if ( msg.type == ResultWas::Warning ) { - m_xml.scopedElement( "Warning" ) - .writeText( msg.message ); + auto t = m_xml.scopedElement( "Warning" ); + writeSourceInfo( msg.lineInfo ); + t.writeText( msg.message ); } } } // Drop out if result was successful but we're not printing them. - if( !includeResults && result.getResultType() != ResultWas::Warning ) + if ( !includeResults && result.getResultType() != ResultWas::Warning && + result.getResultType() != ResultWas::ExplicitSkip ) { return; - + } // Print the expression if there is one. if( result.hasExpression() ) { @@ -10348,6 +11307,12 @@ namespace Catch { m_xml.writeText( result.getMessage() ); m_xml.endElement(); break; + case ResultWas::ExplicitSkip: + m_xml.startElement( "Skip" ); + writeSourceInfo( result.getSourceInfo() ); + m_xml.writeText( result.getMessage() ); + m_xml.endElement(); + break; default: break; } @@ -10358,15 +11323,18 @@ namespace Catch { void XmlReporter::sectionEnded( SectionStats const& sectionStats ) { StreamingReporterBase::sectionEnded( sectionStats ); - if( --m_sectionDepth > 0 ) { - XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); - e.writeAttribute( "successes"_sr, sectionStats.assertions.passed ); - e.writeAttribute( "failures"_sr, sectionStats.assertions.failed ); - e.writeAttribute( "expectedFailures"_sr, sectionStats.assertions.failedButOk ); - - if ( m_config->showDurations() == ShowDurations::Always ) - e.writeAttribute( "durationInSeconds"_sr, sectionStats.durationInSeconds ); + if ( --m_sectionDepth > 0 ) { + { + XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); + e.writeAttribute( "successes"_sr, sectionStats.assertions.passed ); + e.writeAttribute( "failures"_sr, sectionStats.assertions.failed ); + e.writeAttribute( "expectedFailures"_sr, sectionStats.assertions.failedButOk ); + e.writeAttribute( "skipped"_sr, sectionStats.assertions.skipped > 0 ); + if ( m_config->showDurations() == ShowDurations::Always ) + e.writeAttribute( "durationInSeconds"_sr, sectionStats.durationInSeconds ); + } + // Ends assertion tag m_xml.endElement(); } } @@ -10375,14 +11343,14 @@ namespace Catch { StreamingReporterBase::testCaseEnded( testCaseStats ); XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" ); e.writeAttribute( "success"_sr, testCaseStats.totals.assertions.allOk() ); + e.writeAttribute( "skips"_sr, testCaseStats.totals.assertions.skipped ); if ( m_config->showDurations() == ShowDurations::Always ) e.writeAttribute( "durationInSeconds"_sr, m_testCaseTimer.getElapsedSeconds() ); - if( !testCaseStats.stdOut.empty() ) - m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline ); + m_xml.scopedElement( "StdOut" ).writeText( trim( StringRef(testCaseStats.stdOut) ), XmlFormatting::Newline ); if( !testCaseStats.stdErr.empty() ) - m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline ); + m_xml.scopedElement( "StdErr" ).writeText( trim( StringRef(testCaseStats.stdErr) ), XmlFormatting::Newline ); m_xml.endElement(); } @@ -10392,11 +11360,13 @@ namespace Catch { m_xml.scopedElement( "OverallResults" ) .writeAttribute( "successes"_sr, testRunStats.totals.assertions.passed ) .writeAttribute( "failures"_sr, testRunStats.totals.assertions.failed ) - .writeAttribute( "expectedFailures"_sr, testRunStats.totals.assertions.failedButOk ); + .writeAttribute( "expectedFailures"_sr, testRunStats.totals.assertions.failedButOk ) + .writeAttribute( "skips"_sr, testRunStats.totals.assertions.skipped ); m_xml.scopedElement( "OverallResultsCases") .writeAttribute( "successes"_sr, testRunStats.totals.testCases.passed ) .writeAttribute( "failures"_sr, testRunStats.totals.testCases.failed ) - .writeAttribute( "expectedFailures"_sr, testRunStats.totals.testCases.failedButOk ); + .writeAttribute( "expectedFailures"_sr, testRunStats.totals.testCases.failedButOk ) + .writeAttribute( "skips"_sr, testRunStats.totals.testCases.skipped ); m_xml.endElement(); } @@ -10415,26 +11385,23 @@ namespace Catch { } void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) { - m_xml.startElement("mean") + m_xml.scopedElement("mean") .writeAttribute("value"_sr, benchmarkStats.mean.point.count()) .writeAttribute("lowerBound"_sr, benchmarkStats.mean.lower_bound.count()) .writeAttribute("upperBound"_sr, benchmarkStats.mean.upper_bound.count()) .writeAttribute("ci"_sr, benchmarkStats.mean.confidence_interval); - m_xml.endElement(); - m_xml.startElement("standardDeviation") + m_xml.scopedElement("standardDeviation") .writeAttribute("value"_sr, benchmarkStats.standardDeviation.point.count()) .writeAttribute("lowerBound"_sr, benchmarkStats.standardDeviation.lower_bound.count()) .writeAttribute("upperBound"_sr, benchmarkStats.standardDeviation.upper_bound.count()) .writeAttribute("ci"_sr, benchmarkStats.standardDeviation.confidence_interval); - m_xml.endElement(); - m_xml.startElement("outliers") + m_xml.scopedElement("outliers") .writeAttribute("variance"_sr, benchmarkStats.outlierVariance) .writeAttribute("lowMild"_sr, benchmarkStats.outliers.low_mild) .writeAttribute("lowSevere"_sr, benchmarkStats.outliers.low_severe) .writeAttribute("highMild"_sr, benchmarkStats.outliers.high_mild) .writeAttribute("highSevere"_sr, benchmarkStats.outliers.high_severe); m_xml.endElement(); - m_xml.endElement(); } void XmlReporter::benchmarkFailed(StringRef error) { diff --git a/extras/catch_amalgamated.hpp b/extras/catch_amalgamated.hpp index e91734a4..bec588d4 100644 --- a/extras/catch_amalgamated.hpp +++ b/extras/catch_amalgamated.hpp @@ -1,3 +1,4 @@ + // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at @@ -5,8 +6,8 @@ // SPDX-License-Identifier: BSL-1.0 -// Catch v3.2.1 -// Generated: 2022-12-09 23:01:14.526666 +// Catch v3.5.0 +// Generated: 2023-12-11 00:51:06.770598 // ---------------------------------------------------------- // This file is an amalgamation of multiple different files. // You probably shouldn't edit it directly. @@ -59,233 +60,6 @@ -#ifndef CATCH_INTERFACES_CONFIG_HPP_INCLUDED -#define CATCH_INTERFACES_CONFIG_HPP_INCLUDED - - - -#ifndef CATCH_NONCOPYABLE_HPP_INCLUDED -#define CATCH_NONCOPYABLE_HPP_INCLUDED - -namespace Catch { - namespace Detail { - - //! Deriving classes become noncopyable and nonmovable - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable&& ) = delete; - NonCopyable& operator=( NonCopyable const& ) = delete; - NonCopyable& operator=( NonCopyable&& ) = delete; - - protected: - NonCopyable() noexcept = default; - }; - - } // namespace Detail -} // namespace Catch - -#endif // CATCH_NONCOPYABLE_HPP_INCLUDED - - -#ifndef CATCH_STRINGREF_HPP_INCLUDED -#define CATCH_STRINGREF_HPP_INCLUDED - -#include <cstddef> -#include <string> -#include <iosfwd> -#include <cassert> - -namespace Catch { - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. - class StringRef { - public: - using size_type = std::size_t; - using const_iterator = const char*; - - private: - static constexpr char const* const s_empty = ""; - - char const* m_start = s_empty; - size_type m_size = 0; - - public: // construction - constexpr StringRef() noexcept = default; - - StringRef( char const* rawChars ) noexcept; - - constexpr StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - explicit operator std::string() const { - return std::string(m_start, m_size); - } - - public: // operators - auto operator == ( StringRef other ) const noexcept -> bool; - auto operator != (StringRef other) const noexcept -> bool { - return !(*this == other); - } - - constexpr auto operator[] ( size_type index ) const noexcept -> char { - assert(index < m_size); - return m_start[index]; - } - - bool operator<(StringRef rhs) const noexcept; - - public: // named queries - constexpr auto empty() const noexcept -> bool { - return m_size == 0; - } - constexpr auto size() const noexcept -> size_type { - return m_size; - } - - // Returns a substring of [start, start + length). - // If start + length > size(), then the substring is [start, start + size()). - // If start > size(), then the substring is empty. - constexpr StringRef substr(size_type start, size_type length) const noexcept { - if (start < m_size) { - const auto shortened_size = m_size - start; - return StringRef(m_start + start, (shortened_size < length) ? shortened_size : length); - } else { - return StringRef(); - } - } - - // Returns the current start pointer. May not be null-terminated. - constexpr char const* data() const noexcept { - return m_start; - } - - constexpr const_iterator begin() const { return m_start; } - constexpr const_iterator end() const { return m_start + m_size; } - - - friend std::string& operator += (std::string& lhs, StringRef sr); - friend std::ostream& operator << (std::ostream& os, StringRef sr); - friend std::string operator+(StringRef lhs, StringRef rhs); - - /** - * Provides a three-way comparison with rhs - * - * Returns negative number if lhs < rhs, 0 if lhs == rhs, and a positive - * number if lhs > rhs - */ - int compare( StringRef rhs ) const; - }; - - - constexpr auto operator ""_sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } -} // namespace Catch - -constexpr auto operator ""_catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { - return Catch::StringRef( rawChars, size ); -} - -#endif // CATCH_STRINGREF_HPP_INCLUDED - -#include <chrono> -#include <iosfwd> -#include <string> -#include <vector> - -namespace Catch { - - enum class Verbosity { - Quiet = 0, - Normal, - High - }; - - struct WarnAbout { enum What { - Nothing = 0x00, - //! A test case or leaf section did not run any assertions - NoAssertions = 0x01, - //! A command line test spec matched no test cases - UnmatchedTestSpec = 0x02, - }; }; - - enum class ShowDurations { - DefaultForReporter, - Always, - Never - }; - enum class TestRunOrder { - Declared, - LexicographicallySorted, - Randomized - }; - enum class ColourMode : std::uint8_t { - //! Let Catch2 pick implementation based on platform detection - PlatformDefault, - //! Use ANSI colour code escapes - ANSI, - //! Use Win32 console colour API - Win32, - //! Don't use any colour - None - }; - struct WaitForKeypress { enum When { - Never, - BeforeStart = 1, - BeforeExit = 2, - BeforeStartAndExit = BeforeStart | BeforeExit - }; }; - - class TestSpec; - class IStream; - - class IConfig : public Detail::NonCopyable { - public: - virtual ~IConfig(); - - virtual bool allowThrows() const = 0; - virtual StringRef name() const = 0; - virtual bool includeSuccessfulResults() const = 0; - virtual bool shouldDebugBreak() const = 0; - virtual bool warnAboutMissingAssertions() const = 0; - virtual bool warnAboutUnmatchedTestSpecs() const = 0; - virtual bool zeroTestsCountAsSuccess() const = 0; - virtual int abortAfter() const = 0; - virtual bool showInvisibles() const = 0; - virtual ShowDurations 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; - virtual TestRunOrder runOrder() const = 0; - virtual uint32_t rngSeed() const = 0; - virtual unsigned int shardCount() const = 0; - virtual unsigned int shardIndex() const = 0; - virtual ColourMode defaultColourMode() const = 0; - virtual std::vector<std::string> const& getSectionsToRun() const = 0; - virtual Verbosity verbosity() const = 0; - - virtual bool skipBenchmarks() const = 0; - virtual bool benchmarkNoAnalysis() const = 0; - virtual unsigned int benchmarkSamples() const = 0; - virtual double benchmarkConfidenceInterval() const = 0; - virtual unsigned int benchmarkResamples() const = 0; - virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0; - }; -} - -#endif // CATCH_INTERFACES_CONFIG_HPP_INCLUDED - - #ifndef CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED #define CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED @@ -352,7 +126,7 @@ namespace Catch { // Only GCC compiler should be used in this block, so other compilers trying to // mask themselves as GCC should be ignored. -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) && !defined(__NVCOMPILER) # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) @@ -361,20 +135,37 @@ namespace Catch { # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wparentheses\"" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + _Pragma( "GCC diagnostic ignored \"-Wunused-result\"" ) + # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wunused-variable\"" ) # define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wuseless-cast\"" ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wshadow\"" ) + # define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) #endif +#if defined(__NVCOMPILER) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "diag push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "diag pop" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress declared_but_not_referenced" ) +#endif + #if defined(__CUDACC__) && !defined(__clang__) +# ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ +// New pragmas introduced in CUDA 11.5+ # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" ) # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" ) +# else +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress 177" ) +# endif #endif // clang-cl defines _MSC_VER as well as __clang__, which could cause the @@ -428,6 +219,9 @@ namespace Catch { # define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wcomma\"" ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wshadow\"" ) + #endif // __clang__ @@ -447,7 +241,9 @@ namespace Catch { //////////////////////////////////////////////////////////////////////////////// // Assume that some platforms do not support getenv. -#if defined(CATCH_PLATFORM_WINDOWS_UWP) || defined(CATCH_PLATFORM_PLAYSTATION) +#if defined( CATCH_PLATFORM_WINDOWS_UWP ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( _GAMING_XBOX ) # define CATCH_INTERNAL_CONFIG_NO_GETENV #else # define CATCH_INTERNAL_CONFIG_GETENV @@ -492,8 +288,14 @@ namespace Catch { // Visual C++ #if defined(_MSC_VER) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) +// We want to defer to nvcc-specific warning suppression if we are compiled +// with nvcc masquerading for MSVC. +# if !defined( __CUDACC__ ) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + __pragma( warning( push ) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + __pragma( warning( pop ) ) +# endif // Universal Windows platform does not support SEH // Or console colours (or console at all...) @@ -659,6 +461,9 @@ namespace Catch { #if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS #endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT +#endif #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS #endif @@ -668,6 +473,16 @@ namespace Catch { #if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS #endif +#if !defined( CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS +#endif + // The goal of this macro is to avoid evaluation of the arguments, but // still have the compiler warn on problems inside... @@ -681,13 +496,6 @@ namespace Catch { # undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS #endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS -#endif #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) #define CATCH_TRY if ((true)) @@ -733,38 +541,31 @@ namespace Catch { class IResultCapture; class IConfig; - class IContext { - public: - virtual ~IContext(); // = default + class Context { + IConfig const* m_config = nullptr; + IResultCapture* m_resultCapture = nullptr; - virtual IResultCapture* getResultCapture() = 0; - virtual IConfig const* getConfig() const = 0; - }; + CATCH_EXPORT static Context* currentContext; + friend Context& getCurrentMutableContext(); + friend Context const& getCurrentContext(); + static void createContext(); + friend void cleanUpContext(); - class IMutableContext : public IContext { public: - ~IMutableContext() override; // = default - virtual void setResultCapture( IResultCapture* resultCapture ) = 0; - virtual void setConfig( IConfig const* config ) = 0; - - private: - CATCH_EXPORT static IMutableContext* currentContext; - friend IMutableContext& getCurrentMutableContext(); - friend void cleanUpContext(); - static void createContext(); + IResultCapture* getResultCapture() const { return m_resultCapture; } + IConfig const* getConfig() const { return m_config; } + void setResultCapture( IResultCapture* resultCapture ); + void setConfig( IConfig const* config ); }; - inline IMutableContext& getCurrentMutableContext() - { - if( !IMutableContext::currentContext ) - IMutableContext::createContext(); - // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) - return *IMutableContext::currentContext; - } + Context& getCurrentMutableContext(); - inline IContext& getCurrentContext() - { - return getCurrentMutableContext(); + inline Context const& getCurrentContext() { + // We duplicate the logic from `getCurrentMutableContext` here, + // to avoid paying the call overhead in debug mode. + if ( !Context::currentContext ) { Context::createContext(); } + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return *Context::currentContext; } void cleanUpContext(); @@ -776,16 +577,6 @@ namespace Catch { #endif // CATCH_CONTEXT_HPP_INCLUDED -#ifndef CATCH_INTERFACES_REPORTER_HPP_INCLUDED -#define CATCH_INTERFACES_REPORTER_HPP_INCLUDED - - - -#ifndef CATCH_SECTION_INFO_HPP_INCLUDED -#define CATCH_SECTION_INFO_HPP_INCLUDED - - - #ifndef CATCH_MOVE_AND_FORWARD_HPP_INCLUDED #define CATCH_MOVE_AND_FORWARD_HPP_INCLUDED @@ -800,109 +591,199 @@ namespace Catch { #endif // CATCH_MOVE_AND_FORWARD_HPP_INCLUDED -#ifndef CATCH_SOURCE_LINE_INFO_HPP_INCLUDED -#define CATCH_SOURCE_LINE_INFO_HPP_INCLUDED - -#include <cstddef> -#include <iosfwd> +#ifndef CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED +#define CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED namespace Catch { - struct SourceLineInfo { + //! Used to signal that an assertion macro failed + struct TestFailureException{}; + //! Used to signal that the remainder of a test should be skipped + struct TestSkipException {}; - SourceLineInfo() = delete; - constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept: - file( _file ), - line( _line ) - {} + /** + * Outlines throwing of `TestFailureException` into a single TU + * + * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. + */ + [[noreturn]] void throw_test_failure_exception(); - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; + /** + * Outlines throwing of `TestSkipException` into a single TU + * + * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. + */ + [[noreturn]] void throw_test_skip_exception(); - char const* file; - std::size_t line; +} // namespace Catch - friend std::ostream& operator << (std::ostream& os, SourceLineInfo const& info); - }; -} +#endif // CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) ) -#endif // CATCH_SOURCE_LINE_INFO_HPP_INCLUDED +#ifndef CATCH_UNIQUE_NAME_HPP_INCLUDED +#define CATCH_UNIQUE_NAME_HPP_INCLUDED -#ifndef CATCH_TOTALS_HPP_INCLUDED -#define CATCH_TOTALS_HPP_INCLUDED -#include <cstdint> -namespace Catch { +/** \file + * Wrapper for the CONFIG configuration option + * + * When generating internal unique names, there are two options. Either + * we mix in the current line number, or mix in an incrementing number. + * We prefer the latter, using `__COUNTER__`, but users might want to + * use the former. + */ - struct Counts { - Counts operator - ( Counts const& other ) const; - Counts& operator += ( Counts const& other ); +#ifndef CATCH_CONFIG_COUNTER_HPP_INCLUDED +#define CATCH_CONFIG_COUNTER_HPP_INCLUDED - std::uint64_t total() const; - bool allPassed() const; - bool allOk() const; - std::uint64_t passed = 0; - std::uint64_t failed = 0; - std::uint64_t failedButOk = 0; - }; +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif - struct Totals { +#if defined( CATCH_INTERNAL_CONFIG_COUNTER ) && \ + !defined( CATCH_CONFIG_NO_COUNTER ) && \ + !defined( CATCH_CONFIG_COUNTER ) +# define CATCH_CONFIG_COUNTER +#endif - Totals operator - ( Totals const& other ) const; - Totals& operator += ( Totals const& other ); - Totals delta( Totals const& prevTotals ) const; +#endif // CATCH_CONFIG_COUNTER_HPP_INCLUDED +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif - Counts assertions; - Counts testCases; - }; -} +#endif // CATCH_UNIQUE_NAME_HPP_INCLUDED -#endif // CATCH_TOTALS_HPP_INCLUDED + +#ifndef CATCH_INTERFACES_CAPTURE_HPP_INCLUDED +#define CATCH_INTERFACES_CAPTURE_HPP_INCLUDED #include <string> +#include <chrono> + + + +#ifndef CATCH_STRINGREF_HPP_INCLUDED +#define CATCH_STRINGREF_HPP_INCLUDED + +#include <cstddef> +#include <string> +#include <iosfwd> +#include <cassert> + +#include <cstring> namespace Catch { - struct SectionInfo { - // The last argument is ignored, so that people can write - // SECTION("ShortName", "Proper description that is long") and - // still use the `-c` flag comfortably. - SectionInfo( SourceLineInfo const& _lineInfo, std::string _name, - const char* const = nullptr ): - name(CATCH_MOVE(_name)), - lineInfo(_lineInfo) - {} + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. + class StringRef { + public: + using size_type = std::size_t; + using const_iterator = const char*; - std::string name; - SourceLineInfo lineInfo; - }; + private: + static constexpr char const* const s_empty = ""; - struct SectionEndInfo { - SectionInfo sectionInfo; - Counts prevAssertions; - double durationInSeconds; - }; + char const* m_start = s_empty; + size_type m_size = 0; -} // end namespace Catch + public: // construction + constexpr StringRef() noexcept = default; -#endif // CATCH_SECTION_INFO_HPP_INCLUDED + StringRef( char const* rawChars ) noexcept; + constexpr StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} -#ifndef CATCH_ASSERTION_RESULT_HPP_INCLUDED -#define CATCH_ASSERTION_RESULT_HPP_INCLUDED + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + explicit operator std::string() const { + return std::string(m_start, m_size); + } + public: // operators + auto operator == ( StringRef other ) const noexcept -> bool { + return m_size == other.m_size + && (std::memcmp( m_start, other.m_start, m_size ) == 0); + } + auto operator != (StringRef other) const noexcept -> bool { + return !(*this == other); + } -#ifndef CATCH_ASSERTION_INFO_HPP_INCLUDED -#define CATCH_ASSERTION_INFO_HPP_INCLUDED + constexpr auto operator[] ( size_type index ) const noexcept -> char { + assert(index < m_size); + return m_start[index]; + } + + bool operator<(StringRef rhs) const noexcept; + + public: // named queries + constexpr auto empty() const noexcept -> bool { + return m_size == 0; + } + constexpr auto size() const noexcept -> size_type { + return m_size; + } + + // Returns a substring of [start, start + length). + // If start + length > size(), then the substring is [start, start + size()). + // If start > size(), then the substring is empty. + constexpr StringRef substr(size_type start, size_type length) const noexcept { + if (start < m_size) { + const auto shortened_size = m_size - start; + return StringRef(m_start + start, (shortened_size < length) ? shortened_size : length); + } else { + return StringRef(); + } + } + + // Returns the current start pointer. May not be null-terminated. + constexpr char const* data() const noexcept { + return m_start; + } + constexpr const_iterator begin() const { return m_start; } + constexpr const_iterator end() const { return m_start + m_size; } + + + friend std::string& operator += (std::string& lhs, StringRef sr); + friend std::ostream& operator << (std::ostream& os, StringRef sr); + friend std::string operator+(StringRef lhs, StringRef rhs); + + /** + * Provides a three-way comparison with rhs + * + * Returns negative number if lhs < rhs, 0 if lhs == rhs, and a positive + * number if lhs > rhs + */ + int compare( StringRef rhs ) const; + }; + + + constexpr auto operator ""_sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } +} // namespace Catch + +constexpr auto operator ""_catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +#endif // CATCH_STRINGREF_HPP_INCLUDED #ifndef CATCH_RESULT_TYPE_HPP_INCLUDED @@ -916,6 +797,8 @@ namespace Catch { Ok = 0, Info = 1, Warning = 2, + // TODO: Should explicit skip be considered "not OK" (cf. isOk)? I.e., should it have the failure bit? + ExplicitSkip = 4, FailureBit = 0x10, @@ -954,113 +837,156 @@ namespace Catch { #endif // CATCH_RESULT_TYPE_HPP_INCLUDED + +#ifndef CATCH_UNIQUE_PTR_HPP_INCLUDED +#define CATCH_UNIQUE_PTR_HPP_INCLUDED + +#include <cassert> +#include <type_traits> + + namespace Catch { +namespace Detail { + /** + * A reimplementation of `std::unique_ptr` for improved compilation performance + * + * Does not support arrays nor custom deleters. + */ + template <typename T> + class unique_ptr { + T* m_ptr; + public: + constexpr unique_ptr(std::nullptr_t = nullptr): + m_ptr{} + {} + explicit constexpr unique_ptr(T* ptr): + m_ptr(ptr) + {} - struct AssertionInfo { - // AssertionInfo() = delete; + template <typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>> + unique_ptr(unique_ptr<U>&& from): + m_ptr(from.release()) + {} - StringRef macroName; - SourceLineInfo lineInfo; - StringRef capturedExpression; - ResultDisposition::Flags resultDisposition; - }; + template <typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>> + unique_ptr& operator=(unique_ptr<U>&& from) { + reset(from.release()); -} // end namespace Catch + return *this; + } -#endif // CATCH_ASSERTION_INFO_HPP_INCLUDED + unique_ptr(unique_ptr const&) = delete; + unique_ptr& operator=(unique_ptr const&) = delete; + unique_ptr(unique_ptr&& rhs) noexcept: + m_ptr(rhs.m_ptr) { + rhs.m_ptr = nullptr; + } + unique_ptr& operator=(unique_ptr&& rhs) noexcept { + reset(rhs.release()); -#ifndef CATCH_LAZY_EXPR_HPP_INCLUDED -#define CATCH_LAZY_EXPR_HPP_INCLUDED + return *this; + } -#include <iosfwd> + ~unique_ptr() { + delete m_ptr; + } -namespace Catch { + T& operator*() { + assert(m_ptr); + return *m_ptr; + } + T const& operator*() const { + assert(m_ptr); + return *m_ptr; + } + T* operator->() noexcept { + assert(m_ptr); + return m_ptr; + } + T const* operator->() const noexcept { + assert(m_ptr); + return m_ptr; + } - class ITransientExpression; + T* get() { return m_ptr; } + T const* get() const { return m_ptr; } - class LazyExpression { - friend class AssertionHandler; - friend struct AssertionStats; - friend class RunContext; + void reset(T* ptr = nullptr) { + delete m_ptr; + m_ptr = ptr; + } - ITransientExpression const* m_transientExpression = nullptr; - bool m_isNegated; - public: - LazyExpression( bool isNegated ): - m_isNegated(isNegated) - {} - LazyExpression(LazyExpression const& other) = default; - LazyExpression& operator = ( LazyExpression const& ) = delete; + T* release() { + auto temp = m_ptr; + m_ptr = nullptr; + return temp; + } explicit operator bool() const { - return m_transientExpression != nullptr; + return m_ptr; } - friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&; + friend void swap(unique_ptr& lhs, unique_ptr& rhs) { + auto temp = lhs.m_ptr; + lhs.m_ptr = rhs.m_ptr; + rhs.m_ptr = temp; + } }; -} // namespace Catch + //! Specialization to cause compile-time error for arrays + template <typename T> + class unique_ptr<T[]>; -#endif // CATCH_LAZY_EXPR_HPP_INCLUDED + template <typename T, typename... Args> + unique_ptr<T> make_unique(Args&&... args) { + return unique_ptr<T>(new T(CATCH_FORWARD(args)...)); + } -#include <string> -namespace Catch { +} // end namespace Detail +} // end namespace Catch - struct AssertionResultData - { - AssertionResultData() = delete; +#endif // CATCH_UNIQUE_PTR_HPP_INCLUDED - AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression ); - std::string message; - mutable std::string reconstructedExpression; - LazyExpression lazyExpression; - ResultWas::OfType resultType; +#ifndef CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED - std::string reconstructExpression() const; - }; - class AssertionResult { - public: - AssertionResult() = delete; - AssertionResult( AssertionInfo const& info, AssertionResultData const& data ); - bool isOk() const; - bool succeeded() const; - ResultWas::OfType getResultType() const; - bool hasExpression() const; - bool hasMessage() const; - std::string getExpression() const; - std::string getExpressionInMacro() const; - bool hasExpandedExpression() const; - std::string getExpandedExpression() const; - StringRef getMessage() const; - SourceLineInfo getSourceInfo() const; - StringRef getTestMacroName() const; +// Adapted from donated nonius code. - //protected: - AssertionInfo m_info; - AssertionResultData m_resultData; - }; +#ifndef CATCH_CLOCK_HPP_INCLUDED +#define CATCH_CLOCK_HPP_INCLUDED -} // end namespace Catch +#include <chrono> -#endif // CATCH_ASSERTION_RESULT_HPP_INCLUDED +namespace Catch { + namespace Benchmark { + using IDuration = std::chrono::nanoseconds; + using FDuration = std::chrono::duration<double, std::nano>; + template <typename Clock> + using TimePoint = typename Clock::time_point; -#ifndef CATCH_MESSAGE_INFO_HPP_INCLUDED -#define CATCH_MESSAGE_INFO_HPP_INCLUDED + using default_clock = std::chrono::steady_clock; + } // namespace Benchmark +} // namespace Catch +#endif // CATCH_CLOCK_HPP_INCLUDED +namespace Catch { -#ifndef CATCH_INTERFACES_CAPTURE_HPP_INCLUDED -#define CATCH_INTERFACES_CAPTURE_HPP_INCLUDED + // We cannot forward declare the type with default template argument + // multiple times, so it is split out into a separate header so that + // we can prevent multiple declarations in dependees + template <typename Duration = Benchmark::FDuration> + struct BenchmarkStats; -#include <string> -#include <chrono> +} // end namespace Catch +#endif // CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED namespace Catch { @@ -1078,19 +1004,31 @@ namespace Catch { class IGeneratorTracker; struct BenchmarkInfo; - template <typename Duration = std::chrono::duration<double, std::nano>> - struct BenchmarkStats; + + namespace Generators { + class GeneratorUntypedBase; + using GeneratorBasePtr = Catch::Detail::unique_ptr<GeneratorUntypedBase>; + } + class IResultCapture { public: virtual ~IResultCapture(); - virtual bool sectionStarted( SectionInfo const& sectionInfo, - Counts& assertions ) = 0; - virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; - virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - - virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + virtual void notifyAssertionStarted( AssertionInfo const& info ) = 0; + virtual bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) = 0; + virtual void sectionEnded( SectionEndInfo&& endInfo ) = 0; + virtual void sectionEndedEarly( SectionEndInfo&& endInfo ) = 0; + + virtual IGeneratorTracker* + acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) = 0; + virtual IGeneratorTracker* + createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) = 0; virtual void benchmarkPreparing( StringRef name ) = 0; virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; @@ -1100,7 +1038,7 @@ namespace Catch { virtual void pushScopedMessage( MessageInfo const& message ) = 0; virtual void popScopedMessage( MessageInfo const& message ) = 0; - virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0; + virtual void emplaceUnscopedMessage( MessageBuilder&& builder ) = 0; virtual void handleFatalErrorCondition( StringRef message ) = 0; @@ -1118,7 +1056,7 @@ namespace Catch { AssertionReaction& reaction ) = 0; virtual void handleUnexpectedInflightException ( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) = 0; virtual void handleIncomplete ( AssertionInfo const& info ) = 0; @@ -1143,146 +1081,186 @@ namespace Catch { #endif // CATCH_INTERFACES_CAPTURE_HPP_INCLUDED -#include <string> -namespace Catch { +#ifndef CATCH_INTERFACES_CONFIG_HPP_INCLUDED +#define CATCH_INTERFACES_CONFIG_HPP_INCLUDED - struct MessageInfo { - MessageInfo( StringRef _macroName, - SourceLineInfo const& _lineInfo, - ResultWas::OfType _type ); - StringRef macroName; - std::string message; - SourceLineInfo lineInfo; - ResultWas::OfType type; - unsigned int sequence; - bool operator == (MessageInfo const& other) const { - return sequence == other.sequence; - } - bool operator < (MessageInfo const& other) const { - return sequence < other.sequence; - } - private: - static unsigned int globalCount; - }; +#ifndef CATCH_NONCOPYABLE_HPP_INCLUDED +#define CATCH_NONCOPYABLE_HPP_INCLUDED -} // end namespace Catch +namespace Catch { + namespace Detail { -#endif // CATCH_MESSAGE_INFO_HPP_INCLUDED + //! Deriving classes become noncopyable and nonmovable + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable&& ) = delete; + NonCopyable& operator=( NonCopyable const& ) = delete; + NonCopyable& operator=( NonCopyable&& ) = delete; + protected: + NonCopyable() noexcept = default; + }; -#ifndef CATCH_UNIQUE_PTR_HPP_INCLUDED -#define CATCH_UNIQUE_PTR_HPP_INCLUDED + } // namespace Detail +} // namespace Catch -#include <cassert> -#include <type_traits> +#endif // CATCH_NONCOPYABLE_HPP_INCLUDED +#include <chrono> +#include <iosfwd> +#include <string> +#include <vector> namespace Catch { -namespace Detail { - /** - * A reimplementation of `std::unique_ptr` for improved compilation performance - * - * Does not support arrays nor custom deleters. - */ - template <typename T> - class unique_ptr { - T* m_ptr; + + enum class Verbosity { + Quiet = 0, + Normal, + High + }; + + struct WarnAbout { enum What { + Nothing = 0x00, + //! A test case or leaf section did not run any assertions + NoAssertions = 0x01, + //! A command line test spec matched no test cases + UnmatchedTestSpec = 0x02, + }; }; + + enum class ShowDurations { + DefaultForReporter, + Always, + Never + }; + enum class TestRunOrder { + Declared, + LexicographicallySorted, + Randomized + }; + enum class ColourMode : std::uint8_t { + //! Let Catch2 pick implementation based on platform detection + PlatformDefault, + //! Use ANSI colour code escapes + ANSI, + //! Use Win32 console colour API + Win32, + //! Don't use any colour + None + }; + struct WaitForKeypress { enum When { + Never, + BeforeStart = 1, + BeforeExit = 2, + BeforeStartAndExit = BeforeStart | BeforeExit + }; }; + + class TestSpec; + class IStream; + + class IConfig : public Detail::NonCopyable { public: - constexpr unique_ptr(std::nullptr_t = nullptr): - m_ptr{} - {} - explicit constexpr unique_ptr(T* ptr): - m_ptr(ptr) - {} + virtual ~IConfig(); - template <typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>> - unique_ptr(unique_ptr<U>&& from): - m_ptr(from.release()) - {} + virtual bool allowThrows() const = 0; + virtual StringRef name() const = 0; + virtual bool includeSuccessfulResults() const = 0; + virtual bool shouldDebugBreak() const = 0; + virtual bool warnAboutMissingAssertions() const = 0; + virtual bool warnAboutUnmatchedTestSpecs() const = 0; + virtual bool zeroTestsCountAsSuccess() const = 0; + virtual int abortAfter() const = 0; + virtual bool showInvisibles() const = 0; + virtual ShowDurations 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; + virtual TestRunOrder runOrder() const = 0; + virtual uint32_t rngSeed() const = 0; + virtual unsigned int shardCount() const = 0; + virtual unsigned int shardIndex() const = 0; + virtual ColourMode defaultColourMode() const = 0; + virtual std::vector<std::string> const& getSectionsToRun() const = 0; + virtual Verbosity verbosity() const = 0; - template <typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>> - unique_ptr& operator=(unique_ptr<U>&& from) { - reset(from.release()); + virtual bool skipBenchmarks() const = 0; + virtual bool benchmarkNoAnalysis() const = 0; + virtual unsigned int benchmarkSamples() const = 0; + virtual double benchmarkConfidenceInterval() const = 0; + virtual unsigned int benchmarkResamples() const = 0; + virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0; + }; +} - return *this; - } +#endif // CATCH_INTERFACES_CONFIG_HPP_INCLUDED - unique_ptr(unique_ptr const&) = delete; - unique_ptr& operator=(unique_ptr const&) = delete; - unique_ptr(unique_ptr&& rhs) noexcept: - m_ptr(rhs.m_ptr) { - rhs.m_ptr = nullptr; - } - unique_ptr& operator=(unique_ptr&& rhs) noexcept { - reset(rhs.release()); +#ifndef CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED +#define CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED - return *this; - } - ~unique_ptr() { - delete m_ptr; - } +#include <string> - T& operator*() { - assert(m_ptr); - return *m_ptr; - } - T const& operator*() const { - assert(m_ptr); - return *m_ptr; - } - T* operator->() noexcept { - assert(m_ptr); - return m_ptr; - } - T const* operator->() const noexcept { - assert(m_ptr); - return m_ptr; - } +namespace Catch { - T* get() { return m_ptr; } - T const* get() const { return m_ptr; } + class TestCaseHandle; + struct TestCaseInfo; + class ITestCaseRegistry; + class IExceptionTranslatorRegistry; + class IExceptionTranslator; + class ReporterRegistry; + class IReporterFactory; + class ITagAliasRegistry; + class ITestInvoker; + class IMutableEnumValuesRegistry; + struct SourceLineInfo; - void reset(T* ptr = nullptr) { - delete m_ptr; - m_ptr = ptr; - } + class StartupExceptionRegistry; + class EventListenerFactory; - T* release() { - auto temp = m_ptr; - m_ptr = nullptr; - return temp; - } + using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; - explicit operator bool() const { - return m_ptr; - } + class IRegistryHub { + public: + virtual ~IRegistryHub(); // = default - friend void swap(unique_ptr& lhs, unique_ptr& rhs) { - auto temp = lhs.m_ptr; - lhs.m_ptr = rhs.m_ptr; - rhs.m_ptr = temp; - } + virtual ReporterRegistry const& getReporterRegistry() const = 0; + virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; + virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; + virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; + + + virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; }; - //! Specialization to cause compile-time error for arrays - template <typename T> - class unique_ptr<T[]>; + class IMutableRegistryHub { + public: + virtual ~IMutableRegistryHub(); // = default + virtual void registerReporter( std::string const& name, IReporterFactoryPtr factory ) = 0; + virtual void registerListener( Detail::unique_ptr<EventListenerFactory> factory ) = 0; + virtual void registerTest(Detail::unique_ptr<TestCaseInfo>&& testInfo, Detail::unique_ptr<ITestInvoker>&& invoker) = 0; + virtual void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) = 0; + virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; + virtual void registerStartupException() noexcept = 0; + virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0; + }; - template <typename T, typename... Args> - unique_ptr<T> make_unique(Args&&... args) { - return unique_ptr<T>(new T(CATCH_FORWARD(args)...)); - } + IRegistryHub const& getRegistryHub(); + IMutableRegistryHub& getMutableRegistryHub(); + void cleanUp(); + std::string translateActiveException(); +} -} // end namespace Detail -} // end namespace Catch +#endif // CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED + + +#ifndef CATCH_BENCHMARK_STATS_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_HPP_INCLUDED -#endif // CATCH_UNIQUE_PTR_HPP_INCLUDED // Adapted from donated nonius code. @@ -1292,17 +1270,12 @@ namespace Detail { namespace Catch { namespace Benchmark { - template <typename Duration> + template <typename Type> struct Estimate { - Duration point; - Duration lower_bound; - Duration upper_bound; + Type point; + Type lower_bound; + Type upper_bound; double confidence_interval; - - template <typename Duration2> - operator Estimate<Duration2>() const { - return { point, lower_bound, upper_bound, confidence_interval }; - } }; } // namespace Benchmark } // namespace Catch @@ -1332,103 +1305,14 @@ namespace Catch { } // namespace Catch #endif // CATCH_OUTLIERS_CLASSIFICATION_HPP_INCLUDED +// The fwd decl & default specialization needs to be seen by VS2017 before +// BenchmarkStats itself, or VS2017 will report compilation error. - -#include <map> #include <string> #include <vector> -#include <iosfwd> namespace Catch { - struct ReporterDescription; - struct ListenerDescription; - struct TagInfo; - struct TestCaseInfo; - class TestCaseHandle; - class IConfig; - class IStream; - enum class ColourMode : std::uint8_t; - - struct ReporterConfig { - ReporterConfig( IConfig const* _fullConfig, - Detail::unique_ptr<IStream> _stream, - ColourMode colourMode, - std::map<std::string, std::string> customOptions ); - - ReporterConfig( ReporterConfig&& ) = default; - ReporterConfig& operator=( ReporterConfig&& ) = default; - ~ReporterConfig(); // = default - - Detail::unique_ptr<IStream> takeStream() &&; - IConfig const* fullConfig() const; - ColourMode colourMode() const; - std::map<std::string, std::string> const& customOptions() const; - - private: - Detail::unique_ptr<IStream> m_stream; - IConfig const* m_fullConfig; - ColourMode m_colourMode; - std::map<std::string, std::string> m_customOptions; - }; - - struct TestRunInfo { - constexpr TestRunInfo(StringRef _name) : name(_name) {} - StringRef name; - }; - - struct AssertionStats { - AssertionStats( AssertionResult const& _assertionResult, - std::vector<MessageInfo> const& _infoMessages, - Totals const& _totals ); - - AssertionStats( AssertionStats const& ) = default; - AssertionStats( AssertionStats && ) = default; - AssertionStats& operator = ( AssertionStats const& ) = delete; - AssertionStats& operator = ( AssertionStats && ) = delete; - - AssertionResult assertionResult; - std::vector<MessageInfo> infoMessages; - Totals totals; - }; - - struct SectionStats { - SectionStats( SectionInfo const& _sectionInfo, - Counts const& _assertions, - double _durationInSeconds, - bool _missingAssertions ); - - SectionInfo sectionInfo; - Counts assertions; - double durationInSeconds; - bool missingAssertions; - }; - - struct TestCaseStats { - TestCaseStats( TestCaseInfo const& _testInfo, - Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, - bool _aborting ); - - TestCaseInfo const * testInfo; - Totals totals; - std::string stdOut; - std::string stdErr; - bool aborting; - }; - - struct TestRunStats { - TestRunStats( TestRunInfo const& _runInfo, - Totals const& _totals, - bool _aborting ); - - TestRunInfo runInfo; - Totals totals; - bool aborting; - }; - - struct BenchmarkInfo { std::string name; double estimatedDuration; @@ -1439,226 +1323,66 @@ namespace Catch { double clockCost; }; - template <class Duration> + // We need to keep template parameter for backwards compatibility, + // but we also do not want to use the template paraneter. + template <class Dummy> struct BenchmarkStats { BenchmarkInfo info; - std::vector<Duration> samples; - Benchmark::Estimate<Duration> mean; - Benchmark::Estimate<Duration> standardDeviation; + std::vector<Benchmark::FDuration> samples; + Benchmark::Estimate<Benchmark::FDuration> mean; + Benchmark::Estimate<Benchmark::FDuration> standardDeviation; Benchmark::OutlierClassification outliers; double outlierVariance; - - template <typename Duration2> - operator BenchmarkStats<Duration2>() const { - std::vector<Duration2> samples2; - samples2.reserve(samples.size()); - for (auto const& sample : samples) { - samples2.push_back(Duration2(sample)); - } - return { - info, - CATCH_MOVE(samples2), - mean, - standardDeviation, - outliers, - outlierVariance, - }; - } }; - //! By setting up its preferences, a reporter can modify Catch2's behaviour - //! in some regards, e.g. it can request Catch2 to capture writes to - //! stdout/stderr during test execution, and pass them to the reporter. - struct ReporterPreferences { - //! Catch2 should redirect writes to stdout and pass them to the - //! reporter - bool shouldRedirectStdOut = false; - //! Catch2 should call `Reporter::assertionEnded` even for passing - //! assertions - bool shouldReportAllAssertions = false; - }; - - /** - * The common base for all reporters and event listeners - * - * Implementing classes must also implement: - * - * //! User-friendly description of the reporter/listener type - * static std::string getDescription() - * - * Generally shouldn't be derived from by users of Catch2 directly, - * instead they should derive from one of the utility bases that - * derive from this class. - */ - class IEventListener { - protected: - //! Derived classes can set up their preferences here - ReporterPreferences m_preferences; - //! The test run's config as filled in from CLI and defaults - IConfig const* m_config; - - public: - IEventListener( IConfig const* config ): m_config( config ) {} - - virtual ~IEventListener(); // = default; - - // Implementing class must also provide the following static methods: - // static std::string getDescription(); - - ReporterPreferences const& getPreferences() const { - return m_preferences; - } - - //! Called when no test cases match provided test spec - virtual void noMatchingTestCases( StringRef unmatchedSpec ) = 0; - //! Called for all invalid test specs from the cli - virtual void reportInvalidTestSpec( StringRef invalidArgument ) = 0; - - /** - * Called once in a testing run before tests are started - * - * Not called if tests won't be run (e.g. only listing will happen) - */ - virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0; - - //! Called _once_ for each TEST_CASE, no matter how many times it is entered - virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0; - //! Called _every time_ a TEST_CASE is entered, including repeats (due to sections) - virtual void testCasePartialStarting( TestCaseInfo const& testInfo, uint64_t partNumber ) = 0; - //! Called when a `SECTION` is being entered. Not called for skipped sections - virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; - - //! Called when user-code is being probed before the actual benchmark runs - virtual void benchmarkPreparing( StringRef benchmarkName ) = 0; - //! Called after probe but before the user-code is being benchmarked - virtual void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) = 0; - //! Called with the benchmark results if benchmark successfully finishes - virtual void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) = 0; - //! Called if running the benchmarks fails for any reason - virtual void benchmarkFailed( StringRef benchmarkName ) = 0; - - //! Called before assertion success/failure is evaluated - virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; - - //! Called after assertion was fully evaluated - virtual void assertionEnded( AssertionStats const& assertionStats ) = 0; - - //! Called after a `SECTION` has finished running - virtual void sectionEnded( SectionStats const& sectionStats ) = 0; - //! Called _every time_ a TEST_CASE is entered, including repeats (due to sections) - virtual void testCasePartialEnded(TestCaseStats const& testCaseStats, uint64_t partNumber ) = 0; - //! Called _once_ for each TEST_CASE, no matter how many times it is entered - virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0; - /** - * Called once after all tests in a testing run are finished - * - * Not called if tests weren't run (e.g. only listings happened) - */ - virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; - - //! Called with test cases that are skipped due to the test run aborting - virtual void skipTest( TestCaseInfo const& testInfo ) = 0; - - //! Called if a fatal error (signal/structured exception) occured - virtual void fatalErrorEncountered( StringRef error ) = 0; - - //! Writes out information about provided reporters using reporter-specific format - virtual void listReporters(std::vector<ReporterDescription> const& descriptions) = 0; - //! Writes out the provided listeners descriptions using reporter-specific format - virtual void listListeners(std::vector<ListenerDescription> const& descriptions) = 0; - //! Writes out information about provided tests using reporter-specific format - virtual void listTests(std::vector<TestCaseHandle> const& tests) = 0; - //! Writes out information about the provided tags using reporter-specific format - virtual void listTags(std::vector<TagInfo> const& tags) = 0; - }; - using IEventListenerPtr = Detail::unique_ptr<IEventListener>; } // end namespace Catch -#endif // CATCH_INTERFACES_REPORTER_HPP_INCLUDED - - -#ifndef CATCH_UNIQUE_NAME_HPP_INCLUDED -#define CATCH_UNIQUE_NAME_HPP_INCLUDED - - +#endif // CATCH_BENCHMARK_STATS_HPP_INCLUDED -/** \file - * Wrapper for the CONFIG configuration option - * - * When generating internal unique names, there are two options. Either - * we mix in the current line number, or mix in an incrementing number. - * We prefer the latter, using `__COUNTER__`, but users might want to - * use the former. - */ - -#ifndef CATCH_CONFIG_COUNTER_HPP_INCLUDED -#define CATCH_CONFIG_COUNTER_HPP_INCLUDED - -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif +// Adapted from donated nonius code. -#if defined( CATCH_INTERNAL_CONFIG_COUNTER ) && \ - !defined( CATCH_CONFIG_NO_COUNTER ) && \ - !defined( CATCH_CONFIG_COUNTER ) -# define CATCH_CONFIG_COUNTER -#endif +#ifndef CATCH_ENVIRONMENT_HPP_INCLUDED +#define CATCH_ENVIRONMENT_HPP_INCLUDED -#endif // CATCH_CONFIG_COUNTER_HPP_INCLUDED -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif +namespace Catch { + namespace Benchmark { + struct EnvironmentEstimate { + FDuration mean; + OutlierClassification outliers; + }; + struct Environment { + EnvironmentEstimate clock_resolution; + EnvironmentEstimate clock_cost; + }; + } // namespace Benchmark +} // namespace Catch -#endif // CATCH_UNIQUE_NAME_HPP_INCLUDED +#endif // CATCH_ENVIRONMENT_HPP_INCLUDED // Adapted from donated nonius code. -#ifndef CATCH_CHRONOMETER_HPP_INCLUDED -#define CATCH_CHRONOMETER_HPP_INCLUDED +#ifndef CATCH_EXECUTION_PLAN_HPP_INCLUDED +#define CATCH_EXECUTION_PLAN_HPP_INCLUDED // Adapted from donated nonius code. -#ifndef CATCH_CLOCK_HPP_INCLUDED -#define CATCH_CLOCK_HPP_INCLUDED - -#include <chrono> -#include <ratio> - -namespace Catch { - namespace Benchmark { - template <typename Clock> - using ClockDuration = typename Clock::duration; - template <typename Clock> - using FloatDuration = std::chrono::duration<double, typename Clock::period>; +#ifndef CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED +#define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED - template <typename Clock> - using TimePoint = typename Clock::time_point; - using default_clock = std::chrono::steady_clock; - template <typename Clock> - struct now { - TimePoint<Clock> operator()() const { - return Clock::now(); - } - }; +// Adapted from donated nonius code. - using fp_seconds = std::chrono::duration<double, std::ratio<1>>; - } // namespace Benchmark -} // namespace Catch +#ifndef CATCH_CHRONOMETER_HPP_INCLUDED +#define CATCH_CHRONOMETER_HPP_INCLUDED -#endif // CATCH_CLOCK_HPP_INCLUDED // Adapted from donated nonius code. @@ -1666,7 +1390,7 @@ namespace Catch { #ifndef CATCH_OPTIMIZER_HPP_INCLUDED #define CATCH_OPTIMIZER_HPP_INCLUDED -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) # include <atomic> // atomic_thread_fence #endif @@ -1687,16 +1411,23 @@ namespace Catch { namespace Detail { inline void optimizer_barrier() { keep_memory(); } } // namespace Detail -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) +#if defined(_MSVC_VER) #pragma optimize("", off) +#elif defined(__IAR_SYSTEMS_ICC__) +// For IAR the pragma only affects the following function +#pragma optimize=disable +#endif template <typename T> inline void keep_memory(T* p) { // thanks @milleniumbug *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p); } // TODO equivalent keep_memory() +#if defined(_MSVC_VER) #pragma optimize("", on) +#endif namespace Detail { inline void optimizer_barrier() { @@ -1718,7 +1449,7 @@ namespace Catch { template <typename Fn, typename... Args> inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> std::enable_if_t<std::is_same<void, decltype(fn(args...))>::value> { - CATCH_FORWARD(fn) (CATCH_FORWARD(args)...); + CATCH_FORWARD((fn)) (CATCH_FORWARD(args)...); } } // namespace Benchmark } // namespace Catch @@ -1726,33 +1457,6 @@ namespace Catch { #endif // CATCH_OPTIMIZER_HPP_INCLUDED -// Adapted from donated nonius code. - -#ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED -#define CATCH_COMPLETE_INVOKE_HPP_INCLUDED - - - -#ifndef CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED -#define CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED - -namespace Catch { - - //! Used to signal that an assertion macro failed - struct TestFailureException{}; - - /** - * Outlines throwing of `TestFailureException` into a single TU - * - * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. - */ - [[noreturn]] void throw_test_failure_exception(); - -} // namespace Catch - -#endif // CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED - - #ifndef CATCH_META_HPP_INCLUDED #define CATCH_META_HPP_INCLUDED @@ -1794,112 +1498,6 @@ namespace mpl_{ #endif // CATCH_META_HPP_INCLUDED - -#ifndef CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED -#define CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED - - -#include <string> - -namespace Catch { - - class TestCaseHandle; - struct TestCaseInfo; - class ITestCaseRegistry; - class IExceptionTranslatorRegistry; - class IExceptionTranslator; - class IReporterRegistry; - class IReporterFactory; - class ITagAliasRegistry; - class ITestInvoker; - class IMutableEnumValuesRegistry; - struct SourceLineInfo; - - class StartupExceptionRegistry; - class EventListenerFactory; - - using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; - - class IRegistryHub { - public: - virtual ~IRegistryHub(); // = default - - virtual IReporterRegistry const& getReporterRegistry() const = 0; - virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; - virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; - virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; - - - virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; - }; - - class IMutableRegistryHub { - public: - virtual ~IMutableRegistryHub(); // = default - virtual void registerReporter( std::string const& name, IReporterFactoryPtr factory ) = 0; - virtual void registerListener( Detail::unique_ptr<EventListenerFactory> factory ) = 0; - virtual void registerTest(Detail::unique_ptr<TestCaseInfo>&& testInfo, Detail::unique_ptr<ITestInvoker>&& invoker) = 0; - virtual void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) = 0; - virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; - virtual void registerStartupException() noexcept = 0; - virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0; - }; - - IRegistryHub const& getRegistryHub(); - IMutableRegistryHub& getMutableRegistryHub(); - void cleanUp(); - std::string translateActiveException(); - -} - -#endif // CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED - -#include <type_traits> - -namespace Catch { - namespace Benchmark { - namespace Detail { - template <typename T> - struct CompleteType { using type = T; }; - template <> - struct CompleteType<void> { struct type {}; }; - - template <typename T> - using CompleteType_t = typename CompleteType<T>::type; - - template <typename Result> - struct CompleteInvoker { - template <typename Fun, typename... Args> - static Result invoke(Fun&& fun, Args&&... args) { - return CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); - } - }; - template <> - struct CompleteInvoker<void> { - template <typename Fun, typename... Args> - static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) { - CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); - return {}; - } - }; - - // invoke and not return void :( - template <typename Fun, typename... Args> - CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) { - return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(CATCH_FORWARD(fun), CATCH_FORWARD(args)...); - } - - } // namespace Detail - - template <typename Fun> - Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) { - return Detail::complete_invoke(CATCH_FORWARD(fun)); - } - } // namespace Benchmark -} // namespace Catch - -#endif // CATCH_COMPLETE_INVOKE_HPP_INCLUDED - namespace Catch { namespace Benchmark { namespace Detail { @@ -1917,7 +1515,10 @@ namespace Catch { void start() override { started = Clock::now(); } void finish() override { finished = Clock::now(); } - ClockDuration<Clock> elapsed() const { return finished - started; } + IDuration elapsed() const { + return std::chrono::duration_cast<std::chrono::nanoseconds>( + finished - started ); + } TimePoint<Clock> started; TimePoint<Clock> finished; @@ -1958,50 +1559,6 @@ namespace Catch { #endif // CATCH_CHRONOMETER_HPP_INCLUDED - -// Adapted from donated nonius code. - -#ifndef CATCH_ENVIRONMENT_HPP_INCLUDED -#define CATCH_ENVIRONMENT_HPP_INCLUDED - - -namespace Catch { - namespace Benchmark { - template <typename Duration> - struct EnvironmentEstimate { - Duration mean; - OutlierClassification outliers; - - template <typename Duration2> - operator EnvironmentEstimate<Duration2>() const { - return { mean, outliers }; - } - }; - template <typename Clock> - struct Environment { - using clock_type = Clock; - EnvironmentEstimate<FloatDuration<Clock>> clock_resolution; - EnvironmentEstimate<FloatDuration<Clock>> clock_cost; - }; - } // namespace Benchmark -} // namespace Catch - -#endif // CATCH_ENVIRONMENT_HPP_INCLUDED - - -// Adapted from donated nonius code. - -#ifndef CATCH_EXECUTION_PLAN_HPP_INCLUDED -#define CATCH_EXECUTION_PLAN_HPP_INCLUDED - - - -// Adapted from donated nonius code. - -#ifndef CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED -#define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED - - #include <type_traits> namespace Catch { @@ -2140,6 +1697,57 @@ namespace Catch { // Adapted from donated nonius code. +#ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED +#define CATCH_COMPLETE_INVOKE_HPP_INCLUDED + + +namespace Catch { + namespace Benchmark { + namespace Detail { + template <typename T> + struct CompleteType { using type = T; }; + template <> + struct CompleteType<void> { struct type {}; }; + + template <typename T> + using CompleteType_t = typename CompleteType<T>::type; + + template <typename Result> + struct CompleteInvoker { + template <typename Fun, typename... Args> + static Result invoke(Fun&& fun, Args&&... args) { + return CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); + } + }; + template <> + struct CompleteInvoker<void> { + template <typename Fun, typename... Args> + static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) { + CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); + return {}; + } + }; + + // invoke and not return void :( + template <typename Fun, typename... Args> + CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) { + return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(CATCH_FORWARD(fun), CATCH_FORWARD(args)...); + } + + } // namespace Detail + + template <typename Fun> + Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) { + return Detail::complete_invoke(CATCH_FORWARD(fun)); + } + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_COMPLETE_INVOKE_HPP_INCLUDED + + +// Adapted from donated nonius code. + #ifndef CATCH_TIMING_HPP_INCLUDED #define CATCH_TIMING_HPP_INCLUDED @@ -2148,14 +1756,14 @@ namespace Catch { namespace Catch { namespace Benchmark { - template <typename Duration, typename Result> + template <typename Result> struct Timing { - Duration elapsed; + IDuration elapsed; Result result; int iterations; }; - template <typename Clock, typename Func, typename... Args> - using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; + template <typename Func, typename... Args> + using TimingOf = Timing<Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; } // namespace Benchmark } // namespace Catch @@ -2165,7 +1773,7 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun, typename... Args> - TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) { + TimingOf<Fun, Args...> measure(Fun&& fun, Args&&... args) { auto start = Clock::now(); auto&& r = Detail::complete_invoke(fun, CATCH_FORWARD(args)...); auto end = Clock::now(); @@ -2184,11 +1792,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<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<Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) { Detail::ChronometerModel<Clock> meter; auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); @@ -2203,8 +1811,8 @@ namespace Catch { void throw_optimized_away_error(); template <typename Clock, typename Fun> - TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> - run_for_at_least(ClockDuration<Clock> how_long, + TimingOf<Fun, run_for_at_least_argument_t<Clock, Fun>> + run_for_at_least(IDuration how_long, const int initial_iterations, Fun&& fun) { auto iters = initial_iterations; @@ -2224,38 +1832,38 @@ namespace Catch { #endif // CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED -#include <algorithm> -#include <iterator> +#include <vector> namespace Catch { namespace Benchmark { - template <typename Duration> struct ExecutionPlan { int iterations_per_sample; - Duration estimated_duration; + FDuration estimated_duration; Detail::BenchmarkFunction benchmark; - Duration warmup_time; + FDuration warmup_time; int warmup_iterations; - template <typename Duration2> - operator ExecutionPlan<Duration2>() const { - return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations }; - } - template <typename Clock> - std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { + std::vector<FDuration> run(const IConfig &cfg, Environment env) const { // warmup a bit - Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{})); + Detail::run_for_at_least<Clock>( + std::chrono::duration_cast<IDuration>( warmup_time ), + warmup_iterations, + Detail::repeat( []() { return Clock::now(); } ) + ); - std::vector<FloatDuration<Clock>> times; - times.reserve(cfg.benchmarkSamples()); - std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] { + std::vector<FDuration> times; + const auto num_samples = cfg.benchmarkSamples(); + times.reserve( num_samples ); + for ( size_t i = 0; i < num_samples; ++i ) { Detail::ChronometerModel<Clock> model; - this->benchmark(Chronometer(model, iterations_per_sample)); + this->benchmark( Chronometer( model, iterations_per_sample ) ); auto sample_time = model.elapsed() - env.clock_cost.mean; - if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero(); - return sample_time / iterations_per_sample; - }); + if ( sample_time < FDuration::zero() ) { + sample_time = FDuration::zero(); + } + times.push_back(sample_time / iterations_per_sample); + } return times; } }; @@ -2278,122 +1886,35 @@ namespace Catch { #define CATCH_STATS_HPP_INCLUDED -#include <algorithm> #include <vector> -#include <numeric> -#include <tuple> -#include <cmath> namespace Catch { namespace Benchmark { namespace Detail { using sample = std::vector<double>; - // Used when we know we want == comparison of two doubles - // to centralize warning suppression - bool directCompare( double lhs, double rhs ); - - double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last); - - template <typename Iterator> - OutlierClassification classify_outliers(Iterator first, Iterator last) { - std::vector<double> copy(first, last); - - auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end()); - auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end()); - auto iqr = q3 - q1; - auto los = q1 - (iqr * 3.); - auto lom = q1 - (iqr * 1.5); - auto him = q3 + (iqr * 1.5); - auto his = q3 + (iqr * 3.); - - OutlierClassification o; - for (; first != last; ++first) { - auto&& t = *first; - if (t < los) ++o.low_severe; - else if (t < lom) ++o.low_mild; - else if (t > his) ++o.high_severe; - else if (t > him) ++o.high_mild; - ++o.samples_seen; - } - return o; - } - - template <typename Iterator> - double mean(Iterator first, Iterator last) { - auto count = last - first; - double sum = std::accumulate(first, last, 0.); - return sum / static_cast<double>(count); - } + double weighted_average_quantile( int k, + int q, + double* first, + double* last ); - template <typename Estimator, typename Iterator> - sample jackknife(Estimator&& estimator, Iterator first, Iterator last) { - auto n = static_cast<size_t>(last - first); - auto second = first; - ++second; - sample results; - results.reserve(n); + OutlierClassification + classify_outliers( double const* first, double const* last ); - for (auto it = first; it != last; ++it) { - std::iter_swap(it, first); - results.push_back(estimator(second, last)); - } + double mean( double const* first, double const* last ); - return results; - } - - inline double normal_cdf(double x) { - return std::erfc(-x / std::sqrt(2.0)) / 2.0; - } + double normal_cdf( double x ); double erfc_inv(double x); double normal_quantile(double p); - template <typename Iterator, typename Estimator> - Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) { - auto n_samples = last - first; - - double point = estimator(first, last); - // Degenerate case with a single sample - if (n_samples == 1) return { point, point, point, confidence_level }; - - sample jack = jackknife(estimator, first, last); - double jack_mean = mean(jack.begin(), jack.end()); - double sum_squares, sum_cubes; - std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> { - auto d = jack_mean - x; - auto d2 = d * d; - auto d3 = d2 * d; - return { sqcb.first + d2, sqcb.second + d3 }; - }); - - double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5)); - long n = static_cast<long>(resample.size()); - double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / static_cast<double>(n); - // degenerate case with uniform samples - if ( directCompare( prob_n, 0. ) ) { - return { point, point, point, confidence_level }; - } - - double bias = normal_quantile(prob_n); - double z1 = normal_quantile((1. - confidence_level) / 2.); - - auto cumn = [n]( double x ) -> long { - return std::lround( normal_cdf( x ) * static_cast<double>(n) ); - }; - auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); }; - double b1 = bias + z1; - double b2 = bias - z1; - double a1 = a(b1); - double a2 = a(b2); - auto lo = static_cast<size_t>((std::max)(cumn(a1), 0l)); - auto hi = static_cast<size_t>((std::min)(cumn(a2), n - 1)); - - return { point, resample[lo], resample[hi], confidence_level }; - } - - double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n); + Estimate<double> + bootstrap( double confidence_level, + double* first, + double* last, + sample const& resample, + double ( *estimator )( double const*, double const* ) ); struct bootstrap_analysis { Estimate<double> mean; @@ -2401,7 +1922,10 @@ namespace Catch { double outlier_variance; }; - bootstrap_analysis analyse_samples(double confidence_level, unsigned int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last); + bootstrap_analysis analyse_samples(double confidence_level, + unsigned int n_resamples, + double* first, + double* last); } // namespace Detail } // namespace Benchmark } // namespace Catch @@ -2409,7 +1933,6 @@ namespace Catch { #endif // CATCH_STATS_HPP_INCLUDED #include <algorithm> -#include <iterator> #include <vector> #include <cmath> @@ -2420,46 +1943,49 @@ namespace Catch { std::vector<double> resolution(int k) { std::vector<TimePoint<Clock>> times; times.reserve(static_cast<size_t>(k + 1)); - std::generate_n(std::back_inserter(times), k + 1, now<Clock>{}); + for ( int i = 0; i < k + 1; ++i ) { + times.push_back( Clock::now() ); + } std::vector<double> deltas; deltas.reserve(static_cast<size_t>(k)); - std::transform(std::next(times.begin()), times.end(), times.begin(), - std::back_inserter(deltas), - [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); }); + for ( size_t idx = 1; idx < times.size(); ++idx ) { + deltas.push_back( static_cast<double>( + ( times[idx] - times[idx - 1] ).count() ) ); + } return deltas; } - const auto warmup_iterations = 10000; - const auto warmup_time = std::chrono::milliseconds(100); - const auto minimum_ticks = 1000; - const auto warmup_seed = 10000; - const auto clock_resolution_estimation_time = std::chrono::milliseconds(500); - const auto clock_cost_estimation_time_limit = std::chrono::seconds(1); - const auto clock_cost_estimation_tick_limit = 100000; - const auto clock_cost_estimation_time = std::chrono::milliseconds(10); - const auto clock_cost_estimation_iterations = 10000; + constexpr auto warmup_iterations = 10000; + constexpr auto warmup_time = std::chrono::milliseconds(100); + constexpr auto minimum_ticks = 1000; + constexpr auto warmup_seed = 10000; + constexpr auto clock_resolution_estimation_time = std::chrono::milliseconds(500); + constexpr auto clock_cost_estimation_time_limit = std::chrono::seconds(1); + constexpr auto clock_cost_estimation_tick_limit = 100000; + constexpr auto clock_cost_estimation_time = std::chrono::milliseconds(10); + constexpr auto clock_cost_estimation_iterations = 10000; template <typename Clock> int warmup() { - return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>) + return run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(warmup_time), warmup_seed, &resolution<Clock>) .iterations; } template <typename Clock> - EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) { - auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>) + EnvironmentEstimate estimate_clock_resolution(int iterations) { + auto r = run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(clock_resolution_estimation_time), iterations, &resolution<Clock>) .result; return { - FloatDuration<Clock>(mean(r.begin(), r.end())), - classify_outliers(r.begin(), r.end()), + FDuration(mean(r.data(), r.data() + r.size())), + classify_outliers(r.data(), r.data() + r.size()), }; } template <typename Clock> - EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) { + EnvironmentEstimate estimate_clock_cost(FDuration resolution) { auto time_limit = (std::min)( resolution * clock_cost_estimation_tick_limit, - FloatDuration<Clock>(clock_cost_estimation_time_limit)); + FDuration(clock_cost_estimation_time_limit)); auto time_clock = [](int k) { return Detail::measure<Clock>([k] { for (int i = 0; i < k; ++i) { @@ -2470,26 +1996,28 @@ namespace Catch { }; time_clock(1); int iters = clock_cost_estimation_iterations; - auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock); + auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(clock_cost_estimation_time), iters, time_clock); std::vector<double> times; int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed)); times.reserve(static_cast<size_t>(nsamples)); - std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] { - return static_cast<double>((time_clock(r.iterations) / r.iterations).count()); - }); + for ( int s = 0; s < nsamples; ++s ) { + times.push_back( static_cast<double>( + ( time_clock( r.iterations ) / r.iterations ) + .count() ) ); + } return { - FloatDuration<Clock>(mean(times.begin(), times.end())), - classify_outliers(times.begin(), times.end()), + FDuration(mean(times.data(), times.data() + times.size())), + classify_outliers(times.data(), times.data() + times.size()), }; } template <typename Clock> - Environment<FloatDuration<Clock>> measure_environment() { + Environment measure_environment() { #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wexit-time-destructors" #endif - static Catch::Detail::unique_ptr<Environment<FloatDuration<Clock>>> env; + static Catch::Detail::unique_ptr<Environment> env; #if defined(__clang__) # pragma clang diagnostic pop #endif @@ -2501,7 +2029,7 @@ namespace Catch { auto resolution = Detail::estimate_clock_resolution<Clock>(iters); auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean); - env = Catch::Detail::make_unique<Environment<FloatDuration<Clock>>>( Environment<FloatDuration<Clock>>{resolution, cost} ); + env = Catch::Detail::make_unique<Environment>( Environment{resolution, cost} ); return *env; } } // namespace Detail @@ -2524,95 +2052,29 @@ namespace Catch { #define CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED -#include <algorithm> #include <vector> -#include <iterator> namespace Catch { namespace Benchmark { - template <typename Duration> struct SampleAnalysis { - std::vector<Duration> samples; - Estimate<Duration> mean; - Estimate<Duration> standard_deviation; + std::vector<FDuration> samples; + Estimate<FDuration> mean; + Estimate<FDuration> standard_deviation; OutlierClassification outliers; double outlier_variance; - - template <typename Duration2> - operator SampleAnalysis<Duration2>() const { - std::vector<Duration2> samples2; - samples2.reserve(samples.size()); - std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); }); - return { - CATCH_MOVE(samples2), - mean, - standard_deviation, - outliers, - outlier_variance, - }; - } }; } // namespace Benchmark } // namespace Catch #endif // CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED -#include <algorithm> -#include <iterator> -#include <vector> namespace Catch { + class IConfig; + namespace Benchmark { namespace Detail { - template <typename Duration, typename Iterator> - SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) { - if (!cfg.benchmarkNoAnalysis()) { - std::vector<double> samples; - samples.reserve(static_cast<size_t>(last - first)); - std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); }); - - auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end()); - auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end()); - - auto wrap_estimate = [](Estimate<double> e) { - return Estimate<Duration> { - Duration(e.point), - Duration(e.lower_bound), - Duration(e.upper_bound), - e.confidence_interval, - }; - }; - std::vector<Duration> samples2; - samples2.reserve(samples.size()); - std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); }); - return { - CATCH_MOVE(samples2), - wrap_estimate(analysis.mean), - wrap_estimate(analysis.standard_deviation), - outliers, - analysis.outlier_variance, - }; - } else { - std::vector<Duration> samples; - samples.reserve(static_cast<size_t>(last - first)); - - Duration mean = Duration(0); - int i = 0; - for (auto it = first; it < last; ++it, ++i) { - samples.push_back(Duration(*it)); - mean += Duration(*it); - } - mean /= i; - - return { - CATCH_MOVE(samples), - Estimate<Duration>{mean, mean, mean, 0.0}, - Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0}, - OutlierClassification{}, - 0.0 - }; - } - } + SampleAnalysis analyse(const IConfig &cfg, FDuration* first, FDuration* last); } // namespace Detail } // namespace Benchmark } // namespace Catch @@ -2620,9 +2082,9 @@ namespace Catch { #endif // CATCH_ANALYSE_HPP_INCLUDED #include <algorithm> -#include <functional> +#include <chrono> +#include <exception> #include <string> -#include <vector> #include <cmath> namespace Catch { @@ -2636,16 +2098,18 @@ namespace Catch { : fun(CATCH_MOVE(func)), name(CATCH_MOVE(benchmarkName)) {} template <typename Clock> - ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { + ExecutionPlan prepare(const IConfig &cfg, Environment env) const { auto min_time = env.clock_resolution.mean * Detail::minimum_ticks; auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime())); - auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun); + auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(run_time), 1, fun); int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed)); - return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; + return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FDuration>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; } template <typename Clock = default_clock> void run() { + static_assert( Clock::is_steady, + "Benchmarking clock should be steady" ); auto const* cfg = getCurrentContext().getConfig(); auto env = Detail::measure_environment<Clock>(); @@ -2657,7 +2121,7 @@ namespace Catch { }); BenchmarkInfo info { - name, + CATCH_MOVE(name), plan.estimated_duration.count(), plan.iterations_per_sample, cfg->benchmarkSamples(), @@ -2672,10 +2136,10 @@ namespace Catch { return plan.template run<Clock>(*cfg, env); }); - auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end()); - BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; + auto analysis = Detail::analyse(*cfg, samples.data(), samples.data() + samples.size()); + BenchmarkStats<> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; getResultCapture().benchmarkEnded(stats); - } CATCH_CATCH_ANON (TestFailureException) { + } CATCH_CATCH_ANON (TestFailureException const&) { getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr); } CATCH_CATCH_ALL{ getResultCapture().benchmarkFailed(translateActiveException()); @@ -2843,6 +2307,7 @@ namespace Catch { #ifndef CATCH_CONFIG_WCHAR_HPP_INCLUDED #define CATCH_CONFIG_WCHAR_HPP_INCLUDED + // We assume that WCHAR should be enabled by default, and only disabled // for a shortlist (so far only DJGPP) of compilers. @@ -3066,7 +2531,6 @@ namespace Catch { } // namespace Detail - // If we decide for C++14, change these to enable_if_ts template <typename T, typename = void> struct StringMaker { template <typename Fake = T> @@ -3349,6 +2813,12 @@ namespace Catch { } } }; + template <> + struct StringMaker<std::nullopt_t> { + static std::string convert(const std::nullopt_t&) { + return "{ }"; + } + }; } #endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER @@ -3735,6 +3205,143 @@ struct StringMaker<Catch::Approx> { #endif // CATCH_APPROX_HPP_INCLUDED +#ifndef CATCH_ASSERTION_INFO_HPP_INCLUDED +#define CATCH_ASSERTION_INFO_HPP_INCLUDED + + + +#ifndef CATCH_SOURCE_LINE_INFO_HPP_INCLUDED +#define CATCH_SOURCE_LINE_INFO_HPP_INCLUDED + +#include <cstddef> +#include <iosfwd> + +namespace Catch { + + struct SourceLineInfo { + + SourceLineInfo() = delete; + constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept: + file( _file ), + line( _line ) + {} + + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + + friend std::ostream& operator << (std::ostream& os, SourceLineInfo const& info); + }; +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) ) + +#endif // CATCH_SOURCE_LINE_INFO_HPP_INCLUDED + +namespace Catch { + + struct AssertionInfo { + // AssertionInfo() = delete; + + StringRef macroName; + SourceLineInfo lineInfo; + StringRef capturedExpression; + ResultDisposition::Flags resultDisposition; + }; + +} // end namespace Catch + +#endif // CATCH_ASSERTION_INFO_HPP_INCLUDED + + +#ifndef CATCH_ASSERTION_RESULT_HPP_INCLUDED +#define CATCH_ASSERTION_RESULT_HPP_INCLUDED + + + +#ifndef CATCH_LAZY_EXPR_HPP_INCLUDED +#define CATCH_LAZY_EXPR_HPP_INCLUDED + +#include <iosfwd> + +namespace Catch { + + class ITransientExpression; + + class LazyExpression { + friend class AssertionHandler; + friend struct AssertionStats; + friend class RunContext; + + ITransientExpression const* m_transientExpression = nullptr; + bool m_isNegated; + public: + LazyExpression( bool isNegated ): + m_isNegated(isNegated) + {} + LazyExpression(LazyExpression const& other) = default; + LazyExpression& operator = ( LazyExpression const& ) = delete; + + explicit operator bool() const { + return m_transientExpression != nullptr; + } + + friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&; + }; + +} // namespace Catch + +#endif // CATCH_LAZY_EXPR_HPP_INCLUDED + +#include <string> + +namespace Catch { + + struct AssertionResultData + { + AssertionResultData() = delete; + + AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression ); + + std::string message; + mutable std::string reconstructedExpression; + LazyExpression lazyExpression; + ResultWas::OfType resultType; + + std::string reconstructExpression() const; + }; + + class AssertionResult { + public: + AssertionResult() = delete; + AssertionResult( AssertionInfo const& info, AssertionResultData&& data ); + + bool isOk() const; + bool succeeded() const; + ResultWas::OfType getResultType() const; + bool hasExpression() const; + bool hasMessage() const; + std::string getExpression() const; + std::string getExpressionInMacro() const; + bool hasExpandedExpression() const; + std::string getExpandedExpression() const; + StringRef getMessage() const; + SourceLineInfo getSourceInfo() const; + StringRef getTestMacroName() const; + + //protected: + AssertionInfo m_info; + AssertionResultData m_resultData; + }; + +} // end namespace Catch + +#endif // CATCH_ASSERTION_RESULT_HPP_INCLUDED + + #ifndef CATCH_CONFIG_HPP_INCLUDED #define CATCH_CONFIG_HPP_INCLUDED @@ -3899,6 +3506,7 @@ namespace Catch { #ifndef CATCH_OPTIONAL_HPP_INCLUDED #define CATCH_OPTIONAL_HPP_INCLUDED + #include <cassert> namespace Catch { @@ -3907,35 +3515,50 @@ namespace Catch { template<typename T> class Optional { public: - Optional() : nullableValue( nullptr ) {} - Optional( T const& _value ) - : nullableValue( new( storage ) T( _value ) ) - {} - Optional( Optional const& _other ) - : nullableValue( _other ? new( storage ) T( *_other ) : nullptr ) - {} + Optional(): nullableValue( nullptr ) {} + ~Optional() { reset(); } - ~Optional() { + Optional( T const& _value ): + nullableValue( new ( storage ) T( _value ) ) {} + Optional( T&& _value ): + nullableValue( new ( storage ) T( CATCH_MOVE( _value ) ) ) {} + + Optional& operator=( T const& _value ) { + reset(); + nullableValue = new ( storage ) T( _value ); + return *this; + } + Optional& operator=( T&& _value ) { reset(); + nullableValue = new ( storage ) T( CATCH_MOVE( _value ) ); + return *this; } - Optional& operator= ( Optional const& _other ) { - if( &_other != this ) { + Optional( Optional const& _other ): + nullableValue( _other ? new ( storage ) T( *_other ) : nullptr ) {} + Optional( Optional&& _other ): + nullableValue( _other ? new ( storage ) T( CATCH_MOVE( *_other ) ) + : nullptr ) {} + + Optional& operator=( Optional const& _other ) { + if ( &_other != this ) { reset(); - if( _other ) - nullableValue = new( storage ) T( *_other ); + if ( _other ) { nullableValue = new ( storage ) T( *_other ); } } return *this; } - Optional& operator = ( T const& _value ) { - reset(); - nullableValue = new( storage ) T( _value ); + Optional& operator=( Optional&& _other ) { + if ( &_other != this ) { + reset(); + if ( _other ) { + nullableValue = new ( storage ) T( CATCH_MOVE( *_other ) ); + } + } return *this; } void reset() { - if( nullableValue ) - nullableValue->~T(); + if ( nullableValue ) { nullableValue->~T(); } nullableValue = nullptr; } @@ -3982,7 +3605,7 @@ namespace Catch { } private: - T *nullableValue; + T* nullableValue; alignas(alignof(T)) char storage[sizeof(T)]; }; @@ -4058,6 +3681,7 @@ namespace Catch { Error = BrightRed, Success = Green, + Skip = LightGrey, OriginalExpression = Cyan, ReconstructedExpression = BrightYellow, @@ -4377,6 +4001,29 @@ namespace Catch { + +/** \file + * Wrapper for the CATCH_CONFIG_PREFIX_MESSAGES configuration option + * + * CATCH_CONFIG_PREFIX_ALL can be used to avoid clashes with other macros + * by prepending CATCH_. This may not be desirable if the only clashes are with + * logger macros such as INFO and WARN. In this cases + * CATCH_CONFIG_PREFIX_MESSAGES can be used to only prefix a small subset + * of relevant macros. + * + */ + +#ifndef CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED +#define CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED + + +#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_PREFIX_MESSAGES) + #define CATCH_CONFIG_PREFIX_MESSAGES +#endif + +#endif // CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED + + #ifndef CATCH_STREAM_END_STOP_HPP_INCLUDED #define CATCH_STREAM_END_STOP_HPP_INCLUDED @@ -4388,10 +4035,10 @@ namespace Catch { // as well as // << stuff +StreamEndStop struct StreamEndStop { - StringRef operator+() const { return StringRef(); } + constexpr StringRef operator+() const { return StringRef(); } template <typename T> - friend T const& operator+( T const& value, StreamEndStop ) { + constexpr friend T const& operator+( T const& value, StreamEndStop ) { return value; } }; @@ -4400,12 +4047,47 @@ namespace Catch { #endif // CATCH_STREAM_END_STOP_HPP_INCLUDED + +#ifndef CATCH_MESSAGE_INFO_HPP_INCLUDED +#define CATCH_MESSAGE_INFO_HPP_INCLUDED + + +#include <string> + +namespace Catch { + + struct MessageInfo { + MessageInfo( StringRef _macroName, + SourceLineInfo const& _lineInfo, + ResultWas::OfType _type ); + + StringRef macroName; + std::string message; + SourceLineInfo lineInfo; + ResultWas::OfType type; + unsigned int sequence; + + bool operator == (MessageInfo const& other) const { + return sequence == other.sequence; + } + bool operator < (MessageInfo const& other) const { + return sequence < other.sequence; + } + private: + static unsigned int globalCount; + }; + +} // end namespace Catch + +#endif // CATCH_MESSAGE_INFO_HPP_INCLUDED + #include <string> #include <vector> namespace Catch { struct SourceLineInfo; + class IResultCapture; struct MessageStream { @@ -4424,11 +4106,10 @@ namespace Catch { ResultWas::OfType type ): m_info(macroName, lineInfo, type) {} - template<typename T> - MessageBuilder& operator << ( T const& value ) { + MessageBuilder&& operator << ( T const& value ) && { m_stream << value; - return *this; + return CATCH_MOVE(*this); } MessageInfo m_info; @@ -4436,7 +4117,7 @@ namespace Catch { class ScopedMessage { public: - explicit ScopedMessage( MessageBuilder const& builder ); + explicit ScopedMessage( MessageBuilder&& builder ); ScopedMessage( ScopedMessage& duplicate ) = delete; ScopedMessage( ScopedMessage&& old ) noexcept; ~ScopedMessage(); @@ -4447,7 +4128,7 @@ namespace Catch { class Capturer { std::vector<MessageInfo> m_messages; - IResultCapture& m_resultCapture = getResultCapture(); + IResultCapture& m_resultCapture; size_t m_captured = 0; public: Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ); @@ -4483,7 +4164,10 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \ - Catch::Capturer varName( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \ + Catch::Capturer varName( macroName##_catch_sr, \ + CATCH_INTERNAL_LINEINFO, \ + Catch::ResultWas::Info, \ + #__VA_ARGS__##_catch_sr ); \ varName.captureValues( 0, __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// @@ -4495,28 +4179,28 @@ namespace Catch { Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) -#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) +#if defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) #define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg ) #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE", __VA_ARGS__ ) -#elif defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) +#elif defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) #define CATCH_INFO( msg ) (void)(0) #define CATCH_UNSCOPED_INFO( msg ) (void)(0) #define CATCH_WARN( msg ) (void)(0) #define CATCH_CAPTURE( ... ) (void)(0) -#elif !defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) #define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg ) #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) #define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE", __VA_ARGS__ ) -#elif !defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) #define INFO( msg ) (void)(0) #define UNSCOPED_INFO( msg ) (void)(0) @@ -4531,6 +4215,75 @@ namespace Catch { #endif // CATCH_MESSAGE_HPP_INCLUDED +#ifndef CATCH_SECTION_INFO_HPP_INCLUDED +#define CATCH_SECTION_INFO_HPP_INCLUDED + + + +#ifndef CATCH_TOTALS_HPP_INCLUDED +#define CATCH_TOTALS_HPP_INCLUDED + +#include <cstdint> + +namespace Catch { + + struct Counts { + Counts operator - ( Counts const& other ) const; + Counts& operator += ( Counts const& other ); + + std::uint64_t total() const; + bool allPassed() const; + bool allOk() const; + + std::uint64_t passed = 0; + std::uint64_t failed = 0; + std::uint64_t failedButOk = 0; + std::uint64_t skipped = 0; + }; + + struct Totals { + + Totals operator - ( Totals const& other ) const; + Totals& operator += ( Totals const& other ); + + Totals delta( Totals const& prevTotals ) const; + + Counts assertions; + Counts testCases; + }; +} + +#endif // CATCH_TOTALS_HPP_INCLUDED + +#include <string> + +namespace Catch { + + struct SectionInfo { + // The last argument is ignored, so that people can write + // SECTION("ShortName", "Proper description that is long") and + // still use the `-c` flag comfortably. + SectionInfo( SourceLineInfo const& _lineInfo, std::string _name, + const char* const = nullptr ): + name(CATCH_MOVE(_name)), + lineInfo(_lineInfo) + {} + + std::string name; + SourceLineInfo lineInfo; + }; + + struct SectionEndInfo { + SectionInfo sectionInfo; + Counts prevAssertions; + double durationInSeconds; + }; + +} // end namespace Catch + +#endif // CATCH_SECTION_INFO_HPP_INCLUDED + + #ifndef CATCH_SESSION_HPP_INCLUDED #define CATCH_SESSION_HPP_INCLUDED @@ -5806,11 +5559,10 @@ namespace Catch { namespace Catch { - class IResultCapture; - struct AssertionReaction { bool shouldDebugBreak = false; bool shouldThrow = false; + bool shouldSkip = false; }; class AssertionHandler { @@ -5847,7 +5599,6 @@ namespace Catch { void handleUnexpectedInflightException(); void complete(); - void setCompleted(); // query auto allowThrows() const -> bool; @@ -5859,6 +5610,19 @@ namespace Catch { #endif // CATCH_ASSERTION_HANDLER_HPP_INCLUDED + +#ifndef CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED +#define CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED + + +#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) + #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__##_catch_sr +#else + #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION"_catch_sr +#endif + +#endif // CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED + // We need this suppression to leak, because it took until GCC 10 // for the front end to handle local suppression via _Pragma properly #if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ <= 9 @@ -5867,12 +5631,6 @@ namespace Catch { #if !defined(CATCH_CONFIG_DISABLE) -#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) - #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__ -#else - #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION" -#endif - #if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) /////////////////////////////////////////////////////////////////////////////// @@ -5884,7 +5642,7 @@ namespace Catch { #else // CATCH_CONFIG_FAST_COMPILE #define INTERNAL_CATCH_TRY try -#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); } +#define INTERNAL_CATCH_CATCH( handler ) catch(...) { (handler).handleUnexpectedInflightException(); } #endif @@ -5940,6 +5698,7 @@ namespace Catch { if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(__VA_ARGS__); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ @@ -5960,6 +5719,7 @@ namespace Catch { if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(expr); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ @@ -5986,6 +5746,7 @@ namespace Catch { if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(__VA_ARGS__); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ @@ -6009,6 +5770,34 @@ namespace Catch { + +/** \file + * Wrapper for the STATIC_ANALYSIS_SUPPORT configuration option + * + * Some of Catch2's macros can be defined differently to work better with + * static analysis tools, like clang-tidy or coverity. + * Currently the main use case is to show that `SECTION`s are executed + * exclusively, and not all in one run of a `TEST_CASE`. + */ + +#ifndef CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED +#define CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED + + +#if defined(__clang_analyzer__) || defined(__COVERITY__) + #define CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT +#endif + +#if defined( CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) +# define CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT +#endif + + +#endif // CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED + + #ifndef CATCH_TIMER_HPP_INCLUDED #define CATCH_TIMER_HPP_INCLUDED @@ -6035,6 +5824,9 @@ namespace Catch { class Section : Detail::NonCopyable { public: Section( SectionInfo&& info ); + Section( SourceLineInfo const& _lineInfo, + StringRef _name, + const char* const = nullptr ); ~Section(); // This indicates whether the section should be executed or not @@ -6050,17 +5842,63 @@ namespace Catch { } // end namespace Catch -#define INTERNAL_CATCH_SECTION( ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::Section( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::SectionInfo( \ + CATCH_INTERNAL_LINEINFO, \ + ( Catch::ReusableStringStream() << __VA_ARGS__ ) \ + .str() ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#else + +// These section definitions imply that at most one section at one level +// will be intered (because only one section's __LINE__ can be equal to +// the dummy `catchInternalSectionHint` variable from `TEST_CASE`). + +namespace Catch { + namespace Detail { + // Intentionally without linkage, as it should only be used as a dummy + // symbol for static analysis. + int GetNewSectionHint(); + } // namespace Detail +} // namespace Catch + + +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#endif -#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION #endif // CATCH_SECTION_HPP_INCLUDED @@ -6070,42 +5908,20 @@ namespace Catch { -#ifndef CATCH_INTERFACES_TESTCASE_HPP_INCLUDED -#define CATCH_INTERFACES_TESTCASE_HPP_INCLUDED - -#include <vector> +#ifndef CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED +#define CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED namespace Catch { - class TestSpec; - struct TestCaseInfo; - class ITestInvoker { public: - virtual void invoke () const = 0; + virtual void invoke() const = 0; virtual ~ITestInvoker(); // = default }; - class TestCaseHandle; - class IConfig; - - class ITestCaseRegistry { - public: - virtual ~ITestCaseRegistry(); // = default - // TODO: this exists only for adding filenames to test cases -- let's expose this in a saner way later - virtual std::vector<TestCaseInfo* > const& getAllInfos() const = 0; - virtual std::vector<TestCaseHandle> const& getAllTests() const = 0; - virtual std::vector<TestCaseHandle> const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool isThrowSafe( TestCaseHandle const& testCase, IConfig const& config ); - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector<TestCaseHandle> const& getAllTestCasesSorted( IConfig const& config ); - -} +} // namespace Catch -#endif // CATCH_INTERFACES_TESTCASE_HPP_INCLUDED +#endif // CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED #ifndef CATCH_PREPROCESSOR_REMOVE_PARENS_HPP_INCLUDED @@ -6177,25 +5993,55 @@ struct AutoReg : Detail::NonCopyable { void TestName::test() #endif + +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) + /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ static void TestName(); \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ + namespace{ const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ static void TestName() #define INTERNAL_CATCH_TESTCASE( ... ) \ INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), __VA_ARGS__ ) - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#else // ^^ !CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT | vv CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT + + +// Dummy registrator for the dumy test case macros +namespace Catch { + namespace Detail { + struct DummyUse { + DummyUse( void ( * )( int ) ); + }; + } // namespace Detail +} // namespace Catch + +// Note that both the presence of the argument and its exact name are +// necessary for the section support. + +// We provide a shadowed variable so that a `SECTION` inside non-`TEST_CASE` +// tests can compile. The redefined `TEST_CASE` shadows this with param. +static int catchInternalSectionHint = 0; + +# define INTERNAL_CATCH_TESTCASE2( fname ) \ + static void fname( int ); \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + static const Catch::Detail::DummyUse INTERNAL_CATCH_UNIQUE_NAME( \ + dummyUser )( &(fname) ); \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + static void fname( [[maybe_unused]] int catchInternalSectionHint ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +# define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( dummyFunction ) ) + + +#endif // CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ @@ -6206,13 +6052,33 @@ struct AutoReg : Detail::NonCopyable { struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ void test(); \ }; \ - Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &TestName::test ), \ + CATCH_INTERNAL_LINEINFO, \ + #ClassName##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ } \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ void TestName::test() #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), ClassName, __VA_ARGS__ ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + namespace { \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &QualifiedMethod ), \ + CATCH_INTERNAL_LINEINFO, \ + "&" #QualifiedMethod##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); \ + } /* NOLINT */ \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + + /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ do { \ @@ -6260,6 +6126,7 @@ struct AutoReg : Detail::NonCopyable { #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) @@ -6313,6 +6180,7 @@ struct AutoReg : Detail::NonCopyable { #define CATCH_FAIL( ... ) (void)(0) #define CATCH_FAIL_CHECK( ... ) (void)(0) #define CATCH_SUCCEED( ... ) (void)(0) + #define CATCH_SKIP( ... ) (void)(0) #define CATCH_STATIC_REQUIRE( ... ) (void)(0) #define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0) @@ -6357,6 +6225,7 @@ struct AutoReg : Detail::NonCopyable { #define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) #define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) @@ -6409,6 +6278,7 @@ struct AutoReg : Detail::NonCopyable { #define FAIL( ... ) (void)(0) #define FAIL_CHECK( ... ) (void)(0) #define SUCCEED( ... ) (void)(0) + #define SKIP( ... ) (void)(0) #define STATIC_REQUIRE( ... ) (void)(0) #define STATIC_REQUIRE_FALSE( ... ) (void)(0) @@ -6835,7 +6705,7 @@ struct AutoReg : Detail::NonCopyable { void reg_tests() { \ size_t index = 0; \ using expander = size_t[]; \ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ } \ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -6970,7 +6840,7 @@ struct AutoReg : Detail::NonCopyable { void reg_tests(){\ size_t index = 0;\ using expander = size_t[];\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName##_catch_sr, Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ @@ -7098,6 +6968,7 @@ struct AutoReg : Detail::NonCopyable { +#include <cstdint> #include <string> #include <vector> @@ -7250,6 +7121,10 @@ namespace Catch { #include <exception> namespace Catch { + namespace Detail { + void registerTranslatorImpl( + Detail::unique_ptr<IExceptionTranslator>&& translator ); + } class ExceptionTranslatorRegistrar { template<typename T> @@ -7283,9 +7158,9 @@ namespace Catch { public: template<typename T> ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) { - getMutableRegistryHub().registerTranslator( - Detail::make_unique<ExceptionTranslator<T>>(translateFunction) - ); + Detail::registerTranslatorImpl( + Detail::make_unique<ExceptionTranslator<T>>( + translateFunction ) ); } }; @@ -7357,8 +7232,8 @@ namespace Catch { #define CATCH_VERSION_MACROS_HPP_INCLUDED #define CATCH_VERSION_MAJOR 3 -#define CATCH_VERSION_MINOR 2 -#define CATCH_VERSION_PATCH 1 +#define CATCH_VERSION_MINOR 5 +#define CATCH_VERSION_PATCH 0 #endif // CATCH_VERSION_MACROS_HPP_INCLUDED @@ -7682,37 +7557,47 @@ namespace Detail { return makeGenerators( value( T( CATCH_FORWARD( val ) ) ), CATCH_FORWARD( moreGenerators )... ); } - auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + IGeneratorTracker* acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ); + IGeneratorTracker* createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + GeneratorBasePtr&& generator ); 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( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { + auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> typename decltype(generatorExpression())::type { using UnderlyingType = typename decltype(generatorExpression())::type; - IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); - if (!tracker.hasGenerator()) { - tracker.setGenerator(Catch::Detail::make_unique<Generators<UnderlyingType>>(generatorExpression())); + IGeneratorTracker* tracker = acquireGeneratorTracker( generatorName, lineInfo ); + // Creation of tracker is delayed after generator creation, so + // that constructing generator can fail without breaking everything. + if (!tracker) { + tracker = createGeneratorTracker( + generatorName, + lineInfo, + Catch::Detail::make_unique<Generators<UnderlyingType>>( + generatorExpression() ) ); } - auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() ); + auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker->getGenerator() ); return generator.get(); } } // namespace Generators } // namespace Catch +#define CATCH_INTERNAL_GENERATOR_STRINGIZE_IMPL( ... ) #__VA_ARGS__##_catch_sr +#define CATCH_INTERNAL_GENERATOR_STRINGIZE(...) CATCH_INTERNAL_GENERATOR_STRINGIZE_IMPL(__VA_ARGS__) + #define GENERATE( ... ) \ - Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_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( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_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( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ CATCH_INTERNAL_LINEINFO, \ [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) @@ -8010,7 +7895,550 @@ namespace Catch { #endif // CATCH_RANDOM_NUMBER_GENERATOR_HPP_INCLUDED -#include <random> + + +#ifndef CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED +#define CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED + + + + +#ifndef CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED +#define CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED + +#include <climits> +#include <cstddef> +#include <cstdint> +#include <type_traits> + +namespace Catch { + namespace Detail { + + template <std::size_t> + struct SizedUnsignedType; +#define SizedUnsignedTypeHelper( TYPE ) \ + template <> \ + struct SizedUnsignedType<sizeof( TYPE )> { \ + using type = TYPE; \ + } + + SizedUnsignedTypeHelper( std::uint8_t ); + SizedUnsignedTypeHelper( std::uint16_t ); + SizedUnsignedTypeHelper( std::uint32_t ); + SizedUnsignedTypeHelper( std::uint64_t ); +#undef SizedUnsignedTypeHelper + + template <std::size_t sz> + using SizedUnsignedType_t = typename SizedUnsignedType<sz>::type; + + template <typename T> + using DoubleWidthUnsignedType_t = SizedUnsignedType_t<2 * sizeof( T )>; + + template <typename T> + struct ExtendedMultResult { + T upper; + T lower; + friend bool operator==( ExtendedMultResult const& lhs, + ExtendedMultResult const& rhs ) { + return lhs.upper == rhs.upper && lhs.lower == rhs.lower; + } + }; + + // Returns 128 bit result of multiplying lhs and rhs + constexpr ExtendedMultResult<std::uint64_t> + extendedMult( std::uint64_t lhs, std::uint64_t rhs ) { + // We use the simple long multiplication approach for + // correctness, we can use platform specific builtins + // for performance later. + + // Split the lhs and rhs into two 32bit "digits", so that we can + // do 64 bit arithmetic to handle carry bits. + // 32b 32b 32b 32b + // lhs L1 L2 + // * rhs R1 R2 + // ------------------------ + // | R2 * L2 | + // | R2 * L1 | + // | R1 * L2 | + // | R1 * L1 | + // ------------------------- + // | a | b | c | d | + +#define CarryBits( x ) ( x >> 32 ) +#define Digits( x ) ( x & 0xFF'FF'FF'FF ) + + auto r2l2 = Digits( rhs ) * Digits( lhs ); + auto r2l1 = Digits( rhs ) * CarryBits( lhs ); + auto r1l2 = CarryBits( rhs ) * Digits( lhs ); + auto r1l1 = CarryBits( rhs ) * CarryBits( lhs ); + + // Sum to columns first + auto d = Digits( r2l2 ); + auto c = CarryBits( r2l2 ) + Digits( r2l1 ) + Digits( r1l2 ); + auto b = CarryBits( r2l1 ) + CarryBits( r1l2 ) + Digits( r1l1 ); + auto a = CarryBits( r1l1 ); + + // Propagate carries between columns + c += CarryBits( d ); + b += CarryBits( c ); + a += CarryBits( b ); + + // Remove the used carries + c = Digits( c ); + b = Digits( b ); + a = Digits( a ); + +#undef CarryBits +#undef Digits + + return { + a << 32 | b, // upper 64 bits + c << 32 | d // lower 64 bits + }; + } + + template <typename UInt> + constexpr ExtendedMultResult<UInt> extendedMult( UInt lhs, UInt rhs ) { + static_assert( std::is_unsigned<UInt>::value, + "extendedMult can only handle unsigned integers" ); + static_assert( sizeof( UInt ) < sizeof( std::uint64_t ), + "Generic extendedMult can only handle types smaller " + "than uint64_t" ); + using WideType = DoubleWidthUnsignedType_t<UInt>; + + auto result = WideType( lhs ) * WideType( rhs ); + return { + static_cast<UInt>( result >> ( CHAR_BIT * sizeof( UInt ) ) ), + static_cast<UInt>( result & UInt( -1 ) ) }; + } + + + template <typename TargetType, + typename Generator> + std::enable_if_t<sizeof(typename Generator::result_type) >= sizeof(TargetType), + TargetType> fillBitsFrom(Generator& gen) { + using gresult_type = typename Generator::result_type; + static_assert( std::is_unsigned<TargetType>::value, "Only unsigned integers are supported" ); + static_assert( Generator::min() == 0 && + Generator::max() == static_cast<gresult_type>( -1 ), + "Generator must be able to output all numbers in its result type (effectively it must be a random bit generator)" ); + + // We want to return the top bits from a generator, as they are + // usually considered higher quality. + constexpr auto generated_bits = sizeof( gresult_type ) * CHAR_BIT; + constexpr auto return_bits = sizeof( TargetType ) * CHAR_BIT; + + return static_cast<TargetType>( gen() >> + ( generated_bits - return_bits) ); + } + + template <typename TargetType, + typename Generator> + std::enable_if_t<sizeof(typename Generator::result_type) < sizeof(TargetType), + TargetType> fillBitsFrom(Generator& gen) { + using gresult_type = typename Generator::result_type; + static_assert( std::is_unsigned<TargetType>::value, + "Only unsigned integers are supported" ); + static_assert( Generator::min() == 0 && + Generator::max() == static_cast<gresult_type>( -1 ), + "Generator must be able to output all numbers in its result type (effectively it must be a random bit generator)" ); + + constexpr auto generated_bits = sizeof( gresult_type ) * CHAR_BIT; + constexpr auto return_bits = sizeof( TargetType ) * CHAR_BIT; + std::size_t filled_bits = 0; + TargetType ret = 0; + do { + ret <<= generated_bits; + ret |= gen(); + filled_bits += generated_bits; + } while ( filled_bits < return_bits ); + + return ret; + } + + /* + * Transposes numbers into unsigned type while keeping their ordering + * + * This means that signed types are changed so that the ordering is + * [INT_MIN, ..., -1, 0, ..., INT_MAX], rather than order we would + * get by simple casting ([0, ..., INT_MAX, INT_MIN, ..., -1]) + */ + template <typename OriginalType, typename UnsignedType> + std::enable_if_t<std::is_signed<OriginalType>::value, UnsignedType> + transposeToNaturalOrder( UnsignedType in ) { + static_assert( + sizeof( OriginalType ) == sizeof( UnsignedType ), + "reordering requires the same sized types on both sides" ); + static_assert( std::is_unsigned<UnsignedType>::value, + "Input type must be unsigned" ); + // Assuming 2s complement (standardized in current C++), the + // positive and negative numbers are already internally ordered, + // and their difference is in the top bit. Swapping it orders + // them the desired way. + constexpr auto highest_bit = + UnsignedType( 1 ) << ( sizeof( UnsignedType ) * CHAR_BIT - 1 ); + return static_cast<UnsignedType>( in ^ highest_bit ); + } + + + + template <typename OriginalType, + typename UnsignedType> + std::enable_if_t<std::is_unsigned<OriginalType>::value, UnsignedType> + transposeToNaturalOrder(UnsignedType in) { + static_assert( + sizeof( OriginalType ) == sizeof( UnsignedType ), + "reordering requires the same sized types on both sides" ); + static_assert( std::is_unsigned<UnsignedType>::value, "Input type must be unsigned" ); + // No reordering is needed for unsigned -> unsigned + return in; + } + } // namespace Detail +} // namespace Catch + +#endif // CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED + +namespace Catch { + + namespace Detail { + // Indirection to enable make_unsigned<bool> behaviour. + template <typename T> + struct make_unsigned { + using type = std::make_unsigned_t<T>; + }; + + template <> + struct make_unsigned<bool> { + using type = uint8_t; + }; + + template <typename T> + using make_unsigned_t = typename make_unsigned<T>::type; + } + +/** + * Implementation of uniform distribution on integers. + * + * Unlike `std::uniform_int_distribution`, this implementation supports + * various 1 byte integral types, including bool (but you should not + * actually use it for bools). + * + * The underlying algorithm is based on the one described in "Fast Random + * Integer Generation in an Interval" by Daniel Lemire, but has been + * optimized under the assumption of reuse of the same distribution object. + */ +template <typename IntegerType> +class uniform_integer_distribution { + static_assert(std::is_integral<IntegerType>::value, "..."); + + using UnsignedIntegerType = Detail::make_unsigned_t<IntegerType>; + + // We store the left range bound converted to internal representation, + // because it will be used in computation in the () operator. + UnsignedIntegerType m_a; + // After initialization, right bound is only used for the b() getter, + // so we keep it in the original type. + IntegerType m_b; + + // How many different values are there in [a, b]. a == b => 1, can be 0 for distribution over all values in the type. + UnsignedIntegerType m_ab_distance; + + // We hoisted this out of the main generation function. Technically, + // this means that using this distribution will be slower than Lemire's + // algorithm if this distribution instance will be used only few times, + // but it will be faster if it is used many times. Since Catch2 uses + // distributions only to implement random generators, we assume that each + // distribution will be reused many times and this is an optimization. + UnsignedIntegerType m_rejection_threshold = 0; + + // Assumes m_b and m_a are already filled + UnsignedIntegerType computeDistance() const { + // This overflows and returns 0 if ua == 0 and ub == TYPE_MAX. + // We handle that later when generating the number. + return transposeTo(m_b) - m_a + 1; + } + + static UnsignedIntegerType computeRejectionThreshold(UnsignedIntegerType ab_distance) { + // distance == 0 means that we will return all possible values from + // the type's range, and that we shouldn't reject anything. + if ( ab_distance == 0 ) { return 0; } + return ( ~ab_distance + 1 ) % ab_distance; + } + + static UnsignedIntegerType transposeTo(IntegerType in) { + return Detail::transposeToNaturalOrder<IntegerType>( + static_cast<UnsignedIntegerType>( in ) ); + } + static IntegerType transposeBack(UnsignedIntegerType in) { + return static_cast<IntegerType>( + Detail::transposeToNaturalOrder<IntegerType>(in) ); + } + +public: + using result_type = IntegerType; + + uniform_integer_distribution( IntegerType a, IntegerType b ): + m_a( transposeTo(a) ), + m_b( b ), + m_ab_distance( computeDistance() ), + m_rejection_threshold( computeRejectionThreshold(m_ab_distance) ) { + assert( a <= b ); + } + + template <typename Generator> + result_type operator()( Generator& g ) { + // All possible values of result_type are valid. + if ( m_ab_distance == 0 ) { + return transposeBack( Detail::fillBitsFrom<UnsignedIntegerType>( g ) ); + } + + auto random_number = Detail::fillBitsFrom<UnsignedIntegerType>( g ); + auto emul = Detail::extendedMult( random_number, m_ab_distance ); + // Unlike Lemire's algorithm we skip the ab_distance check, since + // we precomputed the rejection threshold, which is always tighter. + while (emul.lower < m_rejection_threshold) { + random_number = Detail::fillBitsFrom<UnsignedIntegerType>( g ); + emul = Detail::extendedMult( random_number, m_ab_distance ); + } + + return transposeBack(m_a + emul.upper); + } + + result_type a() const { return transposeBack(m_a); } + result_type b() const { return m_b; } +}; + +} // end namespace Catch + +#endif // CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED + + + +#ifndef CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED +#define CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED + + + + +#ifndef CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED +#define CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED + + + +#ifndef CATCH_POLYFILLS_HPP_INCLUDED +#define CATCH_POLYFILLS_HPP_INCLUDED + +namespace Catch { + + bool isnan(float f); + bool isnan(double d); + + float nextafter(float x, float y); + double nextafter(double x, double y); + +} + +#endif // CATCH_POLYFILLS_HPP_INCLUDED + +#include <cassert> +#include <cmath> +#include <cstdint> +#include <limits> +#include <type_traits> + +namespace Catch { + + namespace Detail { + /** + * Returns the largest magnitude of 1-ULP distance inside the [a, b] range. + * + * Assumes `a < b`. + */ + template <typename FloatType> + FloatType gamma(FloatType a, FloatType b) { + static_assert( std::is_floating_point<FloatType>::value, + "gamma returns the largest ULP magnitude within " + "floating point range [a, b]. This only makes sense " + "for floating point types" ); + assert( a <= b ); + + const auto gamma_up = Catch::nextafter( a, std::numeric_limits<FloatType>::infinity() ) - a; + const auto gamma_down = b - Catch::nextafter( b, -std::numeric_limits<FloatType>::infinity() ); + + return gamma_up < gamma_down ? gamma_down : gamma_up; + } + + template <typename FloatingPoint> + struct DistanceTypePicker; + template <> + struct DistanceTypePicker<float> { + using type = std::uint32_t; + }; + template <> + struct DistanceTypePicker<double> { + using type = std::uint64_t; + }; + + template <typename T> + using DistanceType = typename DistanceTypePicker<T>::type; + +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + /** + * Computes the number of equi-distant floats in [a, b] + * + * Since not every range can be split into equidistant floats + * exactly, we actually compute ceil(b/distance - a/distance), + * because in those cases we want to overcount. + * + * Uses modified Dekker's FastTwoSum algorithm to handle rounding. + */ + template <typename FloatType> + DistanceType<FloatType> + count_equidistant_floats( FloatType a, FloatType b, FloatType distance ) { + assert( a <= b ); + // We get distance as gamma for our uniform float distribution, + // so this will round perfectly. + const auto ag = a / distance; + const auto bg = b / distance; + + const auto s = bg - ag; + const auto err = ( std::fabs( a ) <= std::fabs( b ) ) + ? -ag - ( s - bg ) + : bg - ( s + ag ); + const auto ceil_s = static_cast<DistanceType<FloatType>>( std::ceil( s ) ); + + return ( ceil_s != s ) ? ceil_s : ceil_s + ( err > 0 ); + } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + + } + +} // end namespace Catch + +#endif // CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED + +#include <cmath> +#include <type_traits> + +namespace Catch { + + namespace Detail { +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + // The issue with overflow only happens with maximal ULP and HUGE + // distance, e.g. when generating numbers in [-inf, inf] for given + // type. So we only check for the largest possible ULP in the + // type, and return something that does not overflow to inf in 1 mult. + constexpr std::uint64_t calculate_max_steps_in_one_go(double gamma) { + if ( gamma == 1.99584030953472e+292 ) { return 9007199254740991; } + return static_cast<std::uint64_t>( -1 ); + } + constexpr std::uint32_t calculate_max_steps_in_one_go(float gamma) { + if ( gamma == 2.028241e+31f ) { return 16777215; } + return static_cast<std::uint32_t>( -1 ); + } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + } + +/** + * Implementation of uniform distribution on floating point numbers. + * + * Note that we support only `float` and `double` types, because these + * usually mean the same thing across different platform. `long double` + * varies wildly by platform and thus we cannot provide reproducible + * implementation. Also note that we don't implement all parts of + * distribution per standard: this distribution is not serializable, nor + * can the range be arbitrarily reset. + * + * The implementation also uses different approach than the one taken by + * `std::uniform_real_distribution`, where instead of generating a number + * between [0, 1) and then multiplying the range bounds with it, we first + * split the [a, b] range into a set of equidistributed floating point + * numbers, and then use uniform int distribution to pick which one to + * return. + * + * This has the advantage of guaranteeing uniformity (the multiplication + * method loses uniformity due to rounding when multiplying floats), except + * for small non-uniformity at one side of the interval, where we have + * to deal with the fact that not every interval is splittable into + * equidistributed floats. + * + * Based on "Drawing random floating-point numbers from an interval" by + * Frederic Goualard. + */ +template <typename FloatType> +class uniform_floating_point_distribution { + static_assert(std::is_floating_point<FloatType>::value, "..."); + static_assert(!std::is_same<FloatType, long double>::value, + "We do not support long double due to inconsistent behaviour between platforms"); + + using WidthType = Detail::DistanceType<FloatType>; + + FloatType m_a, m_b; + FloatType m_ulp_magnitude; + WidthType m_floats_in_range; + uniform_integer_distribution<WidthType> m_int_dist; + + // In specific cases, we can overflow into `inf` when computing the + // `steps * g` offset. To avoid this, we don't offset by more than this + // in one multiply + addition. + WidthType m_max_steps_in_one_go; + // We don't want to do the magnitude check every call to `operator()` + bool m_a_has_leq_magnitude; + +public: + using result_type = FloatType; + + uniform_floating_point_distribution( FloatType a, FloatType b ): + m_a( a ), + m_b( b ), + m_ulp_magnitude( Detail::gamma( m_a, m_b ) ), + m_floats_in_range( Detail::count_equidistant_floats( m_a, m_b, m_ulp_magnitude ) ), + m_int_dist(0, m_floats_in_range), + m_max_steps_in_one_go( Detail::calculate_max_steps_in_one_go(m_ulp_magnitude)), + m_a_has_leq_magnitude(std::fabs(m_a) <= std::fabs(m_b)) + { + assert( a <= b ); + } + + template <typename Generator> + result_type operator()( Generator& g ) { + WidthType steps = m_int_dist( g ); + if ( m_a_has_leq_magnitude ) { + if ( steps == m_floats_in_range ) { return m_a; } + auto b = m_b; + while (steps > m_max_steps_in_one_go) { + b -= m_max_steps_in_one_go * m_ulp_magnitude; + steps -= m_max_steps_in_one_go; + } + return b - steps * m_ulp_magnitude; + } else { + if ( steps == m_floats_in_range ) { return m_b; } + auto a = m_a; + while (steps > m_max_steps_in_one_go) { + a += m_max_steps_in_one_go * m_ulp_magnitude; + steps -= m_max_steps_in_one_go; + } + return a + steps * m_ulp_magnitude; + } + } + + result_type a() const { return m_a; } + result_type b() const { return m_b; } +}; + +} // end namespace Catch + +#endif // CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED namespace Catch { namespace Generators { @@ -8024,7 +8452,7 @@ namespace Detail { template <typename Float> class RandomFloatingGenerator final : public IGenerator<Float> { Catch::SimplePcg32 m_rng; - std::uniform_real_distribution<Float> m_dist; + Catch::uniform_floating_point_distribution<Float> m_dist; Float m_current_number; public: RandomFloatingGenerator( Float a, Float b, std::uint32_t seed ): @@ -8042,10 +8470,27 @@ public: } }; +template <> +class RandomFloatingGenerator<long double> final : public IGenerator<long double> { + // We still rely on <random> for this specialization, but we don't + // want to drag it into the header. + struct PImpl; + Catch::Detail::unique_ptr<PImpl> m_pimpl; + long double m_current_number; + +public: + RandomFloatingGenerator( long double a, long double b, std::uint32_t seed ); + + long double const& get() const override { return m_current_number; } + bool next() override; + + ~RandomFloatingGenerator() override; // = default +}; + template <typename Integer> class RandomIntegerGenerator final : public IGenerator<Integer> { Catch::SimplePcg32 m_rng; - std::uniform_int_distribution<Integer> m_dist; + Catch::uniform_integer_distribution<Integer> m_dist; Integer m_current_number; public: RandomIntegerGenerator( Integer a, Integer b, std::uint32_t seed ): @@ -8066,14 +8511,6 @@ public: template <typename T> std::enable_if_t<std::is_integral<T>::value, GeneratorWrapper<T>> random(T a, T b) { - static_assert( - !std::is_same<T, char>::value && - !std::is_same<T, int8_t>::value && - !std::is_same<T, uint8_t>::value && - !std::is_same<T, signed char>::value && - !std::is_same<T, unsigned char>::value && - !std::is_same<T, bool>::value, - "The requested type is not supported by the underlying random distributions from std" ); return GeneratorWrapper<T>( Catch::Detail::make_unique<RandomIntegerGenerator<T>>(a, b, Detail::getSeed()) ); @@ -8186,10 +8623,11 @@ GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) { return GeneratorWrapper<ResultType>(Catch::Detail::make_unique<IteratorGenerator<ResultType>>(from, to)); } -template <typename Container, - typename ResultType = typename Container::value_type> -GeneratorWrapper<ResultType> from_range(Container const& cnt) { - return GeneratorWrapper<ResultType>(Catch::Detail::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end())); +template <typename Container> +auto from_range(Container const& cnt) { + using std::begin; + using std::end; + return from_range( begin( cnt ), end( cnt ) ); } @@ -8221,6 +8659,232 @@ GeneratorWrapper<ResultType> from_range(Container const& cnt) { +#ifndef CATCH_INTERFACES_REPORTER_HPP_INCLUDED +#define CATCH_INTERFACES_REPORTER_HPP_INCLUDED + + + +#ifndef CATCH_TEST_RUN_INFO_HPP_INCLUDED +#define CATCH_TEST_RUN_INFO_HPP_INCLUDED + + +namespace Catch { + + struct TestRunInfo { + constexpr TestRunInfo(StringRef _name) : name(_name) {} + StringRef name; + }; + +} // end namespace Catch + +#endif // CATCH_TEST_RUN_INFO_HPP_INCLUDED + +#include <map> +#include <string> +#include <vector> +#include <iosfwd> + +namespace Catch { + + struct ReporterDescription; + struct ListenerDescription; + struct TagInfo; + struct TestCaseInfo; + class TestCaseHandle; + class IConfig; + class IStream; + enum class ColourMode : std::uint8_t; + + struct ReporterConfig { + ReporterConfig( IConfig const* _fullConfig, + Detail::unique_ptr<IStream> _stream, + ColourMode colourMode, + std::map<std::string, std::string> customOptions ); + + ReporterConfig( ReporterConfig&& ) = default; + ReporterConfig& operator=( ReporterConfig&& ) = default; + ~ReporterConfig(); // = default + + Detail::unique_ptr<IStream> takeStream() &&; + IConfig const* fullConfig() const; + ColourMode colourMode() const; + std::map<std::string, std::string> const& customOptions() const; + + private: + Detail::unique_ptr<IStream> m_stream; + IConfig const* m_fullConfig; + ColourMode m_colourMode; + std::map<std::string, std::string> m_customOptions; + }; + + struct AssertionStats { + AssertionStats( AssertionResult const& _assertionResult, + std::vector<MessageInfo> const& _infoMessages, + Totals const& _totals ); + + AssertionStats( AssertionStats const& ) = default; + AssertionStats( AssertionStats && ) = default; + AssertionStats& operator = ( AssertionStats const& ) = delete; + AssertionStats& operator = ( AssertionStats && ) = delete; + + AssertionResult assertionResult; + std::vector<MessageInfo> infoMessages; + Totals totals; + }; + + struct SectionStats { + SectionStats( SectionInfo&& _sectionInfo, + Counts const& _assertions, + double _durationInSeconds, + bool _missingAssertions ); + + SectionInfo sectionInfo; + Counts assertions; + double durationInSeconds; + bool missingAssertions; + }; + + struct TestCaseStats { + TestCaseStats( TestCaseInfo const& _testInfo, + Totals const& _totals, + std::string&& _stdOut, + std::string&& _stdErr, + bool _aborting ); + + TestCaseInfo const * testInfo; + Totals totals; + std::string stdOut; + std::string stdErr; + bool aborting; + }; + + struct TestRunStats { + TestRunStats( TestRunInfo const& _runInfo, + Totals const& _totals, + bool _aborting ); + + TestRunInfo runInfo; + Totals totals; + bool aborting; + }; + + //! By setting up its preferences, a reporter can modify Catch2's behaviour + //! in some regards, e.g. it can request Catch2 to capture writes to + //! stdout/stderr during test execution, and pass them to the reporter. + struct ReporterPreferences { + //! Catch2 should redirect writes to stdout and pass them to the + //! reporter + bool shouldRedirectStdOut = false; + //! Catch2 should call `Reporter::assertionEnded` even for passing + //! assertions + bool shouldReportAllAssertions = false; + }; + + /** + * The common base for all reporters and event listeners + * + * Implementing classes must also implement: + * + * //! User-friendly description of the reporter/listener type + * static std::string getDescription() + * + * Generally shouldn't be derived from by users of Catch2 directly, + * instead they should derive from one of the utility bases that + * derive from this class. + */ + class IEventListener { + protected: + //! Derived classes can set up their preferences here + ReporterPreferences m_preferences; + //! The test run's config as filled in from CLI and defaults + IConfig const* m_config; + + public: + IEventListener( IConfig const* config ): m_config( config ) {} + + virtual ~IEventListener(); // = default; + + // Implementing class must also provide the following static methods: + // static std::string getDescription(); + + ReporterPreferences const& getPreferences() const { + return m_preferences; + } + + //! Called when no test cases match provided test spec + virtual void noMatchingTestCases( StringRef unmatchedSpec ) = 0; + //! Called for all invalid test specs from the cli + virtual void reportInvalidTestSpec( StringRef invalidArgument ) = 0; + + /** + * Called once in a testing run before tests are started + * + * Not called if tests won't be run (e.g. only listing will happen) + */ + virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0; + + //! Called _once_ for each TEST_CASE, no matter how many times it is entered + virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0; + //! Called _every time_ a TEST_CASE is entered, including repeats (due to sections) + virtual void testCasePartialStarting( TestCaseInfo const& testInfo, uint64_t partNumber ) = 0; + //! Called when a `SECTION` is being entered. Not called for skipped sections + virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; + + //! Called when user-code is being probed before the actual benchmark runs + virtual void benchmarkPreparing( StringRef benchmarkName ) = 0; + //! Called after probe but before the user-code is being benchmarked + virtual void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) = 0; + //! Called with the benchmark results if benchmark successfully finishes + virtual void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) = 0; + //! Called if running the benchmarks fails for any reason + virtual void benchmarkFailed( StringRef benchmarkName ) = 0; + + //! Called before assertion success/failure is evaluated + virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; + + //! Called after assertion was fully evaluated + virtual void assertionEnded( AssertionStats const& assertionStats ) = 0; + + //! Called after a `SECTION` has finished running + virtual void sectionEnded( SectionStats const& sectionStats ) = 0; + //! Called _every time_ a TEST_CASE is entered, including repeats (due to sections) + virtual void testCasePartialEnded(TestCaseStats const& testCaseStats, uint64_t partNumber ) = 0; + //! Called _once_ for each TEST_CASE, no matter how many times it is entered + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0; + /** + * Called once after all tests in a testing run are finished + * + * Not called if tests weren't run (e.g. only listings happened) + */ + virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; + + /** + * Called with test cases that are skipped due to the test run aborting. + * NOT called for test cases that are explicitly skipped using the `SKIP` macro. + * + * Deprecated - will be removed in the next major release. + */ + virtual void skipTest( TestCaseInfo const& testInfo ) = 0; + + //! Called if a fatal error (signal/structured exception) occurred + virtual void fatalErrorEncountered( StringRef error ) = 0; + + //! Writes out information about provided reporters using reporter-specific format + virtual void listReporters(std::vector<ReporterDescription> const& descriptions) = 0; + //! Writes out the provided listeners descriptions using reporter-specific format + virtual void listListeners(std::vector<ListenerDescription> const& descriptions) = 0; + //! Writes out information about provided tests using reporter-specific format + virtual void listTests(std::vector<TestCaseHandle> const& tests) = 0; + //! Writes out information about the provided tags using reporter-specific format + virtual void listTags(std::vector<TagInfo> const& tags) = 0; + }; + using IEventListenerPtr = Detail::unique_ptr<IEventListener>; + +} // end namespace Catch + +#endif // CATCH_INTERFACES_REPORTER_HPP_INCLUDED + + #ifndef CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED #define CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED @@ -8259,89 +8923,79 @@ namespace Catch { #endif // CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED -#ifndef CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED -#define CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED +#ifndef CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED +#define CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED +#include <string> +namespace Catch { -#ifndef CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED -#define CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED + struct TagAlias; + class ITagAliasRegistry { + public: + virtual ~ITagAliasRegistry(); // = default + // Nullptr if not present + virtual TagAlias const* find( std::string const& alias ) const = 0; + virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0; -namespace Catch { - namespace Detail { - //! Provides case-insensitive `op<` semantics when called - struct CaseInsensitiveLess { - bool operator()( StringRef lhs, - StringRef rhs ) const; - }; + static ITagAliasRegistry const& get(); + }; - //! Provides case-insensitive `op==` semantics when called - struct CaseInsensitiveEqualTo { - bool operator()( StringRef lhs, - StringRef rhs ) const; - }; +} // end namespace Catch - } // namespace Detail -} // namespace Catch +#endif // CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED -#endif // CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED -#include <string> +#ifndef CATCH_INTERFACES_TESTCASE_HPP_INCLUDED +#define CATCH_INTERFACES_TESTCASE_HPP_INCLUDED + #include <vector> -#include <map> namespace Catch { + struct TestCaseInfo; + class TestCaseHandle; class IConfig; - class IEventListener; - using IEventListenerPtr = Detail::unique_ptr<IEventListener>; - class IReporterFactory; - using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; - struct ReporterConfig; - class EventListenerFactory; - - class IReporterRegistry { + class ITestCaseRegistry { public: - using FactoryMap = std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess>; - using Listeners = std::vector<Detail::unique_ptr<EventListenerFactory>>; - - virtual ~IReporterRegistry(); // = default - virtual IEventListenerPtr create( std::string const& name, ReporterConfig&& config ) const = 0; - virtual FactoryMap const& getFactories() const = 0; - virtual Listeners const& getListeners() const = 0; + virtual ~ITestCaseRegistry(); // = default + // TODO: this exists only for adding filenames to test cases -- let's expose this in a saner way later + virtual std::vector<TestCaseInfo* > const& getAllInfos() const = 0; + virtual std::vector<TestCaseHandle> const& getAllTests() const = 0; + virtual std::vector<TestCaseHandle> const& getAllTestsSorted( IConfig const& config ) const = 0; }; -} // end namespace Catch - -#endif // CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED - +} -#ifndef CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED -#define CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED +#endif // CATCH_INTERFACES_TESTCASE_HPP_INCLUDED -#include <string> +#endif // CATCH_INTERFACES_ALL_HPP_INCLUDED -namespace Catch { - struct TagAlias; +#ifndef CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED +#define CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED - class ITagAliasRegistry { - public: - virtual ~ITagAliasRegistry(); // = default - // Nullptr if not present - virtual TagAlias const* find( std::string const& alias ) const = 0; - virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0; - static ITagAliasRegistry const& get(); - }; +namespace Catch { + namespace Detail { + //! Provides case-insensitive `op<` semantics when called + struct CaseInsensitiveLess { + bool operator()( StringRef lhs, + StringRef rhs ) const; + }; -} // end namespace Catch + //! Provides case-insensitive `op==` semantics when called + struct CaseInsensitiveEqualTo { + bool operator()( StringRef lhs, + StringRef rhs ) const; + }; -#endif // CATCH_INTERFACES_TAG_ALIAS_REGISTRY_HPP_INCLUDED + } // namespace Detail +} // namespace Catch -#endif // CATCH_INTERFACES_ALL_HPP_INCLUDED +#endif // CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED @@ -8383,6 +9037,7 @@ namespace Catch { #ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED #define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED + #if defined(_MSC_VER) # if _MSC_VER >= 1900 // Visual Studio 2015 or newer # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS @@ -8515,7 +9170,10 @@ namespace Catch { #if defined(__i386__) || defined(__x86_64__) #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ #elif defined(__aarch64__) - #define CATCH_TRAP() __asm__(".inst 0xd43e0000") + #define CATCH_TRAP() __asm__(".inst 0xd43e0000") + #elif defined(__POWERPC__) + #define CATCH_TRAP() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ + : : : "memory","r0","r3","r4" ) /* NOLINT */ #endif #elif defined(CATCH_PLATFORM_IPHONE) @@ -8670,7 +9328,6 @@ namespace Catch { ~ExceptionTranslatorRegistry() override; void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ); std::string translateActiveException() const override; - std::string tryTranslators() const; private: ExceptionTranslators m_translators; @@ -8746,17 +9403,6 @@ namespace Catch { #define CATCH_FLOATING_POINT_HELPERS_HPP_INCLUDED - -#ifndef CATCH_POLYFILLS_HPP_INCLUDED -#define CATCH_POLYFILLS_HPP_INCLUDED - -namespace Catch { - bool isnan(float f); - bool isnan(double d); -} - -#endif // CATCH_POLYFILLS_HPP_INCLUDED - #include <cassert> #include <cmath> #include <cstdint> @@ -8769,6 +9415,11 @@ namespace Catch { uint32_t convertToBits(float f); uint64_t convertToBits(double d); + // Used when we know we want == comparison of two doubles + // to centralize warning suppression + bool directCompare( float lhs, float rhs ); + bool directCompare( double lhs, double rhs ); + } // end namespace Detail @@ -8865,6 +9516,139 @@ namespace Detail { #endif // CATCH_GETENV_HPP_INCLUDED +#ifndef CATCH_IS_PERMUTATION_HPP_INCLUDED +#define CATCH_IS_PERMUTATION_HPP_INCLUDED + +#include <algorithm> +#include <iterator> + +namespace Catch { + namespace Detail { + + template <typename ForwardIter, + typename Sentinel, + typename T, + typename Comparator> + ForwardIter find_sentinel( ForwardIter start, + Sentinel sentinel, + T const& value, + Comparator cmp ) { + while ( start != sentinel ) { + if ( cmp( *start, value ) ) { break; } + ++start; + } + return start; + } + + template <typename ForwardIter, + typename Sentinel, + typename T, + typename Comparator> + std::ptrdiff_t count_sentinel( ForwardIter start, + Sentinel sentinel, + T const& value, + Comparator cmp ) { + std::ptrdiff_t count = 0; + while ( start != sentinel ) { + if ( cmp( *start, value ) ) { ++count; } + ++start; + } + return count; + } + + template <typename ForwardIter, typename Sentinel> + std::enable_if_t<!std::is_same<ForwardIter, Sentinel>::value, + std::ptrdiff_t> + sentinel_distance( ForwardIter iter, const Sentinel sentinel ) { + std::ptrdiff_t dist = 0; + while ( iter != sentinel ) { + ++iter; + ++dist; + } + return dist; + } + + template <typename ForwardIter> + std::ptrdiff_t sentinel_distance( ForwardIter first, + ForwardIter last ) { + return std::distance( first, last ); + } + + template <typename ForwardIter1, + typename Sentinel1, + typename ForwardIter2, + typename Sentinel2, + typename Comparator> + bool check_element_counts( ForwardIter1 first_1, + const Sentinel1 end_1, + ForwardIter2 first_2, + const Sentinel2 end_2, + Comparator cmp ) { + auto cursor = first_1; + while ( cursor != end_1 ) { + if ( find_sentinel( first_1, cursor, *cursor, cmp ) == + cursor ) { + // we haven't checked this element yet + const auto count_in_range_2 = + count_sentinel( first_2, end_2, *cursor, cmp ); + // Not a single instance in 2nd range, so it cannot be a + // permutation of 1st range + if ( count_in_range_2 == 0 ) { return false; } + + const auto count_in_range_1 = + count_sentinel( cursor, end_1, *cursor, cmp ); + if ( count_in_range_1 != count_in_range_2 ) { + return false; + } + } + + ++cursor; + } + + return true; + } + + template <typename ForwardIter1, + typename Sentinel1, + typename ForwardIter2, + typename Sentinel2, + typename Comparator> + bool is_permutation( ForwardIter1 first_1, + const Sentinel1 end_1, + ForwardIter2 first_2, + const Sentinel2 end_2, + Comparator cmp ) { + // TODO: no optimization for stronger iterators, because we would also have to constrain on sentinel vs not sentinel types + // TODO: Comparator has to be "both sides", e.g. a == b => b == a + // This skips shared prefix of the two ranges + while (first_1 != end_1 && first_2 != end_2 && cmp(*first_1, *first_2)) { + ++first_1; + ++first_2; + } + + // We need to handle case where at least one of the ranges has no more elements + if (first_1 == end_1 || first_2 == end_2) { + return first_1 == end_1 && first_2 == end_2; + } + + // pair counting is n**2, so we pay linear walk to compare the sizes first + auto dist_1 = sentinel_distance( first_1, end_1 ); + auto dist_2 = sentinel_distance( first_2, end_2 ); + + if (dist_1 != dist_2) { return false; } + + // Since we do not try to handle stronger iterators pair (e.g. + // bidir) optimally, the only thing left to do is to check counts in + // the remaining ranges. + return check_element_counts( first_1, end_1, first_2, end_2, cmp ); + } + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_IS_PERMUTATION_HPP_INCLUDED + + #ifndef CATCH_ISTREAM_HPP_INCLUDED #define CATCH_ISTREAM_HPP_INCLUDED @@ -8912,6 +9696,119 @@ namespace Catch { #endif // CATCH_STREAM_HPP_INCLUDED +#ifndef CATCH_JSONWRITER_HPP_INCLUDED +#define CATCH_JSONWRITER_HPP_INCLUDED + + +#include <cstdint> +#include <sstream> + +namespace Catch { + class JsonObjectWriter; + class JsonArrayWriter; + + struct JsonUtils { + static void indent( std::ostream& os, std::uint64_t level ); + static void appendCommaNewline( std::ostream& os, + bool& should_comma, + std::uint64_t level ); + }; + + class JsonValueWriter { + public: + JsonValueWriter( std::ostream& os ); + JsonValueWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonObjectWriter writeObject() &&; + JsonArrayWriter writeArray() &&; + + template <typename T> + void write( T const& value ) && { + writeImpl( value, !std::is_arithmetic<T>::value ); + } + void write( StringRef value ) &&; + void write( bool value ) &&; + + private: + void writeImpl( StringRef value, bool quote ); + + // Without this SFINAE, this overload is a better match + // for `std::string`, `char const*`, `char const[N]` args. + // While it would still work, it would cause code bloat + // and multiple iteration over the strings + template <typename T, + typename = typename std::enable_if_t< + !std::is_convertible<T, StringRef>::value>> + void writeImpl( T const& value, bool quote_value ) { + m_sstream << value; + writeImpl( m_sstream.str(), quote_value ); + } + + std::ostream& m_os; + std::stringstream m_sstream; + std::uint64_t m_indent_level; + }; + + class JsonObjectWriter { + public: + JsonObjectWriter( std::ostream& os ); + JsonObjectWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonObjectWriter( JsonObjectWriter&& source ); + JsonObjectWriter& operator=( JsonObjectWriter&& source ) = delete; + + ~JsonObjectWriter(); + + JsonValueWriter write( StringRef key ); + + private: + std::ostream& m_os; + std::uint64_t m_indent_level; + bool m_should_comma = false; + bool m_active = true; + }; + + class JsonArrayWriter { + public: + JsonArrayWriter( std::ostream& os ); + JsonArrayWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonArrayWriter( JsonArrayWriter&& source ); + JsonArrayWriter& operator=( JsonArrayWriter&& source ) = delete; + + ~JsonArrayWriter(); + + JsonObjectWriter writeObject(); + JsonArrayWriter writeArray(); + + template <typename T> + JsonArrayWriter& write( T const& value ) { + return writeImpl( value ); + } + + JsonArrayWriter& write( bool value ); + + private: + template <typename T> + JsonArrayWriter& writeImpl( T const& value ) { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + JsonValueWriter{ m_os }.write( value ); + + return *this; + } + + std::ostream& m_os; + std::uint64_t m_indent_level; + bool m_should_comma = false; + bool m_active = true; + }; + +} // namespace Catch + +#endif // CATCH_JSONWRITER_HPP_INCLUDED + + #ifndef CATCH_LEAK_DETECTOR_HPP_INCLUDED #define CATCH_LEAK_DETECTOR_HPP_INCLUDED @@ -9098,28 +9995,45 @@ namespace Catch { #include <map> +#include <string> +#include <vector> namespace Catch { - class ReporterRegistry : public IReporterRegistry { - public: + class IEventListener; + using IEventListenerPtr = Detail::unique_ptr<IEventListener>; + class IReporterFactory; + using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; + struct ReporterConfig; + class EventListenerFactory; + class ReporterRegistry { + struct ReporterRegistryImpl; + Detail::unique_ptr<ReporterRegistryImpl> m_impl; + + public: ReporterRegistry(); - ~ReporterRegistry() override; // = default, out of line to allow fwd decl + ~ReporterRegistry(); // = default; - IEventListenerPtr create( std::string const& name, ReporterConfig&& config ) const override; + IEventListenerPtr create( std::string const& name, + ReporterConfig&& config ) const; - void registerReporter( std::string const& name, IReporterFactoryPtr factory ); - void registerListener( Detail::unique_ptr<EventListenerFactory> factory ); + void registerReporter( std::string const& name, + IReporterFactoryPtr factory ); - FactoryMap const& getFactories() const override; - Listeners const& getListeners() const override; + void + registerListener( Detail::unique_ptr<EventListenerFactory> factory ); - private: - FactoryMap m_factories; - Listeners m_listeners; + std::map<std::string, + IReporterFactoryPtr, + Detail::CaseInsensitiveLess> const& + getFactories() const; + + std::vector<Detail::unique_ptr<EventListenerFactory>> const& + getListeners() const; }; -} + +} // end namespace Catch #endif // CATCH_REPORTER_REGISTRY_HPP_INCLUDED @@ -9143,10 +10057,49 @@ namespace TestCaseTracking { std::string name; SourceLineInfo location; - NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); + NameAndLocation( std::string&& _name, SourceLineInfo const& _location ); friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) { - return lhs.name == rhs.name - && lhs.location == rhs.location; + // This is a very cheap check that should have a very high hit rate. + // If we get to SourceLineInfo::operator==, we will redo it, but the + // cost of repeating is trivial at that point (we will be paying + // multiple strcmp/memcmps at that point). + if ( lhs.location.line != rhs.location.line ) { return false; } + return lhs.name == rhs.name && lhs.location == rhs.location; + } + friend bool operator!=(NameAndLocation const& lhs, + NameAndLocation const& rhs) { + return !( lhs == rhs ); + } + }; + + /** + * This is a variant of `NameAndLocation` that does not own the name string + * + * This avoids extra allocations when trying to locate a tracker by its + * name and location, as long as we make sure that trackers only keep + * around the owning variant. + */ + struct NameAndLocationRef { + StringRef name; + SourceLineInfo location; + + constexpr NameAndLocationRef( StringRef name_, + SourceLineInfo location_ ): + name( name_ ), location( location_ ) {} + + friend bool operator==( NameAndLocation const& lhs, + NameAndLocationRef const& rhs ) { + // This is a very cheap check that should have a very high hit rate. + // If we get to SourceLineInfo::operator==, we will redo it, but the + // cost of repeating is trivial at that point (we will be paying + // multiple strcmp/memcmps at that point). + if ( lhs.location.line != rhs.location.line ) { return false; } + return StringRef( lhs.name ) == rhs.name && + lhs.location == rhs.location; + } + friend bool operator==( NameAndLocationRef const& lhs, + NameAndLocation const& rhs ) { + return rhs == lhs; } }; @@ -9174,8 +10127,8 @@ namespace TestCaseTracking { CycleState m_runState = NotStarted; public: - ITracker( NameAndLocation const& nameAndLoc, ITracker* parent ): - m_nameAndLocation( nameAndLoc ), + ITracker( NameAndLocation&& nameAndLoc, ITracker* parent ): + m_nameAndLocation( CATCH_MOVE(nameAndLoc) ), m_parent( parent ) {} @@ -9195,8 +10148,10 @@ namespace TestCaseTracking { //! Returns true if tracker run to completion (successfully or not) virtual bool isComplete() const = 0; - //! Returns true if tracker run to completion succesfully - bool isSuccessfullyCompleted() const; + //! Returns true if tracker run to completion successfully + bool isSuccessfullyCompleted() const { + return m_runState == CompletedSuccessfully; + } //! Returns true if tracker has started but hasn't been completed bool isOpen() const; //! Returns true iff tracker has started @@ -9214,7 +10169,7 @@ namespace TestCaseTracking { * * Returns nullptr if not found. */ - ITracker* findChild( NameAndLocation const& nameAndLocation ); + ITracker* findChild( NameAndLocationRef const& nameAndLocation ); //! Have any children been added? bool hasChildren() const { return !m_children.empty(); @@ -9255,13 +10210,15 @@ namespace TestCaseTracking { public: ITracker& startRun(); - void endRun(); - void startCycle(); + void startCycle() { + m_currentTracker = m_rootTracker.get(); + m_runState = Executing; + } void completeCycle(); bool completedCycle() const; - ITracker& currentTracker(); + ITracker& currentTracker() { return *m_currentTracker; } void setCurrentTracker( ITracker* tracker ); }; @@ -9271,7 +10228,7 @@ namespace TestCaseTracking { TrackerContext& m_ctx; public: - TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + TrackerBase( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ); bool isComplete() const override; @@ -9287,22 +10244,26 @@ namespace TestCaseTracking { class SectionTracker : public TrackerBase { std::vector<StringRef> m_filters; - std::string m_trimmed_name; + // Note that lifetime-wise we piggy back off the name stored in the `ITracker` parent`. + // Currently it allocates owns the name, so this is safe. If it is later refactored + // to not own the name, the name still has to outlive the `ITracker` parent, so + // this should still be safe. + StringRef m_trimmed_name; public: - SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + SectionTracker( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ); bool isSectionTracker() const override; bool isComplete() const override; - static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ); + static SectionTracker& acquire( TrackerContext& ctx, NameAndLocationRef const& nameAndLocation ); void tryOpen(); void addInitialFilters( std::vector<std::string> const& filters ); void addNextFilters( std::vector<StringRef> const& filters ); //! Returns filters active in this tracker - std::vector<StringRef> const& getFilters() const; + std::vector<StringRef> const& getFilters() const { return m_filters; } //! Returns whitespace-trimmed name of the tracked section StringRef trimmedName() const; }; @@ -9321,13 +10282,14 @@ using TestCaseTracking::SectionTracker; namespace Catch { - class IMutableContext; class IGeneratorTracker; class IConfig; + class IEventListener; + using IEventListenerPtr = Detail::unique_ptr<IEventListener>; /////////////////////////////////////////////////////////////////////////// - class RunContext : public IResultCapture { + class RunContext final : public IResultCapture { public: RunContext( RunContext const& ) = delete; @@ -9356,7 +10318,7 @@ namespace Catch { AssertionReaction& reaction ) override; void handleUnexpectedInflightException ( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) override; void handleIncomplete ( AssertionInfo const& info ) override; @@ -9365,12 +10327,22 @@ namespace Catch { ResultWas::OfType resultType, AssertionReaction &reaction ) override; - bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override; + void notifyAssertionStarted( AssertionInfo const& info ) override; + bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) override; - void sectionEnded( SectionEndInfo const& endInfo ) override; - void sectionEndedEarly( SectionEndInfo const& endInfo ) override; + void sectionEnded( SectionEndInfo&& endInfo ) override; + void sectionEndedEarly( SectionEndInfo&& endInfo ) override; + + IGeneratorTracker* + acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) override; + IGeneratorTracker* createGeneratorTracker( + StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) override; - auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; void benchmarkPreparing( StringRef name ) override; void benchmarkStarting( BenchmarkInfo const& info ) override; @@ -9380,7 +10352,7 @@ namespace Catch { void pushScopedMessage( MessageInfo const& message ) override; void popScopedMessage( MessageInfo const& message ) override; - void emplaceUnscopedMessage( MessageBuilder const& builder ) override; + void emplaceUnscopedMessage( MessageBuilder&& builder ) override; std::string getCurrentTestName() const override; @@ -9406,7 +10378,7 @@ namespace Catch { void resetAssertionInfo(); bool testForMissingAssertions( Counts& assertions ); - void assertionEnded( AssertionResult const& result ); + void assertionEnded( AssertionResult&& result ); void reportExpr ( AssertionInfo const &info, ResultWas::OfType resultType, @@ -9420,7 +10392,6 @@ namespace Catch { void handleUnfinishedSections(); TestRunInfo m_runInfo; - IMutableContext& m_context; TestCaseHandle const* m_activeTestCase = nullptr; ITracker* m_testCaseTracker = nullptr; Optional<AssertionResult> m_lastResult; @@ -9568,6 +10539,7 @@ namespace Catch { #define CATCH_STRING_MANIP_HPP_INCLUDED +#include <cstdint> #include <string> #include <iosfwd> #include <vector> @@ -9676,16 +10648,14 @@ namespace Catch { namespace Catch { - class TestCaseHandle; class IConfig; + class ITestInvoker; + class TestCaseHandle; class TestSpec; std::vector<TestCaseHandle> sortTests( IConfig const& config, std::vector<TestCaseHandle> const& unsortedTestCases ); bool isThrowSafe( TestCaseHandle const& testCase, IConfig const& config ); - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ); - - void enforceNoDuplicateTestCases( std::vector<TestCaseHandle> const& functions ); std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ); std::vector<TestCaseHandle> const& getAllTestCasesSorted( IConfig const& config ); @@ -9714,18 +10684,6 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////// - class TestInvokerAsFunction final : public ITestInvoker { - using TestType = void(*)(); - TestType m_testAsFunction; - public: - TestInvokerAsFunction(TestType testAsFunction) noexcept: - m_testAsFunction(testAsFunction) {} - - void invoke() const override; - }; - - /////////////////////////////////////////////////////////////////////////// - } // end namespace Catch @@ -9861,7 +10819,7 @@ namespace Catch { // Calculates the length of the current line void calcLength(); - // Returns current indention width + // Returns current indentation width size_t indentSize() const; // Creates an indented and (optionally) suffixed string from @@ -10174,6 +11132,8 @@ namespace Catch { #define CATCH_MATCHERS_IMPL_HPP_INCLUDED +#include <string> + namespace Catch { template<typename ArgT, typename MatcherT> @@ -10866,13 +11826,11 @@ namespace Catch { } template <typename RangeLike> - bool match(RangeLike&& rng) const { - using std::begin; using std::end; - - return end(rng) != std::find_if(begin(rng), end(rng), - [&](auto const& elem) { - return m_eq(elem, m_desired); - }); + bool match( RangeLike&& rng ) const { + for ( auto&& elem : rng ) { + if ( m_eq( elem, m_desired ) ) { return true; } + } + return false; } }; @@ -10924,7 +11882,7 @@ namespace Catch { /** * Creates a matcher that checks whether a range contains a specific element. * - * Uses `eq` to do the comparisons + * Uses `eq` to do the comparisons, the element is provided on the rhs */ template <typename T, typename Equality> ContainsElementMatcher<T, Equality> Contains(T&& elem, Equality&& eq) { @@ -10960,6 +11918,32 @@ public: //! Creates a matcher that checks whether a std derived exception has the provided message ExceptionMessageMatcher Message(std::string const& message); +template <typename StringMatcherType> +class ExceptionMessageMatchesMatcher final + : public MatcherBase<std::exception> { + StringMatcherType m_matcher; + +public: + ExceptionMessageMatchesMatcher( StringMatcherType matcher ): + m_matcher( CATCH_MOVE( matcher ) ) {} + + bool match( std::exception const& ex ) const override { + return m_matcher.match( ex.what() ); + } + + std::string describe() const override { + return " matches \"" + m_matcher.describe() + '"'; + } +}; + +//! Creates a matcher that checks whether a message from an std derived +//! exception matches a provided matcher +template <typename StringMatcherType> +ExceptionMessageMatchesMatcher<StringMatcherType> +MessageMatches( StringMatcherType&& matcher ) { + return { CATCH_FORWARD( matcher ) }; +} + } // namespace Matchers } // namespace Catch @@ -10987,6 +11971,11 @@ namespace Matchers { double m_margin; }; + //! Creates a matcher that accepts numbers within certain range of target + WithinAbsMatcher WithinAbs( double target, double margin ); + + + class WithinUlpsMatcher final : public MatcherBase<double> { public: WithinUlpsMatcher( double target, @@ -11000,6 +11989,13 @@ namespace Matchers { Detail::FloatingPointKind m_type; }; + //! Creates a matcher that accepts doubles within certain ULP range of target + WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff); + //! Creates a matcher that accepts floats within certain ULP range of target + WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff); + + + // Given IEEE-754 format for floats and doubles, we can assume // that float -> double promotion is lossless. Given this, we can // assume that if we do the standard relative comparison of @@ -11016,13 +12012,6 @@ namespace Matchers { double m_epsilon; }; - //! Creates a matcher that accepts doubles within certain ULP range of target - WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff); - //! Creates a matcher that accepts floats within certain ULP range of target - WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff); - //! Creates a matcher that accepts numbers within certain range of target - WithinAbsMatcher WithinAbs(double target, double margin); - //! Creates a matcher that accepts doubles within certain relative range of target WithinRelMatcher WithinRel(double target, double eps); //! Creates a matcher that accepts doubles within 100*DBL_EPS relative range of target @@ -11032,6 +12021,17 @@ namespace Matchers { //! Creates a matcher that accepts floats within 100*FLT_EPS relative range of target WithinRelMatcher WithinRel(float target); + + + class IsNaNMatcher final : public MatcherBase<double> { + public: + IsNaNMatcher() = default; + bool match( double const& matchee ) const override; + std::string describe() const override; + }; + + IsNaNMatcher IsNaN(); + } // namespace Matchers } // namespace Catch @@ -11247,6 +12247,143 @@ namespace Catch { #endif // CATCH_MATCHERS_QUANTIFIERS_HPP_INCLUDED +#ifndef CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED +#define CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED + + +#include <algorithm> +#include <utility> + +namespace Catch { + namespace Matchers { + + /** + * Matcher for checking that an element contains the same + * elements in the same order + */ + template <typename TargetRangeLike, typename Equality> + class RangeEqualsMatcher final : public MatcherGenericBase { + TargetRangeLike m_desired; + Equality m_predicate; + + public: + template <typename TargetRangeLike2, typename Equality2> + RangeEqualsMatcher( TargetRangeLike2&& range, + Equality2&& predicate ): + m_desired( CATCH_FORWARD( range ) ), + m_predicate( CATCH_FORWARD( predicate ) ) {} + + template <typename RangeLike> + bool match( RangeLike&& rng ) const { + auto rng_start = begin( rng ); + const auto rng_end = end( rng ); + auto target_start = begin( m_desired ); + const auto target_end = end( m_desired ); + + while (rng_start != rng_end && target_start != target_end) { + if (!m_predicate(*rng_start, *target_start)) { + return false; + } + ++rng_start; + ++target_start; + } + return rng_start == rng_end && target_start == target_end; + } + + std::string describe() const override { + return "elements are " + Catch::Detail::stringify( m_desired ); + } + }; + + /** + * Matcher for checking that an element contains the same + * elements (but not necessarily in the same order) + */ + template <typename TargetRangeLike, typename Equality> + class UnorderedRangeEqualsMatcher final : public MatcherGenericBase { + TargetRangeLike m_desired; + Equality m_predicate; + + public: + template <typename TargetRangeLike2, typename Equality2> + UnorderedRangeEqualsMatcher( TargetRangeLike2&& range, + Equality2&& predicate ): + m_desired( CATCH_FORWARD( range ) ), + m_predicate( CATCH_FORWARD( predicate ) ) {} + + template <typename RangeLike> + bool match( RangeLike&& rng ) const { + using std::begin; + using std::end; + return Catch::Detail::is_permutation( begin( m_desired ), + end( m_desired ), + begin( rng ), + end( rng ), + m_predicate ); + } + + std::string describe() const override { + return "unordered elements are " + + ::Catch::Detail::stringify( m_desired ); + } + }; + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range. + * + * Uses `std::equal_to` to do the comparison + */ + template <typename RangeLike> + std::enable_if_t<!Detail::is_matcher<RangeLike>::value, + RangeEqualsMatcher<RangeLike, std::equal_to<>>> + RangeEquals( RangeLike&& range ) { + return { CATCH_FORWARD( range ), std::equal_to<>{} }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range. + * + * Uses to provided predicate `predicate` to do the comparisons + */ + template <typename RangeLike, typename Equality> + RangeEqualsMatcher<RangeLike, Equality> + RangeEquals( RangeLike&& range, Equality&& predicate ) { + return { CATCH_FORWARD( range ), CATCH_FORWARD( predicate ) }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range, in some permutation + * + * Uses `std::equal_to` to do the comparison + */ + template <typename RangeLike> + std::enable_if_t< + !Detail::is_matcher<RangeLike>::value, + UnorderedRangeEqualsMatcher<RangeLike, std::equal_to<>>> + UnorderedRangeEquals( RangeLike&& range ) { + return { CATCH_FORWARD( range ), std::equal_to<>{} }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range, in some permutation. + * + * Uses to provided predicate `predicate` to do the comparisons + */ + template <typename RangeLike, typename Equality> + UnorderedRangeEqualsMatcher<RangeLike, Equality> + UnorderedRangeEquals( RangeLike&& range, Equality&& predicate ) { + return { CATCH_FORWARD( range ), CATCH_FORWARD( predicate ) }; + } + } // namespace Matchers +} // namespace Catch + +#endif // CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED + + #ifndef CATCH_MATCHERS_STRING_HPP_INCLUDED #define CATCH_MATCHERS_STRING_HPP_INCLUDED @@ -11402,11 +12539,10 @@ namespace Matchers { // - 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 // - then just call that directly - if (m_comparator.size() != v.size()) - return false; - for (std::size_t i = 0; i < v.size(); ++i) - if (m_comparator[i] != v[i]) - return false; + if ( m_comparator.size() != v.size() ) { return false; } + for ( std::size_t i = 0; i < v.size(); ++i ) { + if ( !( m_comparator[i] == v[i] ) ) { return false; } + } return true; } std::string describe() const override { @@ -11910,7 +13046,7 @@ namespace Catch { void skipTest(TestCaseInfo const&) override {} protected: - //! Should the cumulative base store the assertion expansion for succesful assertions? + //! Should the cumulative base store the assertion expansion for successful assertions? bool m_shouldStoreSuccesfulAssertions = true; //! Should the cumulative base store the assertion expansion for failed assertions? bool m_shouldStoreFailedAssertions = true; @@ -12078,6 +13214,93 @@ namespace Catch { #endif // CATCH_REPORTER_HELPERS_HPP_INCLUDED + +#ifndef CATCH_REPORTER_JSON_HPP_INCLUDED +#define CATCH_REPORTER_JSON_HPP_INCLUDED + + +#include <stack> + +namespace Catch { + class JsonReporter : public StreamingReporterBase { + public: + JsonReporter( ReporterConfig&& config ); + + ~JsonReporter() override; + + static std::string getDescription(); + + public: // StreamingReporterBase + void testRunStarting( TestRunInfo const& runInfo ) override; + void testRunEnded( TestRunStats const& runStats ) override; + + void testCaseStarting( TestCaseInfo const& tcInfo ) override; + void testCaseEnded( TestCaseStats const& tcStats ) override; + + void testCasePartialStarting( TestCaseInfo const& tcInfo, + uint64_t index ) override; + void testCasePartialEnded( TestCaseStats const& tcStats, + uint64_t index ) override; + + void sectionStarting( SectionInfo const& sectionInfo ) override; + void sectionEnded( SectionStats const& sectionStats ) override; + + void assertionStarting( AssertionInfo const& assertionInfo ) override; + void assertionEnded( AssertionStats const& assertionStats ) override; + + //void testRunEndedCumulative() override; + + void benchmarkPreparing( StringRef name ) override; + void benchmarkStarting( BenchmarkInfo const& ) override; + void benchmarkEnded( BenchmarkStats<> const& ) override; + void benchmarkFailed( StringRef error ) override; + + void listReporters( + std::vector<ReporterDescription> const& descriptions ) override; + void listListeners( + std::vector<ListenerDescription> const& descriptions ) override; + void listTests( std::vector<TestCaseHandle> const& tests ) override; + void listTags( std::vector<TagInfo> const& tags ) override; + + private: + Timer m_testCaseTimer; + enum class Writer { + Object, + Array + }; + + JsonArrayWriter& startArray(); + JsonArrayWriter& startArray( StringRef key ); + + JsonObjectWriter& startObject(); + JsonObjectWriter& startObject( StringRef key ); + + void endObject(); + void endArray(); + + bool isInside( Writer writer ); + + void startListing(); + void endListing(); + + // Invariant: + // When m_writers is not empty and its top element is + // - Writer::Object, then m_objectWriters is not be empty + // - Writer::Array, then m_arrayWriters shall not be empty + std::stack<JsonObjectWriter> m_objectWriters{}; + std::stack<JsonArrayWriter> m_arrayWriters{}; + std::stack<Writer> m_writers{}; + + bool m_startedListing = false; + + // std::size_t m_sectionDepth = 0; + // std::size_t m_sectionStarted = 0; + }; +} // namespace Catch + +#endif // CATCH_REPORTER_JSON_HPP_INCLUDED + + #ifndef CATCH_REPORTER_JUNIT_HPP_INCLUDED #define CATCH_REPORTER_JUNIT_HPP_INCLUDED @@ -12217,7 +13440,8 @@ namespace Catch { //! independent on the reporter's concrete type void registerReporterImpl( std::string const& name, IReporterFactoryPtr reporterPtr ); - + //! Actually registers the factory, independent on listener's concrete type + void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory ); } // namespace Detail class IEventListener; @@ -12278,7 +13502,7 @@ namespace Catch { public: ListenerRegistrar(StringRef listenerName) { - getMutableRegistryHub().registerListener( Detail::make_unique<TypedListenerFactory>(listenerName) ); + registerListenerImpl( Detail::make_unique<TypedListenerFactory>(listenerName) ); } }; } @@ -12299,7 +13523,7 @@ namespace Catch { CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ namespace { \ Catch::ListenerRegistrar<listenerType> INTERNAL_CATCH_UNIQUE_NAME( \ - catch_internal_RegistrarFor )( #listenerType ); \ + catch_internal_RegistrarFor )( #listenerType##_catch_sr ); \ } \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION @@ -12346,7 +13570,7 @@ namespace Catch { void writeRun( TestRunNode const& groupNode ); - void writeTestFile(std::string const& filename, std::vector<TestCaseNode const*> const& testCaseNodes); + void writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes); void writeTestCase(TestCaseNode const& testCaseNode); diff --git a/fuzzing/NullOStream.cpp b/fuzzing/NullOStream.cpp index 53e0893d..e3a181e8 100644 --- a/fuzzing/NullOStream.cpp +++ b/fuzzing/NullOStream.cpp @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + #include "NullOStream.h" void NullOStream::avoidOutOfLineVirtualCompilerWarning() diff --git a/fuzzing/NullOStream.h b/fuzzing/NullOStream.h index e1fe15b0..abbec09c 100644 --- a/fuzzing/NullOStream.h +++ b/fuzzing/NullOStream.h @@ -1,3 +1,11 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + #pragma once #include <ostream> diff --git a/fuzzing/fuzz_TestSpecParser.cpp b/fuzzing/fuzz_TestSpecParser.cpp index af4de406..3aba8c84 100644 --- a/fuzzing/fuzz_TestSpecParser.cpp +++ b/fuzzing/fuzz_TestSpecParser.cpp @@ -1,4 +1,10 @@ -//License: Boost 1.0 + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 //By Paul Dreik 2020 #include <catch2/internal/catch_test_spec_parser.hpp> diff --git a/fuzzing/fuzz_XmlWriter.cpp b/fuzzing/fuzz_XmlWriter.cpp index f8e5a0d9..70c4ed80 100644 --- a/fuzzing/fuzz_XmlWriter.cpp +++ b/fuzzing/fuzz_XmlWriter.cpp @@ -1,4 +1,10 @@ -//License: Boost 1.0 + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 //By Paul Dreik 2020 #include <catch2/internal/catch_xmlwriter.hpp> diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp index eafe79fe..7000f420 100644 --- a/fuzzing/fuzz_textflow.cpp +++ b/fuzzing/fuzz_textflow.cpp @@ -1,4 +1,10 @@ -//License: Boost 1.0 + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 //By Paul Dreik 2020 #include <catch2/internal/catch_textflow.hpp> diff --git a/meson.build b/meson.build index 0cab573e..1c5b80a1 100644 --- a/meson.build +++ b/meson.build @@ -8,10 +8,12 @@ project( 'catch2', 'cpp', - version: '3.2.1', # CML version placeholder, don't delete + version: '3.5.0', # CML version placeholder, don't delete license: 'BSL-1.0', - meson_version: '>=0.50.0', + meson_version: '>=0.54.1', ) subdir('src/catch2') -subdir('tests') +if get_option('tests') + subdir('tests') +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..76904873 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('tests', type: 'boolean', value: true, description: 'Build the unit tests') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b54c6274..d01aab2d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,8 @@ set(BENCHMARK_HEADERS ${SOURCES_DIR}/benchmark/catch_sample_analysis.hpp ${SOURCES_DIR}/benchmark/detail/catch_analyse.hpp ${SOURCES_DIR}/benchmark/detail/catch_benchmark_function.hpp + ${SOURCES_DIR}/benchmark/detail/catch_benchmark_stats.hpp + ${SOURCES_DIR}/benchmark/detail/catch_benchmark_stats_fwd.hpp ${SOURCES_DIR}/benchmark/detail/catch_complete_invoke.hpp ${SOURCES_DIR}/benchmark/detail/catch_estimate_clock.hpp ${SOURCES_DIR}/benchmark/detail/catch_measure.hpp @@ -31,6 +33,7 @@ set(BENCHMARK_HEADERS ) set(BENCHMARK_SOURCES ${SOURCES_DIR}/benchmark/catch_chronometer.cpp + ${SOURCES_DIR}/benchmark/detail/catch_analyse.cpp ${SOURCES_DIR}/benchmark/detail/catch_benchmark_function.cpp ${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.cpp ${SOURCES_DIR}/benchmark/detail/catch_stats.cpp @@ -39,7 +42,7 @@ set(BENCHMARK_FILES ${BENCHMARK_HEADERS} ${BENCHMARK_SOURCES}) set(IMPL_HEADERS - "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" + "${PROJECT_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" ${SOURCES_DIR}/catch_user_config.hpp.in ${SOURCES_DIR}/catch_all.hpp ${SOURCES_DIR}/catch_approx.hpp @@ -71,6 +74,7 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_compiler_capabilities.hpp ${SOURCES_DIR}/internal/catch_config_android_logwrite.hpp ${SOURCES_DIR}/internal/catch_config_counter.hpp + ${SOURCES_DIR}/internal/catch_config_static_analysis_support.hpp ${SOURCES_DIR}/internal/catch_config_uncaught_exceptions.hpp ${SOURCES_DIR}/internal/catch_config_wchar.hpp ${SOURCES_DIR}/internal/catch_console_colour.hpp @@ -88,6 +92,8 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_floating_point_helpers.hpp ${SOURCES_DIR}/internal/catch_getenv.hpp ${SOURCES_DIR}/internal/catch_istream.hpp + ${SOURCES_DIR}/internal/catch_is_permutation.hpp + ${SOURCES_DIR}/internal/catch_jsonwriter.hpp ${SOURCES_DIR}/internal/catch_lazy_expr.hpp ${SOURCES_DIR}/internal/catch_leak_detector.hpp ${SOURCES_DIR}/internal/catch_list.hpp @@ -103,6 +109,8 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_polyfills.hpp ${SOURCES_DIR}/internal/catch_preprocessor.hpp ${SOURCES_DIR}/internal/catch_preprocessor_remove_parens.hpp + ${SOURCES_DIR}/internal/catch_random_floating_point_helpers.hpp + ${SOURCES_DIR}/internal/catch_random_integer_helpers.hpp ${SOURCES_DIR}/internal/catch_random_number_generator.hpp ${SOURCES_DIR}/internal/catch_random_seed_generation.hpp ${SOURCES_DIR}/internal/catch_reporter_registry.hpp @@ -127,10 +135,13 @@ set(IMPL_HEADERS ${SOURCES_DIR}/internal/catch_test_failure_exception.hpp ${SOURCES_DIR}/internal/catch_test_macro_impl.hpp ${SOURCES_DIR}/internal/catch_test_registry.hpp + ${SOURCES_DIR}/internal/catch_test_run_info.hpp ${SOURCES_DIR}/internal/catch_test_spec_parser.hpp ${SOURCES_DIR}/internal/catch_textflow.hpp ${SOURCES_DIR}/internal/catch_to_string.hpp ${SOURCES_DIR}/internal/catch_uncaught_exceptions.hpp + ${SOURCES_DIR}/internal/catch_uniform_floating_point_distribution.hpp + ${SOURCES_DIR}/internal/catch_uniform_integer_distribution.hpp ${SOURCES_DIR}/internal/catch_unique_name.hpp ${SOURCES_DIR}/internal/catch_unique_ptr.hpp ${SOURCES_DIR}/internal/catch_void_type.hpp @@ -152,6 +163,7 @@ set(IMPL_SOURCES ${SOURCES_DIR}/catch_timer.cpp ${SOURCES_DIR}/catch_tostring.cpp ${SOURCES_DIR}/catch_totals.cpp + ${SOURCES_DIR}/catch_translate_exception.cpp ${SOURCES_DIR}/catch_version.cpp ${SOURCES_DIR}/internal/catch_assertion_handler.cpp ${SOURCES_DIR}/internal/catch_case_insensitive_comparisons.cpp @@ -170,6 +182,7 @@ set(IMPL_SOURCES ${SOURCES_DIR}/internal/catch_floating_point_helpers.cpp ${SOURCES_DIR}/internal/catch_getenv.cpp ${SOURCES_DIR}/internal/catch_istream.cpp + ${SOURCES_DIR}/internal/catch_jsonwriter.cpp ${SOURCES_DIR}/internal/catch_lazy_expr.cpp ${SOURCES_DIR}/internal/catch_leak_detector.cpp ${SOURCES_DIR}/internal/catch_list.cpp @@ -215,8 +228,8 @@ set(INTERFACE_HEADERS ${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.hpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter.hpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_registry.hpp ${SOURCES_DIR}/interfaces/catch_interfaces_tag_alias_registry.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_test_invoker.hpp ${SOURCES_DIR}/interfaces/catch_interfaces_testcase.hpp ) set(INTERFACE_SOURCES @@ -227,7 +240,6 @@ set(INTERFACE_SOURCES ${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_registry.cpp ${SOURCES_DIR}/interfaces/catch_interfaces_testcase.cpp ) set(INTERFACE_FILES ${INTERFACE_HEADERS} ${INTERFACE_SOURCES}) @@ -252,6 +264,7 @@ set(MATCHER_HEADERS ${SOURCES_DIR}/matchers/catch_matchers_all.hpp ${SOURCES_DIR}/matchers/catch_matchers_container_properties.hpp ${SOURCES_DIR}/matchers/catch_matchers_contains.hpp + ${SOURCES_DIR}/matchers/catch_matchers_range_equals.hpp ${SOURCES_DIR}/matchers/catch_matchers_exception.hpp ${SOURCES_DIR}/matchers/catch_matchers_floating_point.hpp ${SOURCES_DIR}/matchers/catch_matchers_predicate.hpp @@ -282,6 +295,7 @@ set(REPORTER_HEADERS ${SOURCES_DIR}/reporters/catch_reporter_cumulative_base.hpp ${SOURCES_DIR}/reporters/catch_reporter_event_listener.hpp ${SOURCES_DIR}/reporters/catch_reporter_helpers.hpp + ${SOURCES_DIR}/reporters/catch_reporter_json.hpp ${SOURCES_DIR}/reporters/catch_reporter_junit.hpp ${SOURCES_DIR}/reporters/catch_reporter_multi.hpp ${SOURCES_DIR}/reporters/catch_reporter_registrars.hpp @@ -300,6 +314,7 @@ set(REPORTER_SOURCES ${SOURCES_DIR}/reporters/catch_reporter_cumulative_base.cpp ${SOURCES_DIR}/reporters/catch_reporter_event_listener.cpp ${SOURCES_DIR}/reporters/catch_reporter_helpers.cpp + ${SOURCES_DIR}/reporters/catch_reporter_json.cpp ${SOURCES_DIR}/reporters/catch_reporter_junit.cpp ${SOURCES_DIR}/reporters/catch_reporter_multi.cpp ${SOURCES_DIR}/reporters/catch_reporter_registrars.cpp @@ -321,7 +336,7 @@ set(ALL_FILES ) set(FILTERED_FILES ${ALL_FILES}) -list(REMOVE_ITEM FILTERED_FILES "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp") +list(REMOVE_ITEM FILTERED_FILES "${PROJECT_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp") source_group( TREE ${SOURCES_DIR} PREFIX sources @@ -329,7 +344,7 @@ source_group( ) source_group("generated headers" FILES - "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" + "${PROJECT_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" ) add_library(Catch2 ${ALL_FILES}) @@ -372,13 +387,13 @@ target_compile_features(Catch2 configure_file( "${SOURCES_DIR}/catch_user_config.hpp.in" - "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" + "${PROJECT_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" ) target_include_directories(Catch2 PUBLIC $<BUILD_INTERFACE:${SOURCES_DIR}/..> - $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/generated-includes> + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/generated-includes> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) @@ -426,7 +441,7 @@ if (NOT_SUBPROJECT) install( DIRECTORY "${SOURCES_DIR}" - "${CMAKE_BINARY_DIR}/generated-includes/catch2" # Also install the generated header + "${PROJECT_BINARY_DIR}/generated-includes/catch2" # Also install the generated header DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING @@ -447,7 +462,7 @@ if (CATCH_BUILD_EXAMPLES OR CATCH_BUILD_EXTRA_TESTS) target_include_directories(Catch2_buildall_interface INTERFACE $<BUILD_INTERFACE:${SOURCES_DIR}/..> - $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/generated-includes> + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/generated-includes> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ) target_compile_definitions(Catch2_buildall_interface @@ -487,12 +502,10 @@ set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE) # so we want to check & warn users if they do this. However, we won't abort # the configuration step so that we don't have to also provide an override. if (BUILD_SHARED_LIBS) - if (MSVC) - set_target_properties(Catch2 Catch2WithMain - PROPERTIES - WINDOWS_EXPORT_ALL_SYMBOLS ON - ) - endif() + set_target_properties(Catch2 Catch2WithMain + PROPERTIES + WINDOWS_EXPORT_ALL_SYMBOLS ON + ) get_target_property(_VisPreset Catch2 CXX_VISIBILITY_PRESET) if (NOT MSVC AND _VisPreset STREQUAL "hidden") diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp index a2d5c3ea..3db40bb0 100644 --- a/src/catch2/benchmark/catch_benchmark.hpp +++ b/src/catch2/benchmark/catch_benchmark.hpp @@ -10,26 +10,28 @@ #ifndef CATCH_BENCHMARK_HPP_INCLUDED #define CATCH_BENCHMARK_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/catch_user_config.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_context.hpp> -#include <catch2/interfaces/catch_interfaces_reporter.hpp> -#include <catch2/internal/catch_unique_name.hpp> #include <catch2/internal/catch_move_and_forward.hpp> -#include <catch2/benchmark/catch_chronometer.hpp> +#include <catch2/internal/catch_test_failure_exception.hpp> +#include <catch2/internal/catch_unique_name.hpp> +#include <catch2/interfaces/catch_interfaces_capture.hpp> +#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> +#include <catch2/benchmark/detail/catch_benchmark_stats.hpp> #include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_environment.hpp> #include <catch2/benchmark/catch_execution_plan.hpp> #include <catch2/benchmark/detail/catch_estimate_clock.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/benchmark/detail/catch_analyse.hpp> #include <catch2/benchmark/detail/catch_benchmark_function.hpp> #include <catch2/benchmark/detail/catch_run_for_at_least.hpp> #include <algorithm> -#include <functional> +#include <chrono> +#include <exception> #include <string> -#include <vector> #include <cmath> namespace Catch { @@ -43,16 +45,18 @@ namespace Catch { : fun(CATCH_MOVE(func)), name(CATCH_MOVE(benchmarkName)) {} template <typename Clock> - ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { + ExecutionPlan prepare(const IConfig &cfg, Environment env) const { auto min_time = env.clock_resolution.mean * Detail::minimum_ticks; auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime())); - auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun); + auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(run_time), 1, fun); int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed)); - return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; + return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FDuration>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; } template <typename Clock = default_clock> void run() { + static_assert( Clock::is_steady, + "Benchmarking clock should be steady" ); auto const* cfg = getCurrentContext().getConfig(); auto env = Detail::measure_environment<Clock>(); @@ -64,7 +68,7 @@ namespace Catch { }); BenchmarkInfo info { - name, + CATCH_MOVE(name), plan.estimated_duration.count(), plan.iterations_per_sample, cfg->benchmarkSamples(), @@ -79,10 +83,10 @@ namespace Catch { return plan.template run<Clock>(*cfg, env); }); - auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end()); - BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; + auto analysis = Detail::analyse(*cfg, samples.data(), samples.data() + samples.size()); + BenchmarkStats<> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; getResultCapture().benchmarkEnded(stats); - } CATCH_CATCH_ANON (TestFailureException) { + } CATCH_CATCH_ANON (TestFailureException const&) { getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr); } CATCH_CATCH_ALL{ getResultCapture().benchmarkFailed(translateActiveException()); diff --git a/src/catch2/benchmark/catch_benchmark_all.hpp b/src/catch2/benchmark/catch_benchmark_all.hpp index eb81f238..56fc7c74 100644 --- a/src/catch2/benchmark/catch_benchmark_all.hpp +++ b/src/catch2/benchmark/catch_benchmark_all.hpp @@ -33,6 +33,8 @@ #include <catch2/benchmark/catch_sample_analysis.hpp> #include <catch2/benchmark/detail/catch_analyse.hpp> #include <catch2/benchmark/detail/catch_benchmark_function.hpp> +#include <catch2/benchmark/detail/catch_benchmark_stats.hpp> +#include <catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp> #include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/benchmark/detail/catch_estimate_clock.hpp> #include <catch2/benchmark/detail/catch_measure.hpp> diff --git a/src/catch2/benchmark/catch_chronometer.hpp b/src/catch2/benchmark/catch_chronometer.hpp index bce2406b..95498e6b 100644 --- a/src/catch2/benchmark/catch_chronometer.hpp +++ b/src/catch2/benchmark/catch_chronometer.hpp @@ -12,7 +12,6 @@ #include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_optimizer.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/internal/catch_meta.hpp> #include <catch2/internal/catch_move_and_forward.hpp> @@ -33,7 +32,10 @@ namespace Catch { void start() override { started = Clock::now(); } void finish() override { finished = Clock::now(); } - ClockDuration<Clock> elapsed() const { return finished - started; } + IDuration elapsed() const { + return std::chrono::duration_cast<std::chrono::nanoseconds>( + finished - started ); + } TimePoint<Clock> started; TimePoint<Clock> finished; diff --git a/src/catch2/benchmark/catch_clock.hpp b/src/catch2/benchmark/catch_clock.hpp index cee46097..4068c4d2 100644 --- a/src/catch2/benchmark/catch_clock.hpp +++ b/src/catch2/benchmark/catch_clock.hpp @@ -11,28 +11,16 @@ #define CATCH_CLOCK_HPP_INCLUDED #include <chrono> -#include <ratio> namespace Catch { namespace Benchmark { - template <typename Clock> - using ClockDuration = typename Clock::duration; - template <typename Clock> - using FloatDuration = std::chrono::duration<double, typename Clock::period>; + using IDuration = std::chrono::nanoseconds; + using FDuration = std::chrono::duration<double, std::nano>; template <typename Clock> using TimePoint = typename Clock::time_point; using default_clock = std::chrono::steady_clock; - - template <typename Clock> - struct now { - TimePoint<Clock> operator()() const { - return Clock::now(); - } - }; - - using fp_seconds = std::chrono::duration<double, std::ratio<1>>; } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/catch_environment.hpp b/src/catch2/benchmark/catch_environment.hpp index de4d77df..da3f2fa9 100644 --- a/src/catch2/benchmark/catch_environment.hpp +++ b/src/catch2/benchmark/catch_environment.hpp @@ -15,21 +15,13 @@ namespace Catch { namespace Benchmark { - template <typename Duration> struct EnvironmentEstimate { - Duration mean; + FDuration mean; OutlierClassification outliers; - - template <typename Duration2> - operator EnvironmentEstimate<Duration2>() const { - return { mean, outliers }; - } }; - template <typename Clock> struct Environment { - using clock_type = Clock; - EnvironmentEstimate<FloatDuration<Clock>> clock_resolution; - EnvironmentEstimate<FloatDuration<Clock>> clock_cost; + EnvironmentEstimate clock_resolution; + EnvironmentEstimate clock_cost; }; } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/catch_estimate.hpp b/src/catch2/benchmark/catch_estimate.hpp index be594a18..64383a2e 100644 --- a/src/catch2/benchmark/catch_estimate.hpp +++ b/src/catch2/benchmark/catch_estimate.hpp @@ -12,17 +12,12 @@ namespace Catch { namespace Benchmark { - template <typename Duration> + template <typename Type> struct Estimate { - Duration point; - Duration lower_bound; - Duration upper_bound; + Type point; + Type lower_bound; + Type upper_bound; double confidence_interval; - - template <typename Duration2> - operator Estimate<Duration2>() const { - return { point, lower_bound, upper_bound, confidence_interval }; - } }; } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/catch_execution_plan.hpp b/src/catch2/benchmark/catch_execution_plan.hpp index 039de7ee..17ca589f 100644 --- a/src/catch2/benchmark/catch_execution_plan.hpp +++ b/src/catch2/benchmark/catch_execution_plan.hpp @@ -17,38 +17,38 @@ #include <catch2/benchmark/detail/catch_repeat.hpp> #include <catch2/benchmark/detail/catch_run_for_at_least.hpp> -#include <algorithm> -#include <iterator> +#include <vector> namespace Catch { namespace Benchmark { - template <typename Duration> struct ExecutionPlan { int iterations_per_sample; - Duration estimated_duration; + FDuration estimated_duration; Detail::BenchmarkFunction benchmark; - Duration warmup_time; + FDuration warmup_time; int warmup_iterations; - template <typename Duration2> - operator ExecutionPlan<Duration2>() const { - return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations }; - } - template <typename Clock> - std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const { + std::vector<FDuration> run(const IConfig &cfg, Environment env) const { // warmup a bit - Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{})); - - std::vector<FloatDuration<Clock>> times; - times.reserve(cfg.benchmarkSamples()); - std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] { + Detail::run_for_at_least<Clock>( + std::chrono::duration_cast<IDuration>( warmup_time ), + warmup_iterations, + Detail::repeat( []() { return Clock::now(); } ) + ); + + std::vector<FDuration> times; + const auto num_samples = cfg.benchmarkSamples(); + times.reserve( num_samples ); + for ( size_t i = 0; i < num_samples; ++i ) { Detail::ChronometerModel<Clock> model; - this->benchmark(Chronometer(model, iterations_per_sample)); + this->benchmark( Chronometer( model, iterations_per_sample ) ); auto sample_time = model.elapsed() - env.clock_cost.mean; - if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero(); - return sample_time / iterations_per_sample; - }); + if ( sample_time < FDuration::zero() ) { + sample_time = FDuration::zero(); + } + times.push_back(sample_time / iterations_per_sample); + } return times; } }; diff --git a/src/catch2/benchmark/catch_optimizer.hpp b/src/catch2/benchmark/catch_optimizer.hpp index 0dbfc145..61e6571f 100644 --- a/src/catch2/benchmark/catch_optimizer.hpp +++ b/src/catch2/benchmark/catch_optimizer.hpp @@ -10,7 +10,7 @@ #ifndef CATCH_OPTIMIZER_HPP_INCLUDED #define CATCH_OPTIMIZER_HPP_INCLUDED -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) # include <atomic> // atomic_thread_fence #endif @@ -32,16 +32,23 @@ namespace Catch { namespace Detail { inline void optimizer_barrier() { keep_memory(); } } // namespace Detail -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) +#if defined(_MSVC_VER) #pragma optimize("", off) +#elif defined(__IAR_SYSTEMS_ICC__) +// For IAR the pragma only affects the following function +#pragma optimize=disable +#endif template <typename T> inline void keep_memory(T* p) { // thanks @milleniumbug *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p); } // TODO equivalent keep_memory() +#if defined(_MSVC_VER) #pragma optimize("", on) +#endif namespace Detail { inline void optimizer_barrier() { @@ -63,7 +70,7 @@ namespace Catch { template <typename Fn, typename... Args> inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> std::enable_if_t<std::is_same<void, decltype(fn(args...))>::value> { - CATCH_FORWARD(fn) (CATCH_FORWARD(args)...); + CATCH_FORWARD((fn)) (CATCH_FORWARD(args)...); } } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/catch_sample_analysis.hpp b/src/catch2/benchmark/catch_sample_analysis.hpp index d849d246..aeb87d05 100644 --- a/src/catch2/benchmark/catch_sample_analysis.hpp +++ b/src/catch2/benchmark/catch_sample_analysis.hpp @@ -10,38 +10,20 @@ #ifndef CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED #define CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED -#include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_estimate.hpp> #include <catch2/benchmark/catch_outlier_classification.hpp> -#include <catch2/internal/catch_move_and_forward.hpp> +#include <catch2/benchmark/catch_clock.hpp> -#include <algorithm> #include <vector> -#include <iterator> namespace Catch { namespace Benchmark { - template <typename Duration> struct SampleAnalysis { - std::vector<Duration> samples; - Estimate<Duration> mean; - Estimate<Duration> standard_deviation; + std::vector<FDuration> samples; + Estimate<FDuration> mean; + Estimate<FDuration> standard_deviation; OutlierClassification outliers; double outlier_variance; - - template <typename Duration2> - operator SampleAnalysis<Duration2>() const { - std::vector<Duration2> samples2; - samples2.reserve(samples.size()); - std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); }); - return { - CATCH_MOVE(samples2), - mean, - standard_deviation, - outliers, - outlier_variance, - }; - } }; } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/detail/catch_analyse.cpp b/src/catch2/benchmark/detail/catch_analyse.cpp new file mode 100644 index 00000000..7d27daf1 --- /dev/null +++ b/src/catch2/benchmark/detail/catch_analyse.cpp @@ -0,0 +1,85 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +// Adapted from donated nonius code. + +#include <catch2/benchmark/detail/catch_analyse.hpp> +#include <catch2/benchmark/catch_clock.hpp> +#include <catch2/benchmark/catch_sample_analysis.hpp> +#include <catch2/benchmark/detail/catch_stats.hpp> +#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/internal/catch_move_and_forward.hpp> + +#include <vector> + +namespace Catch { + namespace Benchmark { + namespace Detail { + SampleAnalysis analyse(const IConfig &cfg, FDuration* first, FDuration* last) { + if (!cfg.benchmarkNoAnalysis()) { + std::vector<double> samples; + samples.reserve(static_cast<size_t>(last - first)); + for (auto current = first; current != last; ++current) { + samples.push_back( current->count() ); + } + + auto analysis = Catch::Benchmark::Detail::analyse_samples( + cfg.benchmarkConfidenceInterval(), + cfg.benchmarkResamples(), + samples.data(), + samples.data() + samples.size() ); + auto outliers = Catch::Benchmark::Detail::classify_outliers( + samples.data(), samples.data() + samples.size() ); + + auto wrap_estimate = [](Estimate<double> e) { + return Estimate<FDuration> { + FDuration(e.point), + FDuration(e.lower_bound), + FDuration(e.upper_bound), + e.confidence_interval, + }; + }; + std::vector<FDuration> samples2; + samples2.reserve(samples.size()); + for (auto s : samples) { + samples2.push_back( FDuration( s ) ); + } + + return { + CATCH_MOVE(samples2), + wrap_estimate(analysis.mean), + wrap_estimate(analysis.standard_deviation), + outliers, + analysis.outlier_variance, + }; + } else { + std::vector<FDuration> samples; + samples.reserve(static_cast<size_t>(last - first)); + + FDuration mean = FDuration(0); + int i = 0; + for (auto it = first; it < last; ++it, ++i) { + samples.push_back(FDuration(*it)); + mean += FDuration(*it); + } + mean /= i; + + return SampleAnalysis{ + CATCH_MOVE(samples), + Estimate<FDuration>{ mean, mean, mean, 0.0 }, + Estimate<FDuration>{ FDuration( 0 ), + FDuration( 0 ), + FDuration( 0 ), + 0.0 }, + OutlierClassification{}, + 0.0 + }; + } + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch diff --git a/src/catch2/benchmark/detail/catch_analyse.hpp b/src/catch2/benchmark/detail/catch_analyse.hpp index 77b0a9d3..5e3f7b0f 100644 --- a/src/catch2/benchmark/detail/catch_analyse.hpp +++ b/src/catch2/benchmark/detail/catch_analyse.hpp @@ -11,68 +11,15 @@ #define CATCH_ANALYSE_HPP_INCLUDED #include <catch2/benchmark/catch_clock.hpp> -#include <catch2/benchmark/catch_environment.hpp> #include <catch2/benchmark/catch_sample_analysis.hpp> -#include <catch2/benchmark/detail/catch_stats.hpp> -#include <catch2/interfaces/catch_interfaces_config.hpp> -#include <catch2/internal/catch_move_and_forward.hpp> -#include <algorithm> -#include <iterator> -#include <vector> namespace Catch { + class IConfig; + namespace Benchmark { namespace Detail { - template <typename Duration, typename Iterator> - SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) { - if (!cfg.benchmarkNoAnalysis()) { - std::vector<double> samples; - samples.reserve(static_cast<size_t>(last - first)); - std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); }); - - auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end()); - auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end()); - - auto wrap_estimate = [](Estimate<double> e) { - return Estimate<Duration> { - Duration(e.point), - Duration(e.lower_bound), - Duration(e.upper_bound), - e.confidence_interval, - }; - }; - std::vector<Duration> samples2; - samples2.reserve(samples.size()); - std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); }); - return { - CATCH_MOVE(samples2), - wrap_estimate(analysis.mean), - wrap_estimate(analysis.standard_deviation), - outliers, - analysis.outlier_variance, - }; - } else { - std::vector<Duration> samples; - samples.reserve(static_cast<size_t>(last - first)); - - Duration mean = Duration(0); - int i = 0; - for (auto it = first; it < last; ++it, ++i) { - samples.push_back(Duration(*it)); - mean += Duration(*it); - } - mean /= i; - - return { - CATCH_MOVE(samples), - Estimate<Duration>{mean, mean, mean, 0.0}, - Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0}, - OutlierClassification{}, - 0.0 - }; - } - } + SampleAnalysis analyse(const IConfig &cfg, FDuration* first, FDuration* last); } // namespace Detail } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/detail/catch_benchmark_function.hpp b/src/catch2/benchmark/detail/catch_benchmark_function.hpp index 15298258..144e4b6e 100644 --- a/src/catch2/benchmark/detail/catch_benchmark_function.hpp +++ b/src/catch2/benchmark/detail/catch_benchmark_function.hpp @@ -11,7 +11,6 @@ #define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED #include <catch2/benchmark/catch_chronometer.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/internal/catch_meta.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/benchmark/detail/catch_benchmark_stats.hpp b/src/catch2/benchmark/detail/catch_benchmark_stats.hpp new file mode 100644 index 00000000..3633bc9f --- /dev/null +++ b/src/catch2/benchmark/detail/catch_benchmark_stats.hpp @@ -0,0 +1,48 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_BENCHMARK_STATS_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_HPP_INCLUDED + +#include <catch2/benchmark/catch_estimate.hpp> +#include <catch2/benchmark/catch_outlier_classification.hpp> +// The fwd decl & default specialization needs to be seen by VS2017 before +// BenchmarkStats itself, or VS2017 will report compilation error. +#include <catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp> + +#include <string> +#include <vector> + +namespace Catch { + + struct BenchmarkInfo { + std::string name; + double estimatedDuration; + int iterations; + unsigned int samples; + unsigned int resamples; + double clockResolution; + double clockCost; + }; + + // We need to keep template parameter for backwards compatibility, + // but we also do not want to use the template paraneter. + template <class Dummy> + struct BenchmarkStats { + BenchmarkInfo info; + + std::vector<Benchmark::FDuration> samples; + Benchmark::Estimate<Benchmark::FDuration> mean; + Benchmark::Estimate<Benchmark::FDuration> standardDeviation; + Benchmark::OutlierClassification outliers; + double outlierVariance; + }; + + +} // end namespace Catch + +#endif // CATCH_BENCHMARK_STATS_HPP_INCLUDED diff --git a/src/catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp b/src/catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp new file mode 100644 index 00000000..2ccc25d5 --- /dev/null +++ b/src/catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp @@ -0,0 +1,23 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED + +#include <catch2/benchmark/catch_clock.hpp> + +namespace Catch { + + // We cannot forward declare the type with default template argument + // multiple times, so it is split out into a separate header so that + // we can prevent multiple declarations in dependees + template <typename Duration = Benchmark::FDuration> + struct BenchmarkStats; + +} // end namespace Catch + +#endif // CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED diff --git a/src/catch2/benchmark/detail/catch_complete_invoke.hpp b/src/catch2/benchmark/detail/catch_complete_invoke.hpp index 49db413e..4dff4b7e 100644 --- a/src/catch2/benchmark/detail/catch_complete_invoke.hpp +++ b/src/catch2/benchmark/detail/catch_complete_invoke.hpp @@ -10,14 +10,9 @@ #ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED #define CATCH_COMPLETE_INVOKE_HPP_INCLUDED -#include <catch2/internal/catch_test_failure_exception.hpp> #include <catch2/internal/catch_meta.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> -#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_move_and_forward.hpp> -#include <type_traits> - namespace Catch { namespace Benchmark { namespace Detail { diff --git a/src/catch2/benchmark/detail/catch_estimate_clock.hpp b/src/catch2/benchmark/detail/catch_estimate_clock.hpp index 907773f2..918484a9 100644 --- a/src/catch2/benchmark/detail/catch_estimate_clock.hpp +++ b/src/catch2/benchmark/detail/catch_estimate_clock.hpp @@ -19,7 +19,6 @@ #include <catch2/internal/catch_unique_ptr.hpp> #include <algorithm> -#include <iterator> #include <vector> #include <cmath> @@ -30,46 +29,49 @@ namespace Catch { std::vector<double> resolution(int k) { std::vector<TimePoint<Clock>> times; times.reserve(static_cast<size_t>(k + 1)); - std::generate_n(std::back_inserter(times), k + 1, now<Clock>{}); + for ( int i = 0; i < k + 1; ++i ) { + times.push_back( Clock::now() ); + } std::vector<double> deltas; deltas.reserve(static_cast<size_t>(k)); - std::transform(std::next(times.begin()), times.end(), times.begin(), - std::back_inserter(deltas), - [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); }); + for ( size_t idx = 1; idx < times.size(); ++idx ) { + deltas.push_back( static_cast<double>( + ( times[idx] - times[idx - 1] ).count() ) ); + } return deltas; } - const auto warmup_iterations = 10000; - const auto warmup_time = std::chrono::milliseconds(100); - const auto minimum_ticks = 1000; - const auto warmup_seed = 10000; - const auto clock_resolution_estimation_time = std::chrono::milliseconds(500); - const auto clock_cost_estimation_time_limit = std::chrono::seconds(1); - const auto clock_cost_estimation_tick_limit = 100000; - const auto clock_cost_estimation_time = std::chrono::milliseconds(10); - const auto clock_cost_estimation_iterations = 10000; + constexpr auto warmup_iterations = 10000; + constexpr auto warmup_time = std::chrono::milliseconds(100); + constexpr auto minimum_ticks = 1000; + constexpr auto warmup_seed = 10000; + constexpr auto clock_resolution_estimation_time = std::chrono::milliseconds(500); + constexpr auto clock_cost_estimation_time_limit = std::chrono::seconds(1); + constexpr auto clock_cost_estimation_tick_limit = 100000; + constexpr auto clock_cost_estimation_time = std::chrono::milliseconds(10); + constexpr auto clock_cost_estimation_iterations = 10000; template <typename Clock> int warmup() { - return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>) + return run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(warmup_time), warmup_seed, &resolution<Clock>) .iterations; } template <typename Clock> - EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) { - auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>) + EnvironmentEstimate estimate_clock_resolution(int iterations) { + auto r = run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(clock_resolution_estimation_time), iterations, &resolution<Clock>) .result; return { - FloatDuration<Clock>(mean(r.begin(), r.end())), - classify_outliers(r.begin(), r.end()), + FDuration(mean(r.data(), r.data() + r.size())), + classify_outliers(r.data(), r.data() + r.size()), }; } template <typename Clock> - EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) { + EnvironmentEstimate estimate_clock_cost(FDuration resolution) { auto time_limit = (std::min)( resolution * clock_cost_estimation_tick_limit, - FloatDuration<Clock>(clock_cost_estimation_time_limit)); + FDuration(clock_cost_estimation_time_limit)); auto time_clock = [](int k) { return Detail::measure<Clock>([k] { for (int i = 0; i < k; ++i) { @@ -80,26 +82,28 @@ namespace Catch { }; time_clock(1); int iters = clock_cost_estimation_iterations; - auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock); + auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<IDuration>(clock_cost_estimation_time), iters, time_clock); std::vector<double> times; int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed)); times.reserve(static_cast<size_t>(nsamples)); - std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] { - return static_cast<double>((time_clock(r.iterations) / r.iterations).count()); - }); + for ( int s = 0; s < nsamples; ++s ) { + times.push_back( static_cast<double>( + ( time_clock( r.iterations ) / r.iterations ) + .count() ) ); + } return { - FloatDuration<Clock>(mean(times.begin(), times.end())), - classify_outliers(times.begin(), times.end()), + FDuration(mean(times.data(), times.data() + times.size())), + classify_outliers(times.data(), times.data() + times.size()), }; } template <typename Clock> - Environment<FloatDuration<Clock>> measure_environment() { + Environment measure_environment() { #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wexit-time-destructors" #endif - static Catch::Detail::unique_ptr<Environment<FloatDuration<Clock>>> env; + static Catch::Detail::unique_ptr<Environment> env; #if defined(__clang__) # pragma clang diagnostic pop #endif @@ -111,7 +115,7 @@ namespace Catch { auto resolution = Detail::estimate_clock_resolution<Clock>(iters); auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean); - env = Catch::Detail::make_unique<Environment<FloatDuration<Clock>>>( Environment<FloatDuration<Clock>>{resolution, cost} ); + env = Catch::Detail::make_unique<Environment>( Environment{resolution, cost} ); return *env; } } // namespace Detail diff --git a/src/catch2/benchmark/detail/catch_measure.hpp b/src/catch2/benchmark/detail/catch_measure.hpp index 388814c1..37494a68 100644 --- a/src/catch2/benchmark/detail/catch_measure.hpp +++ b/src/catch2/benchmark/detail/catch_measure.hpp @@ -10,7 +10,6 @@ #ifndef CATCH_MEASURE_HPP_INCLUDED #define CATCH_MEASURE_HPP_INCLUDED -#include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/benchmark/detail/catch_timing.hpp> #include <catch2/internal/catch_move_and_forward.hpp> @@ -19,7 +18,7 @@ namespace Catch { namespace Benchmark { namespace Detail { template <typename Clock, typename Fun, typename... Args> - TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) { + TimingOf<Fun, Args...> measure(Fun&& fun, Args&&... args) { auto start = Clock::now(); auto&& r = Detail::complete_invoke(fun, CATCH_FORWARD(args)...); auto end = Clock::now(); diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.cpp b/src/catch2/benchmark/detail/catch_run_for_at_least.cpp index 35778b27..3ebdcc05 100644 --- a/src/catch2/benchmark/detail/catch_run_for_at_least.cpp +++ b/src/catch2/benchmark/detail/catch_run_for_at_least.cpp @@ -7,9 +7,10 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/benchmark/detail/catch_run_for_at_least.hpp> -#include <exception> #include <catch2/internal/catch_enforce.hpp> +#include <exception> + namespace Catch { namespace Benchmark { namespace Detail { diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp index 976a4b24..4dfa8bbb 100644 --- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp +++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp @@ -24,11 +24,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<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<Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) { Detail::ChronometerModel<Clock> meter; auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); @@ -43,8 +43,8 @@ namespace Catch { void throw_optimized_away_error(); template <typename Clock, typename Fun> - TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> - run_for_at_least(ClockDuration<Clock> how_long, + TimingOf<Fun, run_for_at_least_argument_t<Clock, Fun>> + run_for_at_least(IDuration how_long, const int initial_iterations, Fun&& fun) { auto iters = initial_iterations; diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 514ed1f7..2dd2d864 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -10,10 +10,14 @@ #include <catch2/benchmark/detail/catch_stats.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> +#include <catch2/internal/catch_floating_point_helpers.hpp> +#include <catch2/internal/catch_random_number_generator.hpp> +#include <algorithm> #include <cassert> +#include <cmath> #include <cstddef> -#include <iterator> +#include <numeric> #include <random> @@ -21,139 +25,204 @@ #include <future> #endif -namespace { - -using Catch::Benchmark::Detail::sample; - - template <typename URng, typename Estimator> - sample resample(URng& rng, unsigned int resamples, std::vector<double>::iterator first, std::vector<double>::iterator last, Estimator& estimator) { - auto n = static_cast<size_t>(last - first); - std::uniform_int_distribution<decltype(n)> dist(0, n - 1); - - sample out; - out.reserve(resamples); - std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] { - std::vector<double> resampled; - resampled.reserve(n); - std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[static_cast<std::ptrdiff_t>(dist(rng))]; }); - return estimator(resampled.begin(), resampled.end()); - }); - std::sort(out.begin(), out.end()); - return out; - } - - - double erf_inv(double x) { - // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2 - double w, p; - - w = -log((1.0 - x) * (1.0 + x)); - - if (w < 6.250000) { - w = w - 3.125000; - p = -3.6444120640178196996e-21; - p = -1.685059138182016589e-19 + p * w; - p = 1.2858480715256400167e-18 + p * w; - p = 1.115787767802518096e-17 + p * w; - p = -1.333171662854620906e-16 + p * w; - p = 2.0972767875968561637e-17 + p * w; - p = 6.6376381343583238325e-15 + p * w; - p = -4.0545662729752068639e-14 + p * w; - p = -8.1519341976054721522e-14 + p * w; - p = 2.6335093153082322977e-12 + p * w; - p = -1.2975133253453532498e-11 + p * w; - p = -5.4154120542946279317e-11 + p * w; - p = 1.051212273321532285e-09 + p * w; - p = -4.1126339803469836976e-09 + p * w; - p = -2.9070369957882005086e-08 + p * w; - p = 4.2347877827932403518e-07 + p * w; - p = -1.3654692000834678645e-06 + p * w; - p = -1.3882523362786468719e-05 + p * w; - p = 0.0001867342080340571352 + p * w; - p = -0.00074070253416626697512 + p * w; - p = -0.0060336708714301490533 + p * w; - p = 0.24015818242558961693 + p * w; - p = 1.6536545626831027356 + p * w; - } else if (w < 16.000000) { - w = sqrt(w) - 3.250000; - p = 2.2137376921775787049e-09; - p = 9.0756561938885390979e-08 + p * w; - p = -2.7517406297064545428e-07 + p * w; - p = 1.8239629214389227755e-08 + p * w; - p = 1.5027403968909827627e-06 + p * w; - p = -4.013867526981545969e-06 + p * w; - p = 2.9234449089955446044e-06 + p * w; - p = 1.2475304481671778723e-05 + p * w; - p = -4.7318229009055733981e-05 + p * w; - p = 6.8284851459573175448e-05 + p * w; - p = 2.4031110387097893999e-05 + p * w; - p = -0.0003550375203628474796 + p * w; - p = 0.00095328937973738049703 + p * w; - p = -0.0016882755560235047313 + p * w; - p = 0.0024914420961078508066 + p * w; - p = -0.0037512085075692412107 + p * w; - p = 0.005370914553590063617 + p * w; - p = 1.0052589676941592334 + p * w; - p = 3.0838856104922207635 + p * w; - } else { - w = sqrt(w) - 5.000000; - p = -2.7109920616438573243e-11; - p = -2.5556418169965252055e-10 + p * w; - p = 1.5076572693500548083e-09 + p * w; - p = -3.7894654401267369937e-09 + p * w; - p = 7.6157012080783393804e-09 + p * w; - p = -1.4960026627149240478e-08 + p * w; - p = 2.9147953450901080826e-08 + p * w; - p = -6.7711997758452339498e-08 + p * w; - p = 2.2900482228026654717e-07 + p * w; - p = -9.9298272942317002539e-07 + p * w; - p = 4.5260625972231537039e-06 + p * w; - p = -1.9681778105531670567e-05 + p * w; - p = 7.5995277030017761139e-05 + p * w; - p = -0.00021503011930044477347 + p * w; - p = -0.00013871931833623122026 + p * w; - p = 1.0103004648645343977 + p * w; - p = 4.8499064014085844221 + p * w; - } - return p * x; - } - - double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) { - auto m = Catch::Benchmark::Detail::mean(first, last); - double variance = std::accumulate( first, - last, - 0., - [m]( double a, double b ) { - double diff = b - m; - return a + diff * diff; - } ) / - ( last - first ); - return std::sqrt( variance ); - } - -} - namespace Catch { namespace Benchmark { namespace Detail { + namespace { + + template <typename URng, typename Estimator> + static sample + resample( URng& rng, + unsigned int resamples, + double const* first, + double const* last, + Estimator& estimator ) { + auto n = static_cast<size_t>( last - first ); + std::uniform_int_distribution<decltype( n )> dist( 0, + n - 1 ); + + sample out; + out.reserve( resamples ); + // We allocate the vector outside the loop to avoid realloc + // per resample + std::vector<double> resampled; + resampled.reserve( n ); + for ( size_t i = 0; i < resamples; ++i ) { + resampled.clear(); + for ( size_t s = 0; s < n; ++s ) { + resampled.push_back( + first[static_cast<std::ptrdiff_t>( + dist( rng ) )] ); + } + const auto estimate = + estimator( resampled.data(), resampled.data() + resampled.size() ); + out.push_back( estimate ); + } + std::sort( out.begin(), out.end() ); + return out; + } -#if defined( __GNUC__ ) || defined( __clang__ ) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - bool directCompare( double lhs, double rhs ) { return lhs == rhs; } -#if defined( __GNUC__ ) || defined( __clang__ ) -# pragma GCC diagnostic pop -#endif + static double outlier_variance( Estimate<double> mean, + Estimate<double> stddev, + int n ) { + double sb = stddev.point; + double mn = mean.point / n; + double mg_min = mn / 2.; + double sg = (std::min)( mg_min / 4., sb / std::sqrt( n ) ); + double sg2 = sg * sg; + double sb2 = sb * sb; + + auto c_max = [n, mn, sb2, sg2]( double x ) -> double { + double k = mn - x; + double d = k * k; + double nd = n * d; + double k0 = -n * nd; + double k1 = sb2 - n * sg2 + nd; + double det = k1 * k1 - 4 * sg2 * k0; + return static_cast<int>( -2. * k0 / + ( k1 + std::sqrt( det ) ) ); + }; + + auto var_out = [n, sb2, sg2]( double c ) { + double nc = n - c; + return ( nc / n ) * ( sb2 - nc * sg2 ); + }; + + return (std::min)( var_out( 1 ), + var_out( + (std::min)( c_max( 0. ), + c_max( mg_min ) ) ) ) / + sb2; + } + + static double erf_inv( double x ) { + // Code accompanying the article "Approximating the erfinv + // function" in GPU Computing Gems, Volume 2 + double w, p; + + w = -log( ( 1.0 - x ) * ( 1.0 + x ) ); + + if ( w < 6.250000 ) { + w = w - 3.125000; + p = -3.6444120640178196996e-21; + p = -1.685059138182016589e-19 + p * w; + p = 1.2858480715256400167e-18 + p * w; + p = 1.115787767802518096e-17 + p * w; + p = -1.333171662854620906e-16 + p * w; + p = 2.0972767875968561637e-17 + p * w; + p = 6.6376381343583238325e-15 + p * w; + p = -4.0545662729752068639e-14 + p * w; + p = -8.1519341976054721522e-14 + p * w; + p = 2.6335093153082322977e-12 + p * w; + p = -1.2975133253453532498e-11 + p * w; + p = -5.4154120542946279317e-11 + p * w; + p = 1.051212273321532285e-09 + p * w; + p = -4.1126339803469836976e-09 + p * w; + p = -2.9070369957882005086e-08 + p * w; + p = 4.2347877827932403518e-07 + p * w; + p = -1.3654692000834678645e-06 + p * w; + p = -1.3882523362786468719e-05 + p * w; + p = 0.0001867342080340571352 + p * w; + p = -0.00074070253416626697512 + p * w; + p = -0.0060336708714301490533 + p * w; + p = 0.24015818242558961693 + p * w; + p = 1.6536545626831027356 + p * w; + } else if ( w < 16.000000 ) { + w = sqrt( w ) - 3.250000; + p = 2.2137376921775787049e-09; + p = 9.0756561938885390979e-08 + p * w; + p = -2.7517406297064545428e-07 + p * w; + p = 1.8239629214389227755e-08 + p * w; + p = 1.5027403968909827627e-06 + p * w; + p = -4.013867526981545969e-06 + p * w; + p = 2.9234449089955446044e-06 + p * w; + p = 1.2475304481671778723e-05 + p * w; + p = -4.7318229009055733981e-05 + p * w; + p = 6.8284851459573175448e-05 + p * w; + p = 2.4031110387097893999e-05 + p * w; + p = -0.0003550375203628474796 + p * w; + p = 0.00095328937973738049703 + p * w; + p = -0.0016882755560235047313 + p * w; + p = 0.0024914420961078508066 + p * w; + p = -0.0037512085075692412107 + p * w; + p = 0.005370914553590063617 + p * w; + p = 1.0052589676941592334 + p * w; + p = 3.0838856104922207635 + p * w; + } else { + w = sqrt( w ) - 5.000000; + p = -2.7109920616438573243e-11; + p = -2.5556418169965252055e-10 + p * w; + p = 1.5076572693500548083e-09 + p * w; + p = -3.7894654401267369937e-09 + p * w; + p = 7.6157012080783393804e-09 + p * w; + p = -1.4960026627149240478e-08 + p * w; + p = 2.9147953450901080826e-08 + p * w; + p = -6.7711997758452339498e-08 + p * w; + p = 2.2900482228026654717e-07 + p * w; + p = -9.9298272942317002539e-07 + p * w; + p = 4.5260625972231537039e-06 + p * w; + p = -1.9681778105531670567e-05 + p * w; + p = 7.5995277030017761139e-05 + p * w; + p = -0.00021503011930044477347 + p * w; + p = -0.00013871931833623122026 + p * w; + p = 1.0103004648645343977 + p * w; + p = 4.8499064014085844221 + p * w; + } + return p * x; + } + + static double + standard_deviation( double const* first, double const* last ) { + auto m = Catch::Benchmark::Detail::mean( first, last ); + double variance = + std::accumulate( first, + last, + 0., + [m]( double a, double b ) { + double diff = b - m; + return a + diff * diff; + } ) / + ( last - first ); + return std::sqrt( variance ); + } + + static sample jackknife( double ( *estimator )( double const*, + double const* ), + double* first, + double* last ) { + const auto second = first + 1; + sample results; + results.reserve( static_cast<size_t>( last - first ) ); + + for ( auto it = first; it != last; ++it ) { + std::iter_swap( it, first ); + results.push_back( estimator( second, last ) ); + } + + return results; + } + + + } // namespace + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +namespace Catch { + namespace Benchmark { + namespace Detail { - double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) { + double weighted_average_quantile( int k, + int q, + double* first, + double* last ) { auto count = last - first; double idx = (count - 1) * k / static_cast<double>(q); int j = static_cast<int>(idx); double g = idx - j; std::nth_element(first, first + j, last); auto xj = first[j]; - if ( directCompare( g, 0 ) ) { + if ( Catch::Detail::directCompare( g, 0 ) ) { return xj; } @@ -161,6 +230,48 @@ namespace Catch { return xj + g * (xj1 - xj); } + OutlierClassification + classify_outliers( double const* first, double const* last ) { + std::vector<double> copy( first, last ); + + auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.data() + copy.size() ); + auto q3 = weighted_average_quantile( 3, 4, copy.data(), copy.data() + copy.size() ); + auto iqr = q3 - q1; + auto los = q1 - ( iqr * 3. ); + auto lom = q1 - ( iqr * 1.5 ); + auto him = q3 + ( iqr * 1.5 ); + auto his = q3 + ( iqr * 3. ); + + OutlierClassification o; + for ( ; first != last; ++first ) { + const double t = *first; + if ( t < los ) { + ++o.low_severe; + } else if ( t < lom ) { + ++o.low_mild; + } else if ( t > his ) { + ++o.high_severe; + } else if ( t > him ) { + ++o.high_mild; + } + ++o.samples_seen; + } + return o; + } + + double mean( double const* first, double const* last ) { + auto count = last - first; + double sum = 0.; + while (first != last) { + sum += *first; + ++first; + } + return sum / static_cast<double>(count); + } + + double normal_cdf( double x ) { + return std::erfc( -x / std::sqrt( 2.0 ) ) / 2.0; + } double erfc_inv(double x) { return erf_inv(1.0 - x); @@ -182,50 +293,77 @@ namespace Catch { return result; } + Estimate<double> + bootstrap( double confidence_level, + double* first, + double* last, + sample const& resample, + double ( *estimator )( double const*, double const* ) ) { + auto n_samples = last - first; + + double point = estimator( first, last ); + // Degenerate case with a single sample + if ( n_samples == 1 ) + return { point, point, point, confidence_level }; + + sample jack = jackknife( estimator, first, last ); + double jack_mean = + mean( jack.data(), jack.data() + jack.size() ); + double sum_squares = 0, sum_cubes = 0; + for ( double x : jack ) { + auto difference = jack_mean - x; + auto square = difference * difference; + auto cube = square * difference; + sum_squares += square; + sum_cubes += cube; + } - double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) { - double sb = stddev.point; - double mn = mean.point / n; - double mg_min = mn / 2.; - double sg = (std::min)(mg_min / 4., sb / std::sqrt(n)); - double sg2 = sg * sg; - double sb2 = sb * sb; - - auto c_max = [n, mn, sb2, sg2](double x) -> double { - double k = mn - x; - double d = k * k; - double nd = n * d; - double k0 = -n * nd; - double k1 = sb2 - n * sg2 + nd; - double det = k1 * k1 - 4 * sg2 * k0; - return static_cast<int>(-2. * k0 / (k1 + std::sqrt(det))); - }; + double accel = sum_cubes / ( 6 * std::pow( sum_squares, 1.5 ) ); + long n = static_cast<long>( resample.size() ); + double prob_n = + std::count_if( resample.begin(), + resample.end(), + [point]( double x ) { return x < point; } ) / + static_cast<double>( n ); + // degenerate case with uniform samples + if ( Catch::Detail::directCompare( prob_n, 0. ) ) { + return { point, point, point, confidence_level }; + } - auto var_out = [n, sb2, sg2](double c) { - double nc = n - c; - return (nc / n) * (sb2 - nc * sg2); - }; + double bias = normal_quantile( prob_n ); + double z1 = normal_quantile( ( 1. - confidence_level ) / 2. ); - return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2; + auto cumn = [n]( double x ) -> long { + return std::lround( normal_cdf( x ) * + static_cast<double>( n ) ); + }; + auto a = [bias, accel]( double b ) { + return bias + b / ( 1. - accel * b ); + }; + double b1 = bias + z1; + double b2 = bias - z1; + double a1 = a( b1 ); + double a2 = a( b2 ); + auto lo = static_cast<size_t>( (std::max)( cumn( a1 ), 0l ) ); + auto hi = + static_cast<size_t>( (std::min)( cumn( a2 ), n - 1 ) ); + + return { point, resample[lo], resample[hi], confidence_level }; } - - bootstrap_analysis analyse_samples(double confidence_level, unsigned int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) { - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS - static std::random_device entropy; - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION - - auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++ - - auto mean = &Detail::mean<std::vector<double>::iterator>; + bootstrap_analysis analyse_samples(double confidence_level, + unsigned int n_resamples, + double* first, + double* last) { + auto mean = &Detail::mean; auto stddev = &standard_deviation; #if defined(CATCH_CONFIG_USE_ASYNC) - auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) { - auto seed = entropy(); + auto Estimate = [=](double(*f)(double const*, double const*)) { + std::random_device rd; + auto seed = rd(); return std::async(std::launch::async, [=] { - std::mt19937 rng(seed); + SimplePcg32 rng( seed ); auto resampled = resample(rng, n_resamples, first, last, f); return bootstrap(confidence_level, first, last, resampled, f); }); @@ -237,9 +375,10 @@ namespace Catch { auto mean_estimate = mean_future.get(); auto stddev_estimate = stddev_future.get(); #else - auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) { - auto seed = entropy(); - std::mt19937 rng(seed); + auto Estimate = [=](double(*f)(double const* , double const*)) { + std::random_device rd; + auto seed = rd(); + SimplePcg32 rng( seed ); auto resampled = resample(rng, n_resamples, first, last, f); return bootstrap(confidence_level, first, last, resampled, f); }; @@ -248,6 +387,7 @@ namespace Catch { auto stddev_estimate = Estimate(stddev); #endif // CATCH_USE_ASYNC + auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++ double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n); return { mean_estimate, stddev_estimate, outlier_variance }; diff --git a/src/catch2/benchmark/detail/catch_stats.hpp b/src/catch2/benchmark/detail/catch_stats.hpp index 4c54ec52..3bea612f 100644 --- a/src/catch2/benchmark/detail/catch_stats.hpp +++ b/src/catch2/benchmark/detail/catch_stats.hpp @@ -13,122 +13,35 @@ #include <catch2/benchmark/catch_estimate.hpp> #include <catch2/benchmark/catch_outlier_classification.hpp> -#include <algorithm> #include <vector> -#include <numeric> -#include <tuple> -#include <cmath> namespace Catch { namespace Benchmark { namespace Detail { using sample = std::vector<double>; - // Used when we know we want == comparison of two doubles - // to centralize warning suppression - bool directCompare( double lhs, double rhs ); - - double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last); - - template <typename Iterator> - OutlierClassification classify_outliers(Iterator first, Iterator last) { - std::vector<double> copy(first, last); - - auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end()); - auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end()); - auto iqr = q3 - q1; - auto los = q1 - (iqr * 3.); - auto lom = q1 - (iqr * 1.5); - auto him = q3 + (iqr * 1.5); - auto his = q3 + (iqr * 3.); - - OutlierClassification o; - for (; first != last; ++first) { - auto&& t = *first; - if (t < los) ++o.low_severe; - else if (t < lom) ++o.low_mild; - else if (t > his) ++o.high_severe; - else if (t > him) ++o.high_mild; - ++o.samples_seen; - } - return o; - } - - template <typename Iterator> - double mean(Iterator first, Iterator last) { - auto count = last - first; - double sum = std::accumulate(first, last, 0.); - return sum / static_cast<double>(count); - } - - template <typename Estimator, typename Iterator> - sample jackknife(Estimator&& estimator, Iterator first, Iterator last) { - auto n = static_cast<size_t>(last - first); - auto second = first; - ++second; - sample results; - results.reserve(n); - - for (auto it = first; it != last; ++it) { - std::iter_swap(it, first); - results.push_back(estimator(second, last)); - } - - return results; - } - - inline double normal_cdf(double x) { - return std::erfc(-x / std::sqrt(2.0)) / 2.0; - } + double weighted_average_quantile( int k, + int q, + double* first, + double* last ); + + OutlierClassification + classify_outliers( double const* first, double const* last ); + + double mean( double const* first, double const* last ); + + double normal_cdf( double x ); double erfc_inv(double x); double normal_quantile(double p); - template <typename Iterator, typename Estimator> - Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) { - auto n_samples = last - first; - - double point = estimator(first, last); - // Degenerate case with a single sample - if (n_samples == 1) return { point, point, point, confidence_level }; - - sample jack = jackknife(estimator, first, last); - double jack_mean = mean(jack.begin(), jack.end()); - double sum_squares, sum_cubes; - std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> { - auto d = jack_mean - x; - auto d2 = d * d; - auto d3 = d2 * d; - return { sqcb.first + d2, sqcb.second + d3 }; - }); - - double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5)); - long n = static_cast<long>(resample.size()); - double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / static_cast<double>(n); - // degenerate case with uniform samples - if ( directCompare( prob_n, 0. ) ) { - return { point, point, point, confidence_level }; - } - - double bias = normal_quantile(prob_n); - double z1 = normal_quantile((1. - confidence_level) / 2.); - - auto cumn = [n]( double x ) -> long { - return std::lround( normal_cdf( x ) * static_cast<double>(n) ); - }; - auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); }; - double b1 = bias + z1; - double b2 = bias - z1; - double a1 = a(b1); - double a2 = a(b2); - auto lo = static_cast<size_t>((std::max)(cumn(a1), 0l)); - auto hi = static_cast<size_t>((std::min)(cumn(a2), n - 1)); - - return { point, resample[lo], resample[hi], confidence_level }; - } - - double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n); + Estimate<double> + bootstrap( double confidence_level, + double* first, + double* last, + sample const& resample, + double ( *estimator )( double const*, double const* ) ); struct bootstrap_analysis { Estimate<double> mean; @@ -136,7 +49,10 @@ namespace Catch { double outlier_variance; }; - bootstrap_analysis analyse_samples(double confidence_level, unsigned int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last); + bootstrap_analysis analyse_samples(double confidence_level, + unsigned int n_resamples, + double* first, + double* last); } // namespace Detail } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/benchmark/detail/catch_timing.hpp b/src/catch2/benchmark/detail/catch_timing.hpp index f5c25571..da567190 100644 --- a/src/catch2/benchmark/detail/catch_timing.hpp +++ b/src/catch2/benchmark/detail/catch_timing.hpp @@ -17,14 +17,14 @@ namespace Catch { namespace Benchmark { - template <typename Duration, typename Result> + template <typename Result> struct Timing { - Duration elapsed; + IDuration elapsed; Result result; int iterations; }; - template <typename Clock, typename Func, typename... Args> - using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; + template <typename Func, typename... Args> + using TimingOf = Timing<Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>; } // namespace Benchmark } // namespace Catch diff --git a/src/catch2/catch_all.hpp b/src/catch2/catch_all.hpp index a0bf7605..f2cc8536 100644 --- a/src/catch2/catch_all.hpp +++ b/src/catch2/catch_all.hpp @@ -54,6 +54,8 @@ #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_config_android_logwrite.hpp> #include <catch2/internal/catch_config_counter.hpp> +#include <catch2/internal/catch_config_prefix_messages.hpp> +#include <catch2/internal/catch_config_static_analysis_support.hpp> #include <catch2/internal/catch_config_uncaught_exceptions.hpp> #include <catch2/internal/catch_config_wchar.hpp> #include <catch2/internal/catch_console_colour.hpp> @@ -70,7 +72,9 @@ #include <catch2/internal/catch_fatal_condition_handler.hpp> #include <catch2/internal/catch_floating_point_helpers.hpp> #include <catch2/internal/catch_getenv.hpp> +#include <catch2/internal/catch_is_permutation.hpp> #include <catch2/internal/catch_istream.hpp> +#include <catch2/internal/catch_jsonwriter.hpp> #include <catch2/internal/catch_lazy_expr.hpp> #include <catch2/internal/catch_leak_detector.hpp> #include <catch2/internal/catch_list.hpp> @@ -85,7 +89,10 @@ #include <catch2/internal/catch_platform.hpp> #include <catch2/internal/catch_polyfills.hpp> #include <catch2/internal/catch_preprocessor.hpp> +#include <catch2/internal/catch_preprocessor_internal_stringify.hpp> #include <catch2/internal/catch_preprocessor_remove_parens.hpp> +#include <catch2/internal/catch_random_floating_point_helpers.hpp> +#include <catch2/internal/catch_random_integer_helpers.hpp> #include <catch2/internal/catch_random_number_generator.hpp> #include <catch2/internal/catch_random_seed_generation.hpp> #include <catch2/internal/catch_reporter_registry.hpp> @@ -110,10 +117,13 @@ #include <catch2/internal/catch_test_failure_exception.hpp> #include <catch2/internal/catch_test_macro_impl.hpp> #include <catch2/internal/catch_test_registry.hpp> +#include <catch2/internal/catch_test_run_info.hpp> #include <catch2/internal/catch_test_spec_parser.hpp> #include <catch2/internal/catch_textflow.hpp> #include <catch2/internal/catch_to_string.hpp> #include <catch2/internal/catch_uncaught_exceptions.hpp> +#include <catch2/internal/catch_uniform_floating_point_distribution.hpp> +#include <catch2/internal/catch_uniform_integer_distribution.hpp> #include <catch2/internal/catch_unique_name.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_void_type.hpp> diff --git a/src/catch2/catch_approx.cpp b/src/catch2/catch_approx.cpp index 407586d1..9ad4ce3e 100644 --- a/src/catch2/catch_approx.cpp +++ b/src/catch2/catch_approx.cpp @@ -70,10 +70,10 @@ namespace Catch { } namespace literals { - Approx operator "" _a(long double val) { + Approx operator ""_a(long double val) { return Approx(val); } - Approx operator "" _a(unsigned long long val) { + Approx operator ""_a(unsigned long long val) { return Approx(val); } } // end namespace literals diff --git a/src/catch2/catch_assertion_result.cpp b/src/catch2/catch_assertion_result.cpp index 5b5d3290..61d4fd06 100644 --- a/src/catch2/catch_assertion_result.cpp +++ b/src/catch2/catch_assertion_result.cpp @@ -7,6 +7,7 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/catch_assertion_result.hpp> #include <catch2/internal/catch_reusable_string_stream.hpp> +#include <catch2/internal/catch_move_and_forward.hpp> namespace Catch { @@ -26,9 +27,9 @@ namespace Catch { return reconstructedExpression; } - AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data ) + AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData&& data ) : m_info( info ), - m_resultData( data ) + m_resultData( CATCH_MOVE(data) ) {} // Result was a success @@ -67,16 +68,15 @@ namespace Catch { } std::string AssertionResult::getExpressionInMacro() const { - std::string expr; - if( m_info.macroName.empty() ) - expr = static_cast<std::string>(m_info.capturedExpression); - else { - expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); - expr += m_info.macroName; - expr += "( "; - expr += m_info.capturedExpression; - expr += " )"; + if ( m_info.macroName.empty() ) { + return static_cast<std::string>( m_info.capturedExpression ); } + std::string expr; + expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); + expr += m_info.macroName; + expr += "( "; + expr += m_info.capturedExpression; + expr += " )"; return expr; } diff --git a/src/catch2/catch_assertion_result.hpp b/src/catch2/catch_assertion_result.hpp index 6829e2f7..48882876 100644 --- a/src/catch2/catch_assertion_result.hpp +++ b/src/catch2/catch_assertion_result.hpp @@ -35,7 +35,7 @@ namespace Catch { class AssertionResult { public: AssertionResult() = delete; - AssertionResult( AssertionInfo const& info, AssertionResultData const& data ); + AssertionResult( AssertionInfo const& info, AssertionResultData&& data ); bool isOk() const; bool succeeded() const; diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp index eb4f5ad3..34f50f17 100644 --- a/src/catch2/catch_config.cpp +++ b/src/catch2/catch_config.cpp @@ -105,7 +105,7 @@ namespace Catch { elem = trim(elem); } - // Insert the default reporter if user hasn't asked for a specfic one + // Insert the default reporter if user hasn't asked for a specific one if ( m_data.reporterSpecifications.empty() ) { m_data.reporterSpecifications.push_back( { #if defined( CATCH_CONFIG_DEFAULT_REPORTER ) diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp index 4ab6ecf5..384f180e 100644 --- a/src/catch2/catch_message.cpp +++ b/src/catch2/catch_message.cpp @@ -19,8 +19,8 @@ namespace Catch { //////////////////////////////////////////////////////////////////////////// - ScopedMessage::ScopedMessage( MessageBuilder const& builder ): - m_info( builder.m_info ) { + ScopedMessage::ScopedMessage( MessageBuilder&& builder ): + m_info( CATCH_MOVE(builder.m_info) ) { m_info.message = builder.m_stream.str(); getResultCapture().pushScopedMessage( m_info ); } @@ -37,7 +37,11 @@ namespace Catch { } - Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { + Capturer::Capturer( StringRef macroName, + SourceLineInfo const& lineInfo, + ResultWas::OfType resultType, + StringRef names ): + m_resultCapture( getResultCapture() ) { auto trimmed = [&] (size_t start, size_t end) { while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) { ++start; diff --git a/src/catch2/catch_message.hpp b/src/catch2/catch_message.hpp index 4f71f227..05325ee8 100644 --- a/src/catch2/catch_message.hpp +++ b/src/catch2/catch_message.hpp @@ -8,12 +8,13 @@ #ifndef CATCH_MESSAGE_HPP_INCLUDED #define CATCH_MESSAGE_HPP_INCLUDED +#include <catch2/internal/catch_config_prefix_messages.hpp> #include <catch2/internal/catch_result_type.hpp> #include <catch2/internal/catch_reusable_string_stream.hpp> #include <catch2/internal/catch_stream_end_stop.hpp> #include <catch2/internal/catch_message_info.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <catch2/catch_tostring.hpp> +#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <string> #include <vector> @@ -21,6 +22,7 @@ namespace Catch { struct SourceLineInfo; + class IResultCapture; struct MessageStream { @@ -39,11 +41,10 @@ namespace Catch { ResultWas::OfType type ): m_info(macroName, lineInfo, type) {} - template<typename T> - MessageBuilder& operator << ( T const& value ) { + MessageBuilder&& operator << ( T const& value ) && { m_stream << value; - return *this; + return CATCH_MOVE(*this); } MessageInfo m_info; @@ -51,7 +52,7 @@ namespace Catch { class ScopedMessage { public: - explicit ScopedMessage( MessageBuilder const& builder ); + explicit ScopedMessage( MessageBuilder&& builder ); ScopedMessage( ScopedMessage& duplicate ) = delete; ScopedMessage( ScopedMessage&& old ) noexcept; ~ScopedMessage(); @@ -62,7 +63,7 @@ namespace Catch { class Capturer { std::vector<MessageInfo> m_messages; - IResultCapture& m_resultCapture = getResultCapture(); + IResultCapture& m_resultCapture; size_t m_captured = 0; public: Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ); @@ -98,7 +99,10 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \ - Catch::Capturer varName( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \ + Catch::Capturer varName( macroName##_catch_sr, \ + CATCH_INTERNAL_LINEINFO, \ + Catch::ResultWas::Info, \ + #__VA_ARGS__##_catch_sr ); \ varName.captureValues( 0, __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// @@ -110,28 +114,28 @@ namespace Catch { Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) -#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) +#if defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) #define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg ) #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE", __VA_ARGS__ ) -#elif defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) +#elif defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) #define CATCH_INFO( msg ) (void)(0) #define CATCH_UNSCOPED_INFO( msg ) (void)(0) #define CATCH_WARN( msg ) (void)(0) #define CATCH_CAPTURE( ... ) (void)(0) -#elif !defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) #define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg ) #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) #define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE", __VA_ARGS__ ) -#elif !defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) #define INFO( msg ) (void)(0) #define UNSCOPED_INFO( msg ) (void)(0) diff --git a/src/catch2/catch_registry_hub.cpp b/src/catch2/catch_registry_hub.cpp index 243dd2b0..8716db3a 100644 --- a/src/catch2/catch_registry_hub.cpp +++ b/src/catch2/catch_registry_hub.cpp @@ -20,6 +20,9 @@ #include <catch2/internal/catch_noncopyable.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> #include <catch2/internal/catch_move_and_forward.hpp> +#include <catch2/internal/catch_reporter_registry.hpp> + +#include <exception> namespace Catch { @@ -31,7 +34,7 @@ namespace Catch { public: // IRegistryHub RegistryHub() = default; - IReporterRegistry const& getReporterRegistry() const override { + ReporterRegistry const& getReporterRegistry() const override { return m_reporterRegistry; } ITestCaseRegistry const& getTestCaseRegistry() const override { diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 128f21d9..f1ed5f9c 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -13,13 +13,13 @@ #include <catch2/internal/catch_run_context.hpp> #include <catch2/catch_test_spec.hpp> #include <catch2/catch_version.hpp> -#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/internal/catch_startup_exception_registry.hpp> #include <catch2/internal/catch_sharding.hpp> +#include <catch2/internal/catch_test_case_registry_impl.hpp> #include <catch2/internal/catch_textflow.hpp> #include <catch2/internal/catch_windows_h_proxy.hpp> #include <catch2/reporters/catch_reporter_multi.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> +#include <catch2/internal/catch_reporter_registry.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> #include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_stdstreams.hpp> @@ -27,6 +27,7 @@ #include <algorithm> #include <cassert> +#include <exception> #include <iomanip> #include <set> @@ -341,6 +342,12 @@ namespace Catch { return 2; } + if ( totals.testCases.total() > 0 && + totals.testCases.total() == totals.testCases.skipped + && !m_config->zeroTestsCountAsSuccess() ) { + return 4; + } + // Note that on unices only the lower 8 bits are usually used, clamping // the return value to 255 prevents false negative when some multiple // of 256 tests has failed diff --git a/src/catch2/catch_test_case_info.cpp b/src/catch2/catch_test_case_info.cpp index a6adce0a..e9dad577 100644 --- a/src/catch2/catch_test_case_info.cpp +++ b/src/catch2/catch_test_case_info.cpp @@ -139,12 +139,20 @@ namespace Catch { for (size_t idx = 0; idx < originalTags.size(); ++idx) { auto c = originalTags[idx]; if (c == '[') { - assert(!inTag); + CATCH_ENFORCE( + !inTag, + "Found '[' inside a tag while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + inTag = true; tagStart = idx; } if (c == ']') { - assert(inTag); + CATCH_ENFORCE( + inTag, + "Found unmatched ']' while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + inTag = false; tagEnd = idx; assert(tagStart < tagEnd); @@ -153,7 +161,11 @@ namespace Catch { // it over to backing storage and actually reference the // backing storage in the saved tags StringRef tagStr = originalTags.substr(tagStart+1, tagEnd - tagStart - 1); - CATCH_ENFORCE(!tagStr.empty(), "Empty tags are not allowed"); + CATCH_ENFORCE( !tagStr.empty(), + "Found an empty tag while registering test case '" + << _nameAndTags.name << "' at " + << _lineInfo ); + enforceNotReservedTag(tagStr, lineInfo); properties |= parseSpecialTag(tagStr); // When copying a tag to the backing storage, we need to @@ -167,8 +179,12 @@ namespace Catch { // the tags. internalAppendTag(tagStr); } - (void)inTag; // Silence "set-but-unused" warning in release mode. } + CATCH_ENFORCE( !inTag, + "Found an unclosed tag while registering test case '" + << _nameAndTags.name << "' at " << _lineInfo ); + + // Add [.] if relevant if (isHidden()) { internalAppendTag("."_sr); diff --git a/src/catch2/catch_test_case_info.hpp b/src/catch2/catch_test_case_info.hpp index ab5ae8b9..5ff3e3e7 100644 --- a/src/catch2/catch_test_case_info.hpp +++ b/src/catch2/catch_test_case_info.hpp @@ -15,6 +15,7 @@ #include <catch2/internal/catch_unique_ptr.hpp> +#include <cstdint> #include <string> #include <vector> diff --git a/src/catch2/catch_test_macros.hpp b/src/catch2/catch_test_macros.hpp index cce2852f..1088afbe 100644 --- a/src/catch2/catch_test_macros.hpp +++ b/src/catch2/catch_test_macros.hpp @@ -49,6 +49,7 @@ #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) @@ -102,6 +103,7 @@ #define CATCH_FAIL( ... ) (void)(0) #define CATCH_FAIL_CHECK( ... ) (void)(0) #define CATCH_SUCCEED( ... ) (void)(0) + #define CATCH_SKIP( ... ) (void)(0) #define CATCH_STATIC_REQUIRE( ... ) (void)(0) #define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0) @@ -146,6 +148,7 @@ #define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) #define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) @@ -198,6 +201,7 @@ #define FAIL( ... ) (void)(0) #define FAIL_CHECK( ... ) (void)(0) #define SUCCEED( ... ) (void)(0) + #define SKIP( ... ) (void)(0) #define STATIC_REQUIRE( ... ) (void)(0) #define STATIC_REQUIRE_FALSE( ... ) (void)(0) diff --git a/src/catch2/catch_test_spec.cpp b/src/catch2/catch_test_spec.cpp index f27ce99c..f32f9864 100644 --- a/src/catch2/catch_test_spec.cpp +++ b/src/catch2/catch_test_spec.cpp @@ -6,6 +6,8 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/catch_test_spec.hpp> +#include <catch2/interfaces/catch_interfaces_testcase.hpp> +#include <catch2/internal/catch_test_case_registry_impl.hpp> #include <catch2/internal/catch_reusable_string_stream.hpp> #include <catch2/internal/catch_string_manip.hpp> #include <catch2/catch_test_case_info.hpp> @@ -106,16 +108,18 @@ namespace Catch { return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } ); } - TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCaseHandle> const& testCases, IConfig const& config ) const - { - Matches matches( m_filters.size() ); - std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){ + TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCaseHandle> const& testCases, IConfig const& config ) const { + Matches matches; + matches.reserve( m_filters.size() ); + for ( auto const& filter : m_filters ) { std::vector<TestCaseHandle const*> currentMatches; - for( auto const& test : testCases ) - if( isThrowSafe( test, config ) && filter.matches( test.getTestCaseInfo() ) ) + for ( auto const& test : testCases ) + if ( isThrowSafe( test, config ) && + filter.matches( test.getTestCaseInfo() ) ) currentMatches.emplace_back( &test ); - return FilterMatch{ extractFilterName(filter), currentMatches }; - } ); + matches.push_back( + FilterMatch{ extractFilterName( filter ), currentMatches } ); + } return matches; } diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index 904caa7e..f3fb0beb 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -116,7 +116,6 @@ namespace Catch { } // namespace Detail - // If we decide for C++14, change these to enable_if_ts template <typename T, typename = void> struct StringMaker { template <typename Fake = T> @@ -399,6 +398,12 @@ namespace Catch { } } }; + template <> + struct StringMaker<std::nullopt_t> { + static std::string convert(const std::nullopt_t&) { + return "{ }"; + } + }; } #endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER diff --git a/src/catch2/catch_totals.cpp b/src/catch2/catch_totals.cpp index a3e2b384..bd1954fb 100644 --- a/src/catch2/catch_totals.cpp +++ b/src/catch2/catch_totals.cpp @@ -14,6 +14,7 @@ namespace Catch { diff.passed = passed - other.passed; diff.failed = failed - other.failed; diff.failedButOk = failedButOk - other.failedButOk; + diff.skipped = skipped - other.skipped; return diff; } @@ -21,14 +22,15 @@ namespace Catch { passed += other.passed; failed += other.failed; failedButOk += other.failedButOk; + skipped += other.skipped; return *this; } std::uint64_t Counts::total() const { - return passed + failed + failedButOk; + return passed + failed + failedButOk + skipped; } bool Counts::allPassed() const { - return failed == 0 && failedButOk == 0; + return failed == 0 && failedButOk == 0 && skipped == 0; } bool Counts::allOk() const { return failed == 0; @@ -53,6 +55,8 @@ namespace Catch { ++diff.testCases.failed; else if( diff.assertions.failedButOk > 0 ) ++diff.testCases.failedButOk; + else if ( diff.assertions.skipped > 0 ) + ++ diff.testCases.skipped; else ++diff.testCases.passed; return diff; diff --git a/src/catch2/catch_totals.hpp b/src/catch2/catch_totals.hpp index 8dd360c6..386392c9 100644 --- a/src/catch2/catch_totals.hpp +++ b/src/catch2/catch_totals.hpp @@ -23,6 +23,7 @@ namespace Catch { std::uint64_t passed = 0; std::uint64_t failed = 0; std::uint64_t failedButOk = 0; + std::uint64_t skipped = 0; }; struct Totals { diff --git a/src/catch2/catch_translate_exception.cpp b/src/catch2/catch_translate_exception.cpp new file mode 100644 index 00000000..c4b28944 --- /dev/null +++ b/src/catch2/catch_translate_exception.cpp @@ -0,0 +1,20 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_translate_exception.hpp> +#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> + +namespace Catch { + namespace Detail { + void registerTranslatorImpl( + Detail::unique_ptr<IExceptionTranslator>&& translator ) { + getMutableRegistryHub().registerTranslator( + CATCH_MOVE( translator ) ); + } + } // namespace Detail +} // namespace Catch diff --git a/src/catch2/catch_translate_exception.hpp b/src/catch2/catch_translate_exception.hpp index 2dbeb17e..5a4dc5e3 100644 --- a/src/catch2/catch_translate_exception.hpp +++ b/src/catch2/catch_translate_exception.hpp @@ -15,6 +15,10 @@ #include <exception> namespace Catch { + namespace Detail { + void registerTranslatorImpl( + Detail::unique_ptr<IExceptionTranslator>&& translator ); + } class ExceptionTranslatorRegistrar { template<typename T> @@ -48,9 +52,9 @@ namespace Catch { public: template<typename T> ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) { - getMutableRegistryHub().registerTranslator( - Detail::make_unique<ExceptionTranslator<T>>(translateFunction) - ); + Detail::registerTranslatorImpl( + Detail::make_unique<ExceptionTranslator<T>>( + translateFunction ) ); } }; diff --git a/src/catch2/catch_user_config.hpp.in b/src/catch2/catch_user_config.hpp.in index 3f6b10e8..10d61937 100644 --- a/src/catch2/catch_user_config.hpp.in +++ b/src/catch2/catch_user_config.hpp.in @@ -169,9 +169,18 @@ #endif +#cmakedefine CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT +#cmakedefine CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT + +#if defined( CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) && \ + defined( CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) +# error Cannot force STATIC_ANALYSIS_SUPPORT to both ON and OFF +#endif + + // ------ // Simple toggle defines -// their value is never used and they cannot be overriden +// their value is never used and they cannot be overridden // ------ @@ -189,6 +198,7 @@ #cmakedefine CATCH_CONFIG_FAST_COMPILE #cmakedefine CATCH_CONFIG_NOSTDOUT #cmakedefine CATCH_CONFIG_PREFIX_ALL +#cmakedefine CATCH_CONFIG_PREFIX_MESSAGES #cmakedefine CATCH_CONFIG_WINDOWS_CRTDBG #cmakedefine CATCH_CONFIG_SHARED_LIBRARY diff --git a/src/catch2/catch_version.cpp b/src/catch2/catch_version.cpp index b6b818a0..dbf8b4b2 100644 --- a/src/catch2/catch_version.cpp +++ b/src/catch2/catch_version.cpp @@ -36,7 +36,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 3, 2, 1, "", 0 ); + static Version version( 3, 5, 0, "", 0 ); return version; } diff --git a/src/catch2/catch_version_macros.hpp b/src/catch2/catch_version_macros.hpp index f61d999d..fbe1188c 100644 --- a/src/catch2/catch_version_macros.hpp +++ b/src/catch2/catch_version_macros.hpp @@ -9,7 +9,7 @@ #define CATCH_VERSION_MACROS_HPP_INCLUDED #define CATCH_VERSION_MAJOR 3 -#define CATCH_VERSION_MINOR 2 -#define CATCH_VERSION_PATCH 1 +#define CATCH_VERSION_MINOR 5 +#define CATCH_VERSION_PATCH 0 #endif // CATCH_VERSION_MACROS_HPP_INCLUDED diff --git a/src/catch2/generators/catch_generators.cpp b/src/catch2/generators/catch_generators.cpp index 7cc5aa8a..3514e9f6 100644 --- a/src/catch2/generators/catch_generators.cpp +++ b/src/catch2/generators/catch_generators.cpp @@ -27,9 +27,16 @@ namespace Detail { GeneratorUntypedBase::~GeneratorUntypedBase() = default; - auto acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + IGeneratorTracker* acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const& lineInfo ) { return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); } + IGeneratorTracker* createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + GeneratorBasePtr&& generator ) { + return getResultCapture().createGeneratorTracker( + generatorName, lineInfo, CATCH_MOVE( generator ) ); + } + } // namespace Generators } // namespace Catch diff --git a/src/catch2/generators/catch_generators.hpp b/src/catch2/generators/catch_generators.hpp index 8fc7e58c..117f1901 100644 --- a/src/catch2/generators/catch_generators.hpp +++ b/src/catch2/generators/catch_generators.hpp @@ -14,7 +14,6 @@ #include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_unique_name.hpp> -#include <catch2/internal/catch_preprocessor.hpp> #include <vector> #include <tuple> @@ -204,37 +203,47 @@ namespace Detail { return makeGenerators( value( T( CATCH_FORWARD( val ) ) ), CATCH_FORWARD( moreGenerators )... ); } - auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + IGeneratorTracker* acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ); + IGeneratorTracker* createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + GeneratorBasePtr&& generator ); 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( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) { + auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> typename decltype(generatorExpression())::type { using UnderlyingType = typename decltype(generatorExpression())::type; - IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); - if (!tracker.hasGenerator()) { - tracker.setGenerator(Catch::Detail::make_unique<Generators<UnderlyingType>>(generatorExpression())); + IGeneratorTracker* tracker = acquireGeneratorTracker( generatorName, lineInfo ); + // Creation of tracker is delayed after generator creation, so + // that constructing generator can fail without breaking everything. + if (!tracker) { + tracker = createGeneratorTracker( + generatorName, + lineInfo, + Catch::Detail::make_unique<Generators<UnderlyingType>>( + generatorExpression() ) ); } - auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() ); + auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker->getGenerator() ); return generator.get(); } } // namespace Generators } // namespace Catch +#define CATCH_INTERNAL_GENERATOR_STRINGIZE_IMPL( ... ) #__VA_ARGS__##_catch_sr +#define CATCH_INTERNAL_GENERATOR_STRINGIZE(...) CATCH_INTERNAL_GENERATOR_STRINGIZE_IMPL(__VA_ARGS__) + #define GENERATE( ... ) \ - Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_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( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_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( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ + Catch::Generators::generate( CATCH_INTERNAL_GENERATOR_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \ CATCH_INTERNAL_LINEINFO, \ [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace) diff --git a/src/catch2/generators/catch_generators_random.cpp b/src/catch2/generators/catch_generators_random.cpp index 2e3390fd..00a8e634 100644 --- a/src/catch2/generators/catch_generators_random.cpp +++ b/src/catch2/generators/catch_generators_random.cpp @@ -7,7 +7,35 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/generators/catch_generators_random.hpp> - #include <catch2/internal/catch_context.hpp> -std::uint32_t Catch::Generators::Detail::getSeed() { return sharedRng()(); } +#include <random> + +namespace Catch { + namespace Generators { + namespace Detail { + std::uint32_t getSeed() { return sharedRng()(); } + } // namespace Detail + + struct RandomFloatingGenerator<long double>::PImpl { + PImpl( long double a, long double b, uint32_t seed ): + rng( seed ), dist( a, b ) {} + + Catch::SimplePcg32 rng; + std::uniform_real_distribution<long double> dist; + }; + + RandomFloatingGenerator<long double>::RandomFloatingGenerator( + long double a, long double b, std::uint32_t seed) : + m_pimpl(Catch::Detail::make_unique<PImpl>(a, b, seed)) { + static_cast<void>( next() ); + } + + RandomFloatingGenerator<long double>::~RandomFloatingGenerator() = + default; + bool RandomFloatingGenerator<long double>::next() { + m_current_number = m_pimpl->dist( m_pimpl->rng ); + return true; + } + } // namespace Generators +} // namespace Catch diff --git a/src/catch2/generators/catch_generators_random.hpp b/src/catch2/generators/catch_generators_random.hpp index bcd4888d..d5f307d4 100644 --- a/src/catch2/generators/catch_generators_random.hpp +++ b/src/catch2/generators/catch_generators_random.hpp @@ -11,8 +11,9 @@ #include <catch2/internal/catch_context.hpp> #include <catch2/generators/catch_generators.hpp> #include <catch2/internal/catch_random_number_generator.hpp> - -#include <random> +#include <catch2/internal/catch_uniform_integer_distribution.hpp> +#include <catch2/internal/catch_uniform_floating_point_distribution.hpp> +#include <catch2/internal/catch_unique_ptr.hpp> namespace Catch { namespace Generators { @@ -26,7 +27,7 @@ namespace Detail { template <typename Float> class RandomFloatingGenerator final : public IGenerator<Float> { Catch::SimplePcg32 m_rng; - std::uniform_real_distribution<Float> m_dist; + Catch::uniform_floating_point_distribution<Float> m_dist; Float m_current_number; public: RandomFloatingGenerator( Float a, Float b, std::uint32_t seed ): @@ -44,10 +45,27 @@ public: } }; +template <> +class RandomFloatingGenerator<long double> final : public IGenerator<long double> { + // We still rely on <random> for this specialization, but we don't + // want to drag it into the header. + struct PImpl; + Catch::Detail::unique_ptr<PImpl> m_pimpl; + long double m_current_number; + +public: + RandomFloatingGenerator( long double a, long double b, std::uint32_t seed ); + + long double const& get() const override { return m_current_number; } + bool next() override; + + ~RandomFloatingGenerator() override; // = default +}; + template <typename Integer> class RandomIntegerGenerator final : public IGenerator<Integer> { Catch::SimplePcg32 m_rng; - std::uniform_int_distribution<Integer> m_dist; + Catch::uniform_integer_distribution<Integer> m_dist; Integer m_current_number; public: RandomIntegerGenerator( Integer a, Integer b, std::uint32_t seed ): @@ -68,14 +86,6 @@ public: template <typename T> std::enable_if_t<std::is_integral<T>::value, GeneratorWrapper<T>> random(T a, T b) { - static_assert( - !std::is_same<T, char>::value && - !std::is_same<T, int8_t>::value && - !std::is_same<T, uint8_t>::value && - !std::is_same<T, signed char>::value && - !std::is_same<T, unsigned char>::value && - !std::is_same<T, bool>::value, - "The requested type is not supported by the underlying random distributions from std" ); return GeneratorWrapper<T>( Catch::Detail::make_unique<RandomIntegerGenerator<T>>(a, b, Detail::getSeed()) ); diff --git a/src/catch2/generators/catch_generators_range.hpp b/src/catch2/generators/catch_generators_range.hpp index 495acb95..b67c1590 100644 --- a/src/catch2/generators/catch_generators_range.hpp +++ b/src/catch2/generators/catch_generators_range.hpp @@ -96,10 +96,11 @@ GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) { return GeneratorWrapper<ResultType>(Catch::Detail::make_unique<IteratorGenerator<ResultType>>(from, to)); } -template <typename Container, - typename ResultType = typename Container::value_type> -GeneratorWrapper<ResultType> from_range(Container const& cnt) { - return GeneratorWrapper<ResultType>(Catch::Detail::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end())); +template <typename Container> +auto from_range(Container const& cnt) { + using std::begin; + using std::end; + return from_range( begin( cnt ), end( cnt ) ); } diff --git a/src/catch2/interfaces/catch_interfaces_all.hpp b/src/catch2/interfaces/catch_interfaces_all.hpp index 87b746d8..a99fdcdc 100644 --- a/src/catch2/interfaces/catch_interfaces_all.hpp +++ b/src/catch2/interfaces/catch_interfaces_all.hpp @@ -30,8 +30,8 @@ #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> #include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp> +#include <catch2/interfaces/catch_interfaces_test_invoker.hpp> #include <catch2/interfaces/catch_interfaces_testcase.hpp> #endif // CATCH_INTERFACES_ALL_HPP_INCLUDED diff --git a/src/catch2/interfaces/catch_interfaces_capture.hpp b/src/catch2/interfaces/catch_interfaces_capture.hpp index ac25a8c0..a1876a4c 100644 --- a/src/catch2/interfaces/catch_interfaces_capture.hpp +++ b/src/catch2/interfaces/catch_interfaces_capture.hpp @@ -13,6 +13,8 @@ #include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_result_type.hpp> +#include <catch2/internal/catch_unique_ptr.hpp> +#include <catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp> namespace Catch { @@ -30,19 +32,31 @@ namespace Catch { class IGeneratorTracker; struct BenchmarkInfo; - template <typename Duration = std::chrono::duration<double, std::nano>> - struct BenchmarkStats; + + namespace Generators { + class GeneratorUntypedBase; + using GeneratorBasePtr = Catch::Detail::unique_ptr<GeneratorUntypedBase>; + } + class IResultCapture { public: virtual ~IResultCapture(); - virtual bool sectionStarted( SectionInfo const& sectionInfo, - Counts& assertions ) = 0; - virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; - virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - - virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + virtual void notifyAssertionStarted( AssertionInfo const& info ) = 0; + virtual bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) = 0; + virtual void sectionEnded( SectionEndInfo&& endInfo ) = 0; + virtual void sectionEndedEarly( SectionEndInfo&& endInfo ) = 0; + + virtual IGeneratorTracker* + acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) = 0; + virtual IGeneratorTracker* + createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) = 0; virtual void benchmarkPreparing( StringRef name ) = 0; virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; @@ -52,7 +66,7 @@ namespace Catch { virtual void pushScopedMessage( MessageInfo const& message ) = 0; virtual void popScopedMessage( MessageInfo const& message ) = 0; - virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0; + virtual void emplaceUnscopedMessage( MessageBuilder&& builder ) = 0; virtual void handleFatalErrorCondition( StringRef message ) = 0; @@ -70,7 +84,7 @@ namespace Catch { AssertionReaction& reaction ) = 0; virtual void handleUnexpectedInflightException ( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) = 0; virtual void handleIncomplete ( AssertionInfo const& info ) = 0; diff --git a/src/catch2/interfaces/catch_interfaces_exception.hpp b/src/catch2/interfaces/catch_interfaces_exception.hpp index 9177666a..fcc2a8f9 100644 --- a/src/catch2/interfaces/catch_interfaces_exception.hpp +++ b/src/catch2/interfaces/catch_interfaces_exception.hpp @@ -8,7 +8,6 @@ #ifndef CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED #define CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <string> diff --git a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp b/src/catch2/interfaces/catch_interfaces_registry_hub.hpp index 8813b538..113f223e 100644 --- a/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +++ b/src/catch2/interfaces/catch_interfaces_registry_hub.hpp @@ -19,7 +19,7 @@ namespace Catch { class ITestCaseRegistry; class IExceptionTranslatorRegistry; class IExceptionTranslator; - class IReporterRegistry; + class ReporterRegistry; class IReporterFactory; class ITagAliasRegistry; class ITestInvoker; @@ -35,7 +35,7 @@ namespace Catch { public: virtual ~IRegistryHub(); // = default - virtual IReporterRegistry const& getReporterRegistry() const = 0; + virtual ReporterRegistry const& getReporterRegistry() const = 0; virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; diff --git a/src/catch2/interfaces/catch_interfaces_reporter.cpp b/src/catch2/interfaces/catch_interfaces_reporter.cpp index 0bcf66df..3274bcf5 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.cpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.cpp @@ -54,24 +54,21 @@ namespace Catch { infoMessages( _infoMessages ), totals( _totals ) { - assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression; - if( assertionResult.hasMessage() ) { // Copy message into messages list. // !TBD This should have been done earlier, somewhere MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() ); - builder << assertionResult.getMessage(); - builder.m_info.message = builder.m_stream.str(); + builder.m_info.message = static_cast<std::string>(assertionResult.getMessage()); - infoMessages.push_back( builder.m_info ); + infoMessages.push_back( CATCH_MOVE(builder.m_info) ); } } - SectionStats::SectionStats( SectionInfo const& _sectionInfo, + SectionStats::SectionStats( SectionInfo&& _sectionInfo, Counts const& _assertions, double _durationInSeconds, bool _missingAssertions ) - : sectionInfo( _sectionInfo ), + : sectionInfo( CATCH_MOVE(_sectionInfo) ), assertions( _assertions ), durationInSeconds( _durationInSeconds ), missingAssertions( _missingAssertions ) @@ -80,13 +77,13 @@ namespace Catch { TestCaseStats::TestCaseStats( TestCaseInfo const& _testInfo, Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, + std::string&& _stdOut, + std::string&& _stdErr, bool _aborting ) : testInfo( &_testInfo ), totals( _totals ), - stdOut( _stdOut ), - stdErr( _stdErr ), + stdOut( CATCH_MOVE(_stdOut) ), + stdErr( CATCH_MOVE(_stdErr) ), aborting( _aborting ) {} diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index 5f286363..b40fce31 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -13,11 +13,10 @@ #include <catch2/catch_assertion_result.hpp> #include <catch2/internal/catch_message_info.hpp> #include <catch2/internal/catch_stringref.hpp> +#include <catch2/internal/catch_test_run_info.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_move_and_forward.hpp> -#include <catch2/benchmark/catch_estimate.hpp> -#include <catch2/benchmark/catch_outlier_classification.hpp> - +#include <catch2/benchmark/detail/catch_benchmark_stats.hpp> #include <map> #include <string> @@ -57,11 +56,6 @@ namespace Catch { std::map<std::string, std::string> m_customOptions; }; - struct TestRunInfo { - constexpr TestRunInfo(StringRef _name) : name(_name) {} - StringRef name; - }; - struct AssertionStats { AssertionStats( AssertionResult const& _assertionResult, std::vector<MessageInfo> const& _infoMessages, @@ -78,7 +72,7 @@ namespace Catch { }; struct SectionStats { - SectionStats( SectionInfo const& _sectionInfo, + SectionStats( SectionInfo&& _sectionInfo, Counts const& _assertions, double _durationInSeconds, bool _missingAssertions ); @@ -92,8 +86,8 @@ namespace Catch { struct TestCaseStats { TestCaseStats( TestCaseInfo const& _testInfo, Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, + std::string&& _stdOut, + std::string&& _stdErr, bool _aborting ); TestCaseInfo const * testInfo; @@ -113,45 +107,6 @@ namespace Catch { bool aborting; }; - - struct BenchmarkInfo { - std::string name; - double estimatedDuration; - int iterations; - unsigned int samples; - unsigned int resamples; - double clockResolution; - double clockCost; - }; - - template <class Duration> - struct BenchmarkStats { - BenchmarkInfo info; - - std::vector<Duration> samples; - Benchmark::Estimate<Duration> mean; - Benchmark::Estimate<Duration> standardDeviation; - Benchmark::OutlierClassification outliers; - double outlierVariance; - - template <typename Duration2> - operator BenchmarkStats<Duration2>() const { - std::vector<Duration2> samples2; - samples2.reserve(samples.size()); - for (auto const& sample : samples) { - samples2.push_back(Duration2(sample)); - } - return { - info, - CATCH_MOVE(samples2), - mean, - standardDeviation, - outliers, - outlierVariance, - }; - } - }; - //! By setting up its preferences, a reporter can modify Catch2's behaviour //! in some regards, e.g. it can request Catch2 to capture writes to //! stdout/stderr during test execution, and pass them to the reporter. @@ -242,10 +197,15 @@ namespace Catch { */ virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; - //! Called with test cases that are skipped due to the test run aborting + /** + * Called with test cases that are skipped due to the test run aborting. + * NOT called for test cases that are explicitly skipped using the `SKIP` macro. + * + * Deprecated - will be removed in the next major release. + */ virtual void skipTest( TestCaseInfo const& testInfo ) = 0; - //! Called if a fatal error (signal/structured exception) occured + //! Called if a fatal error (signal/structured exception) occurred virtual void fatalErrorEncountered( StringRef error ) = 0; //! Writes out information about provided reporters using reporter-specific format diff --git a/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp b/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp deleted file mode 100644 index 277d1761..00000000 --- a/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp +++ /dev/null @@ -1,42 +0,0 @@ - -// Copyright Catch2 Authors -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE.txt or copy at -// https://www.boost.org/LICENSE_1_0.txt) - -// SPDX-License-Identifier: BSL-1.0 -#ifndef CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED -#define CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED - -#include <catch2/internal/catch_case_insensitive_comparisons.hpp> -#include <catch2/internal/catch_unique_ptr.hpp> - -#include <string> -#include <vector> -#include <map> - -namespace Catch { - - class IConfig; - - class IEventListener; - using IEventListenerPtr = Detail::unique_ptr<IEventListener>; - class IReporterFactory; - using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; - struct ReporterConfig; - class EventListenerFactory; - - class IReporterRegistry { - public: - using FactoryMap = std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess>; - using Listeners = std::vector<Detail::unique_ptr<EventListenerFactory>>; - - virtual ~IReporterRegistry(); // = default - virtual IEventListenerPtr create( std::string const& name, ReporterConfig&& config ) const = 0; - virtual FactoryMap const& getFactories() const = 0; - virtual Listeners const& getListeners() const = 0; - }; - -} // end namespace Catch - -#endif // CATCH_INTERFACES_REPORTER_REGISTRY_HPP_INCLUDED diff --git a/src/catch2/interfaces/catch_interfaces_test_invoker.hpp b/src/catch2/interfaces/catch_interfaces_test_invoker.hpp new file mode 100644 index 00000000..3caeff9a --- /dev/null +++ b/src/catch2/interfaces/catch_interfaces_test_invoker.hpp @@ -0,0 +1,21 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED +#define CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED + +namespace Catch { + + class ITestInvoker { + public: + virtual void invoke() const = 0; + virtual ~ITestInvoker(); // = default + }; + +} // namespace Catch + +#endif // CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED diff --git a/src/catch2/interfaces/catch_interfaces_testcase.cpp b/src/catch2/interfaces/catch_interfaces_testcase.cpp index 5e632ba8..a543116c 100644 --- a/src/catch2/interfaces/catch_interfaces_testcase.cpp +++ b/src/catch2/interfaces/catch_interfaces_testcase.cpp @@ -9,6 +9,5 @@ #include <catch2/interfaces/catch_interfaces_testcase.hpp> namespace Catch { - ITestInvoker::~ITestInvoker() = default; ITestCaseRegistry::~ITestCaseRegistry() = default; } diff --git a/src/catch2/interfaces/catch_interfaces_testcase.hpp b/src/catch2/interfaces/catch_interfaces_testcase.hpp index 78ee2021..daee8482 100644 --- a/src/catch2/interfaces/catch_interfaces_testcase.hpp +++ b/src/catch2/interfaces/catch_interfaces_testcase.hpp @@ -12,15 +12,7 @@ namespace Catch { - class TestSpec; struct TestCaseInfo; - - class ITestInvoker { - public: - virtual void invoke () const = 0; - virtual ~ITestInvoker(); // = default - }; - class TestCaseHandle; class IConfig; @@ -33,11 +25,6 @@ namespace Catch { virtual std::vector<TestCaseHandle> const& getAllTestsSorted( IConfig const& config ) const = 0; }; - bool isThrowSafe( TestCaseHandle const& testCase, IConfig const& config ); - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector<TestCaseHandle> const& getAllTestCasesSorted( IConfig const& config ); - } #endif // CATCH_INTERFACES_TESTCASE_HPP_INCLUDED diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp index f051314c..e5232f70 100644 --- a/src/catch2/internal/catch_assertion_handler.cpp +++ b/src/catch2/internal/catch_assertion_handler.cpp @@ -12,7 +12,6 @@ #include <catch2/internal/catch_debugger.hpp> #include <catch2/internal/catch_test_failure_exception.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> -#include <catch2/internal/catch_run_context.hpp> #include <catch2/matchers/catch_matchers_string.hpp> namespace Catch { @@ -24,7 +23,9 @@ namespace Catch { ResultDisposition::Flags resultDisposition ) : m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition }, m_resultCapture( getResultCapture() ) - {} + { + m_resultCapture.notifyAssertionStarted( m_assertionInfo ); + } void AssertionHandler::handleExpr( ITransientExpression const& expr ) { m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction ); @@ -38,7 +39,7 @@ namespace Catch { } void AssertionHandler::complete() { - setCompleted(); + m_completed = true; if( m_reaction.shouldDebugBreak ) { // If you find your debugger stopping you here then go one level up on the @@ -50,9 +51,9 @@ namespace Catch { if (m_reaction.shouldThrow) { throw_test_failure_exception(); } - } - void AssertionHandler::setCompleted() { - m_completed = true; + if ( m_reaction.shouldSkip ) { + throw_test_skip_exception(); + } } void AssertionHandler::handleUnexpectedInflightException() { diff --git a/src/catch2/internal/catch_assertion_handler.hpp b/src/catch2/internal/catch_assertion_handler.hpp index 36b55243..01dd7801 100644 --- a/src/catch2/internal/catch_assertion_handler.hpp +++ b/src/catch2/internal/catch_assertion_handler.hpp @@ -11,17 +11,15 @@ #include <catch2/catch_assertion_info.hpp> #include <catch2/internal/catch_decomposer.hpp> #include <catch2/interfaces/catch_interfaces_capture.hpp> -#include <catch2/internal/catch_lazy_expr.hpp> #include <string> namespace Catch { - class IResultCapture; - struct AssertionReaction { bool shouldDebugBreak = false; bool shouldThrow = false; + bool shouldSkip = false; }; class AssertionHandler { @@ -58,7 +56,6 @@ namespace Catch { void handleUnexpectedInflightException(); void complete(); - void setCompleted(); // query auto allowThrows() const -> bool; diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp index 81aa073c..4ac1847b 100644 --- a/src/catch2/internal/catch_commandline.cpp +++ b/src/catch2/internal/catch_commandline.cpp @@ -10,7 +10,7 @@ #include <catch2/catch_config.hpp> #include <catch2/internal/catch_string_manip.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> +#include <catch2/internal/catch_reporter_registry.hpp> #include <catch2/internal/catch_console_colour.hpp> #include <catch2/internal/catch_parse_numbers.hpp> #include <catch2/internal/catch_reporter_spec_parser.hpp> @@ -144,7 +144,7 @@ namespace Catch { auto const& reporterSpec = *parsed; - IReporterRegistry::FactoryMap const& factories = + auto const& factories = getRegistryHub().getReporterRegistry().getFactories(); auto result = factories.find( reporterSpec.name() ); diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index d457a4b4..dacae01b 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -41,7 +41,7 @@ // Only GCC compiler should be used in this block, so other compilers trying to // mask themselves as GCC should be ignored. -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) && !defined(__NVCOMPILER) # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) @@ -50,20 +50,37 @@ # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wparentheses\"" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + _Pragma( "GCC diagnostic ignored \"-Wunused-result\"" ) + # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wunused-variable\"" ) # define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ _Pragma( "GCC diagnostic ignored \"-Wuseless-cast\"" ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wshadow\"" ) + # define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) #endif +#if defined(__NVCOMPILER) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "diag push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "diag pop" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress declared_but_not_referenced" ) +#endif + #if defined(__CUDACC__) && !defined(__clang__) +# ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ +// New pragmas introduced in CUDA 11.5+ # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" ) # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" ) +# else +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress 177" ) +# endif #endif // clang-cl defines _MSC_VER as well as __clang__, which could cause the @@ -117,6 +134,9 @@ # define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wcomma\"" ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wshadow\"" ) + #endif // __clang__ @@ -136,7 +156,9 @@ //////////////////////////////////////////////////////////////////////////////// // Assume that some platforms do not support getenv. -#if defined(CATCH_PLATFORM_WINDOWS_UWP) || defined(CATCH_PLATFORM_PLAYSTATION) +#if defined( CATCH_PLATFORM_WINDOWS_UWP ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( _GAMING_XBOX ) # define CATCH_INTERNAL_CONFIG_NO_GETENV #else # define CATCH_INTERNAL_CONFIG_GETENV @@ -181,8 +203,14 @@ // Visual C++ #if defined(_MSC_VER) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) +// We want to defer to nvcc-specific warning suppression if we are compiled +// with nvcc masquerading for MSVC. +# if !defined( __CUDACC__ ) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + __pragma( warning( push ) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + __pragma( warning( pop ) ) +# endif // Universal Windows platform does not support SEH // Or console colours (or console at all...) @@ -348,6 +376,9 @@ #if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS #endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT +#endif #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS #endif @@ -357,6 +388,16 @@ #if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS #endif +#if !defined( CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS +#endif + // The goal of this macro is to avoid evaluation of the arguments, but // still have the compiler warn on problems inside... @@ -370,13 +411,6 @@ # undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS #endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS -#endif #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) #define CATCH_TRY if ((true)) diff --git a/src/catch2/internal/catch_config_counter.hpp b/src/catch2/internal/catch_config_counter.hpp index 23b22324..a482ce34 100644 --- a/src/catch2/internal/catch_config_counter.hpp +++ b/src/catch2/internal/catch_config_counter.hpp @@ -18,6 +18,8 @@ #ifndef CATCH_CONFIG_COUNTER_HPP_INCLUDED #define CATCH_CONFIG_COUNTER_HPP_INCLUDED +#include <catch2/catch_user_config.hpp> + #if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) #define CATCH_INTERNAL_CONFIG_COUNTER #endif diff --git a/src/catch2/internal/catch_config_prefix_messages.hpp b/src/catch2/internal/catch_config_prefix_messages.hpp new file mode 100644 index 00000000..be1e9a96 --- /dev/null +++ b/src/catch2/internal/catch_config_prefix_messages.hpp @@ -0,0 +1,29 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +/** \file + * Wrapper for the CATCH_CONFIG_PREFIX_MESSAGES configuration option + * + * CATCH_CONFIG_PREFIX_ALL can be used to avoid clashes with other macros + * by prepending CATCH_. This may not be desirable if the only clashes are with + * logger macros such as INFO and WARN. In this cases + * CATCH_CONFIG_PREFIX_MESSAGES can be used to only prefix a small subset + * of relevant macros. + * + */ + +#ifndef CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED +#define CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED + +#include <catch2/catch_user_config.hpp> + +#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_PREFIX_MESSAGES) + #define CATCH_CONFIG_PREFIX_MESSAGES +#endif + +#endif // CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED diff --git a/src/catch2/internal/catch_config_static_analysis_support.hpp b/src/catch2/internal/catch_config_static_analysis_support.hpp new file mode 100644 index 00000000..81bdf39f --- /dev/null +++ b/src/catch2/internal/catch_config_static_analysis_support.hpp @@ -0,0 +1,34 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +/** \file + * Wrapper for the STATIC_ANALYSIS_SUPPORT configuration option + * + * Some of Catch2's macros can be defined differently to work better with + * static analysis tools, like clang-tidy or coverity. + * Currently the main use case is to show that `SECTION`s are executed + * exclusively, and not all in one run of a `TEST_CASE`. + */ + +#ifndef CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED +#define CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED + +#include <catch2/catch_user_config.hpp> + +#if defined(__clang_analyzer__) || defined(__COVERITY__) + #define CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT +#endif + +#if defined( CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) +# define CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT +#endif + + +#endif // CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED diff --git a/src/catch2/internal/catch_config_uncaught_exceptions.hpp b/src/catch2/internal/catch_config_uncaught_exceptions.hpp index 5c4cb930..20b1dfca 100644 --- a/src/catch2/internal/catch_config_uncaught_exceptions.hpp +++ b/src/catch2/internal/catch_config_uncaught_exceptions.hpp @@ -17,6 +17,8 @@ #ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED #define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED +#include <catch2/catch_user_config.hpp> + #if defined(_MSC_VER) # if _MSC_VER >= 1900 // Visual Studio 2015 or newer # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS diff --git a/src/catch2/internal/catch_config_wchar.hpp b/src/catch2/internal/catch_config_wchar.hpp index 8c758ec4..90d85d05 100644 --- a/src/catch2/internal/catch_config_wchar.hpp +++ b/src/catch2/internal/catch_config_wchar.hpp @@ -17,6 +17,8 @@ #ifndef CATCH_CONFIG_WCHAR_HPP_INCLUDED #define CATCH_CONFIG_WCHAR_HPP_INCLUDED +#include <catch2/catch_user_config.hpp> + // We assume that WCHAR should be enabled by default, and only disabled // for a shortlist (so far only DJGPP) of compilers. diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp index 099a6c59..e1238816 100644 --- a/src/catch2/internal/catch_console_colour.cpp +++ b/src/catch2/internal/catch_console_colour.cpp @@ -85,7 +85,7 @@ namespace Catch { namespace { //! A do-nothing implementation of colour, used as fallback for unknown //! platforms, and when the user asks to deactivate all colours. - class NoColourImpl : public ColourImpl { + class NoColourImpl final : public ColourImpl { public: NoColourImpl( IStream* stream ): ColourImpl( stream ) {} @@ -103,7 +103,7 @@ namespace Catch { namespace Catch { namespace { - class Win32ColourImpl : public ColourImpl { + class Win32ColourImpl final : public ColourImpl { public: Win32ColourImpl(IStream* stream): ColourImpl(stream) { @@ -169,7 +169,7 @@ namespace { namespace Catch { namespace { - class ANSIColourImpl : public ColourImpl { + class ANSIColourImpl final : public ColourImpl { public: ANSIColourImpl( IStream* stream ): ColourImpl( stream ) {} diff --git a/src/catch2/internal/catch_console_colour.hpp b/src/catch2/internal/catch_console_colour.hpp index 9aa6a163..d9144315 100644 --- a/src/catch2/internal/catch_console_colour.hpp +++ b/src/catch2/internal/catch_console_colour.hpp @@ -47,6 +47,7 @@ namespace Catch { Error = BrightRed, Success = Green, + Skip = LightGrey, OriginalExpression = Cyan, ReconstructedExpression = BrightYellow, diff --git a/src/catch2/internal/catch_context.cpp b/src/catch2/internal/catch_context.cpp index 17f28509..3b1cc277 100644 --- a/src/catch2/internal/catch_context.cpp +++ b/src/catch2/internal/catch_context.cpp @@ -11,49 +11,27 @@ namespace Catch { - class Context : public IMutableContext, private Detail::NonCopyable { + Context* Context::currentContext = nullptr; - public: // IContext - IResultCapture* getResultCapture() override { - return m_resultCapture; - } - - IConfig const* getConfig() const override { - return m_config; - } - - ~Context() override; - - public: // IMutableContext - void setResultCapture( IResultCapture* resultCapture ) override { - m_resultCapture = resultCapture; - } - void setConfig( IConfig const* config ) override { - m_config = config; - } - - friend IMutableContext& getCurrentMutableContext(); - - private: - IConfig const* m_config = nullptr; - IResultCapture* m_resultCapture = nullptr; - }; - - IMutableContext *IMutableContext::currentContext = nullptr; - - void IMutableContext::createContext() - { + void cleanUpContext() { + delete Context::currentContext; + Context::currentContext = nullptr; + } + void Context::createContext() { currentContext = new Context(); } - void cleanUpContext() { - delete IMutableContext::currentContext; - IMutableContext::currentContext = nullptr; + Context& getCurrentMutableContext() { + if ( !Context::currentContext ) { Context::createContext(); } + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return *Context::currentContext; + } + + void Context::setResultCapture( IResultCapture* resultCapture ) { + m_resultCapture = resultCapture; } - IContext::~IContext() = default; - IMutableContext::~IMutableContext() = default; - Context::~Context() = default; + void Context::setConfig( IConfig const* config ) { m_config = config; } SimplePcg32& sharedRng() { static SimplePcg32 s_rng; diff --git a/src/catch2/internal/catch_context.hpp b/src/catch2/internal/catch_context.hpp index a9d1b394..6ccb3b31 100644 --- a/src/catch2/internal/catch_context.hpp +++ b/src/catch2/internal/catch_context.hpp @@ -15,38 +15,31 @@ namespace Catch { class IResultCapture; class IConfig; - class IContext { - public: - virtual ~IContext(); // = default + class Context { + IConfig const* m_config = nullptr; + IResultCapture* m_resultCapture = nullptr; - virtual IResultCapture* getResultCapture() = 0; - virtual IConfig const* getConfig() const = 0; - }; + CATCH_EXPORT static Context* currentContext; + friend Context& getCurrentMutableContext(); + friend Context const& getCurrentContext(); + static void createContext(); + friend void cleanUpContext(); - class IMutableContext : public IContext { public: - ~IMutableContext() override; // = default - virtual void setResultCapture( IResultCapture* resultCapture ) = 0; - virtual void setConfig( IConfig const* config ) = 0; - - private: - CATCH_EXPORT static IMutableContext* currentContext; - friend IMutableContext& getCurrentMutableContext(); - friend void cleanUpContext(); - static void createContext(); + IResultCapture* getResultCapture() const { return m_resultCapture; } + IConfig const* getConfig() const { return m_config; } + void setResultCapture( IResultCapture* resultCapture ); + void setConfig( IConfig const* config ); }; - inline IMutableContext& getCurrentMutableContext() - { - if( !IMutableContext::currentContext ) - IMutableContext::createContext(); - // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) - return *IMutableContext::currentContext; - } + Context& getCurrentMutableContext(); - inline IContext& getCurrentContext() - { - return getCurrentMutableContext(); + inline Context const& getCurrentContext() { + // We duplicate the logic from `getCurrentMutableContext` here, + // to avoid paying the call overhead in debug mode. + if ( !Context::currentContext ) { Context::createContext(); } + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return *Context::currentContext; } void cleanUpContext(); diff --git a/src/catch2/internal/catch_debugger.hpp b/src/catch2/internal/catch_debugger.hpp index 30063d1f..25c5a260 100644 --- a/src/catch2/internal/catch_debugger.hpp +++ b/src/catch2/internal/catch_debugger.hpp @@ -19,7 +19,10 @@ namespace Catch { #if defined(__i386__) || defined(__x86_64__) #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ #elif defined(__aarch64__) - #define CATCH_TRAP() __asm__(".inst 0xd43e0000") + #define CATCH_TRAP() __asm__(".inst 0xd43e0000") + #elif defined(__POWERPC__) + #define CATCH_TRAP() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ + : : : "memory","r0","r3","r4" ) /* NOLINT */ #endif #elif defined(CATCH_PLATFORM_IPHONE) diff --git a/src/catch2/internal/catch_enum_values_registry.cpp b/src/catch2/internal/catch_enum_values_registry.cpp index 7e8bf5e5..a94b6088 100644 --- a/src/catch2/internal/catch_enum_values_registry.cpp +++ b/src/catch2/internal/catch_enum_values_registry.cpp @@ -39,7 +39,7 @@ namespace Catch { return parsed; } - EnumInfo::~EnumInfo() {} + EnumInfo::~EnumInfo() = default; StringRef EnumInfo::lookup( int value ) const { for( auto const& valueToName : m_values ) { diff --git a/src/catch2/internal/catch_exception_translator_registry.cpp b/src/catch2/internal/catch_exception_translator_registry.cpp index 2a240a9b..1eb61147 100644 --- a/src/catch2/internal/catch_exception_translator_registry.cpp +++ b/src/catch2/internal/catch_exception_translator_registry.cpp @@ -11,10 +11,27 @@ #include <catch2/internal/catch_test_failure_exception.hpp> #include <catch2/internal/catch_move_and_forward.hpp> +#include <exception> + namespace Catch { - ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + namespace { + static std::string tryTranslators( + std::vector< + Detail::unique_ptr<IExceptionTranslator const>> const& translators ) { + if ( translators.empty() ) { + std::rethrow_exception( std::current_exception() ); + } else { + return translators[0]->translate( translators.begin() + 1, + translators.end() ); + } + } + } +#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + + ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() = default; void ExceptionTranslatorRegistry::registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) { m_translators.push_back( CATCH_MOVE( translator ) ); @@ -37,13 +54,16 @@ namespace Catch { // First we try user-registered translators. If none of them can // handle the exception, it will be rethrown handled by our defaults. try { - return tryTranslators(); + return tryTranslators(m_translators); } // To avoid having to handle TFE explicitly everywhere, we just // rethrow it so that it goes back up the caller. catch( TestFailureException& ) { std::rethrow_exception(std::current_exception()); } + catch( TestSkipException& ) { + std::rethrow_exception(std::current_exception()); + } catch( std::exception const& ex ) { return ex.what(); } @@ -58,23 +78,10 @@ namespace Catch { } } - std::string ExceptionTranslatorRegistry::tryTranslators() const { - if (m_translators.empty()) { - std::rethrow_exception(std::current_exception()); - } else { - return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end()); - } - } - #else // ^^ Exceptions are enabled // Exceptions are disabled vv std::string ExceptionTranslatorRegistry::translateActiveException() const { CATCH_INTERNAL_ERROR("Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); } - - std::string ExceptionTranslatorRegistry::tryTranslators() const { - CATCH_INTERNAL_ERROR("Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); - } #endif - } diff --git a/src/catch2/internal/catch_exception_translator_registry.hpp b/src/catch2/internal/catch_exception_translator_registry.hpp index 2aafa684..3123e93d 100644 --- a/src/catch2/internal/catch_exception_translator_registry.hpp +++ b/src/catch2/internal/catch_exception_translator_registry.hpp @@ -21,7 +21,6 @@ namespace Catch { ~ExceptionTranslatorRegistry() override; void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ); std::string translateActiveException() const override; - std::string tryTranslators() const; private: ExceptionTranslators m_translators; diff --git a/src/catch2/internal/catch_floating_point_helpers.cpp b/src/catch2/internal/catch_floating_point_helpers.cpp index e30ee434..9631ed6d 100644 --- a/src/catch2/internal/catch_floating_point_helpers.cpp +++ b/src/catch2/internal/catch_floating_point_helpers.cpp @@ -27,6 +27,17 @@ namespace Catch { return i; } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + bool directCompare( float lhs, float rhs ) { return lhs == rhs; } + bool directCompare( double lhs, double rhs ) { return lhs == rhs; } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + + } // end namespace Detail } // end namespace Catch diff --git a/src/catch2/internal/catch_floating_point_helpers.hpp b/src/catch2/internal/catch_floating_point_helpers.hpp index ca883c61..b2143726 100644 --- a/src/catch2/internal/catch_floating_point_helpers.hpp +++ b/src/catch2/internal/catch_floating_point_helpers.hpp @@ -22,6 +22,11 @@ namespace Catch { uint32_t convertToBits(float f); uint64_t convertToBits(double d); + // Used when we know we want == comparison of two doubles + // to centralize warning suppression + bool directCompare( float lhs, float rhs ); + bool directCompare( double lhs, double rhs ); + } // end namespace Detail diff --git a/src/catch2/internal/catch_is_permutation.hpp b/src/catch2/internal/catch_is_permutation.hpp new file mode 100644 index 00000000..708053d3 --- /dev/null +++ b/src/catch2/internal/catch_is_permutation.hpp @@ -0,0 +1,138 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_IS_PERMUTATION_HPP_INCLUDED +#define CATCH_IS_PERMUTATION_HPP_INCLUDED + +#include <algorithm> +#include <iterator> + +namespace Catch { + namespace Detail { + + template <typename ForwardIter, + typename Sentinel, + typename T, + typename Comparator> + ForwardIter find_sentinel( ForwardIter start, + Sentinel sentinel, + T const& value, + Comparator cmp ) { + while ( start != sentinel ) { + if ( cmp( *start, value ) ) { break; } + ++start; + } + return start; + } + + template <typename ForwardIter, + typename Sentinel, + typename T, + typename Comparator> + std::ptrdiff_t count_sentinel( ForwardIter start, + Sentinel sentinel, + T const& value, + Comparator cmp ) { + std::ptrdiff_t count = 0; + while ( start != sentinel ) { + if ( cmp( *start, value ) ) { ++count; } + ++start; + } + return count; + } + + template <typename ForwardIter, typename Sentinel> + std::enable_if_t<!std::is_same<ForwardIter, Sentinel>::value, + std::ptrdiff_t> + sentinel_distance( ForwardIter iter, const Sentinel sentinel ) { + std::ptrdiff_t dist = 0; + while ( iter != sentinel ) { + ++iter; + ++dist; + } + return dist; + } + + template <typename ForwardIter> + std::ptrdiff_t sentinel_distance( ForwardIter first, + ForwardIter last ) { + return std::distance( first, last ); + } + + template <typename ForwardIter1, + typename Sentinel1, + typename ForwardIter2, + typename Sentinel2, + typename Comparator> + bool check_element_counts( ForwardIter1 first_1, + const Sentinel1 end_1, + ForwardIter2 first_2, + const Sentinel2 end_2, + Comparator cmp ) { + auto cursor = first_1; + while ( cursor != end_1 ) { + if ( find_sentinel( first_1, cursor, *cursor, cmp ) == + cursor ) { + // we haven't checked this element yet + const auto count_in_range_2 = + count_sentinel( first_2, end_2, *cursor, cmp ); + // Not a single instance in 2nd range, so it cannot be a + // permutation of 1st range + if ( count_in_range_2 == 0 ) { return false; } + + const auto count_in_range_1 = + count_sentinel( cursor, end_1, *cursor, cmp ); + if ( count_in_range_1 != count_in_range_2 ) { + return false; + } + } + + ++cursor; + } + + return true; + } + + template <typename ForwardIter1, + typename Sentinel1, + typename ForwardIter2, + typename Sentinel2, + typename Comparator> + bool is_permutation( ForwardIter1 first_1, + const Sentinel1 end_1, + ForwardIter2 first_2, + const Sentinel2 end_2, + Comparator cmp ) { + // TODO: no optimization for stronger iterators, because we would also have to constrain on sentinel vs not sentinel types + // TODO: Comparator has to be "both sides", e.g. a == b => b == a + // This skips shared prefix of the two ranges + while (first_1 != end_1 && first_2 != end_2 && cmp(*first_1, *first_2)) { + ++first_1; + ++first_2; + } + + // We need to handle case where at least one of the ranges has no more elements + if (first_1 == end_1 || first_2 == end_2) { + return first_1 == end_1 && first_2 == end_2; + } + + // pair counting is n**2, so we pay linear walk to compare the sizes first + auto dist_1 = sentinel_distance( first_1, end_1 ); + auto dist_2 = sentinel_distance( first_2, end_2 ); + + if (dist_1 != dist_2) { return false; } + + // Since we do not try to handle stronger iterators pair (e.g. + // bidir) optimally, the only thing left to do is to check counts in + // the remaining ranges. + return check_element_counts( first_1, end_1, first_2, end_2, cmp ); + } + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_IS_PERMUTATION_HPP_INCLUDED diff --git a/src/catch2/internal/catch_istream.cpp b/src/catch2/internal/catch_istream.cpp index 489396ec..bf0f66e4 100644 --- a/src/catch2/internal/catch_istream.cpp +++ b/src/catch2/internal/catch_istream.cpp @@ -24,7 +24,7 @@ namespace Catch { namespace Detail { namespace { template<typename WriterF, std::size_t bufferSize=256> - class StreamBufImpl : public std::streambuf { + class StreamBufImpl final : public std::streambuf { char data[bufferSize]; WriterF m_writer; @@ -72,7 +72,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class FileStream : public IStream { + class FileStream final : public IStream { std::ofstream m_ofs; public: FileStream( std::string const& filename ) { @@ -89,7 +89,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class CoutStream : public IStream { + class CoutStream final : public IStream { std::ostream m_os; public: // Store the streambuf from cout up-front because @@ -118,7 +118,7 @@ namespace Detail { /////////////////////////////////////////////////////////////////////////// - class DebugOutStream : public IStream { + class DebugOutStream final : public IStream { Detail::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf; std::ostream m_os; public: diff --git a/src/catch2/internal/catch_jsonwriter.cpp b/src/catch2/internal/catch_jsonwriter.cpp new file mode 100644 index 00000000..ff65a9d3 --- /dev/null +++ b/src/catch2/internal/catch_jsonwriter.cpp @@ -0,0 +1,148 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#include <catch2/internal/catch_enforce.hpp> +#include <catch2/internal/catch_jsonwriter.hpp> + +namespace Catch { + void JsonUtils::indent( std::ostream& os, std::uint64_t level ) { + for ( std::uint64_t i = 0; i < level; ++i ) { + os << " "; + } + } + void JsonUtils::appendCommaNewline( std::ostream& os, + bool& should_comma, + std::uint64_t level ) { + if ( should_comma ) { os << ','; } + should_comma = true; + os << '\n'; + indent( os, level ); + } + + JsonObjectWriter::JsonObjectWriter( std::ostream& os ): + JsonObjectWriter{ os, 0 } {} + + JsonObjectWriter::JsonObjectWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } { + m_os << '{'; + } + JsonObjectWriter::JsonObjectWriter( JsonObjectWriter&& source ): + m_os{ source.m_os }, + m_indent_level{ source.m_indent_level }, + m_should_comma{ source.m_should_comma }, + m_active{ source.m_active } { + source.m_active = false; + } + + JsonObjectWriter::~JsonObjectWriter() { + if ( !m_active ) { return; } + + m_os << '\n'; + JsonUtils::indent( m_os, m_indent_level ); + m_os << '}'; + } + + JsonValueWriter JsonObjectWriter::write( StringRef key ) { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + + m_os << '"' << key << "\": "; + return JsonValueWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter::JsonArrayWriter( std::ostream& os ): + JsonArrayWriter{ os, 0 } {} + JsonArrayWriter::JsonArrayWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } { + m_os << '['; + } + JsonArrayWriter::JsonArrayWriter( JsonArrayWriter&& source ): + m_os{ source.m_os }, + m_indent_level{ source.m_indent_level }, + m_should_comma{ source.m_should_comma }, + m_active{ source.m_active } { + source.m_active = false; + } + JsonArrayWriter::~JsonArrayWriter() { + if ( !m_active ) { return; } + + m_os << '\n'; + JsonUtils::indent( m_os, m_indent_level ); + m_os << ']'; + } + + JsonObjectWriter JsonArrayWriter::writeObject() { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + return JsonObjectWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter JsonArrayWriter::writeArray() { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + return JsonArrayWriter{ m_os, m_indent_level + 1 }; + } + + JsonArrayWriter& JsonArrayWriter::write( bool value ) { + return writeImpl( value ); + } + + JsonValueWriter::JsonValueWriter( std::ostream& os ): + JsonValueWriter{ os, 0 } {} + + JsonValueWriter::JsonValueWriter( std::ostream& os, + std::uint64_t indent_level ): + m_os{ os }, m_indent_level{ indent_level } {} + + JsonObjectWriter JsonValueWriter::writeObject() && { + return JsonObjectWriter{ m_os, m_indent_level }; + } + + JsonArrayWriter JsonValueWriter::writeArray() && { + return JsonArrayWriter{ m_os, m_indent_level }; + } + + void JsonValueWriter::write( Catch::StringRef value ) && { + writeImpl( value, true ); + } + + void JsonValueWriter::write( bool value ) && { + writeImpl( value ? "true"_sr : "false"_sr, false ); + } + + void JsonValueWriter::writeImpl( Catch::StringRef value, bool quote ) { + if ( quote ) { m_os << '"'; } + for (char c : value) { + // Escape list taken from https://www.json.org/json-en.html, + // string definition. + // Note that while forward slash _can_ be escaped, it does + // not have to be, if JSON is not further embedded somewhere + // where forward slash is meaningful. + if ( c == '"' ) { + m_os << "\\\""; + } else if ( c == '\\' ) { + m_os << "\\\\"; + } else if ( c == '\b' ) { + m_os << "\\b"; + } else if ( c == '\f' ) { + m_os << "\\f"; + } else if ( c == '\n' ) { + m_os << "\\n"; + } else if ( c == '\r' ) { + m_os << "\\r"; + } else if ( c == '\t' ) { + m_os << "\\t"; + } else { + m_os << c; + } + } + if ( quote ) { m_os << '"'; } + } + +} // namespace Catch diff --git a/src/catch2/internal/catch_jsonwriter.hpp b/src/catch2/internal/catch_jsonwriter.hpp new file mode 100644 index 00000000..59c044e4 --- /dev/null +++ b/src/catch2/internal/catch_jsonwriter.hpp @@ -0,0 +1,120 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_JSONWRITER_HPP_INCLUDED +#define CATCH_JSONWRITER_HPP_INCLUDED + +#include <catch2/internal/catch_reusable_string_stream.hpp> +#include <catch2/internal/catch_stringref.hpp> + +#include <cstdint> +#include <sstream> + +namespace Catch { + class JsonObjectWriter; + class JsonArrayWriter; + + struct JsonUtils { + static void indent( std::ostream& os, std::uint64_t level ); + static void appendCommaNewline( std::ostream& os, + bool& should_comma, + std::uint64_t level ); + }; + + class JsonValueWriter { + public: + JsonValueWriter( std::ostream& os ); + JsonValueWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonObjectWriter writeObject() &&; + JsonArrayWriter writeArray() &&; + + template <typename T> + void write( T const& value ) && { + writeImpl( value, !std::is_arithmetic<T>::value ); + } + void write( StringRef value ) &&; + void write( bool value ) &&; + + private: + void writeImpl( StringRef value, bool quote ); + + // Without this SFINAE, this overload is a better match + // for `std::string`, `char const*`, `char const[N]` args. + // While it would still work, it would cause code bloat + // and multiple iteration over the strings + template <typename T, + typename = typename std::enable_if_t< + !std::is_convertible<T, StringRef>::value>> + void writeImpl( T const& value, bool quote_value ) { + m_sstream << value; + writeImpl( m_sstream.str(), quote_value ); + } + + std::ostream& m_os; + std::stringstream m_sstream; + std::uint64_t m_indent_level; + }; + + class JsonObjectWriter { + public: + JsonObjectWriter( std::ostream& os ); + JsonObjectWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonObjectWriter( JsonObjectWriter&& source ); + JsonObjectWriter& operator=( JsonObjectWriter&& source ) = delete; + + ~JsonObjectWriter(); + + JsonValueWriter write( StringRef key ); + + private: + std::ostream& m_os; + std::uint64_t m_indent_level; + bool m_should_comma = false; + bool m_active = true; + }; + + class JsonArrayWriter { + public: + JsonArrayWriter( std::ostream& os ); + JsonArrayWriter( std::ostream& os, std::uint64_t indent_level ); + + JsonArrayWriter( JsonArrayWriter&& source ); + JsonArrayWriter& operator=( JsonArrayWriter&& source ) = delete; + + ~JsonArrayWriter(); + + JsonObjectWriter writeObject(); + JsonArrayWriter writeArray(); + + template <typename T> + JsonArrayWriter& write( T const& value ) { + return writeImpl( value ); + } + + JsonArrayWriter& write( bool value ); + + private: + template <typename T> + JsonArrayWriter& writeImpl( T const& value ) { + JsonUtils::appendCommaNewline( + m_os, m_should_comma, m_indent_level + 1 ); + JsonValueWriter{ m_os }.write( value ); + + return *this; + } + + std::ostream& m_os; + std::uint64_t m_indent_level; + bool m_should_comma = false; + bool m_active = true; + }; + +} // namespace Catch + +#endif // CATCH_JSONWRITER_HPP_INCLUDED diff --git a/src/catch2/internal/catch_leak_detector.cpp b/src/catch2/internal/catch_leak_detector.cpp index 7389eaf7..691bc772 100644 --- a/src/catch2/internal/catch_leak_detector.cpp +++ b/src/catch2/internal/catch_leak_detector.cpp @@ -29,7 +29,7 @@ namespace Catch { #else // ^^ Windows crt debug heap enabled // Windows crt debug heap disabled vv - Catch::LeakDetector::LeakDetector() {} + Catch::LeakDetector::LeakDetector() = default; #endif // CATCH_CONFIG_WINDOWS_CRTDBG diff --git a/src/catch2/internal/catch_list.cpp b/src/catch2/internal/catch_list.cpp index 263781d6..97e4c593 100644 --- a/src/catch2/internal/catch_list.cpp +++ b/src/catch2/internal/catch_list.cpp @@ -9,9 +9,9 @@ #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> -#include <catch2/interfaces/catch_interfaces_testcase.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> +#include <catch2/internal/catch_test_case_registry_impl.hpp> +#include <catch2/internal/catch_reporter_registry.hpp> #include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_case_insensitive_comparisons.hpp> @@ -54,7 +54,7 @@ namespace Catch { void listReporters(IEventListener& reporter) { std::vector<ReporterDescription> descriptions; - IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); + auto const& factories = getRegistryHub().getReporterRegistry().getFactories(); descriptions.reserve(factories.size()); for (auto const& fac : factories) { descriptions.push_back({ fac.first, fac.second->getDescription() }); diff --git a/src/catch2/internal/catch_message_info.hpp b/src/catch2/internal/catch_message_info.hpp index d2658429..1ef43fda 100644 --- a/src/catch2/internal/catch_message_info.hpp +++ b/src/catch2/internal/catch_message_info.hpp @@ -10,7 +10,7 @@ #include <catch2/internal/catch_result_type.hpp> #include <catch2/internal/catch_source_line_info.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> +#include <catch2/internal/catch_stringref.hpp> #include <string> diff --git a/src/catch2/internal/catch_optional.hpp b/src/catch2/internal/catch_optional.hpp index ac3714ee..d1e953ad 100644 --- a/src/catch2/internal/catch_optional.hpp +++ b/src/catch2/internal/catch_optional.hpp @@ -8,6 +8,8 @@ #ifndef CATCH_OPTIONAL_HPP_INCLUDED #define CATCH_OPTIONAL_HPP_INCLUDED +#include <catch2/internal/catch_move_and_forward.hpp> + #include <cassert> namespace Catch { @@ -16,35 +18,50 @@ namespace Catch { template<typename T> class Optional { public: - Optional() : nullableValue( nullptr ) {} - Optional( T const& _value ) - : nullableValue( new( storage ) T( _value ) ) - {} - Optional( Optional const& _other ) - : nullableValue( _other ? new( storage ) T( *_other ) : nullptr ) - {} - - ~Optional() { + Optional(): nullableValue( nullptr ) {} + ~Optional() { reset(); } + + Optional( T const& _value ): + nullableValue( new ( storage ) T( _value ) ) {} + Optional( T&& _value ): + nullableValue( new ( storage ) T( CATCH_MOVE( _value ) ) ) {} + + Optional& operator=( T const& _value ) { reset(); + nullableValue = new ( storage ) T( _value ); + return *this; } + Optional& operator=( T&& _value ) { + reset(); + nullableValue = new ( storage ) T( CATCH_MOVE( _value ) ); + return *this; + } + + Optional( Optional const& _other ): + nullableValue( _other ? new ( storage ) T( *_other ) : nullptr ) {} + Optional( Optional&& _other ): + nullableValue( _other ? new ( storage ) T( CATCH_MOVE( *_other ) ) + : nullptr ) {} - Optional& operator= ( Optional const& _other ) { - if( &_other != this ) { + Optional& operator=( Optional const& _other ) { + if ( &_other != this ) { reset(); - if( _other ) - nullableValue = new( storage ) T( *_other ); + if ( _other ) { nullableValue = new ( storage ) T( *_other ); } } return *this; } - Optional& operator = ( T const& _value ) { - reset(); - nullableValue = new( storage ) T( _value ); + Optional& operator=( Optional&& _other ) { + if ( &_other != this ) { + reset(); + if ( _other ) { + nullableValue = new ( storage ) T( CATCH_MOVE( *_other ) ); + } + } return *this; } void reset() { - if( nullableValue ) - nullableValue->~T(); + if ( nullableValue ) { nullableValue->~T(); } nullableValue = nullptr; } @@ -91,7 +108,7 @@ namespace Catch { } private: - T *nullableValue; + T* nullableValue; alignas(alignof(T)) char storage[sizeof(T)]; }; diff --git a/src/catch2/internal/catch_parse_numbers.cpp b/src/catch2/internal/catch_parse_numbers.cpp index 390b8c87..d949ac19 100644 --- a/src/catch2/internal/catch_parse_numbers.cpp +++ b/src/catch2/internal/catch_parse_numbers.cpp @@ -6,12 +6,12 @@ // SPDX-License-Identifier: BSL-1.0 -#include <catch2/internal/catch_parse_numbers.hpp> - #include <catch2/internal/catch_compiler_capabilities.hpp> +#include <catch2/internal/catch_parse_numbers.hpp> #include <catch2/internal/catch_string_manip.hpp> #include <limits> +#include <stdexcept> namespace Catch { @@ -39,11 +39,14 @@ namespace Catch { return {}; } return static_cast<unsigned int>(ret); - } CATCH_CATCH_ANON( std::exception const& ) { - // There was a larger issue with the input, e.g. the parsed - // number would be too large to fit within ull. - return {}; } + CATCH_CATCH_ANON( std::invalid_argument const& ) { + // no conversion could be performed + } + CATCH_CATCH_ANON( std::out_of_range const& ) { + // the input does not fit into an unsigned long long + } + return {}; } } // namespace Catch diff --git a/src/catch2/internal/catch_polyfills.cpp b/src/catch2/internal/catch_polyfills.cpp index 96efad5d..776c2243 100644 --- a/src/catch2/internal/catch_polyfills.cpp +++ b/src/catch2/internal/catch_polyfills.cpp @@ -31,4 +31,12 @@ namespace Catch { } #endif +#if !defined( CATCH_CONFIG_GLOBAL_NEXTAFTER ) + float nextafter( float x, float y ) { return std::nextafter( x, y ); } + double nextafter( double x, double y ) { return std::nextafter( x, y ); } +#else + float nextafter( float x, float y ) { return ::nextafterf( x, y ); } + double nextafter( double x, double y ) { return ::nextafter( x, y ); } +#endif + } // end namespace Catch diff --git a/src/catch2/internal/catch_polyfills.hpp b/src/catch2/internal/catch_polyfills.hpp index 23a9332b..4503f8f2 100644 --- a/src/catch2/internal/catch_polyfills.hpp +++ b/src/catch2/internal/catch_polyfills.hpp @@ -9,8 +9,13 @@ #define CATCH_POLYFILLS_HPP_INCLUDED namespace Catch { + bool isnan(float f); bool isnan(double d); + + float nextafter(float x, float y); + double nextafter(double x, double y); + } #endif // CATCH_POLYFILLS_HPP_INCLUDED diff --git a/src/catch2/internal/catch_preprocessor_internal_stringify.hpp b/src/catch2/internal/catch_preprocessor_internal_stringify.hpp new file mode 100644 index 00000000..2fd64e1c --- /dev/null +++ b/src/catch2/internal/catch_preprocessor_internal_stringify.hpp @@ -0,0 +1,19 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED +#define CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED + +#include <catch2/catch_user_config.hpp> + +#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) + #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__##_catch_sr +#else + #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION"_catch_sr +#endif + +#endif // CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED diff --git a/src/catch2/internal/catch_random_floating_point_helpers.hpp b/src/catch2/internal/catch_random_floating_point_helpers.hpp new file mode 100644 index 00000000..c59c0539 --- /dev/null +++ b/src/catch2/internal/catch_random_floating_point_helpers.hpp @@ -0,0 +1,94 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED +#define CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED + +#include <catch2/internal/catch_polyfills.hpp> + +#include <cassert> +#include <cmath> +#include <cstdint> +#include <limits> +#include <type_traits> + +namespace Catch { + + namespace Detail { + /** + * Returns the largest magnitude of 1-ULP distance inside the [a, b] range. + * + * Assumes `a < b`. + */ + template <typename FloatType> + FloatType gamma(FloatType a, FloatType b) { + static_assert( std::is_floating_point<FloatType>::value, + "gamma returns the largest ULP magnitude within " + "floating point range [a, b]. This only makes sense " + "for floating point types" ); + assert( a <= b ); + + const auto gamma_up = Catch::nextafter( a, std::numeric_limits<FloatType>::infinity() ) - a; + const auto gamma_down = b - Catch::nextafter( b, -std::numeric_limits<FloatType>::infinity() ); + + return gamma_up < gamma_down ? gamma_down : gamma_up; + } + + template <typename FloatingPoint> + struct DistanceTypePicker; + template <> + struct DistanceTypePicker<float> { + using type = std::uint32_t; + }; + template <> + struct DistanceTypePicker<double> { + using type = std::uint64_t; + }; + + template <typename T> + using DistanceType = typename DistanceTypePicker<T>::type; + +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + /** + * Computes the number of equi-distant floats in [a, b] + * + * Since not every range can be split into equidistant floats + * exactly, we actually compute ceil(b/distance - a/distance), + * because in those cases we want to overcount. + * + * Uses modified Dekker's FastTwoSum algorithm to handle rounding. + */ + template <typename FloatType> + DistanceType<FloatType> + count_equidistant_floats( FloatType a, FloatType b, FloatType distance ) { + assert( a <= b ); + // We get distance as gamma for our uniform float distribution, + // so this will round perfectly. + const auto ag = a / distance; + const auto bg = b / distance; + + const auto s = bg - ag; + const auto err = ( std::fabs( a ) <= std::fabs( b ) ) + ? -ag - ( s - bg ) + : bg - ( s + ag ); + const auto ceil_s = static_cast<DistanceType<FloatType>>( std::ceil( s ) ); + + return ( ceil_s != s ) ? ceil_s : ceil_s + ( err > 0 ); + } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + + } + +} // end namespace Catch + +#endif // CATCH_RANDOM_FLOATING_POINT_HELPERS_HPP_INCLUDED diff --git a/src/catch2/internal/catch_random_integer_helpers.hpp b/src/catch2/internal/catch_random_integer_helpers.hpp new file mode 100644 index 00000000..1c450f05 --- /dev/null +++ b/src/catch2/internal/catch_random_integer_helpers.hpp @@ -0,0 +1,202 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED +#define CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED + +#include <climits> +#include <cstddef> +#include <cstdint> +#include <type_traits> + +namespace Catch { + namespace Detail { + + template <std::size_t> + struct SizedUnsignedType; +#define SizedUnsignedTypeHelper( TYPE ) \ + template <> \ + struct SizedUnsignedType<sizeof( TYPE )> { \ + using type = TYPE; \ + } + + SizedUnsignedTypeHelper( std::uint8_t ); + SizedUnsignedTypeHelper( std::uint16_t ); + SizedUnsignedTypeHelper( std::uint32_t ); + SizedUnsignedTypeHelper( std::uint64_t ); +#undef SizedUnsignedTypeHelper + + template <std::size_t sz> + using SizedUnsignedType_t = typename SizedUnsignedType<sz>::type; + + template <typename T> + using DoubleWidthUnsignedType_t = SizedUnsignedType_t<2 * sizeof( T )>; + + template <typename T> + struct ExtendedMultResult { + T upper; + T lower; + friend bool operator==( ExtendedMultResult const& lhs, + ExtendedMultResult const& rhs ) { + return lhs.upper == rhs.upper && lhs.lower == rhs.lower; + } + }; + + // Returns 128 bit result of multiplying lhs and rhs + constexpr ExtendedMultResult<std::uint64_t> + extendedMult( std::uint64_t lhs, std::uint64_t rhs ) { + // We use the simple long multiplication approach for + // correctness, we can use platform specific builtins + // for performance later. + + // Split the lhs and rhs into two 32bit "digits", so that we can + // do 64 bit arithmetic to handle carry bits. + // 32b 32b 32b 32b + // lhs L1 L2 + // * rhs R1 R2 + // ------------------------ + // | R2 * L2 | + // | R2 * L1 | + // | R1 * L2 | + // | R1 * L1 | + // ------------------------- + // | a | b | c | d | + +#define CarryBits( x ) ( x >> 32 ) +#define Digits( x ) ( x & 0xFF'FF'FF'FF ) + + auto r2l2 = Digits( rhs ) * Digits( lhs ); + auto r2l1 = Digits( rhs ) * CarryBits( lhs ); + auto r1l2 = CarryBits( rhs ) * Digits( lhs ); + auto r1l1 = CarryBits( rhs ) * CarryBits( lhs ); + + // Sum to columns first + auto d = Digits( r2l2 ); + auto c = CarryBits( r2l2 ) + Digits( r2l1 ) + Digits( r1l2 ); + auto b = CarryBits( r2l1 ) + CarryBits( r1l2 ) + Digits( r1l1 ); + auto a = CarryBits( r1l1 ); + + // Propagate carries between columns + c += CarryBits( d ); + b += CarryBits( c ); + a += CarryBits( b ); + + // Remove the used carries + c = Digits( c ); + b = Digits( b ); + a = Digits( a ); + +#undef CarryBits +#undef Digits + + return { + a << 32 | b, // upper 64 bits + c << 32 | d // lower 64 bits + }; + } + + template <typename UInt> + constexpr ExtendedMultResult<UInt> extendedMult( UInt lhs, UInt rhs ) { + static_assert( std::is_unsigned<UInt>::value, + "extendedMult can only handle unsigned integers" ); + static_assert( sizeof( UInt ) < sizeof( std::uint64_t ), + "Generic extendedMult can only handle types smaller " + "than uint64_t" ); + using WideType = DoubleWidthUnsignedType_t<UInt>; + + auto result = WideType( lhs ) * WideType( rhs ); + return { + static_cast<UInt>( result >> ( CHAR_BIT * sizeof( UInt ) ) ), + static_cast<UInt>( result & UInt( -1 ) ) }; + } + + + template <typename TargetType, + typename Generator> + std::enable_if_t<sizeof(typename Generator::result_type) >= sizeof(TargetType), + TargetType> fillBitsFrom(Generator& gen) { + using gresult_type = typename Generator::result_type; + static_assert( std::is_unsigned<TargetType>::value, "Only unsigned integers are supported" ); + static_assert( Generator::min() == 0 && + Generator::max() == static_cast<gresult_type>( -1 ), + "Generator must be able to output all numbers in its result type (effectively it must be a random bit generator)" ); + + // We want to return the top bits from a generator, as they are + // usually considered higher quality. + constexpr auto generated_bits = sizeof( gresult_type ) * CHAR_BIT; + constexpr auto return_bits = sizeof( TargetType ) * CHAR_BIT; + + return static_cast<TargetType>( gen() >> + ( generated_bits - return_bits) ); + } + + template <typename TargetType, + typename Generator> + std::enable_if_t<sizeof(typename Generator::result_type) < sizeof(TargetType), + TargetType> fillBitsFrom(Generator& gen) { + using gresult_type = typename Generator::result_type; + static_assert( std::is_unsigned<TargetType>::value, + "Only unsigned integers are supported" ); + static_assert( Generator::min() == 0 && + Generator::max() == static_cast<gresult_type>( -1 ), + "Generator must be able to output all numbers in its result type (effectively it must be a random bit generator)" ); + + constexpr auto generated_bits = sizeof( gresult_type ) * CHAR_BIT; + constexpr auto return_bits = sizeof( TargetType ) * CHAR_BIT; + std::size_t filled_bits = 0; + TargetType ret = 0; + do { + ret <<= generated_bits; + ret |= gen(); + filled_bits += generated_bits; + } while ( filled_bits < return_bits ); + + return ret; + } + + /* + * Transposes numbers into unsigned type while keeping their ordering + * + * This means that signed types are changed so that the ordering is + * [INT_MIN, ..., -1, 0, ..., INT_MAX], rather than order we would + * get by simple casting ([0, ..., INT_MAX, INT_MIN, ..., -1]) + */ + template <typename OriginalType, typename UnsignedType> + std::enable_if_t<std::is_signed<OriginalType>::value, UnsignedType> + transposeToNaturalOrder( UnsignedType in ) { + static_assert( + sizeof( OriginalType ) == sizeof( UnsignedType ), + "reordering requires the same sized types on both sides" ); + static_assert( std::is_unsigned<UnsignedType>::value, + "Input type must be unsigned" ); + // Assuming 2s complement (standardized in current C++), the + // positive and negative numbers are already internally ordered, + // and their difference is in the top bit. Swapping it orders + // them the desired way. + constexpr auto highest_bit = + UnsignedType( 1 ) << ( sizeof( UnsignedType ) * CHAR_BIT - 1 ); + return static_cast<UnsignedType>( in ^ highest_bit ); + } + + + + template <typename OriginalType, + typename UnsignedType> + std::enable_if_t<std::is_unsigned<OriginalType>::value, UnsignedType> + transposeToNaturalOrder(UnsignedType in) { + static_assert( + sizeof( OriginalType ) == sizeof( UnsignedType ), + "reordering requires the same sized types on both sides" ); + static_assert( std::is_unsigned<UnsignedType>::value, "Input type must be unsigned" ); + // No reordering is needed for unsigned -> unsigned + return in; + } + } // namespace Detail +} // namespace Catch + +#endif // CATCH_RANDOM_INTEGER_HELPERS_HPP_INCLUDED diff --git a/src/catch2/internal/catch_random_seed_generation.cpp b/src/catch2/internal/catch_random_seed_generation.cpp index 40c468cb..fdc3fa19 100644 --- a/src/catch2/internal/catch_random_seed_generation.cpp +++ b/src/catch2/internal/catch_random_seed_generation.cpp @@ -9,6 +9,7 @@ #include <catch2/internal/catch_random_seed_generation.hpp> #include <catch2/internal/catch_enforce.hpp> +#include <catch2/internal/catch_random_integer_helpers.hpp> #include <ctime> #include <random> @@ -21,10 +22,10 @@ namespace Catch { return static_cast<std::uint32_t>( std::time( nullptr ) ); case GenerateFrom::Default: - case GenerateFrom::RandomDevice: - // In theory, a platform could have random_device that returns just - // 16 bits. That is still some randomness, so we don't care too much - return static_cast<std::uint32_t>( std::random_device{}() ); + case GenerateFrom::RandomDevice: { + std::random_device rd; + return Detail::fillBitsFrom<std::uint32_t>( rd ); + } default: CATCH_ERROR("Unknown generation method"); diff --git a/src/catch2/internal/catch_reporter_registry.cpp b/src/catch2/internal/catch_reporter_registry.cpp index 4c0c44f4..cea8c4dc 100644 --- a/src/catch2/internal/catch_reporter_registry.cpp +++ b/src/catch2/internal/catch_reporter_registry.cpp @@ -5,61 +5,87 @@ // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 -#include <catch2/internal/catch_reporter_registry.hpp> -#include <catch2/reporters/catch_reporter_registrars.hpp> +#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> +#include <catch2/internal/catch_enforce.hpp> +#include <catch2/internal/catch_move_and_forward.hpp> +#include <catch2/internal/catch_reporter_registry.hpp> #include <catch2/reporters/catch_reporter_automake.hpp> #include <catch2/reporters/catch_reporter_compact.hpp> #include <catch2/reporters/catch_reporter_console.hpp> +#include <catch2/reporters/catch_reporter_json.hpp> #include <catch2/reporters/catch_reporter_junit.hpp> +#include <catch2/reporters/catch_reporter_registrars.hpp> #include <catch2/reporters/catch_reporter_sonarqube.hpp> #include <catch2/reporters/catch_reporter_tap.hpp> #include <catch2/reporters/catch_reporter_teamcity.hpp> #include <catch2/reporters/catch_reporter_xml.hpp> -#include <catch2/internal/catch_move_and_forward.hpp> -#include <catch2/internal/catch_enforce.hpp> namespace Catch { + struct ReporterRegistry::ReporterRegistryImpl { + std::vector<Detail::unique_ptr<EventListenerFactory>> listeners; + std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess> + factories; + }; - ReporterRegistry::ReporterRegistry() { + ReporterRegistry::ReporterRegistry(): + m_impl( Detail::make_unique<ReporterRegistryImpl>() ) { // Because it is impossible to move out of initializer list, // we have to add the elements manually - m_factories["Automake"] = Detail::make_unique<ReporterFactory<AutomakeReporter>>(); - m_factories["compact"] = Detail::make_unique<ReporterFactory<CompactReporter>>(); - m_factories["console"] = Detail::make_unique<ReporterFactory<ConsoleReporter>>(); - m_factories["JUnit"] = Detail::make_unique<ReporterFactory<JunitReporter>>(); - m_factories["SonarQube"] = Detail::make_unique<ReporterFactory<SonarQubeReporter>>(); - m_factories["TAP"] = Detail::make_unique<ReporterFactory<TAPReporter>>(); - m_factories["TeamCity"] = Detail::make_unique<ReporterFactory<TeamCityReporter>>(); - m_factories["XML"] = Detail::make_unique<ReporterFactory<XmlReporter>>(); + m_impl->factories["Automake"] = + Detail::make_unique<ReporterFactory<AutomakeReporter>>(); + m_impl->factories["compact"] = + Detail::make_unique<ReporterFactory<CompactReporter>>(); + m_impl->factories["console"] = + Detail::make_unique<ReporterFactory<ConsoleReporter>>(); + m_impl->factories["JUnit"] = + Detail::make_unique<ReporterFactory<JunitReporter>>(); + m_impl->factories["SonarQube"] = + Detail::make_unique<ReporterFactory<SonarQubeReporter>>(); + m_impl->factories["TAP"] = + Detail::make_unique<ReporterFactory<TAPReporter>>(); + m_impl->factories["TeamCity"] = + Detail::make_unique<ReporterFactory<TeamCityReporter>>(); + m_impl->factories["XML"] = + Detail::make_unique<ReporterFactory<XmlReporter>>(); + m_impl->factories["JSON"] = + Detail::make_unique<ReporterFactory<JsonReporter>>(); } ReporterRegistry::~ReporterRegistry() = default; - - IEventListenerPtr ReporterRegistry::create( std::string const& name, ReporterConfig&& config ) const { - auto it = m_factories.find( name ); - if( it == m_factories.end() ) - return nullptr; - return it->second->create( CATCH_MOVE(config) ); + IEventListenerPtr + ReporterRegistry::create( std::string const& name, + ReporterConfig&& config ) const { + auto it = m_impl->factories.find( name ); + if ( it == m_impl->factories.end() ) return nullptr; + return it->second->create( CATCH_MOVE( config ) ); } - void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr factory ) { + void ReporterRegistry::registerReporter( std::string const& name, + IReporterFactoryPtr factory ) { CATCH_ENFORCE( name.find( "::" ) == name.npos, - "'::' is not allowed in reporter name: '" + name + '\'' ); - auto ret = m_factories.emplace(name, CATCH_MOVE(factory)); - CATCH_ENFORCE( ret.second, "reporter using '" + name + "' as name was already registered" ); + "'::' is not allowed in reporter name: '" + name + + '\'' ); + auto ret = m_impl->factories.emplace( name, CATCH_MOVE( factory ) ); + CATCH_ENFORCE( ret.second, + "reporter using '" + name + + "' as name was already registered" ); } void ReporterRegistry::registerListener( Detail::unique_ptr<EventListenerFactory> factory ) { - m_listeners.push_back( CATCH_MOVE(factory) ); + m_impl->listeners.push_back( CATCH_MOVE( factory ) ); } - IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const { - return m_factories; - } - IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const { - return m_listeners; + std::map<std::string, + IReporterFactoryPtr, + Detail::CaseInsensitiveLess> const& + ReporterRegistry::getFactories() const { + return m_impl->factories; } -} + std::vector<Detail::unique_ptr<EventListenerFactory>> const& + ReporterRegistry::getListeners() const { + return m_impl->listeners; + } +} // namespace Catch diff --git a/src/catch2/internal/catch_reporter_registry.hpp b/src/catch2/internal/catch_reporter_registry.hpp index 5577b9ef..92a88927 100644 --- a/src/catch2/internal/catch_reporter_registry.hpp +++ b/src/catch2/internal/catch_reporter_registry.hpp @@ -8,31 +8,48 @@ #ifndef CATCH_REPORTER_REGISTRY_HPP_INCLUDED #define CATCH_REPORTER_REGISTRY_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_reporter.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> +#include <catch2/internal/catch_case_insensitive_comparisons.hpp> +#include <catch2/internal/catch_unique_ptr.hpp> #include <map> +#include <string> +#include <vector> namespace Catch { - class ReporterRegistry : public IReporterRegistry { - public: + class IEventListener; + using IEventListenerPtr = Detail::unique_ptr<IEventListener>; + class IReporterFactory; + using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>; + struct ReporterConfig; + class EventListenerFactory; + + class ReporterRegistry { + struct ReporterRegistryImpl; + Detail::unique_ptr<ReporterRegistryImpl> m_impl; + public: ReporterRegistry(); - ~ReporterRegistry() override; // = default, out of line to allow fwd decl + ~ReporterRegistry(); // = default; - IEventListenerPtr create( std::string const& name, ReporterConfig&& config ) const override; + IEventListenerPtr create( std::string const& name, + ReporterConfig&& config ) const; - void registerReporter( std::string const& name, IReporterFactoryPtr factory ); - void registerListener( Detail::unique_ptr<EventListenerFactory> factory ); + void registerReporter( std::string const& name, + IReporterFactoryPtr factory ); - FactoryMap const& getFactories() const override; - Listeners const& getListeners() const override; + void + registerListener( Detail::unique_ptr<EventListenerFactory> factory ); - private: - FactoryMap m_factories; - Listeners m_listeners; + std::map<std::string, + IReporterFactoryPtr, + Detail::CaseInsensitiveLess> const& + getFactories() const; + + std::vector<Detail::unique_ptr<EventListenerFactory>> const& + getListeners() const; }; -} + +} // end namespace Catch #endif // CATCH_REPORTER_REGISTRY_HPP_INCLUDED diff --git a/src/catch2/internal/catch_reporter_spec_parser.cpp b/src/catch2/internal/catch_reporter_spec_parser.cpp index f6591d9a..8b88b170 100644 --- a/src/catch2/internal/catch_reporter_spec_parser.cpp +++ b/src/catch2/internal/catch_reporter_spec_parser.cpp @@ -21,9 +21,9 @@ namespace Catch { }; kvPair splitKVPair(StringRef kvString) { - auto splitPos = static_cast<size_t>( std::distance( - kvString.begin(), - std::find( kvString.begin(), kvString.end(), '=' ) ) ); + auto splitPos = static_cast<size_t>( + std::find( kvString.begin(), kvString.end(), '=' ) - + kvString.begin() ); return { kvString.substr( 0, splitPos ), kvString.substr( splitPos + 1, kvString.size() ) }; diff --git a/src/catch2/internal/catch_result_type.hpp b/src/catch2/internal/catch_result_type.hpp index faf0683d..e66afaff 100644 --- a/src/catch2/internal/catch_result_type.hpp +++ b/src/catch2/internal/catch_result_type.hpp @@ -16,6 +16,8 @@ namespace Catch { Ok = 0, Info = 1, Warning = 2, + // TODO: Should explicit skip be considered "not OK" (cf. isOk)? I.e., should it have the failure bit? + ExplicitSkip = 4, FailureBit = 0x10, diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index d2e8fb8c..e568100d 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -8,8 +8,9 @@ #include <catch2/internal/catch_run_context.hpp> #include <catch2/catch_user_config.hpp> -#include <catch2/interfaces/catch_interfaces_generatortracker.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/interfaces/catch_interfaces_generatortracker.hpp> +#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_context.hpp> #include <catch2/internal/catch_enforce.hpp> @@ -19,6 +20,7 @@ #include <catch2/internal/catch_output_redirect.hpp> #include <catch2/internal/catch_assertion_handler.hpp> #include <catch2/internal/catch_test_failure_exception.hpp> +#include <catch2/internal/catch_result_type.hpp> #include <cassert> #include <algorithm> @@ -26,149 +28,152 @@ namespace Catch { namespace Generators { - struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker { - GeneratorBasePtr m_generator; - - GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( nameAndLocation, ctx, parent ) - {} - ~GeneratorTracker() override; - - static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) { - GeneratorTracker* tracker; - - ITracker& currentTracker = ctx.currentTracker(); - // 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 = static_cast<GeneratorTracker*>( thisTracker ); - } else if ( ITracker* childTracker = - currentTracker.findChild( nameAndLocation ) ) { - assert( childTracker ); - assert( childTracker->isGeneratorTracker() ); - tracker = static_cast<GeneratorTracker*>( childTracker ); - } else { - auto newTracker = - Catch::Detail::make_unique<GeneratorTracker>( - nameAndLocation, ctx, ¤tTracker ); - tracker = newTracker.get(); - currentTracker.addChild( CATCH_MOVE(newTracker) ); - } - - if( !tracker->isComplete() ) { - tracker->open(); - } + namespace { + struct GeneratorTracker final : TestCaseTracking::TrackerBase, + IGeneratorTracker { + GeneratorBasePtr m_generator; + + GeneratorTracker( + TestCaseTracking::NameAndLocation&& nameAndLocation, + TrackerContext& ctx, + ITracker* parent ): + TrackerBase( CATCH_MOVE( nameAndLocation ), ctx, parent ) {} + ~GeneratorTracker() override = default; + + static GeneratorTracker* + acquire( TrackerContext& ctx, + TestCaseTracking::NameAndLocationRef const& + nameAndLocation ) { + GeneratorTracker* tracker; + + ITracker& currentTracker = ctx.currentTracker(); + // 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 = static_cast<GeneratorTracker*>( thisTracker ); + } else if ( ITracker* childTracker = + currentTracker.findChild( + nameAndLocation ) ) { + assert( childTracker ); + assert( childTracker->isGeneratorTracker() ); + tracker = + static_cast<GeneratorTracker*>( childTracker ); + } else { + return nullptr; + } - return *tracker; - } + if ( !tracker->isComplete() ) { tracker->open(); } - // TrackerBase interface - bool isGeneratorTracker() const override { return true; } - auto hasGenerator() const -> bool override { - return !!m_generator; - } - void close() override { - TrackerBase::close(); - // 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 = [&]() { - // No children -> nobody to wait for - if ( m_children.empty() ) { - return false; - } - // If at least one child started executing, don't wait - if ( std::find_if( - m_children.begin(), - m_children.end(), - []( TestCaseTracking::ITrackerPtr const& tracker ) { - return tracker->hasStarted(); - } ) != m_children.end() ) { - return false; - } + return tracker; + } - // No children have started. We need to check if they _can_ - // start, and thus we should wait for them, or they cannot - // start (due to filters), and we shouldn't wait for them - ITracker* parent = m_parent; - // This is safe: there is always at least one section - // tracker in a test case tracking tree - while ( !parent->isSectionTracker() ) { - parent = parent->parent(); - } - assert( parent && - "Missing root (test case) level section" ); - - auto const& parentSection = - static_cast<SectionTracker const&>( *parent ); - auto const& filters = parentSection.getFilters(); - // No filters -> no restrictions on running sections - if ( filters.empty() ) { - return true; - } + // TrackerBase interface + bool isGeneratorTracker() const override { return true; } + auto hasGenerator() const -> bool override { + return !!m_generator; + } + void close() override { + TrackerBase::close(); + // 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 = [&]() { + // No children -> nobody to wait for + if ( m_children.empty() ) { return false; } + // If at least one child started executing, don't wait + if ( std::find_if( + m_children.begin(), + m_children.end(), + []( TestCaseTracking::ITrackerPtr const& + tracker ) { + return tracker->hasStarted(); + } ) != m_children.end() ) { + return false; + } - for ( auto const& child : m_children ) { - if ( child->isSectionTracker() && - std::find( - filters.begin(), - filters.end(), - static_cast<SectionTracker const&>( *child ) - .trimmedName() ) != filters.end() ) { - return true; + // No children have started. We need to check if they + // _can_ start, and thus we should wait for them, or + // they cannot start (due to filters), and we shouldn't + // wait for them + ITracker* parent = m_parent; + // This is safe: there is always at least one section + // tracker in a test case tracking tree + while ( !parent->isSectionTracker() ) { + parent = parent->parent(); } + assert( parent && + "Missing root (test case) level section" ); + + auto const& parentSection = + static_cast<SectionTracker const&>( *parent ); + auto const& filters = parentSection.getFilters(); + // No filters -> no restrictions on running sections + if ( filters.empty() ) { return true; } + + for ( auto const& child : m_children ) { + if ( child->isSectionTracker() && + std::find( filters.begin(), + filters.end(), + static_cast<SectionTracker const&>( + *child ) + .trimmedName() ) != + filters.end() ) { + return true; + } + } + return false; + }(); + + // 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. + assert( m_generator && "Tracker without generator" ); + if ( should_wait_for_child || + ( m_runState == CompletedSuccessfully && + m_generator->countedNext() ) ) { + m_children.clear(); + m_runState = Executing; } - return false; - }(); - - // 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->countedNext() ) ) { - m_children.clear(); - m_runState = Executing; } - } - // IGeneratorTracker interface - auto getGenerator() const -> GeneratorBasePtr const& override { - return m_generator; - } - void setGenerator( GeneratorBasePtr&& generator ) override { - m_generator = CATCH_MOVE( generator ); - } - }; - GeneratorTracker::~GeneratorTracker() = default; + // IGeneratorTracker interface + auto getGenerator() const -> GeneratorBasePtr const& override { + return m_generator; + } + void setGenerator( GeneratorBasePtr&& generator ) override { + m_generator = CATCH_MOVE( generator ); + } + }; + } // namespace } RunContext::RunContext(IConfig const* _config, IEventListenerPtr&& reporter) : m_runInfo(_config->name()), - m_context(getCurrentMutableContext()), m_config(_config), m_reporter(CATCH_MOVE(reporter)), m_lastAssertionInfo{ StringRef(), SourceLineInfo("",0), StringRef(), ResultDisposition::Normal }, m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions ) { - m_context.setResultCapture(this); + getCurrentMutableContext().setResultCapture( this ); m_reporter->testRunStarting(m_runInfo); } @@ -179,13 +184,8 @@ namespace Catch { Totals RunContext::runTest(TestCaseHandle const& testCase) { const Totals prevTotals = m_totals; - std::string redirectedCout; - std::string redirectedCerr; - auto const& testInfo = testCase.getTestCaseInfo(); - m_reporter->testCaseStarting(testInfo); - m_activeTestCase = &testCase; @@ -227,9 +227,11 @@ namespace Catch { seedRng( *m_config ); uint64_t testRuns = 0; + std::string redirectedCout; + std::string redirectedCerr; do { m_trackerContext.startCycle(); - m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo)); + m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocationRef(testInfo.name, testInfo.lineInfo)); m_reporter->testCasePartialStarting(testInfo, testRuns); @@ -240,7 +242,7 @@ namespace Catch { redirectedCerr += oneRunCerr; const auto singleRunTotals = m_totals.delta(beforeRunTotals); - auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, oneRunCout, oneRunCerr, aborting()); + auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, CATCH_MOVE(oneRunCout), CATCH_MOVE(oneRunCerr), aborting()); m_reporter->testCasePartialEnded(statsForOneRun, testRuns); ++testRuns; @@ -255,8 +257,8 @@ namespace Catch { m_totals.testCases += deltaTotals.testCases; m_reporter->testCaseEnded(TestCaseStats(testInfo, deltaTotals, - redirectedCout, - redirectedCerr, + CATCH_MOVE(redirectedCout), + CATCH_MOVE(redirectedCerr), aborting())); m_activeTestCase = nullptr; @@ -266,10 +268,13 @@ namespace Catch { } - void RunContext::assertionEnded(AssertionResult const & result) { + void RunContext::assertionEnded(AssertionResult&& result) { if (result.getResultType() == ResultWas::Ok) { m_totals.assertions.passed++; m_lastAssertionPassed = true; + } else if (result.getResultType() == ResultWas::ExplicitSkip) { + m_totals.assertions.skipped++; + m_lastAssertionPassed = true; } else if (!result.succeeded()) { m_lastAssertionPassed = false; if (result.isOk()) { @@ -285,24 +290,37 @@ namespace Catch { m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)); - if (result.getResultType() != ResultWas::Warning) + if ( result.getResultType() != ResultWas::Warning ) { m_messageScopes.clear(); + } - // Reset working state - resetAssertionInfo(); - m_lastResult = result; + // Reset working state. assertion info will be reset after + // populateReaction is run if it is needed + m_lastResult = CATCH_MOVE( result ); } void RunContext::resetAssertionInfo() { m_lastAssertionInfo.macroName = StringRef(); m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr; + m_lastAssertionInfo.resultDisposition = ResultDisposition::Normal; + } + + void RunContext::notifyAssertionStarted( AssertionInfo const& info ) { + m_reporter->assertionStarting( info ); } - bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) { - ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo)); + bool RunContext::sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) { + ITracker& sectionTracker = + SectionTracker::acquire( m_trackerContext, + TestCaseTracking::NameAndLocationRef( + sectionName, sectionLineInfo ) ); + if (!sectionTracker.isOpen()) return false; m_activeSections.push_back(§ionTracker); + SectionInfo sectionInfo( sectionLineInfo, static_cast<std::string>(sectionName) ); m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; m_reporter->sectionStarting(sectionInfo); @@ -311,14 +329,39 @@ namespace Catch { return true; } - auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + IGeneratorTracker* + RunContext::acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) { using namespace Generators; - GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext, - TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) ); + GeneratorTracker* tracker = GeneratorTracker::acquire( + m_trackerContext, + TestCaseTracking::NameAndLocationRef( + generatorName, lineInfo ) ); m_lastAssertionInfo.lineInfo = lineInfo; return tracker; } + IGeneratorTracker* RunContext::createGeneratorTracker( + StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) { + + auto nameAndLoc = TestCaseTracking::NameAndLocation( static_cast<std::string>( generatorName ), lineInfo ); + auto& currentTracker = m_trackerContext.currentTracker(); + assert( + currentTracker.nameAndLocation() != nameAndLoc && + "Trying to create tracker for a genreator that already has one" ); + + auto newTracker = Catch::Detail::make_unique<Generators::GeneratorTracker>( + CATCH_MOVE(nameAndLoc), m_trackerContext, ¤tTracker ); + auto ret = newTracker.get(); + currentTracker.addChild( CATCH_MOVE( newTracker ) ); + + ret->setGenerator( CATCH_MOVE( generator ) ); + ret->open(); + return ret; + } + bool RunContext::testForMissingAssertions(Counts& assertions) { if (assertions.total() != 0) return false; @@ -331,7 +374,7 @@ namespace Catch { return true; } - void RunContext::sectionEnded(SectionEndInfo const & endInfo) { + void RunContext::sectionEnded(SectionEndInfo&& endInfo) { Counts assertions = m_totals.assertions - endInfo.prevAssertions; bool missingAssertions = testForMissingAssertions(assertions); @@ -340,19 +383,20 @@ namespace Catch { m_activeSections.pop_back(); } - m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions)); + m_reporter->sectionEnded(SectionStats(CATCH_MOVE(endInfo.sectionInfo), assertions, endInfo.durationInSeconds, missingAssertions)); m_messages.clear(); m_messageScopes.clear(); } - void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) { - if (m_unfinishedSections.empty()) + void RunContext::sectionEndedEarly(SectionEndInfo&& endInfo) { + if ( m_unfinishedSections.empty() ) { m_activeSections.back()->fail(); - else + } else { m_activeSections.back()->close(); + } m_activeSections.pop_back(); - m_unfinishedSections.push_back(endInfo); + m_unfinishedSections.push_back(CATCH_MOVE(endInfo)); } void RunContext::benchmarkPreparing( StringRef name ) { @@ -376,8 +420,8 @@ namespace Catch { m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end()); } - void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) { - m_messageScopes.emplace_back( builder ); + void RunContext::emplaceUnscopedMessage( MessageBuilder&& builder ) { + m_messageScopes.emplace_back( CATCH_MOVE(builder) ); } std::string RunContext::getCurrentTestName() const { @@ -402,9 +446,10 @@ namespace Catch { // Instead, fake a result data. AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } ); tempResult.message = static_cast<std::string>(message); - AssertionResult result(m_lastAssertionInfo, tempResult); + AssertionResult result(m_lastAssertionInfo, CATCH_MOVE(tempResult)); - assertionEnded(result); + assertionEnded(CATCH_MOVE(result) ); + resetAssertionInfo(); handleUnfinishedSections(); @@ -414,7 +459,7 @@ namespace Catch { Counts assertions; assertions.failed = 1; - SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false); + SectionStats testCaseSectionStats(CATCH_MOVE(testCaseSection), assertions, 0, false); m_reporter->sectionEnded(testCaseSectionStats); auto const& testInfo = m_activeTestCase->getTestCaseInfo(); @@ -475,6 +520,8 @@ namespace Catch { duration = timer.getElapsedSeconds(); } CATCH_CATCH_ANON (TestFailureException&) { // This just means the test was aborted due to failure + } CATCH_CATCH_ANON (TestSkipException&) { + // This just means the test was explicitly skipped } CATCH_CATCH_ALL { // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions // are reported without translation at the point of origin. @@ -491,7 +538,7 @@ namespace Catch { m_messages.clear(); m_messageScopes.clear(); - SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions); + SectionStats testCaseSectionStats(CATCH_MOVE(testCaseSection), assertions, duration, missingAssertions); m_reporter->sectionEnded(testCaseSectionStats); } @@ -515,7 +562,7 @@ namespace Catch { itEnd = m_unfinishedSections.rend(); it != itEnd; ++it) - sectionEnded(*it); + sectionEnded(CATCH_MOVE(*it)); m_unfinishedSections.clear(); } @@ -524,8 +571,6 @@ namespace Catch { ITransientExpression const& expr, AssertionReaction& reaction ) { - m_reporter->assertionStarting( info ); - bool negated = isFalseTest( info.resultDisposition ); bool result = expr.getResult() != negated; @@ -541,6 +586,7 @@ namespace Catch { reportExpr(info, ResultWas::ExpressionFailed, &expr, negated ); populateReaction( reaction ); } + resetAssertionInfo(); } void RunContext::reportExpr( AssertionInfo const &info, @@ -551,10 +597,10 @@ namespace Catch { m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( negated ) ); - AssertionResult assertionResult{ info, data }; + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; assertionResult.m_resultData.lazyExpression.m_transientExpression = expr; - assertionEnded( assertionResult ); + assertionEnded( CATCH_MOVE(assertionResult) ); } void RunContext::handleMessage( @@ -563,16 +609,23 @@ namespace Catch { StringRef message, AssertionReaction& reaction ) { - m_reporter->assertionStarting( info ); - m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( false ) ); data.message = static_cast<std::string>(message); - AssertionResult assertionResult{ m_lastAssertionInfo, data }; - assertionEnded( assertionResult ); - if( !assertionResult.isOk() ) + AssertionResult assertionResult{ m_lastAssertionInfo, + CATCH_MOVE( data ) }; + + const auto isOk = assertionResult.isOk(); + assertionEnded( CATCH_MOVE(assertionResult) ); + if ( !isOk ) { populateReaction( reaction ); + } else if ( resultType == ResultWas::ExplicitSkip ) { + // TODO: Need to handle this explicitly, as ExplicitSkip is + // considered "OK" + reaction.shouldSkip = true; + } + resetAssertionInfo(); } void RunContext::handleUnexpectedExceptionNotThrown( AssertionInfo const& info, @@ -583,16 +636,17 @@ namespace Catch { void RunContext::handleUnexpectedInflightException( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) { m_lastAssertionInfo = info; AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = message; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + data.message = CATCH_MOVE(message); + AssertionResult assertionResult{ info, CATCH_MOVE(data) }; + assertionEnded( CATCH_MOVE(assertionResult) ); populateReaction( reaction ); + resetAssertionInfo(); } void RunContext::populateReaction( AssertionReaction& reaction ) { @@ -603,12 +657,14 @@ namespace Catch { void RunContext::handleIncomplete( AssertionInfo const& info ) { + using namespace std::string_literals; m_lastAssertionInfo = info; AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"s; + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; + assertionEnded( CATCH_MOVE(assertionResult) ); + resetAssertionInfo(); } void RunContext::handleNonExpr( AssertionInfo const &info, @@ -618,11 +674,12 @@ namespace Catch { m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( false ) ); - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); + AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; - if( !assertionResult.isOk() ) - populateReaction( reaction ); + const auto isOk = assertionResult.isOk(); + assertionEnded( CATCH_MOVE(assertionResult) ); + if ( !isOk ) { populateReaction( reaction ); } + resetAssertionInfo(); } diff --git a/src/catch2/internal/catch_run_context.hpp b/src/catch2/internal/catch_run_context.hpp index ab20db57..c749304d 100644 --- a/src/catch2/internal/catch_run_context.hpp +++ b/src/catch2/internal/catch_run_context.hpp @@ -8,8 +8,9 @@ #ifndef CATCH_RUN_CONTEXT_HPP_INCLUDED #define CATCH_RUN_CONTEXT_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_reporter.hpp> +#include <catch2/interfaces/catch_interfaces_capture.hpp> #include <catch2/internal/catch_test_registry.hpp> +#include <catch2/internal/catch_test_run_info.hpp> #include <catch2/internal/catch_fatal_condition_handler.hpp> #include <catch2/catch_test_case_info.hpp> #include <catch2/catch_message.hpp> @@ -24,13 +25,14 @@ namespace Catch { - class IMutableContext; class IGeneratorTracker; class IConfig; + class IEventListener; + using IEventListenerPtr = Detail::unique_ptr<IEventListener>; /////////////////////////////////////////////////////////////////////////// - class RunContext : public IResultCapture { + class RunContext final : public IResultCapture { public: RunContext( RunContext const& ) = delete; @@ -59,7 +61,7 @@ namespace Catch { AssertionReaction& reaction ) override; void handleUnexpectedInflightException ( AssertionInfo const& info, - std::string const& message, + std::string&& message, AssertionReaction& reaction ) override; void handleIncomplete ( AssertionInfo const& info ) override; @@ -68,12 +70,22 @@ namespace Catch { ResultWas::OfType resultType, AssertionReaction &reaction ) override; - bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override; + void notifyAssertionStarted( AssertionInfo const& info ) override; + bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) override; - void sectionEnded( SectionEndInfo const& endInfo ) override; - void sectionEndedEarly( SectionEndInfo const& endInfo ) override; + void sectionEnded( SectionEndInfo&& endInfo ) override; + void sectionEndedEarly( SectionEndInfo&& endInfo ) override; + + IGeneratorTracker* + acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) override; + IGeneratorTracker* createGeneratorTracker( + StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) override; - auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; void benchmarkPreparing( StringRef name ) override; void benchmarkStarting( BenchmarkInfo const& info ) override; @@ -83,7 +95,7 @@ namespace Catch { void pushScopedMessage( MessageInfo const& message ) override; void popScopedMessage( MessageInfo const& message ) override; - void emplaceUnscopedMessage( MessageBuilder const& builder ) override; + void emplaceUnscopedMessage( MessageBuilder&& builder ) override; std::string getCurrentTestName() const override; @@ -109,7 +121,7 @@ namespace Catch { void resetAssertionInfo(); bool testForMissingAssertions( Counts& assertions ); - void assertionEnded( AssertionResult const& result ); + void assertionEnded( AssertionResult&& result ); void reportExpr ( AssertionInfo const &info, ResultWas::OfType resultType, @@ -123,7 +135,6 @@ namespace Catch { void handleUnfinishedSections(); TestRunInfo m_runInfo; - IMutableContext& m_context; TestCaseHandle const* m_activeTestCase = nullptr; ITracker* m_testCaseTracker = nullptr; Optional<AssertionResult> m_lastResult; diff --git a/src/catch2/internal/catch_section.cpp b/src/catch2/internal/catch_section.cpp index ca2e5d8c..061732b1 100644 --- a/src/catch2/internal/catch_section.cpp +++ b/src/catch2/internal/catch_section.cpp @@ -15,7 +15,7 @@ namespace Catch { Section::Section( SectionInfo&& info ): m_info( CATCH_MOVE( info ) ), m_sectionIncluded( - getResultCapture().sectionStarted( m_info, m_assertions ) ) { + getResultCapture().sectionStarted( m_info.name, m_info.lineInfo, m_assertions ) ) { // Non-"included" sections will not use the timing information // anyway, so don't bother with the potential syscall. if (m_sectionIncluded) { @@ -23,13 +23,31 @@ namespace Catch { } } + Section::Section( SourceLineInfo const& _lineInfo, + StringRef _name, + const char* const ): + m_info( { "invalid", static_cast<std::size_t>( -1 ) }, std::string{} ), + m_sectionIncluded( + getResultCapture().sectionStarted( _name, _lineInfo, m_assertions ) ) { + // We delay initialization the SectionInfo member until we know + // this section needs it, so we avoid allocating std::string for name. + // We also delay timer start to avoid the potential syscall unless we + // will actually use the result. + if ( m_sectionIncluded ) { + m_info.name = static_cast<std::string>( _name ); + m_info.lineInfo = _lineInfo; + m_timer.start(); + } + } + Section::~Section() { if( m_sectionIncluded ) { - SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() }; - if( uncaught_exceptions() ) - getResultCapture().sectionEndedEarly( endInfo ); - else - getResultCapture().sectionEnded( endInfo ); + SectionEndInfo endInfo{ CATCH_MOVE(m_info), m_assertions, m_timer.getElapsedSeconds() }; + if ( uncaught_exceptions() ) { + getResultCapture().sectionEndedEarly( CATCH_MOVE(endInfo) ); + } else { + getResultCapture().sectionEnded( CATCH_MOVE( endInfo ) ); + } } } diff --git a/src/catch2/internal/catch_section.hpp b/src/catch2/internal/catch_section.hpp index abd12192..8c894eeb 100644 --- a/src/catch2/internal/catch_section.hpp +++ b/src/catch2/internal/catch_section.hpp @@ -9,6 +9,7 @@ #define CATCH_SECTION_HPP_INCLUDED #include <catch2/internal/catch_compiler_capabilities.hpp> +#include <catch2/internal/catch_config_static_analysis_support.hpp> #include <catch2/internal/catch_noncopyable.hpp> #include <catch2/catch_section_info.hpp> #include <catch2/catch_timer.hpp> @@ -20,6 +21,9 @@ namespace Catch { class Section : Detail::NonCopyable { public: Section( SectionInfo&& info ); + Section( SourceLineInfo const& _lineInfo, + StringRef _name, + const char* const = nullptr ); ~Section(); // This indicates whether the section should be executed or not @@ -35,16 +39,62 @@ namespace Catch { } // end namespace Catch -#define INTERNAL_CATCH_SECTION( ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION - -#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::Section( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::SectionInfo( \ + CATCH_INTERNAL_LINEINFO, \ + ( Catch::ReusableStringStream() << __VA_ARGS__ ) \ + .str() ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#else + +// These section definitions imply that at most one section at one level +// will be intered (because only one section's __LINE__ can be equal to +// the dummy `catchInternalSectionHint` variable from `TEST_CASE`). + +namespace Catch { + namespace Detail { + // Intentionally without linkage, as it should only be used as a dummy + // symbol for static analysis. + int GetNewSectionHint(); + } // namespace Detail +} // namespace Catch + + +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#endif + #endif // CATCH_SECTION_HPP_INCLUDED diff --git a/src/catch2/internal/catch_stream_end_stop.hpp b/src/catch2/internal/catch_stream_end_stop.hpp index 61379f20..66d678cf 100644 --- a/src/catch2/internal/catch_stream_end_stop.hpp +++ b/src/catch2/internal/catch_stream_end_stop.hpp @@ -17,10 +17,10 @@ namespace Catch { // as well as // << stuff +StreamEndStop struct StreamEndStop { - StringRef operator+() const { return StringRef(); } + constexpr StringRef operator+() const { return StringRef(); } template <typename T> - friend T const& operator+( T const& value, StreamEndStop ) { + constexpr friend T const& operator+( T const& value, StreamEndStop ) { return value; } }; diff --git a/src/catch2/internal/catch_string_manip.cpp b/src/catch2/internal/catch_string_manip.cpp index cb96dd4f..0c889ca1 100644 --- a/src/catch2/internal/catch_string_manip.cpp +++ b/src/catch2/internal/catch_string_manip.cpp @@ -8,7 +8,6 @@ #include <catch2/internal/catch_string_manip.hpp> #include <catch2/internal/catch_stringref.hpp> -#include <algorithm> #include <ostream> #include <cstring> #include <cctype> @@ -32,9 +31,9 @@ namespace Catch { return s.find( infix ) != std::string::npos; } void toLowerInPlace( std::string& s ) { - std::transform( s.begin(), s.end(), s.begin(), []( char c ) { - return toLower( c ); - } ); + for ( char& c : s ) { + c = toLower( c ); + } } std::string toLower( std::string const& s ) { std::string lc = s; diff --git a/src/catch2/internal/catch_string_manip.hpp b/src/catch2/internal/catch_string_manip.hpp index 8630b56a..dc0c552c 100644 --- a/src/catch2/internal/catch_string_manip.hpp +++ b/src/catch2/internal/catch_string_manip.hpp @@ -10,6 +10,7 @@ #include <catch2/internal/catch_stringref.hpp> +#include <cstdint> #include <string> #include <iosfwd> #include <vector> diff --git a/src/catch2/internal/catch_stringref.cpp b/src/catch2/internal/catch_stringref.cpp index 668ff297..232498eb 100644 --- a/src/catch2/internal/catch_stringref.cpp +++ b/src/catch2/internal/catch_stringref.cpp @@ -17,10 +17,6 @@ namespace Catch { : StringRef( rawChars, std::strlen(rawChars) ) {} - auto StringRef::operator == ( StringRef other ) const noexcept -> bool { - return m_size == other.m_size - && (std::memcmp( m_start, other.m_start, m_size ) == 0); - } bool StringRef::operator<(StringRef rhs) const noexcept { if (m_size < rhs.m_size) { diff --git a/src/catch2/internal/catch_stringref.hpp b/src/catch2/internal/catch_stringref.hpp index bd8971bc..99bb9a98 100644 --- a/src/catch2/internal/catch_stringref.hpp +++ b/src/catch2/internal/catch_stringref.hpp @@ -13,6 +13,8 @@ #include <iosfwd> #include <cassert> +#include <cstring> + namespace Catch { /// A non-owning string class (similar to the forthcoming std::string_view) @@ -49,7 +51,10 @@ namespace Catch { } public: // operators - auto operator == ( StringRef other ) const noexcept -> bool; + auto operator == ( StringRef other ) const noexcept -> bool { + return m_size == other.m_size + && (std::memcmp( m_start, other.m_start, m_size ) == 0); + } auto operator != (StringRef other) const noexcept -> bool { return !(*this == other); } diff --git a/src/catch2/internal/catch_tag_alias_registry.cpp b/src/catch2/internal/catch_tag_alias_registry.cpp index b7c6b9ec..4fd0d557 100644 --- a/src/catch2/internal/catch_tag_alias_registry.cpp +++ b/src/catch2/internal/catch_tag_alias_registry.cpp @@ -13,7 +13,7 @@ namespace Catch { - TagAliasRegistry::~TagAliasRegistry() {} + TagAliasRegistry::~TagAliasRegistry() = default; TagAlias const* TagAliasRegistry::find( std::string const& alias ) const { auto it = m_registry.find( alias ); diff --git a/src/catch2/internal/catch_template_test_registry.hpp b/src/catch2/internal/catch_template_test_registry.hpp index 88599f32..0ea354bc 100644 --- a/src/catch2/internal/catch_template_test_registry.hpp +++ b/src/catch2/internal/catch_template_test_registry.hpp @@ -181,7 +181,7 @@ void reg_tests() { \ size_t index = 0; \ using expander = size_t[]; \ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\ } \ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ @@ -316,7 +316,7 @@ void reg_tests(){\ size_t index = 0;\ using expander = size_t[];\ - (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName##_catch_sr, Catch::NameAndTags{ Name " - " INTERNAL_CATCH_STRINGIZE(TmplList) " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \ }\ };\ static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ diff --git a/src/catch2/internal/catch_test_case_registry_impl.cpp b/src/catch2/internal/catch_test_case_registry_impl.cpp index 4b3d2e47..f1702979 100644 --- a/src/catch2/internal/catch_test_case_registry_impl.cpp +++ b/src/catch2/internal/catch_test_case_registry_impl.cpp @@ -9,6 +9,7 @@ #include <catch2/internal/catch_context.hpp> #include <catch2/internal/catch_enforce.hpp> +#include <catch2/interfaces/catch_interfaces_config.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_random_number_generator.hpp> #include <catch2/internal/catch_run_context.hpp> @@ -23,6 +24,38 @@ namespace Catch { + namespace { + static void enforceNoDuplicateTestCases( + std::vector<TestCaseHandle> const& tests ) { + auto testInfoCmp = []( TestCaseInfo const* lhs, + TestCaseInfo const* rhs ) { + return *lhs < *rhs; + }; + std::set<TestCaseInfo const*, decltype( testInfoCmp )&> seenTests( + testInfoCmp ); + for ( auto const& test : tests ) { + const auto infoPtr = &test.getTestCaseInfo(); + const auto prev = seenTests.insert( infoPtr ); + CATCH_ENFORCE( prev.second, + "error: test case \"" + << infoPtr->name << "\", with tags \"" + << infoPtr->tagsAsString() + << "\" already defined.\n" + << "\tFirst seen at " + << ( *prev.first )->lineInfo << "\n" + << "\tRedefined at " << infoPtr->lineInfo ); + } + } + + static bool matchTest( TestCaseHandle const& testCase, + TestSpec const& testSpec, + IConfig const& config ) { + return testSpec.matches( testCase.getTestCaseInfo() ) && + isThrowSafe( testCase, config ); + } + + } // end unnamed namespace + std::vector<TestCaseHandle> sortTests( IConfig const& config, std::vector<TestCaseHandle> const& unsortedTestCases ) { switch (config.runOrder()) { case TestRunOrder::Declared: @@ -79,29 +112,6 @@ namespace Catch { return !testCase.getTestCaseInfo().throws() || config.allowThrows(); } - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ) { - return testSpec.matches( testCase.getTestCaseInfo() ) && isThrowSafe( testCase, config ); - } - - void - enforceNoDuplicateTestCases( std::vector<TestCaseHandle> const& tests ) { - auto testInfoCmp = []( TestCaseInfo const* lhs, - TestCaseInfo const* rhs ) { - return *lhs < *rhs; - }; - std::set<TestCaseInfo const*, decltype(testInfoCmp) &> seenTests(testInfoCmp); - for ( auto const& test : tests ) { - const auto infoPtr = &test.getTestCaseInfo(); - const auto prev = seenTests.insert( infoPtr ); - CATCH_ENFORCE( - prev.second, - "error: test case \"" << infoPtr->name << "\", with tags \"" - << infoPtr->tagsAsString() << "\" already defined.\n" - << "\tFirst seen at " << ( *prev.first )->lineInfo << "\n" - << "\tRedefined at " << infoPtr->lineInfo ); - } - } - std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ) { std::vector<TestCaseHandle> filtered; filtered.reserve( testCases.size() ); @@ -142,11 +152,4 @@ namespace Catch { return m_sortedFunctions; } - - - /////////////////////////////////////////////////////////////////////////// - void TestInvokerAsFunction::invoke() const { - m_testAsFunction(); - } - } // end namespace Catch diff --git a/src/catch2/internal/catch_test_case_registry_impl.hpp b/src/catch2/internal/catch_test_case_registry_impl.hpp index 228dbb79..a4a27ed1 100644 --- a/src/catch2/internal/catch_test_case_registry_impl.hpp +++ b/src/catch2/internal/catch_test_case_registry_impl.hpp @@ -8,23 +8,22 @@ #ifndef CATCH_TEST_CASE_REGISTRY_IMPL_HPP_INCLUDED #define CATCH_TEST_CASE_REGISTRY_IMPL_HPP_INCLUDED -#include <catch2/internal/catch_test_registry.hpp> +#include <catch2/interfaces/catch_interfaces_testcase.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/internal/catch_unique_ptr.hpp> #include <vector> namespace Catch { - class TestCaseHandle; class IConfig; + class ITestInvoker; + class TestCaseHandle; class TestSpec; std::vector<TestCaseHandle> sortTests( IConfig const& config, std::vector<TestCaseHandle> const& unsortedTestCases ); bool isThrowSafe( TestCaseHandle const& testCase, IConfig const& config ); - bool matchTest( TestCaseHandle const& testCase, TestSpec const& testSpec, IConfig const& config ); - - void enforceNoDuplicateTestCases( std::vector<TestCaseHandle> const& functions ); std::vector<TestCaseHandle> filterTests( std::vector<TestCaseHandle> const& testCases, TestSpec const& testSpec, IConfig const& config ); std::vector<TestCaseHandle> const& getAllTestCasesSorted( IConfig const& config ); @@ -53,18 +52,6 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////// - class TestInvokerAsFunction final : public ITestInvoker { - using TestType = void(*)(); - TestType m_testAsFunction; - public: - TestInvokerAsFunction(TestType testAsFunction) noexcept: - m_testAsFunction(testAsFunction) {} - - void invoke() const override; - }; - - /////////////////////////////////////////////////////////////////////////// - } // end namespace Catch diff --git a/src/catch2/internal/catch_test_case_tracker.cpp b/src/catch2/internal/catch_test_case_tracker.cpp index e230fac1..1470b91c 100644 --- a/src/catch2/internal/catch_test_case_tracker.cpp +++ b/src/catch2/internal/catch_test_case_tracker.cpp @@ -22,8 +22,8 @@ namespace Catch { namespace TestCaseTracking { - NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) - : name( _name ), + NameAndLocation::NameAndLocation( std::string&& _name, SourceLineInfo const& _location ) + : name( CATCH_MOVE(_name) ), location( _location ) {} @@ -38,14 +38,17 @@ namespace TestCaseTracking { m_children.push_back( CATCH_MOVE(child) ); } - ITracker* ITracker::findChild( NameAndLocation const& nameAndLocation ) { + ITracker* ITracker::findChild( NameAndLocationRef const& nameAndLocation ) { auto it = std::find_if( m_children.begin(), m_children.end(), [&nameAndLocation]( ITrackerPtr const& tracker ) { - return tracker->nameAndLocation().location == - nameAndLocation.location && - tracker->nameAndLocation().name == nameAndLocation.name; + auto const& tnameAndLoc = tracker->nameAndLocation(); + if ( tnameAndLoc.location.line != + nameAndLocation.location.line ) { + return false; + } + return tnameAndLoc == nameAndLocation; } ); return ( it != m_children.end() ) ? it->get() : nullptr; } @@ -53,10 +56,6 @@ namespace TestCaseTracking { bool ITracker::isSectionTracker() const { return false; } bool ITracker::isGeneratorTracker() const { return false; } - bool ITracker::isSuccessfullyCompleted() const { - return m_runState == CompletedSuccessfully; - } - bool ITracker::isOpen() const { return m_runState != NotStarted && !isComplete(); } @@ -83,16 +82,6 @@ namespace TestCaseTracking { return *m_rootTracker; } - void TrackerContext::endRun() { - m_rootTracker.reset(); - m_currentTracker = nullptr; - m_runState = NotStarted; - } - - void TrackerContext::startCycle() { - m_currentTracker = m_rootTracker.get(); - m_runState = Executing; - } void TrackerContext::completeCycle() { m_runState = CompletedCycle; } @@ -100,16 +89,13 @@ namespace TestCaseTracking { bool TrackerContext::completedCycle() const { return m_runState == CompletedCycle; } - ITracker& TrackerContext::currentTracker() { - return *m_currentTracker; - } void TrackerContext::setCurrentTracker( ITracker* tracker ) { m_currentTracker = tracker; } - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ): - ITracker(nameAndLocation, parent), + TrackerBase::TrackerBase( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ): + ITracker(CATCH_MOVE(nameAndLocation), parent), m_ctx( ctx ) {} @@ -169,13 +155,14 @@ namespace TestCaseTracking { m_ctx.setCurrentTracker( this ); } - SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( nameAndLocation, ctx, parent ), - m_trimmed_name(trim(nameAndLocation.name)) + SectionTracker::SectionTracker( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : TrackerBase( CATCH_MOVE(nameAndLocation), ctx, parent ), + m_trimmed_name(trim(StringRef(ITracker::nameAndLocation().name))) { if( parent ) { - while( !parent->isSectionTracker() ) + while ( !parent->isSectionTracker() ) { parent = parent->parent(); + } SectionTracker& parentSection = static_cast<SectionTracker&>( *parent ); addNextFilters( parentSection.m_filters ); @@ -195,24 +182,30 @@ namespace TestCaseTracking { bool SectionTracker::isSectionTracker() const { return true; } - SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { - SectionTracker* section; + SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocationRef const& nameAndLocation ) { + SectionTracker* tracker; ITracker& currentTracker = ctx.currentTracker(); if ( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isSectionTracker() ); - section = static_cast<SectionTracker*>( childTracker ); + tracker = static_cast<SectionTracker*>( childTracker ); } else { - auto newSection = Catch::Detail::make_unique<SectionTracker>( - nameAndLocation, ctx, ¤tTracker ); - section = newSection.get(); - currentTracker.addChild( CATCH_MOVE( newSection ) ); + auto newTracker = Catch::Detail::make_unique<SectionTracker>( + NameAndLocation{ static_cast<std::string>(nameAndLocation.name), + nameAndLocation.location }, + ctx, + ¤tTracker ); + tracker = newTracker.get(); + currentTracker.addChild( CATCH_MOVE( newTracker ) ); + } + + if ( !ctx.completedCycle() ) { + tracker->tryOpen(); } - if( !ctx.completedCycle() ) - section->tryOpen(); - return *section; + + return *tracker; } void SectionTracker::tryOpen() { @@ -233,10 +226,6 @@ namespace TestCaseTracking { m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() ); } - std::vector<StringRef> const& SectionTracker::getFilters() const { - return m_filters; - } - StringRef SectionTracker::trimmedName() const { return m_trimmed_name; } diff --git a/src/catch2/internal/catch_test_case_tracker.hpp b/src/catch2/internal/catch_test_case_tracker.hpp index 005b1d8e..50278c91 100644 --- a/src/catch2/internal/catch_test_case_tracker.hpp +++ b/src/catch2/internal/catch_test_case_tracker.hpp @@ -22,10 +22,49 @@ namespace TestCaseTracking { std::string name; SourceLineInfo location; - NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); + NameAndLocation( std::string&& _name, SourceLineInfo const& _location ); friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) { - return lhs.name == rhs.name - && lhs.location == rhs.location; + // This is a very cheap check that should have a very high hit rate. + // If we get to SourceLineInfo::operator==, we will redo it, but the + // cost of repeating is trivial at that point (we will be paying + // multiple strcmp/memcmps at that point). + if ( lhs.location.line != rhs.location.line ) { return false; } + return lhs.name == rhs.name && lhs.location == rhs.location; + } + friend bool operator!=(NameAndLocation const& lhs, + NameAndLocation const& rhs) { + return !( lhs == rhs ); + } + }; + + /** + * This is a variant of `NameAndLocation` that does not own the name string + * + * This avoids extra allocations when trying to locate a tracker by its + * name and location, as long as we make sure that trackers only keep + * around the owning variant. + */ + struct NameAndLocationRef { + StringRef name; + SourceLineInfo location; + + constexpr NameAndLocationRef( StringRef name_, + SourceLineInfo location_ ): + name( name_ ), location( location_ ) {} + + friend bool operator==( NameAndLocation const& lhs, + NameAndLocationRef const& rhs ) { + // This is a very cheap check that should have a very high hit rate. + // If we get to SourceLineInfo::operator==, we will redo it, but the + // cost of repeating is trivial at that point (we will be paying + // multiple strcmp/memcmps at that point). + if ( lhs.location.line != rhs.location.line ) { return false; } + return StringRef( lhs.name ) == rhs.name && + lhs.location == rhs.location; + } + friend bool operator==( NameAndLocationRef const& lhs, + NameAndLocation const& rhs ) { + return rhs == lhs; } }; @@ -53,8 +92,8 @@ namespace TestCaseTracking { CycleState m_runState = NotStarted; public: - ITracker( NameAndLocation const& nameAndLoc, ITracker* parent ): - m_nameAndLocation( nameAndLoc ), + ITracker( NameAndLocation&& nameAndLoc, ITracker* parent ): + m_nameAndLocation( CATCH_MOVE(nameAndLoc) ), m_parent( parent ) {} @@ -74,8 +113,10 @@ namespace TestCaseTracking { //! Returns true if tracker run to completion (successfully or not) virtual bool isComplete() const = 0; - //! Returns true if tracker run to completion succesfully - bool isSuccessfullyCompleted() const; + //! Returns true if tracker run to completion successfully + bool isSuccessfullyCompleted() const { + return m_runState == CompletedSuccessfully; + } //! Returns true if tracker has started but hasn't been completed bool isOpen() const; //! Returns true iff tracker has started @@ -93,7 +134,7 @@ namespace TestCaseTracking { * * Returns nullptr if not found. */ - ITracker* findChild( NameAndLocation const& nameAndLocation ); + ITracker* findChild( NameAndLocationRef const& nameAndLocation ); //! Have any children been added? bool hasChildren() const { return !m_children.empty(); @@ -134,13 +175,15 @@ namespace TestCaseTracking { public: ITracker& startRun(); - void endRun(); - void startCycle(); + void startCycle() { + m_currentTracker = m_rootTracker.get(); + m_runState = Executing; + } void completeCycle(); bool completedCycle() const; - ITracker& currentTracker(); + ITracker& currentTracker() { return *m_currentTracker; } void setCurrentTracker( ITracker* tracker ); }; @@ -150,7 +193,7 @@ namespace TestCaseTracking { TrackerContext& m_ctx; public: - TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + TrackerBase( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ); bool isComplete() const override; @@ -166,22 +209,26 @@ namespace TestCaseTracking { class SectionTracker : public TrackerBase { std::vector<StringRef> m_filters; - std::string m_trimmed_name; + // Note that lifetime-wise we piggy back off the name stored in the `ITracker` parent`. + // Currently it allocates owns the name, so this is safe. If it is later refactored + // to not own the name, the name still has to outlive the `ITracker` parent, so + // this should still be safe. + StringRef m_trimmed_name; public: - SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + SectionTracker( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent ); bool isSectionTracker() const override; bool isComplete() const override; - static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ); + static SectionTracker& acquire( TrackerContext& ctx, NameAndLocationRef const& nameAndLocation ); void tryOpen(); void addInitialFilters( std::vector<std::string> const& filters ); void addNextFilters( std::vector<StringRef> const& filters ); //! Returns filters active in this tracker - std::vector<StringRef> const& getFilters() const; + std::vector<StringRef> const& getFilters() const { return m_filters; } //! Returns whitespace-trimmed name of the tracked section StringRef trimmedName() const; }; diff --git a/src/catch2/internal/catch_test_failure_exception.cpp b/src/catch2/internal/catch_test_failure_exception.cpp index c1edff3c..8ea31313 100644 --- a/src/catch2/internal/catch_test_failure_exception.cpp +++ b/src/catch2/internal/catch_test_failure_exception.cpp @@ -20,4 +20,12 @@ namespace Catch { #endif } + void throw_test_skip_exception() { +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + throw Catch::TestSkipException(); +#else + CATCH_ERROR( "Explicitly skipping tests during runtime requires exceptions" ); +#endif + } + } // namespace Catch diff --git a/src/catch2/internal/catch_test_failure_exception.hpp b/src/catch2/internal/catch_test_failure_exception.hpp index 810a81c9..1ef88364 100644 --- a/src/catch2/internal/catch_test_failure_exception.hpp +++ b/src/catch2/internal/catch_test_failure_exception.hpp @@ -12,6 +12,8 @@ namespace Catch { //! Used to signal that an assertion macro failed struct TestFailureException{}; + //! Used to signal that the remainder of a test should be skipped + struct TestSkipException {}; /** * Outlines throwing of `TestFailureException` into a single TU @@ -20,6 +22,13 @@ namespace Catch { */ [[noreturn]] void throw_test_failure_exception(); + /** + * Outlines throwing of `TestSkipException` into a single TU + * + * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. + */ + [[noreturn]] void throw_test_skip_exception(); + } // namespace Catch #endif // CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED diff --git a/src/catch2/internal/catch_test_macro_impl.hpp b/src/catch2/internal/catch_test_macro_impl.hpp index 1b4ea8e7..59c851e8 100644 --- a/src/catch2/internal/catch_test_macro_impl.hpp +++ b/src/catch2/internal/catch_test_macro_impl.hpp @@ -10,6 +10,7 @@ #include <catch2/catch_user_config.hpp> #include <catch2/internal/catch_assertion_handler.hpp> +#include <catch2/internal/catch_preprocessor_internal_stringify.hpp> #include <catch2/interfaces/catch_interfaces_capture.hpp> #include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_source_line_info.hpp> @@ -22,12 +23,6 @@ #if !defined(CATCH_CONFIG_DISABLE) -#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) - #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__ -#else - #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION" -#endif - #if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) /////////////////////////////////////////////////////////////////////////////// @@ -39,7 +34,7 @@ #else // CATCH_CONFIG_FAST_COMPILE #define INTERNAL_CATCH_TRY try -#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); } +#define INTERNAL_CATCH_CATCH( handler ) catch(...) { (handler).handleUnexpectedInflightException(); } #endif @@ -95,6 +90,7 @@ if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(__VA_ARGS__); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ @@ -115,6 +111,7 @@ if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(expr); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ @@ -141,6 +138,7 @@ if( catchAssertionHandler.allowThrows() ) \ try { \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ static_cast<void>(__VA_ARGS__); \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ diff --git a/src/catch2/internal/catch_test_registry.cpp b/src/catch2/internal/catch_test_registry.cpp index 9769ed03..e9c999fe 100644 --- a/src/catch2/internal/catch_test_registry.cpp +++ b/src/catch2/internal/catch_test_registry.cpp @@ -8,7 +8,6 @@ #include <catch2/internal/catch_test_registry.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/catch_test_case_info.hpp> -#include <catch2/internal/catch_test_case_registry_impl.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_string_manip.hpp> #include <catch2/internal/catch_move_and_forward.hpp> @@ -17,9 +16,10 @@ #include <iterator> namespace Catch { + ITestInvoker::~ITestInvoker() = default; namespace { - StringRef extractClassName( StringRef classOrMethodName ) { + static StringRef extractClassName( StringRef classOrMethodName ) { if ( !startsWith( classOrMethodName, '&' ) ) { return classOrMethodName; } @@ -46,6 +46,18 @@ namespace Catch { static_cast<std::size_t>( startIdx ), static_cast<std::size_t>( classNameSize ) ); } + + class TestInvokerAsFunction final : public ITestInvoker { + using TestType = void ( * )(); + TestType m_testAsFunction; + + public: + TestInvokerAsFunction( TestType testAsFunction ) noexcept: + m_testAsFunction( testAsFunction ) {} + + void invoke() const override { m_testAsFunction(); } + }; + } // namespace Detail::unique_ptr<ITestInvoker> makeTestInvoker( void(*testAsFunction)() ) { diff --git a/src/catch2/internal/catch_test_registry.hpp b/src/catch2/internal/catch_test_registry.hpp index 5329a1e9..7766fe11 100644 --- a/src/catch2/internal/catch_test_registry.hpp +++ b/src/catch2/internal/catch_test_registry.hpp @@ -8,9 +8,10 @@ #ifndef CATCH_TEST_REGISTRY_HPP_INCLUDED #define CATCH_TEST_REGISTRY_HPP_INCLUDED +#include <catch2/internal/catch_config_static_analysis_support.hpp> #include <catch2/internal/catch_source_line_info.hpp> #include <catch2/internal/catch_noncopyable.hpp> -#include <catch2/interfaces/catch_interfaces_testcase.hpp> +#include <catch2/interfaces/catch_interfaces_test_invoker.hpp> #include <catch2/internal/catch_stringref.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_unique_name.hpp> @@ -72,25 +73,55 @@ struct AutoReg : Detail::NonCopyable { void TestName::test() #endif + +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) + /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ static void TestName(); \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ + namespace{ const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ static void TestName() #define INTERNAL_CATCH_TESTCASE( ... ) \ INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), __VA_ARGS__ ) - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#else // ^^ !CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT | vv CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT + + +// Dummy registrator for the dumy test case macros +namespace Catch { + namespace Detail { + struct DummyUse { + DummyUse( void ( * )( int ) ); + }; + } // namespace Detail +} // namespace Catch + +// Note that both the presence of the argument and its exact name are +// necessary for the section support. + +// We provide a shadowed variable so that a `SECTION` inside non-`TEST_CASE` +// tests can compile. The redefined `TEST_CASE` shadows this with param. +static int catchInternalSectionHint = 0; + +# define INTERNAL_CATCH_TESTCASE2( fname ) \ + static void fname( int ); \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + static const Catch::Detail::DummyUse INTERNAL_CATCH_UNIQUE_NAME( \ + dummyUser )( &(fname) ); \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + static void fname( [[maybe_unused]] int catchInternalSectionHint ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +# define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( dummyFunction ) ) + + +#endif // CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ @@ -101,13 +132,33 @@ struct AutoReg : Detail::NonCopyable { struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ void test(); \ }; \ - Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &TestName::test ), \ + CATCH_INTERNAL_LINEINFO, \ + #ClassName##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ } \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ void TestName::test() #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), ClassName, __VA_ARGS__ ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + namespace { \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &QualifiedMethod ), \ + CATCH_INTERNAL_LINEINFO, \ + "&" #QualifiedMethod##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); \ + } /* NOLINT */ \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + + /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ do { \ diff --git a/src/catch2/internal/catch_test_run_info.hpp b/src/catch2/internal/catch_test_run_info.hpp new file mode 100644 index 00000000..90357b0a --- /dev/null +++ b/src/catch2/internal/catch_test_run_info.hpp @@ -0,0 +1,22 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_TEST_RUN_INFO_HPP_INCLUDED +#define CATCH_TEST_RUN_INFO_HPP_INCLUDED + +#include <catch2/internal/catch_stringref.hpp> + +namespace Catch { + + struct TestRunInfo { + constexpr TestRunInfo(StringRef _name) : name(_name) {} + StringRef name; + }; + +} // end namespace Catch + +#endif // CATCH_TEST_RUN_INFO_HPP_INCLUDED diff --git a/src/catch2/internal/catch_test_spec_parser.cpp b/src/catch2/internal/catch_test_spec_parser.cpp index bae25475..d6e4cb58 100644 --- a/src/catch2/internal/catch_test_spec_parser.cpp +++ b/src/catch2/internal/catch_test_spec_parser.cpp @@ -221,10 +221,8 @@ namespace Catch { token.erase(token.begin()); if (m_exclusion) { m_currentFilter.m_forbidden.emplace_back(Detail::make_unique<TestSpec::TagPattern>(".", m_substring)); - m_currentFilter.m_forbidden.emplace_back(Detail::make_unique<TestSpec::TagPattern>(token, m_substring)); } else { m_currentFilter.m_required.emplace_back(Detail::make_unique<TestSpec::TagPattern>(".", m_substring)); - m_currentFilter.m_required.emplace_back(Detail::make_unique<TestSpec::TagPattern>(token, m_substring)); } } if (m_exclusion) { diff --git a/src/catch2/internal/catch_textflow.hpp b/src/catch2/internal/catch_textflow.hpp index ceac675d..0776ab92 100644 --- a/src/catch2/internal/catch_textflow.hpp +++ b/src/catch2/internal/catch_textflow.hpp @@ -59,7 +59,7 @@ namespace Catch { // Calculates the length of the current line void calcLength(); - // Returns current indention width + // Returns current indentation width size_t indentSize() const; // Creates an indented and (optionally) suffixed string from diff --git a/src/catch2/internal/catch_uniform_floating_point_distribution.hpp b/src/catch2/internal/catch_uniform_floating_point_distribution.hpp new file mode 100644 index 00000000..23d03b43 --- /dev/null +++ b/src/catch2/internal/catch_uniform_floating_point_distribution.hpp @@ -0,0 +1,131 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED +#define CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED + +#include <catch2/internal/catch_random_floating_point_helpers.hpp> +#include <catch2/internal/catch_uniform_integer_distribution.hpp> + +#include <cmath> +#include <type_traits> + +namespace Catch { + + namespace Detail { +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + // The issue with overflow only happens with maximal ULP and HUGE + // distance, e.g. when generating numbers in [-inf, inf] for given + // type. So we only check for the largest possible ULP in the + // type, and return something that does not overflow to inf in 1 mult. + constexpr std::uint64_t calculate_max_steps_in_one_go(double gamma) { + if ( gamma == 1.99584030953472e+292 ) { return 9007199254740991; } + return static_cast<std::uint64_t>( -1 ); + } + constexpr std::uint32_t calculate_max_steps_in_one_go(float gamma) { + if ( gamma == 2.028241e+31f ) { return 16777215; } + return static_cast<std::uint32_t>( -1 ); + } +#if defined( __GNUC__ ) || defined( __clang__ ) +# pragma GCC diagnostic pop +#endif + } + +/** + * Implementation of uniform distribution on floating point numbers. + * + * Note that we support only `float` and `double` types, because these + * usually mean the same thing across different platform. `long double` + * varies wildly by platform and thus we cannot provide reproducible + * implementation. Also note that we don't implement all parts of + * distribution per standard: this distribution is not serializable, nor + * can the range be arbitrarily reset. + * + * The implementation also uses different approach than the one taken by + * `std::uniform_real_distribution`, where instead of generating a number + * between [0, 1) and then multiplying the range bounds with it, we first + * split the [a, b] range into a set of equidistributed floating point + * numbers, and then use uniform int distribution to pick which one to + * return. + * + * This has the advantage of guaranteeing uniformity (the multiplication + * method loses uniformity due to rounding when multiplying floats), except + * for small non-uniformity at one side of the interval, where we have + * to deal with the fact that not every interval is splittable into + * equidistributed floats. + * + * Based on "Drawing random floating-point numbers from an interval" by + * Frederic Goualard. + */ +template <typename FloatType> +class uniform_floating_point_distribution { + static_assert(std::is_floating_point<FloatType>::value, "..."); + static_assert(!std::is_same<FloatType, long double>::value, + "We do not support long double due to inconsistent behaviour between platforms"); + + using WidthType = Detail::DistanceType<FloatType>; + + FloatType m_a, m_b; + FloatType m_ulp_magnitude; + WidthType m_floats_in_range; + uniform_integer_distribution<WidthType> m_int_dist; + + // In specific cases, we can overflow into `inf` when computing the + // `steps * g` offset. To avoid this, we don't offset by more than this + // in one multiply + addition. + WidthType m_max_steps_in_one_go; + // We don't want to do the magnitude check every call to `operator()` + bool m_a_has_leq_magnitude; + +public: + using result_type = FloatType; + + uniform_floating_point_distribution( FloatType a, FloatType b ): + m_a( a ), + m_b( b ), + m_ulp_magnitude( Detail::gamma( m_a, m_b ) ), + m_floats_in_range( Detail::count_equidistant_floats( m_a, m_b, m_ulp_magnitude ) ), + m_int_dist(0, m_floats_in_range), + m_max_steps_in_one_go( Detail::calculate_max_steps_in_one_go(m_ulp_magnitude)), + m_a_has_leq_magnitude(std::fabs(m_a) <= std::fabs(m_b)) + { + assert( a <= b ); + } + + template <typename Generator> + result_type operator()( Generator& g ) { + WidthType steps = m_int_dist( g ); + if ( m_a_has_leq_magnitude ) { + if ( steps == m_floats_in_range ) { return m_a; } + auto b = m_b; + while (steps > m_max_steps_in_one_go) { + b -= m_max_steps_in_one_go * m_ulp_magnitude; + steps -= m_max_steps_in_one_go; + } + return b - steps * m_ulp_magnitude; + } else { + if ( steps == m_floats_in_range ) { return m_b; } + auto a = m_a; + while (steps > m_max_steps_in_one_go) { + a += m_max_steps_in_one_go * m_ulp_magnitude; + steps -= m_max_steps_in_one_go; + } + return a + steps * m_ulp_magnitude; + } + } + + result_type a() const { return m_a; } + result_type b() const { return m_b; } +}; + +} // end namespace Catch + +#endif // CATCH_UNIFORM_FLOATING_POINT_DISTRIBUTION_HPP_INCLUDED diff --git a/src/catch2/internal/catch_uniform_integer_distribution.hpp b/src/catch2/internal/catch_uniform_integer_distribution.hpp new file mode 100644 index 00000000..3b623579 --- /dev/null +++ b/src/catch2/internal/catch_uniform_integer_distribution.hpp @@ -0,0 +1,126 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED +#define CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED + +#include <catch2/internal/catch_random_integer_helpers.hpp> + +namespace Catch { + + namespace Detail { + // Indirection to enable make_unsigned<bool> behaviour. + template <typename T> + struct make_unsigned { + using type = std::make_unsigned_t<T>; + }; + + template <> + struct make_unsigned<bool> { + using type = uint8_t; + }; + + template <typename T> + using make_unsigned_t = typename make_unsigned<T>::type; + } + +/** + * Implementation of uniform distribution on integers. + * + * Unlike `std::uniform_int_distribution`, this implementation supports + * various 1 byte integral types, including bool (but you should not + * actually use it for bools). + * + * The underlying algorithm is based on the one described in "Fast Random + * Integer Generation in an Interval" by Daniel Lemire, but has been + * optimized under the assumption of reuse of the same distribution object. + */ +template <typename IntegerType> +class uniform_integer_distribution { + static_assert(std::is_integral<IntegerType>::value, "..."); + + using UnsignedIntegerType = Detail::make_unsigned_t<IntegerType>; + + // We store the left range bound converted to internal representation, + // because it will be used in computation in the () operator. + UnsignedIntegerType m_a; + // After initialization, right bound is only used for the b() getter, + // so we keep it in the original type. + IntegerType m_b; + + // How many different values are there in [a, b]. a == b => 1, can be 0 for distribution over all values in the type. + UnsignedIntegerType m_ab_distance; + + // We hoisted this out of the main generation function. Technically, + // this means that using this distribution will be slower than Lemire's + // algorithm if this distribution instance will be used only few times, + // but it will be faster if it is used many times. Since Catch2 uses + // distributions only to implement random generators, we assume that each + // distribution will be reused many times and this is an optimization. + UnsignedIntegerType m_rejection_threshold = 0; + + // Assumes m_b and m_a are already filled + UnsignedIntegerType computeDistance() const { + // This overflows and returns 0 if ua == 0 and ub == TYPE_MAX. + // We handle that later when generating the number. + return transposeTo(m_b) - m_a + 1; + } + + static UnsignedIntegerType computeRejectionThreshold(UnsignedIntegerType ab_distance) { + // distance == 0 means that we will return all possible values from + // the type's range, and that we shouldn't reject anything. + if ( ab_distance == 0 ) { return 0; } + return ( ~ab_distance + 1 ) % ab_distance; + } + + static UnsignedIntegerType transposeTo(IntegerType in) { + return Detail::transposeToNaturalOrder<IntegerType>( + static_cast<UnsignedIntegerType>( in ) ); + } + static IntegerType transposeBack(UnsignedIntegerType in) { + return static_cast<IntegerType>( + Detail::transposeToNaturalOrder<IntegerType>(in) ); + } + +public: + using result_type = IntegerType; + + uniform_integer_distribution( IntegerType a, IntegerType b ): + m_a( transposeTo(a) ), + m_b( b ), + m_ab_distance( computeDistance() ), + m_rejection_threshold( computeRejectionThreshold(m_ab_distance) ) { + assert( a <= b ); + } + + template <typename Generator> + result_type operator()( Generator& g ) { + // All possible values of result_type are valid. + if ( m_ab_distance == 0 ) { + return transposeBack( Detail::fillBitsFrom<UnsignedIntegerType>( g ) ); + } + + auto random_number = Detail::fillBitsFrom<UnsignedIntegerType>( g ); + auto emul = Detail::extendedMult( random_number, m_ab_distance ); + // Unlike Lemire's algorithm we skip the ab_distance check, since + // we precomputed the rejection threshold, which is always tighter. + while (emul.lower < m_rejection_threshold) { + random_number = Detail::fillBitsFrom<UnsignedIntegerType>( g ); + emul = Detail::extendedMult( random_number, m_ab_distance ); + } + + return transposeBack(m_a + emul.upper); + } + + result_type a() const { return transposeBack(m_a); } + result_type b() const { return m_b; } +}; + +} // end namespace Catch + +#endif // CATCH_UNIFORM_INTEGER_DISTRIBUTION_HPP_INCLUDED diff --git a/src/catch2/internal/catch_xmlwriter.cpp b/src/catch2/internal/catch_xmlwriter.cpp index d3bc6303..6c1d45df 100644 --- a/src/catch2/internal/catch_xmlwriter.cpp +++ b/src/catch2/internal/catch_xmlwriter.cpp @@ -11,6 +11,7 @@ #include <catch2/internal/catch_enforce.hpp> #include <catch2/internal/catch_xmlwriter.hpp> +#include <cstdint> #include <iomanip> #include <type_traits> diff --git a/src/catch2/matchers/catch_matchers_all.hpp b/src/catch2/matchers/catch_matchers_all.hpp index eadf7082..83fe5386 100644 --- a/src/catch2/matchers/catch_matchers_all.hpp +++ b/src/catch2/matchers/catch_matchers_all.hpp @@ -27,6 +27,7 @@ #include <catch2/matchers/catch_matchers_floating_point.hpp> #include <catch2/matchers/catch_matchers_predicate.hpp> #include <catch2/matchers/catch_matchers_quantifiers.hpp> +#include <catch2/matchers/catch_matchers_range_equals.hpp> #include <catch2/matchers/catch_matchers_string.hpp> #include <catch2/matchers/catch_matchers_templated.hpp> #include <catch2/matchers/catch_matchers_vector.hpp> diff --git a/src/catch2/matchers/catch_matchers_contains.hpp b/src/catch2/matchers/catch_matchers_contains.hpp index e298cab7..877d6924 100644 --- a/src/catch2/matchers/catch_matchers_contains.hpp +++ b/src/catch2/matchers/catch_matchers_contains.hpp @@ -33,13 +33,11 @@ namespace Catch { } template <typename RangeLike> - bool match(RangeLike&& rng) const { - using std::begin; using std::end; - - return end(rng) != std::find_if(begin(rng), end(rng), - [&](auto const& elem) { - return m_eq(elem, m_desired); - }); + bool match( RangeLike&& rng ) const { + for ( auto&& elem : rng ) { + if ( m_eq( elem, m_desired ) ) { return true; } + } + return false; } }; @@ -91,7 +89,7 @@ namespace Catch { /** * Creates a matcher that checks whether a range contains a specific element. * - * Uses `eq` to do the comparisons + * Uses `eq` to do the comparisons, the element is provided on the rhs */ template <typename T, typename Equality> ContainsElementMatcher<T, Equality> Contains(T&& elem, Equality&& eq) { diff --git a/src/catch2/matchers/catch_matchers_exception.hpp b/src/catch2/matchers/catch_matchers_exception.hpp index 27e1b932..e7c3a636 100644 --- a/src/catch2/matchers/catch_matchers_exception.hpp +++ b/src/catch2/matchers/catch_matchers_exception.hpp @@ -29,6 +29,32 @@ public: //! Creates a matcher that checks whether a std derived exception has the provided message ExceptionMessageMatcher Message(std::string const& message); +template <typename StringMatcherType> +class ExceptionMessageMatchesMatcher final + : public MatcherBase<std::exception> { + StringMatcherType m_matcher; + +public: + ExceptionMessageMatchesMatcher( StringMatcherType matcher ): + m_matcher( CATCH_MOVE( matcher ) ) {} + + bool match( std::exception const& ex ) const override { + return m_matcher.match( ex.what() ); + } + + std::string describe() const override { + return " matches \"" + m_matcher.describe() + '"'; + } +}; + +//! Creates a matcher that checks whether a message from an std derived +//! exception matches a provided matcher +template <typename StringMatcherType> +ExceptionMessageMatchesMatcher<StringMatcherType> +MessageMatches( StringMatcherType&& matcher ) { + return { CATCH_FORWARD( matcher ) }; +} + } // namespace Matchers } // namespace Catch diff --git a/src/catch2/matchers/catch_matchers_floating_point.cpp b/src/catch2/matchers/catch_matchers_floating_point.cpp index 719fb51f..206332ef 100644 --- a/src/catch2/matchers/catch_matchers_floating_point.cpp +++ b/src/catch2/matchers/catch_matchers_floating_point.cpp @@ -38,26 +38,11 @@ namespace { return ulpDist <= maxUlpDiff; } -#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) - - float nextafter(float x, float y) { - return ::nextafterf(x, y); - } - - double nextafter(double x, double y) { - return ::nextafter(x, y); - } - -#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^ template <typename FP> FP step(FP start, FP direction, uint64_t steps) { for (uint64_t i = 0; i < steps; ++i) { -#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) start = Catch::nextafter(start, direction); -#else - start = std::nextafter(start, direction); -#endif } return start; } @@ -225,5 +210,17 @@ WithinRelMatcher WithinRel(float target) { } -} // namespace Matchers + +bool IsNaNMatcher::match( double const& matchee ) const { + return std::isnan( matchee ); +} + +std::string IsNaNMatcher::describe() const { + using namespace std::string_literals; + return "is NaN"s; +} + +IsNaNMatcher IsNaN() { return IsNaNMatcher(); } + + } // namespace Matchers } // namespace Catch diff --git a/src/catch2/matchers/catch_matchers_floating_point.hpp b/src/catch2/matchers/catch_matchers_floating_point.hpp index abdaf159..76816633 100644 --- a/src/catch2/matchers/catch_matchers_floating_point.hpp +++ b/src/catch2/matchers/catch_matchers_floating_point.hpp @@ -27,6 +27,11 @@ namespace Matchers { double m_margin; }; + //! Creates a matcher that accepts numbers within certain range of target + WithinAbsMatcher WithinAbs( double target, double margin ); + + + class WithinUlpsMatcher final : public MatcherBase<double> { public: WithinUlpsMatcher( double target, @@ -40,6 +45,13 @@ namespace Matchers { Detail::FloatingPointKind m_type; }; + //! Creates a matcher that accepts doubles within certain ULP range of target + WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff); + //! Creates a matcher that accepts floats within certain ULP range of target + WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff); + + + // Given IEEE-754 format for floats and doubles, we can assume // that float -> double promotion is lossless. Given this, we can // assume that if we do the standard relative comparison of @@ -56,13 +68,6 @@ namespace Matchers { double m_epsilon; }; - //! Creates a matcher that accepts doubles within certain ULP range of target - WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff); - //! Creates a matcher that accepts floats within certain ULP range of target - WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff); - //! Creates a matcher that accepts numbers within certain range of target - WithinAbsMatcher WithinAbs(double target, double margin); - //! Creates a matcher that accepts doubles within certain relative range of target WithinRelMatcher WithinRel(double target, double eps); //! Creates a matcher that accepts doubles within 100*DBL_EPS relative range of target @@ -72,6 +77,17 @@ namespace Matchers { //! Creates a matcher that accepts floats within 100*FLT_EPS relative range of target WithinRelMatcher WithinRel(float target); + + + class IsNaNMatcher final : public MatcherBase<double> { + public: + IsNaNMatcher() = default; + bool match( double const& matchee ) const override; + std::string describe() const override; + }; + + IsNaNMatcher IsNaN(); + } // namespace Matchers } // namespace Catch diff --git a/src/catch2/matchers/catch_matchers_range_equals.hpp b/src/catch2/matchers/catch_matchers_range_equals.hpp new file mode 100644 index 00000000..95b781a4 --- /dev/null +++ b/src/catch2/matchers/catch_matchers_range_equals.hpp @@ -0,0 +1,144 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED +#define CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED + +#include <catch2/internal/catch_is_permutation.hpp> +#include <catch2/matchers/catch_matchers_templated.hpp> + +#include <algorithm> +#include <utility> + +namespace Catch { + namespace Matchers { + + /** + * Matcher for checking that an element contains the same + * elements in the same order + */ + template <typename TargetRangeLike, typename Equality> + class RangeEqualsMatcher final : public MatcherGenericBase { + TargetRangeLike m_desired; + Equality m_predicate; + + public: + template <typename TargetRangeLike2, typename Equality2> + RangeEqualsMatcher( TargetRangeLike2&& range, + Equality2&& predicate ): + m_desired( CATCH_FORWARD( range ) ), + m_predicate( CATCH_FORWARD( predicate ) ) {} + + template <typename RangeLike> + bool match( RangeLike&& rng ) const { + auto rng_start = begin( rng ); + const auto rng_end = end( rng ); + auto target_start = begin( m_desired ); + const auto target_end = end( m_desired ); + + while (rng_start != rng_end && target_start != target_end) { + if (!m_predicate(*rng_start, *target_start)) { + return false; + } + ++rng_start; + ++target_start; + } + return rng_start == rng_end && target_start == target_end; + } + + std::string describe() const override { + return "elements are " + Catch::Detail::stringify( m_desired ); + } + }; + + /** + * Matcher for checking that an element contains the same + * elements (but not necessarily in the same order) + */ + template <typename TargetRangeLike, typename Equality> + class UnorderedRangeEqualsMatcher final : public MatcherGenericBase { + TargetRangeLike m_desired; + Equality m_predicate; + + public: + template <typename TargetRangeLike2, typename Equality2> + UnorderedRangeEqualsMatcher( TargetRangeLike2&& range, + Equality2&& predicate ): + m_desired( CATCH_FORWARD( range ) ), + m_predicate( CATCH_FORWARD( predicate ) ) {} + + template <typename RangeLike> + bool match( RangeLike&& rng ) const { + using std::begin; + using std::end; + return Catch::Detail::is_permutation( begin( m_desired ), + end( m_desired ), + begin( rng ), + end( rng ), + m_predicate ); + } + + std::string describe() const override { + return "unordered elements are " + + ::Catch::Detail::stringify( m_desired ); + } + }; + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range. + * + * Uses `std::equal_to` to do the comparison + */ + template <typename RangeLike> + std::enable_if_t<!Detail::is_matcher<RangeLike>::value, + RangeEqualsMatcher<RangeLike, std::equal_to<>>> + RangeEquals( RangeLike&& range ) { + return { CATCH_FORWARD( range ), std::equal_to<>{} }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range. + * + * Uses to provided predicate `predicate` to do the comparisons + */ + template <typename RangeLike, typename Equality> + RangeEqualsMatcher<RangeLike, Equality> + RangeEquals( RangeLike&& range, Equality&& predicate ) { + return { CATCH_FORWARD( range ), CATCH_FORWARD( predicate ) }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range, in some permutation + * + * Uses `std::equal_to` to do the comparison + */ + template <typename RangeLike> + std::enable_if_t< + !Detail::is_matcher<RangeLike>::value, + UnorderedRangeEqualsMatcher<RangeLike, std::equal_to<>>> + UnorderedRangeEquals( RangeLike&& range ) { + return { CATCH_FORWARD( range ), std::equal_to<>{} }; + } + + /** + * Creates a matcher that checks if all elements in a range are equal + * to all elements in another range, in some permutation. + * + * Uses to provided predicate `predicate` to do the comparisons + */ + template <typename RangeLike, typename Equality> + UnorderedRangeEqualsMatcher<RangeLike, Equality> + UnorderedRangeEquals( RangeLike&& range, Equality&& predicate ) { + return { CATCH_FORWARD( range ), CATCH_FORWARD( predicate ) }; + } + } // namespace Matchers +} // namespace Catch + +#endif // CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp index 9a4b024f..fffbfdf6 100644 --- a/src/catch2/matchers/catch_matchers_vector.hpp +++ b/src/catch2/matchers/catch_matchers_vector.hpp @@ -85,11 +85,10 @@ namespace Matchers { // - 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 // - then just call that directly - if (m_comparator.size() != v.size()) - return false; - for (std::size_t i = 0; i < v.size(); ++i) - if (m_comparator[i] != v[i]) - return false; + if ( m_comparator.size() != v.size() ) { return false; } + for ( std::size_t i = 0; i < v.size(); ++i ) { + if ( !( m_comparator[i] == v[i] ) ) { return false; } + } return true; } std::string describe() const override { diff --git a/src/catch2/matchers/internal/catch_matchers_impl.hpp b/src/catch2/matchers/internal/catch_matchers_impl.hpp index 12455bfe..2ee9f0c0 100644 --- a/src/catch2/matchers/internal/catch_matchers_impl.hpp +++ b/src/catch2/matchers/internal/catch_matchers_impl.hpp @@ -8,9 +8,14 @@ #ifndef CATCH_MATCHERS_IMPL_HPP_INCLUDED #define CATCH_MATCHERS_IMPL_HPP_INCLUDED -#include <catch2/internal/catch_test_macro_impl.hpp> +#include <catch2/internal/catch_assertion_handler.hpp> +#include <catch2/internal/catch_source_line_info.hpp> +#include <catch2/internal/catch_decomposer.hpp> +#include <catch2/internal/catch_preprocessor_internal_stringify.hpp> #include <catch2/internal/catch_move_and_forward.hpp> +#include <string> + namespace Catch { template<typename ArgT, typename MatcherT> diff --git a/src/catch2/meson.build b/src/catch2/meson.build index b32f72d2..4b9f3e8e 100644 --- a/src/catch2/meson.build +++ b/src/catch2/meson.build @@ -32,6 +32,8 @@ benchmark_headers = [ 'benchmark/catch_sample_analysis.hpp', 'benchmark/detail/catch_analyse.hpp', 'benchmark/detail/catch_benchmark_function.hpp', + 'benchmark/detail/catch_benchmark_stats.hpp', + 'benchmark/detail/catch_benchmark_stats_fwd.hpp', 'benchmark/detail/catch_complete_invoke.hpp', 'benchmark/detail/catch_estimate_clock.hpp', 'benchmark/detail/catch_measure.hpp', @@ -43,6 +45,7 @@ benchmark_headers = [ benchmark_sources = files( 'benchmark/catch_chronometer.cpp', + 'benchmark/detail/catch_analyse.cpp', 'benchmark/detail/catch_benchmark_function.cpp', 'benchmark/detail/catch_run_for_at_least.cpp', 'benchmark/detail/catch_stats.cpp', @@ -64,8 +67,8 @@ internal_headers = [ 'interfaces/catch_interfaces_registry_hub.hpp', 'interfaces/catch_interfaces_reporter.hpp', 'interfaces/catch_interfaces_reporter_factory.hpp', - 'interfaces/catch_interfaces_reporter_registry.hpp', 'interfaces/catch_interfaces_tag_alias_registry.hpp', + 'interfaces/catch_interfaces_test_invoker.hpp', 'interfaces/catch_interfaces_testcase.hpp', 'internal/catch_assertion_handler.hpp', 'internal/catch_case_insensitive_comparisons.hpp', @@ -76,6 +79,7 @@ internal_headers = [ 'internal/catch_compiler_capabilities.hpp', 'internal/catch_config_android_logwrite.hpp', 'internal/catch_config_counter.hpp', + 'internal/catch_config_static_analysis_support.hpp', 'internal/catch_config_uncaught_exceptions.hpp', 'internal/catch_config_wchar.hpp', 'internal/catch_console_colour.hpp', @@ -93,6 +97,8 @@ internal_headers = [ 'internal/catch_floating_point_helpers.hpp', 'internal/catch_getenv.hpp', 'internal/catch_istream.hpp', + 'internal/catch_is_permutation.hpp', + 'internal/catch_jsonwriter.hpp', 'internal/catch_lazy_expr.hpp', 'internal/catch_leak_detector.hpp', 'internal/catch_list.hpp', @@ -107,7 +113,10 @@ internal_headers = [ 'internal/catch_platform.hpp', 'internal/catch_polyfills.hpp', 'internal/catch_preprocessor.hpp', + 'internal/catch_preprocessor_internal_stringify.hpp', 'internal/catch_preprocessor_remove_parens.hpp', + 'internal/catch_random_floating_point_helpers.hpp', + 'internal/catch_random_integer_helpers.hpp', 'internal/catch_random_number_generator.hpp', 'internal/catch_random_seed_generation.hpp', 'internal/catch_reporter_registry.hpp', @@ -132,10 +141,13 @@ internal_headers = [ 'internal/catch_test_failure_exception.hpp', 'internal/catch_test_macro_impl.hpp', 'internal/catch_test_registry.hpp', + 'internal/catch_test_run_info.hpp', 'internal/catch_test_spec_parser.hpp', 'internal/catch_textflow.hpp', 'internal/catch_to_string.hpp', 'internal/catch_uncaught_exceptions.hpp', + 'internal/catch_uniform_floating_point_distribution.hpp', + 'internal/catch_uniform_integer_distribution.hpp', 'internal/catch_unique_name.hpp', 'internal/catch_unique_ptr.hpp', 'internal/catch_void_type.hpp', @@ -150,6 +162,7 @@ internal_headers = [ 'matchers/catch_matchers_floating_point.hpp', 'matchers/catch_matchers_predicate.hpp', 'matchers/catch_matchers_quantifiers.hpp', + 'matchers/catch_matchers_range_equals.hpp', 'matchers/catch_matchers_string.hpp', 'matchers/catch_matchers_templated.hpp', 'matchers/catch_matchers_vector.hpp', @@ -188,7 +201,6 @@ internal_sources = files( 'interfaces/catch_interfaces_registry_hub.cpp', 'interfaces/catch_interfaces_reporter.cpp', 'interfaces/catch_interfaces_reporter_factory.cpp', - 'interfaces/catch_interfaces_reporter_registry.cpp', 'interfaces/catch_interfaces_testcase.cpp', 'internal/catch_assertion_handler.cpp', 'internal/catch_case_insensitive_comparisons.cpp', @@ -207,6 +219,7 @@ internal_sources = files( 'internal/catch_floating_point_helpers.cpp', 'internal/catch_getenv.cpp', 'internal/catch_istream.cpp', + 'internal/catch_jsonwriter.cpp', 'internal/catch_lazy_expr.cpp', 'internal/catch_leak_detector.cpp', 'internal/catch_list.cpp', @@ -261,6 +274,7 @@ internal_sources = files( 'catch_timer.cpp', 'catch_tostring.cpp', 'catch_totals.cpp', + 'catch_translate_exception.cpp', 'catch_version.cpp', ) @@ -272,6 +286,7 @@ reporter_headers = [ 'reporters/catch_reporter_cumulative_base.hpp', 'reporters/catch_reporter_event_listener.hpp', 'reporters/catch_reporter_helpers.hpp', + 'reporters/catch_reporter_json.hpp', 'reporters/catch_reporter_junit.hpp', 'reporters/catch_reporter_multi.hpp', 'reporters/catch_reporter_registrars.hpp', @@ -291,6 +306,7 @@ reporter_sources = files( 'reporters/catch_reporter_cumulative_base.cpp', 'reporters/catch_reporter_event_listener.cpp', 'reporters/catch_reporter_helpers.cpp', + 'reporters/catch_reporter_json.cpp', 'reporters/catch_reporter_junit.cpp', 'reporters/catch_reporter_multi.cpp', 'reporters/catch_reporter_registrars.cpp', diff --git a/src/catch2/reporters/catch_reporter_automake.cpp b/src/catch2/reporters/catch_reporter_automake.cpp index 0660d092..5e506a6b 100644 --- a/src/catch2/reporters/catch_reporter_automake.cpp +++ b/src/catch2/reporters/catch_reporter_automake.cpp @@ -12,12 +12,14 @@ namespace Catch { - AutomakeReporter::~AutomakeReporter() {} + AutomakeReporter::~AutomakeReporter() = default; void AutomakeReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { // Possible values to emit are PASS, XFAIL, SKIP, FAIL, XPASS and ERROR. m_stream << ":test-result: "; - if (_testCaseStats.totals.assertions.allPassed()) { + if ( _testCaseStats.totals.testCases.skipped > 0 ) { + m_stream << "SKIP"; + } else if (_testCaseStats.totals.assertions.allPassed()) { m_stream << "PASS"; } else if (_testCaseStats.totals.assertions.allOk()) { m_stream << "XFAIL"; diff --git a/src/catch2/reporters/catch_reporter_automake.hpp b/src/catch2/reporters/catch_reporter_automake.hpp index 3475a1fd..a639428c 100644 --- a/src/catch2/reporters/catch_reporter_automake.hpp +++ b/src/catch2/reporters/catch_reporter_automake.hpp @@ -8,7 +8,6 @@ #ifndef CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED #define CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/reporters/catch_reporter_streaming_base.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp index d8088457..0f855944 100644 --- a/src/catch2/reporters/catch_reporter_compact.cpp +++ b/src/catch2/reporters/catch_reporter_compact.cpp @@ -105,6 +105,11 @@ public: printIssue("explicitly"); printRemainingMessages(Colour::None); break; + case ResultWas::ExplicitSkip: + printResultType(Colour::Skip, "skipped"_sr); + printMessage(); + printRemainingMessages(); + break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: case ResultWas::FailureBit: @@ -166,7 +171,7 @@ private: return; const auto itEnd = messages.cend(); - const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd)); + const auto N = static_cast<std::size_t>(itEnd - itMessage); stream << colourImpl->guardColour( colour ) << " with " << pluralise( N, "message"_sr ) << ':'; @@ -187,7 +192,7 @@ private: private: std::ostream& stream; AssertionResult const& result; - std::vector<MessageInfo> messages; + std::vector<MessageInfo> const& messages; std::vector<MessageInfo>::const_iterator itMessage; bool printInfoMessages; ColourImpl* colourImpl; @@ -220,7 +225,7 @@ private: // Drop out if result was successful and we're not printing those if( !m_config->includeSuccessfulResults() && result.isOk() ) { - if( result.getResultType() != ResultWas::Warning ) + if( result.getResultType() != ResultWas::Warning && result.getResultType() != ResultWas::ExplicitSkip ) return; printInfoMessages = false; } @@ -244,6 +249,6 @@ private: StreamingReporterBase::testRunEnded( _testRunStats ); } - CompactReporter::~CompactReporter() {} + CompactReporter::~CompactReporter() = default; } // end namespace Catch diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp index 0edb121e..bbde5ec9 100644 --- a/src/catch2/reporters/catch_reporter_console.cpp +++ b/src/catch2/reporters/catch_reporter_console.cpp @@ -51,7 +51,6 @@ public: stats(_stats), result(_stats.assertionResult), colour(Colour::None), - message(result.getMessage()), messages(_stats.infoMessages), colourImpl(colourImpl_), printInfoMessages(_printInfoMessages) { @@ -60,10 +59,10 @@ public: colour = Colour::Success; passOrFail = "PASSED"_sr; //if( result.hasMessage() ) - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; + if (messages.size() == 1) + messageLabel = "with message"_sr; + if (messages.size() > 1) + messageLabel = "with messages"_sr; break; case ResultWas::ExpressionFailed: if (result.isOk()) { @@ -73,43 +72,57 @@ public: colour = Colour::Error; passOrFail = "FAILED"_sr; } - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; + if (messages.size() == 1) + messageLabel = "with message"_sr; + if (messages.size() > 1) + messageLabel = "with messages"_sr; break; case ResultWas::ThrewException: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "due to unexpected exception with "; - if (_stats.infoMessages.size() == 1) - messageLabel += "message"; - if (_stats.infoMessages.size() > 1) - messageLabel += "messages"; + // todo switch + switch (messages.size()) { case 0: + messageLabel = "due to unexpected exception with "_sr; + break; + case 1: + messageLabel = "due to unexpected exception with message"_sr; + break; + default: + messageLabel = "due to unexpected exception with messages"_sr; + break; + } break; case ResultWas::FatalErrorCondition: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "due to a fatal error condition"; + messageLabel = "due to a fatal error condition"_sr; break; case ResultWas::DidntThrowException: colour = Colour::Error; passOrFail = "FAILED"_sr; - messageLabel = "because no exception was thrown where one was expected"; + messageLabel = "because no exception was thrown where one was expected"_sr; break; case ResultWas::Info: - messageLabel = "info"; + messageLabel = "info"_sr; break; case ResultWas::Warning: - messageLabel = "warning"; + messageLabel = "warning"_sr; break; case ResultWas::ExplicitFailure: passOrFail = "FAILED"_sr; colour = Colour::Error; - if (_stats.infoMessages.size() == 1) - messageLabel = "explicitly with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "explicitly with messages"; + if (messages.size() == 1) + messageLabel = "explicitly with message"_sr; + if (messages.size() > 1) + messageLabel = "explicitly with messages"_sr; + break; + case ResultWas::ExplicitSkip: + colour = Colour::Skip; + passOrFail = "SKIPPED"_sr; + if (messages.size() == 1) + messageLabel = "explicitly with message"_sr; + if (messages.size() > 1) + messageLabel = "explicitly with messages"_sr; break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: @@ -173,9 +186,8 @@ private: AssertionResult const& result; Colour::Code colour; StringRef passOrFail; - std::string messageLabel; - std::string message; - std::vector<MessageInfo> messages; + StringRef messageLabel; + std::vector<MessageInfo> const& messages; ColourImpl* colourImpl; bool printInfoMessages; }; @@ -185,13 +197,16 @@ std::size_t makeRatio( std::uint64_t number, std::uint64_t total ) { return (ratio == 0 && number > 0) ? 1 : static_cast<std::size_t>(ratio); } -std::size_t& findMax( std::size_t& i, std::size_t& j, std::size_t& k ) { - if (i > j && i > k) +std::size_t& +findMax( std::size_t& i, std::size_t& j, std::size_t& k, std::size_t& l ) { + if (i > j && i > k && i > l) return i; - else if (j > k) + else if (j > k && j > l) return j; - else + else if (k > l) return k; + else + return l; } enum class Justification { Left, Right }; @@ -203,6 +218,7 @@ struct ColumnInfo { }; struct ColumnBreak {}; struct RowBreak {}; +struct OutputFlush {}; class Duration { enum class Unit { @@ -319,12 +335,12 @@ public: } template<typename T> - friend TablePrinter& operator << (TablePrinter& tp, T const& value) { + friend TablePrinter& operator<< (TablePrinter& tp, T const& value) { tp.m_oss << value; return tp; } - friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) { + friend TablePrinter& operator<< (TablePrinter& tp, ColumnBreak) { auto colStr = tp.m_oss.str(); const auto strSize = colStr.size(); tp.m_oss.str(""); @@ -346,13 +362,18 @@ public: return tp; } - friend TablePrinter& operator << (TablePrinter& tp, RowBreak) { + friend TablePrinter& operator<< (TablePrinter& tp, RowBreak) { if (tp.m_currentColumn > 0) { tp.m_os << '\n'; tp.m_currentColumn = -1; } return tp; } + + friend TablePrinter& operator<<(TablePrinter& tp, OutputFlush) { + tp.m_os << std::flush; + return tp; + } }; ConsoleReporter::ConsoleReporter(ReporterConfig&& config): @@ -374,7 +395,7 @@ ConsoleReporter::ConsoleReporter(ReporterConfig&& config): { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, Justification::Left }, { "samples mean std dev", 14, Justification::Right }, { "iterations low mean low std dev", 14, Justification::Right }, - { "estimated high mean high std dev", 14, Justification::Right } + { "est run time high mean high std dev", 14, Justification::Right } }; } }())) {} @@ -400,7 +421,8 @@ void ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) { bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); // Drop out if result was successful but we're not printing them. - if (!includeResults && result.getResultType() != ResultWas::Warning) + // TODO: Make configurable whether skips should be printed + if (!includeResults && result.getResultType() != ResultWas::Warning && result.getResultType() != ResultWas::ExplicitSkip) return; lazyPrint(); @@ -457,8 +479,11 @@ void ConsoleReporter::benchmarkPreparing( StringRef name ) { void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) { (*m_tablePrinter) << info.samples << ColumnBreak() << info.iterations << ColumnBreak(); - if (!m_config->benchmarkNoAnalysis()) - (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak(); + if ( !m_config->benchmarkNoAnalysis() ) { + ( *m_tablePrinter ) + << Duration( info.estimatedDuration ) << ColumnBreak(); + } + ( *m_tablePrinter ) << OutputFlush{}; } void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) { if (m_config->benchmarkNoAnalysis()) @@ -603,10 +628,11 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total()); std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total()); - while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)++; + std::size_t skippedRatio = makeRatio(totals.testCases.skipped, totals.testCases.total()); + while (failedRatio + failedButOkRatio + passedRatio + skippedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) + findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)++; while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)--; + findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)--; m_stream << m_colour->guardColour( Colour::Error ) << std::string( failedRatio, '=' ) @@ -619,6 +645,8 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { m_stream << m_colour->guardColour( Colour::Success ) << std::string( passedRatio, '=' ); } + m_stream << m_colour->guardColour( Colour::Skip ) + << std::string( skippedRatio, '=' ); } else { m_stream << m_colour->guardColour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH - 1, '=' ); diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp index effd98b7..5e106326 100644 --- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp +++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp @@ -70,7 +70,8 @@ namespace Catch { void CumulativeReporterBase::sectionStarting( SectionInfo const& sectionInfo ) { - SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); + // We need a copy, because SectionStats expect to take ownership + SectionStats incompleteStats( SectionInfo(sectionInfo), Counts(), 0, false ); SectionNode* node; if ( m_sectionStack.empty() ) { if ( !m_rootSection ) { diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/src/catch2/reporters/catch_reporter_cumulative_base.hpp index cdff9991..267b39fd 100644 --- a/src/catch2/reporters/catch_reporter_cumulative_base.hpp +++ b/src/catch2/reporters/catch_reporter_cumulative_base.hpp @@ -8,7 +8,6 @@ #ifndef CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED #define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/reporters/catch_reporter_common_base.hpp> #include <catch2/internal/catch_move_and_forward.hpp> #include <catch2/internal/catch_unique_ptr.hpp> @@ -125,7 +124,7 @@ namespace Catch { void skipTest(TestCaseInfo const&) override {} protected: - //! Should the cumulative base store the assertion expansion for succesful assertions? + //! Should the cumulative base store the assertion expansion for successful assertions? bool m_shouldStoreSuccesfulAssertions = true; //! Should the cumulative base store the assertion expansion for failed assertions? bool m_shouldStoreFailedAssertions = true; diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp index f6aa6fc5..ffb32ffb 100644 --- a/src/catch2/reporters/catch_reporter_helpers.cpp +++ b/src/catch2/reporters/catch_reporter_helpers.cpp @@ -316,15 +316,22 @@ namespace Catch { } std::vector<SummaryColumn> columns; + // Don't include "skipped assertions" in total count + const auto totalAssertionCount = + totals.assertions.total() - totals.assertions.skipped; columns.push_back( SummaryColumn( "", Colour::None ) .addRow( totals.testCases.total() ) - .addRow( totals.assertions.total() ) ); + .addRow( totalAssertionCount ) ); columns.push_back( SummaryColumn( "passed", Colour::Success ) .addRow( totals.testCases.passed ) .addRow( totals.assertions.passed ) ); columns.push_back( SummaryColumn( "failed", Colour::ResultError ) .addRow( totals.testCases.failed ) .addRow( totals.assertions.failed ) ); + columns.push_back( SummaryColumn( "skipped", Colour::Skip ) + .addRow( totals.testCases.skipped ) + // Don't print "skipped assertions" + .addRow( 0 ) ); columns.push_back( SummaryColumn( "failed as expected", Colour::ResultExpectedFailure ) .addRow( totals.testCases.failedButOk ) diff --git a/src/catch2/reporters/catch_reporter_json.cpp b/src/catch2/reporters/catch_reporter_json.cpp new file mode 100644 index 00000000..1f0db8b0 --- /dev/null +++ b/src/catch2/reporters/catch_reporter_json.cpp @@ -0,0 +1,372 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +// +#include <catch2/catch_test_case_info.hpp> +#include <catch2/catch_test_spec.hpp> +#include <catch2/catch_version.hpp> +#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/internal/catch_list.hpp> +#include <catch2/internal/catch_string_manip.hpp> +#include <catch2/reporters/catch_reporter_json.hpp> + +namespace Catch { + namespace { + void writeSourceInfo( JsonObjectWriter& writer, + SourceLineInfo const& sourceInfo ) { + auto source_location_writer = + writer.write( "source-location"_sr ).writeObject(); + source_location_writer.write( "filename"_sr ) + .write( sourceInfo.file ); + source_location_writer.write( "line"_sr ).write( sourceInfo.line ); + } + + void writeTags( JsonArrayWriter writer, std::vector<Tag> const& tags ) { + for ( auto const& tag : tags ) { + writer.write( tag.original ); + } + } + + void writeProperties( JsonArrayWriter writer, + TestCaseInfo const& info ) { + if ( info.isHidden() ) { writer.write( "is-hidden"_sr ); } + if ( info.okToFail() ) { writer.write( "ok-to-fail"_sr ); } + if ( info.expectedToFail() ) { + writer.write( "expected-to-fail"_sr ); + } + if ( info.throws() ) { writer.write( "throws"_sr ); } + } + + } // namespace + + JsonReporter::JsonReporter( ReporterConfig&& config ): + StreamingReporterBase{ CATCH_MOVE( config ) } { + + m_preferences.shouldRedirectStdOut = true; + // TBD: Do we want to report all assertions? XML reporter does + // not, but for machine-parseable reporters I think the answer + // should be yes. + m_preferences.shouldReportAllAssertions = true; + + m_objectWriters.emplace( m_stream ); + m_writers.emplace( Writer::Object ); + auto& writer = m_objectWriters.top(); + + writer.write( "version"_sr ).write( 1 ); + + { + auto metadata_writer = writer.write( "metadata"_sr ).writeObject(); + metadata_writer.write( "name"_sr ).write( m_config->name() ); + metadata_writer.write( "rng-seed"_sr ).write( m_config->rngSeed() ); + metadata_writer.write( "catch2-version"_sr ) + .write( libraryVersion() ); + if ( m_config->testSpec().hasFilters() ) { + metadata_writer.write( "filters"_sr ) + .write( m_config->testSpec() ); + } + } + } + + JsonReporter::~JsonReporter() { + endListing(); + // TODO: Ensure this closes the top level object, add asserts + assert( m_writers.size() == 1 && "Only the top level object should be open" ); + assert( m_writers.top() == Writer::Object ); + endObject(); + m_stream << '\n' << std::flush; + assert( m_writers.empty() ); + } + + JsonArrayWriter& JsonReporter::startArray() { + m_arrayWriters.emplace( m_arrayWriters.top().writeArray() ); + m_writers.emplace( Writer::Array ); + return m_arrayWriters.top(); + } + JsonArrayWriter& JsonReporter::startArray( StringRef key ) { + m_arrayWriters.emplace( + m_objectWriters.top().write( key ).writeArray() ); + m_writers.emplace( Writer::Array ); + return m_arrayWriters.top(); + } + + JsonObjectWriter& JsonReporter::startObject() { + m_objectWriters.emplace( m_arrayWriters.top().writeObject() ); + m_writers.emplace( Writer::Object ); + return m_objectWriters.top(); + } + JsonObjectWriter& JsonReporter::startObject( StringRef key ) { + m_objectWriters.emplace( + m_objectWriters.top().write( key ).writeObject() ); + m_writers.emplace( Writer::Object ); + return m_objectWriters.top(); + } + + void JsonReporter::endObject() { + assert( isInside( Writer::Object ) ); + m_objectWriters.pop(); + m_writers.pop(); + } + void JsonReporter::endArray() { + assert( isInside( Writer::Array ) ); + m_arrayWriters.pop(); + m_writers.pop(); + } + + bool JsonReporter::isInside( Writer writer ) { + return !m_writers.empty() && m_writers.top() == writer; + } + + void JsonReporter::startListing() { + if ( !m_startedListing ) { startObject( "listings"_sr ); } + m_startedListing = true; + } + void JsonReporter::endListing() { + if ( m_startedListing ) { endObject(); } + m_startedListing = false; + } + + std::string JsonReporter::getDescription() { + return "Outputs listings as JSON. Test listing is Work-in-Progress!"; + } + + void JsonReporter::testRunStarting( TestRunInfo const& testInfo ) { + StreamingReporterBase::testRunStarting( testInfo ); + endListing(); + + assert( isInside( Writer::Object ) ); + startObject( "test-run"_sr ); + startArray( "test-cases"_sr ); + } + + static void writeCounts( JsonObjectWriter&& writer, Counts const& counts ) { + writer.write( "passed"_sr ).write( counts.passed ); + writer.write( "failed"_sr ).write( counts.failed ); + writer.write( "fail-but-ok"_sr ).write( counts.failedButOk ); + writer.write( "skipped"_sr ).write( counts.skipped ); + } + + void JsonReporter::testRunEnded(TestRunStats const& runStats) { + assert( isInside( Writer::Array ) ); + // End "test-cases" + endArray(); + + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + runStats.totals.assertions ); + writeCounts( totals.write( "test-cases"_sr ).writeObject(), + runStats.totals.testCases ); + } + + // End the "test-run" object + endObject(); + } + + void JsonReporter::testCaseStarting( TestCaseInfo const& tcInfo ) { + StreamingReporterBase::testCaseStarting( tcInfo ); + + assert( isInside( Writer::Array ) && + "We should be in the 'test-cases' array" ); + startObject(); + // "test-info" prelude + { + auto testInfo = + m_objectWriters.top().write( "test-info"_sr ).writeObject(); + // TODO: handle testName vs className!! + testInfo.write( "name"_sr ).write( tcInfo.name ); + writeSourceInfo(testInfo, tcInfo.lineInfo); + writeTags( testInfo.write( "tags"_sr ).writeArray(), tcInfo.tags ); + writeProperties( testInfo.write( "properties"_sr ).writeArray(), + tcInfo ); + } + + + // Start the array for individual test runs (testCasePartial pairs) + startArray( "runs"_sr ); + } + + void JsonReporter::testCaseEnded( TestCaseStats const& tcStats ) { + StreamingReporterBase::testCaseEnded( tcStats ); + + // We need to close the 'runs' array before finishing the test case + assert( isInside( Writer::Array ) ); + endArray(); + + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + tcStats.totals.assertions ); + // We do not write the test case totals, because there will always be just one test case here. + // TODO: overall "result" -> success, skip, fail here? Or in partial result? + } + // We do not write out stderr/stdout, because we instead wrote those out in partial runs + + // TODO: aborting? + + // And we also close this test case's object + assert( isInside( Writer::Object ) ); + endObject(); + } + + void JsonReporter::testCasePartialStarting( TestCaseInfo const& /*tcInfo*/, + uint64_t index ) { + startObject(); + m_objectWriters.top().write( "run-idx"_sr ).write( index ); + startArray( "path"_sr ); + // TODO: we want to delay most of the printing to the 'root' section + // TODO: childSection key name? + } + + void JsonReporter::testCasePartialEnded( TestCaseStats const& tcStats, + uint64_t /*index*/ ) { + // Fixme: the top level section handles this. + //// path object + endArray(); + if ( !tcStats.stdOut.empty() ) { + m_objectWriters.top() + .write( "captured-stdout"_sr ) + .write( tcStats.stdOut ); + } + if ( !tcStats.stdErr.empty() ) { + m_objectWriters.top() + .write( "captured-stderr"_sr ) + .write( tcStats.stdErr ); + } + { + auto totals = + m_objectWriters.top().write( "totals"_sr ).writeObject(); + writeCounts( totals.write( "assertions"_sr ).writeObject(), + tcStats.totals.assertions ); + // We do not write the test case totals, because there will + // always be just one test case here. + // TODO: overall "result" -> success, skip, fail here? Or in + // partial result? + } + // TODO: aborting? + // run object + endObject(); + } + + void JsonReporter::sectionStarting( SectionInfo const& sectionInfo ) { + assert( isInside( Writer::Array ) && + "Section should always start inside an object" ); + // We want to nest top level sections, even though it shares name + // and source loc with the TEST_CASE + auto& sectionObject = startObject(); + sectionObject.write( "kind"_sr ).write( "section"_sr ); + sectionObject.write( "name"_sr ).write( sectionInfo.name ); + writeSourceInfo( m_objectWriters.top(), sectionInfo.lineInfo ); + + + // TBD: Do we want to create this event lazily? It would become + // rather complex, but we could do it, and it would look + // better for empty sections. OTOH, empty sections should + // be rare. + startArray( "path"_sr ); + } + void JsonReporter::sectionEnded( SectionStats const& /*sectionStats */) { + // End the subpath array + endArray(); + // TODO: metadata + // TODO: what info do we have here? + + // End the section object + endObject(); + } + + void JsonReporter::assertionStarting( AssertionInfo const& /*assertionInfo*/ ) {} + void JsonReporter::assertionEnded( AssertionStats const& assertionStats ) { + // TODO: There is lot of different things to handle here, but + // we can fill it in later, after we show that the basic + // outline and streaming reporter impl works well enough. + //if ( !m_config->includeSuccessfulResults() + // && assertionStats.assertionResult.isOk() ) { + // return; + //} + assert( isInside( Writer::Array ) ); + auto assertionObject = m_arrayWriters.top().writeObject(); + + assertionObject.write( "kind"_sr ).write( "assertion"_sr ); + writeSourceInfo( assertionObject, + assertionStats.assertionResult.getSourceInfo() ); + assertionObject.write( "status"_sr ) + .write( assertionStats.assertionResult.isOk() ); + // TODO: handling of result. + // TODO: messages + // TODO: totals? + } + + + void JsonReporter::benchmarkPreparing( StringRef name ) { (void)name; } + void JsonReporter::benchmarkStarting( BenchmarkInfo const& ) {} + void JsonReporter::benchmarkEnded( BenchmarkStats<> const& ) {} + void JsonReporter::benchmarkFailed( StringRef error ) { (void)error; } + + void JsonReporter::listReporters( + std::vector<ReporterDescription> const& descriptions ) { + startListing(); + + auto writer = + m_objectWriters.top().write( "reporters"_sr ).writeArray(); + for ( auto const& desc : descriptions ) { + auto desc_writer = writer.writeObject(); + desc_writer.write( "name"_sr ).write( desc.name ); + desc_writer.write( "description"_sr ).write( desc.description ); + } + } + void JsonReporter::listListeners( + std::vector<ListenerDescription> const& descriptions ) { + startListing(); + + auto writer = + m_objectWriters.top().write( "listeners"_sr ).writeArray(); + + for ( auto const& desc : descriptions ) { + auto desc_writer = writer.writeObject(); + desc_writer.write( "name"_sr ).write( desc.name ); + desc_writer.write( "description"_sr ).write( desc.description ); + } + } + void JsonReporter::listTests( std::vector<TestCaseHandle> const& tests ) { + startListing(); + + auto writer = m_objectWriters.top().write( "tests"_sr ).writeArray(); + + for ( auto const& test : tests ) { + auto desc_writer = writer.writeObject(); + auto const& info = test.getTestCaseInfo(); + + desc_writer.write( "name"_sr ).write( info.name ); + desc_writer.write( "class-name"_sr ).write( info.className ); + { + auto tag_writer = desc_writer.write( "tags"_sr ).writeArray(); + for ( auto const& tag : info.tags ) { + tag_writer.write( tag.original ); + } + } + writeSourceInfo( desc_writer, info.lineInfo ); + } + } + void JsonReporter::listTags( std::vector<TagInfo> const& tags ) { + startListing(); + + auto writer = m_objectWriters.top().write( "tags"_sr ).writeArray(); + for ( auto const& tag : tags ) { + auto tag_writer = writer.writeObject(); + { + auto aliases_writer = + tag_writer.write( "aliases"_sr ).writeArray(); + for ( auto alias : tag.spellings ) { + aliases_writer.write( alias ); + } + } + tag_writer.write( "count"_sr ).write( tag.count ); + } + } +} // namespace Catch diff --git a/src/catch2/reporters/catch_reporter_json.hpp b/src/catch2/reporters/catch_reporter_json.hpp new file mode 100644 index 00000000..c938ca39 --- /dev/null +++ b/src/catch2/reporters/catch_reporter_json.hpp @@ -0,0 +1,95 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_REPORTER_JSON_HPP_INCLUDED +#define CATCH_REPORTER_JSON_HPP_INCLUDED + +#include <catch2/catch_timer.hpp> +#include <catch2/internal/catch_jsonwriter.hpp> +#include <catch2/reporters/catch_reporter_streaming_base.hpp> + +#include <stack> + +namespace Catch { + class JsonReporter : public StreamingReporterBase { + public: + JsonReporter( ReporterConfig&& config ); + + ~JsonReporter() override; + + static std::string getDescription(); + + public: // StreamingReporterBase + void testRunStarting( TestRunInfo const& runInfo ) override; + void testRunEnded( TestRunStats const& runStats ) override; + + void testCaseStarting( TestCaseInfo const& tcInfo ) override; + void testCaseEnded( TestCaseStats const& tcStats ) override; + + void testCasePartialStarting( TestCaseInfo const& tcInfo, + uint64_t index ) override; + void testCasePartialEnded( TestCaseStats const& tcStats, + uint64_t index ) override; + + void sectionStarting( SectionInfo const& sectionInfo ) override; + void sectionEnded( SectionStats const& sectionStats ) override; + + void assertionStarting( AssertionInfo const& assertionInfo ) override; + void assertionEnded( AssertionStats const& assertionStats ) override; + + //void testRunEndedCumulative() override; + + void benchmarkPreparing( StringRef name ) override; + void benchmarkStarting( BenchmarkInfo const& ) override; + void benchmarkEnded( BenchmarkStats<> const& ) override; + void benchmarkFailed( StringRef error ) override; + + void listReporters( + std::vector<ReporterDescription> const& descriptions ) override; + void listListeners( + std::vector<ListenerDescription> const& descriptions ) override; + void listTests( std::vector<TestCaseHandle> const& tests ) override; + void listTags( std::vector<TagInfo> const& tags ) override; + + private: + Timer m_testCaseTimer; + enum class Writer { + Object, + Array + }; + + JsonArrayWriter& startArray(); + JsonArrayWriter& startArray( StringRef key ); + + JsonObjectWriter& startObject(); + JsonObjectWriter& startObject( StringRef key ); + + void endObject(); + void endArray(); + + bool isInside( Writer writer ); + + void startListing(); + void endListing(); + + // Invariant: + // When m_writers is not empty and its top element is + // - Writer::Object, then m_objectWriters is not be empty + // - Writer::Array, then m_arrayWriters shall not be empty + std::stack<JsonObjectWriter> m_objectWriters{}; + std::stack<JsonArrayWriter> m_arrayWriters{}; + std::stack<Writer> m_writers{}; + + bool m_startedListing = false; + + // std::size_t m_sectionDepth = 0; + // std::size_t m_sectionStarted = 0; + }; +} // namespace Catch + +#endif // CATCH_REPORTER_JSON_HPP_INCLUDED diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp index 837d0489..fc5cae34 100644 --- a/src/catch2/reporters/catch_reporter_junit.cpp +++ b/src/catch2/reporters/catch_reporter_junit.cpp @@ -33,6 +33,8 @@ namespace Catch { gmtime_s(&timeInfo, &rawtime); #elif defined (CATCH_PLATFORM_PLAYSTATION) gmtime_s(&rawtime, &timeInfo); +#elif defined (__IAR_SYSTEMS_ICC__) + timeInfo = *std::gmtime(&rawtime); #else gmtime_r(&rawtime, &timeInfo); #endif @@ -132,6 +134,7 @@ namespace Catch { xml.writeAttribute( "name"_sr, stats.runInfo.name ); xml.writeAttribute( "errors"_sr, unexpectedExceptions ); xml.writeAttribute( "failures"_sr, stats.totals.assertions.failed-unexpectedExceptions ); + xml.writeAttribute( "skipped"_sr, stats.totals.assertions.skipped ); xml.writeAttribute( "tests"_sr, stats.totals.assertions.total() ); xml.writeAttribute( "hostname"_sr, "tbd"_sr ); // !TBD if( m_config->showDurations() == ShowDurations::Never ) @@ -244,7 +247,8 @@ namespace Catch { void JunitReporter::writeAssertion( AssertionStats const& stats ) { AssertionResult const& result = stats.assertionResult; - if( !result.isOk() ) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { std::string elementName; switch( result.getResultType() ) { case ResultWas::ThrewException: @@ -256,7 +260,9 @@ namespace Catch { case ResultWas::DidntThrowException: elementName = "failure"; break; - + case ResultWas::ExplicitSkip: + elementName = "skipped"; + break; // We should never see these here: case ResultWas::Info: case ResultWas::Warning: @@ -274,7 +280,9 @@ namespace Catch { xml.writeAttribute( "type"_sr, result.getTestMacroName() ); ReusableStringStream rss; - if (stats.totals.assertions.total() > 0) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + rss << "SKIPPED\n"; + } else { rss << "FAILED" << ":\n"; if (result.hasExpression()) { rss << " "; @@ -285,11 +293,9 @@ namespace Catch { rss << "with expansion:\n"; rss << TextFlow::Column(result.getExpandedExpression()).indent(2) << '\n'; } - } else { - rss << '\n'; } - if( !result.getMessage().empty() ) + if( result.hasMessage() ) rss << result.getMessage() << '\n'; for( auto const& msg : stats.infoMessages ) if( msg.type == ResultWas::Info ) diff --git a/src/catch2/reporters/catch_reporter_multi.cpp b/src/catch2/reporters/catch_reporter_multi.cpp index ebf28b64..531902be 100644 --- a/src/catch2/reporters/catch_reporter_multi.cpp +++ b/src/catch2/reporters/catch_reporter_multi.cpp @@ -114,7 +114,6 @@ namespace Catch { } } - // The return value indicates if the messages buffer should be cleared: void MultiReporter::assertionEnded( AssertionStats const& assertionStats ) { const bool reportByDefault = assertionStats.assertionResult.getResultType() != ResultWas::Ok || diff --git a/src/catch2/reporters/catch_reporter_registrars.cpp b/src/catch2/reporters/catch_reporter_registrars.cpp index a9787ce5..2a3ac957 100644 --- a/src/catch2/reporters/catch_reporter_registrars.cpp +++ b/src/catch2/reporters/catch_reporter_registrars.cpp @@ -8,6 +8,7 @@ #include <catch2/reporters/catch_reporter_registrars.hpp> +#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> namespace Catch { @@ -26,5 +27,10 @@ namespace Catch { } } + void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory ) { + getMutableRegistryHub().registerListener( CATCH_MOVE(listenerFactory) ); + } + + } // namespace Detail } // namespace Catch diff --git a/src/catch2/reporters/catch_reporter_registrars.hpp b/src/catch2/reporters/catch_reporter_registrars.hpp index fe8cf1ec..a93963f0 100644 --- a/src/catch2/reporters/catch_reporter_registrars.hpp +++ b/src/catch2/reporters/catch_reporter_registrars.hpp @@ -8,8 +8,6 @@ #ifndef CATCH_REPORTER_REGISTRARS_HPP_INCLUDED #define CATCH_REPORTER_REGISTRARS_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> -#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_unique_name.hpp> @@ -36,7 +34,8 @@ namespace Catch { //! independent on the reporter's concrete type void registerReporterImpl( std::string const& name, IReporterFactoryPtr reporterPtr ); - + //! Actually registers the factory, independent on listener's concrete type + void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory ); } // namespace Detail class IEventListener; @@ -97,7 +96,7 @@ namespace Catch { public: ListenerRegistrar(StringRef listenerName) { - getMutableRegistryHub().registerListener( Detail::make_unique<TypedListenerFactory>(listenerName) ); + registerListenerImpl( Detail::make_unique<TypedListenerFactory>(listenerName) ); } }; } @@ -118,7 +117,7 @@ namespace Catch { CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ namespace { \ Catch::ListenerRegistrar<listenerType> INTERNAL_CATCH_UNIQUE_NAME( \ - catch_internal_RegistrarFor )( #listenerType ); \ + catch_internal_RegistrarFor )( #listenerType##_catch_sr ); \ } \ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION diff --git a/src/catch2/reporters/catch_reporter_sonarqube.cpp b/src/catch2/reporters/catch_reporter_sonarqube.cpp index 365979f4..9c391b1f 100644 --- a/src/catch2/reporters/catch_reporter_sonarqube.cpp +++ b/src/catch2/reporters/catch_reporter_sonarqube.cpp @@ -40,7 +40,7 @@ namespace Catch { } void SonarQubeReporter::writeRun( TestRunNode const& runNode ) { - std::map<std::string, std::vector<TestCaseNode const*>> testsPerFile; + std::map<StringRef, std::vector<TestCaseNode const*>> testsPerFile; for ( auto const& child : runNode.children ) { testsPerFile[child->value.testInfo->lineInfo.file].push_back( @@ -52,7 +52,7 @@ namespace Catch { } } - void SonarQubeReporter::writeTestFile(std::string const& filename, std::vector<TestCaseNode const*> const& testCaseNodes) { + void SonarQubeReporter::writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes) { XmlWriter::ScopedElement e = xml.scopedElement("file"); xml.writeAttribute("path"_sr, filename); @@ -97,7 +97,8 @@ namespace Catch { void SonarQubeReporter::writeAssertion(AssertionStats const& stats, bool okToFail) { AssertionResult const& result = stats.assertionResult; - if (!result.isOk()) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { std::string elementName; if (okToFail) { elementName = "skipped"; @@ -108,15 +109,13 @@ namespace Catch { elementName = "error"; break; case ResultWas::ExplicitFailure: - elementName = "failure"; - break; case ResultWas::ExpressionFailed: - elementName = "failure"; - break; case ResultWas::DidntThrowException: elementName = "failure"; break; - + case ResultWas::ExplicitSkip: + elementName = "skipped"; + break; // We should never see these here: case ResultWas::Info: case ResultWas::Warning: @@ -136,7 +135,9 @@ namespace Catch { xml.writeAttribute("message"_sr, messageRss.str()); ReusableStringStream textRss; - if (stats.totals.assertions.total() > 0) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + textRss << "SKIPPED\n"; + } else { textRss << "FAILED:\n"; if (result.hasExpression()) { textRss << '\t' << result.getExpressionInMacro() << '\n'; @@ -146,7 +147,7 @@ namespace Catch { } } - if (!result.getMessage().empty()) + if (result.hasMessage()) textRss << result.getMessage() << '\n'; for (auto const& msg : stats.infoMessages) diff --git a/src/catch2/reporters/catch_reporter_sonarqube.hpp b/src/catch2/reporters/catch_reporter_sonarqube.hpp index bc8f0332..cad6deec 100644 --- a/src/catch2/reporters/catch_reporter_sonarqube.hpp +++ b/src/catch2/reporters/catch_reporter_sonarqube.hpp @@ -41,7 +41,7 @@ namespace Catch { void writeRun( TestRunNode const& groupNode ); - void writeTestFile(std::string const& filename, std::vector<TestCaseNode const*> const& testCaseNodes); + void writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes); void writeTestCase(TestCaseNode const& testCaseNode); diff --git a/src/catch2/reporters/catch_reporter_streaming_base.hpp b/src/catch2/reporters/catch_reporter_streaming_base.hpp index 13672a28..5448000c 100644 --- a/src/catch2/reporters/catch_reporter_streaming_base.hpp +++ b/src/catch2/reporters/catch_reporter_streaming_base.hpp @@ -8,7 +8,6 @@ #ifndef CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED #define CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/reporters/catch_reporter_common_base.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp index 59f8fb8b..67d406fb 100644 --- a/src/catch2/reporters/catch_reporter_tap.cpp +++ b/src/catch2/reporters/catch_reporter_tap.cpp @@ -14,7 +14,6 @@ #include <catch2/reporters/catch_reporter_helpers.hpp> #include <algorithm> -#include <iterator> #include <ostream> namespace Catch { @@ -100,6 +99,12 @@ namespace Catch { printIssue("explicitly"_sr); printRemainingMessages(Colour::None); break; + case ResultWas::ExplicitSkip: + printResultType(tapPassedString); + printIssue(" # SKIP"_sr); + printMessage(); + printRemainingMessages(); + break; // These cases are here to prevent compiler warnings case ResultWas::Unknown: case ResultWas::FailureBit: @@ -159,7 +164,7 @@ namespace Catch { // 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 std::size_t N = static_cast<std::size_t>(itEnd - itMessage); stream << colourImpl->guardColour( colour ) << " with " << pluralise( N, "message"_sr ) << ':'; @@ -178,7 +183,7 @@ namespace Catch { private: std::ostream& stream; AssertionResult const& result; - std::vector<MessageInfo> messages; + std::vector<MessageInfo> const& messages; std::vector<MessageInfo>::const_iterator itMessage; bool printInfoMessages; std::size_t counter; diff --git a/src/catch2/reporters/catch_reporter_teamcity.cpp b/src/catch2/reporters/catch_reporter_teamcity.cpp index 1d002c27..38aa55a6 100644 --- a/src/catch2/reporters/catch_reporter_teamcity.cpp +++ b/src/catch2/reporters/catch_reporter_teamcity.cpp @@ -45,7 +45,7 @@ namespace Catch { } // end anonymous namespace - TeamCityReporter::~TeamCityReporter() {} + TeamCityReporter::~TeamCityReporter() = default; void TeamCityReporter::testRunStarting( TestRunInfo const& runInfo ) { m_stream << "##teamcity[testSuiteStarted name='" << escape( runInfo.name ) @@ -59,7 +59,8 @@ namespace Catch { void TeamCityReporter::assertionEnded(AssertionStats const& assertionStats) { AssertionResult const& result = assertionStats.assertionResult; - if (!result.isOk()) { + if ( !result.isOk() || + result.getResultType() == ResultWas::ExplicitSkip ) { ReusableStringStream msg; if (!m_headerPrintedForThisSection) @@ -84,6 +85,9 @@ namespace Catch { case ResultWas::ExplicitFailure: msg << "explicit failure"; break; + case ResultWas::ExplicitSkip: + msg << "explicit skip"; + break; // We shouldn't get here because of the isOk() test case ResultWas::Ok: @@ -111,18 +115,16 @@ namespace Catch { " " << result.getExpandedExpression() << '\n'; } - if (currentTestCaseInfo->okToFail()) { + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + m_stream << "##teamcity[testIgnored"; + } else if ( currentTestCaseInfo->okToFail() ) { msg << "- failure ignore as test marked as 'ok to fail'\n"; - m_stream << "##teamcity[testIgnored" - << " name='" << escape(currentTestCaseInfo->name) << '\'' - << " message='" << escape(msg.str()) << '\'' - << "]\n"; + m_stream << "##teamcity[testIgnored"; } else { - m_stream << "##teamcity[testFailed" - << " name='" << escape(currentTestCaseInfo->name) << '\'' - << " message='" << escape(msg.str()) << '\'' - << "]\n"; + m_stream << "##teamcity[testFailed"; } + m_stream << " name='" << escape( currentTestCaseInfo->name ) << '\'' + << " message='" << escape( msg.str() ) << '\'' << "]\n"; } m_stream.flush(); } diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index 57fa1cab..35a3028e 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -56,7 +56,7 @@ namespace Catch { m_xml.startElement("Catch2TestRun") .writeAttribute("name"_sr, m_config->name()) .writeAttribute("rng-seed"_sr, m_config->rngSeed()) - .writeAttribute("xml-format-version"_sr, 2) + .writeAttribute("xml-format-version"_sr, 3) .writeAttribute("catch2-version"_sr, libraryVersion()); if ( m_config->testSpec().hasFilters() ) { m_xml.writeAttribute( "filters"_sr, m_config->testSpec() ); @@ -66,7 +66,7 @@ namespace Catch { void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { StreamingReporterBase::testCaseStarting(testInfo); m_xml.startElement( "TestCase" ) - .writeAttribute( "name"_sr, trim( testInfo.name ) ) + .writeAttribute( "name"_sr, trim( StringRef(testInfo.name) ) ) .writeAttribute( "tags"_sr, testInfo.tagsAsString() ); writeSourceInfo( testInfo.lineInfo ); @@ -80,7 +80,7 @@ namespace Catch { StreamingReporterBase::sectionStarting( sectionInfo ); if( m_sectionDepth++ > 0 ) { m_xml.startElement( "Section" ) - .writeAttribute( "name"_sr, trim( sectionInfo.name ) ); + .writeAttribute( "name"_sr, trim( StringRef(sectionInfo.name) ) ); writeSourceInfo( sectionInfo.lineInfo ); m_xml.ensureTagClosed(); } @@ -98,19 +98,22 @@ namespace Catch { // Print any info messages in <Info> tags. for( auto const& msg : assertionStats.infoMessages ) { if( msg.type == ResultWas::Info && includeResults ) { - m_xml.scopedElement( "Info" ) - .writeText( msg.message ); + auto t = m_xml.scopedElement( "Info" ); + writeSourceInfo( msg.lineInfo ); + t.writeText( msg.message ); } else if ( msg.type == ResultWas::Warning ) { - m_xml.scopedElement( "Warning" ) - .writeText( msg.message ); + auto t = m_xml.scopedElement( "Warning" ); + writeSourceInfo( msg.lineInfo ); + t.writeText( msg.message ); } } } // Drop out if result was successful but we're not printing them. - if( !includeResults && result.getResultType() != ResultWas::Warning ) + if ( !includeResults && result.getResultType() != ResultWas::Warning && + result.getResultType() != ResultWas::ExplicitSkip ) { return; - + } // Print the expression if there is one. if( result.hasExpression() ) { @@ -153,6 +156,12 @@ namespace Catch { m_xml.writeText( result.getMessage() ); m_xml.endElement(); break; + case ResultWas::ExplicitSkip: + m_xml.startElement( "Skip" ); + writeSourceInfo( result.getSourceInfo() ); + m_xml.writeText( result.getMessage() ); + m_xml.endElement(); + break; default: break; } @@ -163,15 +172,18 @@ namespace Catch { void XmlReporter::sectionEnded( SectionStats const& sectionStats ) { StreamingReporterBase::sectionEnded( sectionStats ); - if( --m_sectionDepth > 0 ) { - XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); - e.writeAttribute( "successes"_sr, sectionStats.assertions.passed ); - e.writeAttribute( "failures"_sr, sectionStats.assertions.failed ); - e.writeAttribute( "expectedFailures"_sr, sectionStats.assertions.failedButOk ); - - if ( m_config->showDurations() == ShowDurations::Always ) - e.writeAttribute( "durationInSeconds"_sr, sectionStats.durationInSeconds ); - + if ( --m_sectionDepth > 0 ) { + { + XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); + e.writeAttribute( "successes"_sr, sectionStats.assertions.passed ); + e.writeAttribute( "failures"_sr, sectionStats.assertions.failed ); + e.writeAttribute( "expectedFailures"_sr, sectionStats.assertions.failedButOk ); + e.writeAttribute( "skipped"_sr, sectionStats.assertions.skipped > 0 ); + + if ( m_config->showDurations() == ShowDurations::Always ) + e.writeAttribute( "durationInSeconds"_sr, sectionStats.durationInSeconds ); + } + // Ends assertion tag m_xml.endElement(); } } @@ -180,14 +192,14 @@ namespace Catch { StreamingReporterBase::testCaseEnded( testCaseStats ); XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" ); e.writeAttribute( "success"_sr, testCaseStats.totals.assertions.allOk() ); + e.writeAttribute( "skips"_sr, testCaseStats.totals.assertions.skipped ); if ( m_config->showDurations() == ShowDurations::Always ) e.writeAttribute( "durationInSeconds"_sr, m_testCaseTimer.getElapsedSeconds() ); - if( !testCaseStats.stdOut.empty() ) - m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline ); + m_xml.scopedElement( "StdOut" ).writeText( trim( StringRef(testCaseStats.stdOut) ), XmlFormatting::Newline ); if( !testCaseStats.stdErr.empty() ) - m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline ); + m_xml.scopedElement( "StdErr" ).writeText( trim( StringRef(testCaseStats.stdErr) ), XmlFormatting::Newline ); m_xml.endElement(); } @@ -197,11 +209,13 @@ namespace Catch { m_xml.scopedElement( "OverallResults" ) .writeAttribute( "successes"_sr, testRunStats.totals.assertions.passed ) .writeAttribute( "failures"_sr, testRunStats.totals.assertions.failed ) - .writeAttribute( "expectedFailures"_sr, testRunStats.totals.assertions.failedButOk ); + .writeAttribute( "expectedFailures"_sr, testRunStats.totals.assertions.failedButOk ) + .writeAttribute( "skips"_sr, testRunStats.totals.assertions.skipped ); m_xml.scopedElement( "OverallResultsCases") .writeAttribute( "successes"_sr, testRunStats.totals.testCases.passed ) .writeAttribute( "failures"_sr, testRunStats.totals.testCases.failed ) - .writeAttribute( "expectedFailures"_sr, testRunStats.totals.testCases.failedButOk ); + .writeAttribute( "expectedFailures"_sr, testRunStats.totals.testCases.failedButOk ) + .writeAttribute( "skips"_sr, testRunStats.totals.testCases.skipped ); m_xml.endElement(); } @@ -220,26 +234,23 @@ namespace Catch { } void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) { - m_xml.startElement("mean") + m_xml.scopedElement("mean") .writeAttribute("value"_sr, benchmarkStats.mean.point.count()) .writeAttribute("lowerBound"_sr, benchmarkStats.mean.lower_bound.count()) .writeAttribute("upperBound"_sr, benchmarkStats.mean.upper_bound.count()) .writeAttribute("ci"_sr, benchmarkStats.mean.confidence_interval); - m_xml.endElement(); - m_xml.startElement("standardDeviation") + m_xml.scopedElement("standardDeviation") .writeAttribute("value"_sr, benchmarkStats.standardDeviation.point.count()) .writeAttribute("lowerBound"_sr, benchmarkStats.standardDeviation.lower_bound.count()) .writeAttribute("upperBound"_sr, benchmarkStats.standardDeviation.upper_bound.count()) .writeAttribute("ci"_sr, benchmarkStats.standardDeviation.confidence_interval); - m_xml.endElement(); - m_xml.startElement("outliers") + m_xml.scopedElement("outliers") .writeAttribute("variance"_sr, benchmarkStats.outlierVariance) .writeAttribute("lowMild"_sr, benchmarkStats.outliers.low_mild) .writeAttribute("lowSevere"_sr, benchmarkStats.outliers.low_severe) .writeAttribute("highMild"_sr, benchmarkStats.outliers.high_mild) .writeAttribute("highSevere"_sr, benchmarkStats.outliers.high_severe); m_xml.endElement(); - m_xml.endElement(); } void XmlReporter::benchmarkFailed(StringRef error) { diff --git a/src/catch2/reporters/catch_reporters_all.hpp b/src/catch2/reporters/catch_reporters_all.hpp index 16f7bd70..5c713fe1 100644 --- a/src/catch2/reporters/catch_reporters_all.hpp +++ b/src/catch2/reporters/catch_reporters_all.hpp @@ -28,6 +28,7 @@ #include <catch2/reporters/catch_reporter_cumulative_base.hpp> #include <catch2/reporters/catch_reporter_event_listener.hpp> #include <catch2/reporters/catch_reporter_helpers.hpp> +#include <catch2/reporters/catch_reporter_json.hpp> #include <catch2/reporters/catch_reporter_junit.hpp> #include <catch2/reporters/catch_reporter_multi.hpp> #include <catch2/reporters/catch_reporter_registrars.hpp> diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b40fbceb..d3ab14a7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -77,6 +77,8 @@ endif(MSVC) #Temporary workaround # Please keep these ordered alphabetically set(TEST_SOURCES ${SELF_TEST_DIR}/TestRegistrations.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/Algorithms.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/AssertionHandler.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Clara.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/CmdLine.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/CmdLineHelpers.tests.cpp @@ -84,7 +86,9 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/IntrospectiveTests/Details.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/FloatingPoint.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/GeneratorsImpl.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/Integer.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/InternalBenchmark.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/Json.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Parse.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/PartTracker.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/RandomNumberGeneration.tests.cpp @@ -116,6 +120,7 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/UsageTests/Generators.tests.cpp ${SELF_TEST_DIR}/UsageTests/Message.tests.cpp ${SELF_TEST_DIR}/UsageTests/Misc.tests.cpp + ${SELF_TEST_DIR}/UsageTests/Skip.tests.cpp ${SELF_TEST_DIR}/UsageTests/ToStringByte.tests.cpp ${SELF_TEST_DIR}/UsageTests/ToStringChrono.tests.cpp ${SELF_TEST_DIR}/UsageTests/ToStringGeneral.tests.cpp @@ -133,6 +138,7 @@ set(TEST_SOURCES set(TEST_HEADERS ${SELF_TEST_DIR}/helpers/parse_test_spec.hpp + ${SELF_TEST_DIR}/helpers/range_test_helpers.hpp ${SELF_TEST_DIR}/helpers/type_with_lit_0_comparisons.hpp ) @@ -272,6 +278,10 @@ add_test(NAME TestSpecs::OverrideFailureWithNoMatchedTests COMMAND $<TARGET_FILE:SelfTest> "___nonexistent_test___" --allow-running-no-tests ) +add_test(NAME TestSpecs::OverrideAllSkipFailure + COMMAND $<TARGET_FILE:SelfTest> "tests can be skipped dynamically at runtime" --allow-running-no-tests +) + add_test(NAME TestSpecs::NonMatchingTestSpecIsRoundTrippable COMMAND $<TARGET_FILE:SelfTest> Tracker, "this test does not exist" "[nor does this tag]" ) @@ -615,6 +625,18 @@ if (CATCH_ENABLE_CONFIGURE_TESTS) endforeach() endif() +if (CATCH_ENABLE_CMAKE_HELPER_TESTS) + add_test(NAME "CMakeHelper::DiscoverTests" + COMMAND + "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/TestScripts/DiscoverTests/VerifyRegistration.py" "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" + ) + set_tests_properties("CMakeHelper::DiscoverTests" + PROPERTIES + COST 240 + LABELS "uses-python" + ) +endif() + foreach (reporterName # "Automake" - the simple .trs format does not support any kind of comments/metadata "compact" "console" @@ -622,7 +644,8 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any "SonarQube" "TAP" # "TeamCity" - does not seem to support test suite-level metadata/comments - "XML") + "XML" + "JSON") add_test(NAME "Reporters:Filters:${reporterName}" COMMAND @@ -632,6 +655,8 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any # Different regex for these two reporters, because the commas end up xml-escaped if (reporterName MATCHES "JUnit|XML") set(testCaseNameFormat ""CaseInsensitiveLess is case insensitive"") + elseif(reporterName MATCHES "JSON") + set(testCaseNameFormat "\\\\\"CaseInsensitiveLess is case insensitive\\\\\"") else() set(testCaseNameFormat "\"CaseInsensitiveLess is case insensitive\"") endif() diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt index d5b27fba..2a810e25 100644 --- a/tests/ExtraTests/CMakeLists.txt +++ b/tests/ExtraTests/CMakeLists.txt @@ -468,6 +468,17 @@ set_tests_properties( ) +add_executable(AssertionStartingEventGoesBeforeAssertionIsEvaluated + X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp +) +target_link_libraries(AssertionStartingEventGoesBeforeAssertionIsEvaluated + PRIVATE Catch2::Catch2WithMain +) +add_test( + NAME ReporterEvents::AssertionStartingHappensBeforeAssertionIsEvaluated + COMMAND $<TARGET_FILE:AssertionStartingEventGoesBeforeAssertionIsEvaluated> +) + #add_executable(DebugBreakMacros ${TESTS_DIR}/X12-CustomDebugBreakMacro.cpp) #target_link_libraries(DebugBreakMacros Catch2) #add_test(NAME DebugBreakMacros COMMAND DebugBreakMacros --break) @@ -488,15 +499,32 @@ set_tests_properties(TestSpecs::EmptySpecWithNoTestsFails PROPERTIES WILL_FAIL ON ) + add_test( NAME TestSpecs::OverrideFailureWithEmptySpec COMMAND $<TARGET_FILE:NoTests> --allow-running-no-tests ) + add_test( NAME List::Listeners::WorksWithoutRegisteredListeners COMMAND $<TARGET_FILE:NoTests> --list-listeners ) + + +add_executable(AllSkipped ${TESTS_DIR}/X93-AllSkipped.cpp) +target_link_libraries(AllSkipped PRIVATE Catch2::Catch2WithMain) + +add_test( + NAME TestSpecs::SkippingAllTestsFails + COMMAND $<TARGET_FILE:AllSkipped> +) +set_tests_properties(TestSpecs::SkippingAllTestsFails + PROPERTIES + WILL_FAIL ON +) + set( EXTRA_TEST_BINARIES + AllSkipped PrefixedMacros DisabledMacros DisabledExceptions-DefaultHandler diff --git a/tests/ExtraTests/X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp b/tests/ExtraTests/X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp new file mode 100644 index 00000000..6f44bf69 --- /dev/null +++ b/tests/ExtraTests/X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp @@ -0,0 +1,77 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +/**\file + * Registers an event listener to increments counter of assertionStarting events. + * + * Different assertion macros then check that the counter is at expected + * value when they are evaluated. + */ + +#include <catch2/catch_test_macros.hpp> +#include <catch2/reporters/catch_reporter_event_listener.hpp> +#include <catch2/reporters/catch_reporter_registrars.hpp> +#include <catch2/matchers/catch_matchers_predicate.hpp> + +namespace { + + static size_t assertion_starting_events_seen = 0; + + class AssertionStartingListener : public Catch::EventListenerBase { + public: + AssertionStartingListener( Catch::IConfig const* config ): + EventListenerBase( config ) {} + + void assertionStarting( Catch::AssertionInfo const& ) override { + ++assertion_starting_events_seen; + } + }; + + static bool f1() { + return assertion_starting_events_seen == 1; + } + + static void f2() { + if ( assertion_starting_events_seen != 2 ) { throw 1; } + } + + static void f3() { + if ( assertion_starting_events_seen == 3 ) { throw 1; } + } + + static bool f4() { return assertion_starting_events_seen == 4; } + + static void f5() { throw assertion_starting_events_seen; } + +} // anonymous namespace + +CATCH_REGISTER_LISTENER( AssertionStartingListener ) + +TEST_CASE() { + // **IMPORTANT** + // The order of assertions below matters. + REQUIRE( f1() ); + REQUIRE_NOTHROW( f2() ); + REQUIRE_THROWS( f3() ); + REQUIRE_THAT( f4(), + Catch::Matchers::Predicate<bool>( []( bool b ) { return b; } ) ); + REQUIRE_THROWS_MATCHES( + f5(), size_t, Catch::Matchers::Predicate<size_t>( []( size_t i ) { + return i == 5; + } ) ); + + CAPTURE( assertion_starting_events_seen ); // **not** an assertion + INFO( "some info msg" ); // **not** an assertion + WARN( "warning! warning!" ); // assertion-like message + SUCCEED(); // assertion-like message + + // We skip FAIL/SKIP and so on, which fail the test. + + // This require will also increment the count once + REQUIRE( assertion_starting_events_seen == 8 ); +} diff --git a/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp b/tests/ExtraTests/X93-AllSkipped.cpp index f620cbc8..8e7d0afe 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp +++ b/tests/ExtraTests/X93-AllSkipped.cpp @@ -6,8 +6,11 @@ // SPDX-License-Identifier: BSL-1.0 -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> +#include <catch2/catch_test_macros.hpp> -namespace Catch { - IReporterRegistry::~IReporterRegistry() = default; +TEST_CASE( "this test case is being skipped" ) { SKIP(); } + +TEST_CASE( "all sections in this test case are being skipped" ) { + SECTION( "A" ) { SKIP(); } + SECTION( "B" ) { SKIP(); } } diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index e29de92b..88c23e17 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -25,6 +25,7 @@ Nor would this :test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 :test-result: PASS #2152 - ULP checks between differently signed values were wrong - double :test-result: PASS #2152 - ULP checks between differently signed values were wrong - float +:test-result: XFAIL #2615 - Throwing in constructor generator fails test case but does not abort :test-result: XFAIL #748 - captures with unexpected exceptions :test-result: PASS #809 :test-result: PASS #833 @@ -129,8 +130,8 @@ Nor would this :test-result: FAIL Custom std-exceptions can be custom translated :test-result: PASS Default scale is invisible to comparison :test-result: PASS Directly creating an EnumInfo +:test-result: SKIP Empty generators can SKIP in constructor :test-result: PASS Empty stream name opens cout stream -:test-result: PASS Empty tag is not allowed :test-result: FAIL EndsWith string matcher :test-result: PASS Enums can quickly have stringification enabled using REGISTER_ENUM :test-result: PASS Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM @@ -142,6 +143,7 @@ Nor would this :test-result: PASS Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified :test-result: FAIL Exception matchers that fail :test-result: PASS Exception matchers that succeed +:test-result: PASS Exception message can be matched :test-result: PASS Exception messages can be tested for :test-result: PASS Exceptions matchers :test-result: FAIL Expected exceptions that don't throw or unexpected exceptions fail the test @@ -149,8 +151,10 @@ Nor would this :test-result: FAIL FAIL does not require an argument :test-result: FAIL FAIL_CHECK does not abort the test :test-result: PASS Factorials are computed +:test-result: PASS Filter generator throws exception for empty generator :test-result: PASS Floating point matchers: double :test-result: PASS Floating point matchers: float +:test-result: PASS GENERATE can combine literals and generators :test-result: PASS Generators -- adapters :test-result: PASS Generators -- simple :test-result: PASS Generators internals @@ -159,12 +163,16 @@ Nor would this :test-result: PASS Hashers with same seed produce same hash :test-result: PASS Hashing different test cases produces different result :test-result: PASS Hashing test case produces same hash across multiple calls +:test-result: FAIL INFO and UNSCOPED_INFO can stream multiple arguments :test-result: FAIL INFO and WARN do not abort tests :test-result: FAIL INFO gets logged on failure :test-result: FAIL INFO gets logged on failure, even if captured before successful assertions :test-result: FAIL INFO is reset for each loop +:test-result: XFAIL Incomplete AssertionHandler :test-result: XFAIL Inequality checks that should fail :test-result: PASS Inequality checks that should succeed +:test-result: PASS JsonWriter +:test-result: PASS JsonWriter escapes charaters in strings properly :test-result: PASS Lambdas in assertions :test-result: PASS Less-than inequalities with different epsilons :test-result: PASS ManuallyRegistered @@ -262,12 +270,15 @@ Message from section two :test-result: PASS Testing checked-if :test-result: XFAIL Testing checked-if 2 :test-result: XFAIL Testing checked-if 3 +:test-result: XFAIL Testing checked-if 4 +:test-result: XFAIL Testing checked-if 5 :test-result: FAIL The NO_FAIL macro reports a failure but does not fail the test :test-result: PASS The default listing implementation write to provided stream :test-result: FAIL This test 'should' fail but doesn't :test-result: FAIL Thrown string literals are translated :test-result: PASS Tracker :test-result: PASS Trim strings +:test-result: PASS Type conversions of RangeEquals and similar :test-result: FAIL Unexpected exceptions can be translated :test-result: PASS Upcasting special member functions :test-result: PASS Usage of AllMatch range matcher @@ -276,6 +287,8 @@ Message from section two :test-result: PASS Usage of AnyTrue range matcher :test-result: PASS Usage of NoneMatch range matcher :test-result: PASS Usage of NoneTrue range matcher +:test-result: PASS Usage of RangeEquals range matcher +:test-result: PASS Usage of UnorderedRangeEquals range matcher :test-result: PASS Usage of the SizeIs range matcher :test-result: PASS Use a custom approx :test-result: PASS Variadic macros @@ -296,6 +309,7 @@ Message from section two :test-result: PASS X/level/1/b :test-result: PASS XmlEncode :test-result: PASS XmlWriter writes boolean attributes as true/false +:test-result: SKIP a succeeding test can still be skipped :test-result: PASS analyse no analysis :test-result: PASS array<int, N> -> toString :test-result: PASS benchmark function call @@ -308,10 +322,14 @@ Message from section two :test-result: PASS comparisons between const int variables :test-result: PASS comparisons between int variables :test-result: PASS convertToBits +:test-result: SKIP dynamic skipping works with generators :test-result: PASS empty tags are not allowed :test-result: PASS erfc_inv :test-result: PASS estimate_clock_resolution :test-result: PASS even more nested SECTION tests +:test-result: XFAIL failed assertions before SKIP cause test case to fail +:test-result: XFAIL failing for some generator values causes entire test case to fail +:test-result: XFAIL failing in some unskipped sections causes entire test case to fail :test-result: FAIL first tag loose text artifact :test-result: FAIL has printf @@ -330,6 +348,10 @@ loose text artifact :test-result: FAIL mix info, unscoped info and warning :test-result: FAIL more nested SECTION tests :test-result: PASS nested SECTION tests +a! +b1! +! +:test-result: FAIL nested sections can be skipped dynamically at runtime :test-result: PASS non streamable - with conv. op :test-result: PASS non-copyable objects :test-result: PASS normal_cdf @@ -351,9 +373,11 @@ loose text artifact :test-result: PASS run_for_at_least, chronometer :test-result: PASS run_for_at_least, int :test-result: FAIL second tag +:test-result: SKIP sections can be skipped dynamically at runtime :test-result: FAIL send a single char to INFO :test-result: FAIL sends information to INFO :test-result: PASS shortened hide tags are split apart +:test-result: SKIP skipped tests can optionally provide a reason :test-result: PASS splitString :test-result: FAIL stacks unscoped info in loops :test-result: PASS startsWith @@ -375,6 +399,7 @@ loose text artifact :test-result: PASS strlen3 :test-result: PASS tables :test-result: PASS tags with dots in later positions are not parsed as hidden +:test-result: SKIP tests can be skipped dynamically at runtime :test-result: FAIL thrown std::strings are translated :test-result: PASS toString on const wchar_t const pointer returns the string contents :test-result: PASS toString on const wchar_t pointer returns the string contents @@ -390,6 +415,7 @@ loose text artifact :test-result: PASS tuple<string,string> :test-result: PASS tuple<tuple<int>,tuple<>,float> :test-result: PASS uniform samples +:test-result: PASS uniform_integer_distribution can return the bounds :test-result: PASS unique_ptr reimplementation: basic functionality :test-result: PASS vec<vec<string,alloc>> -> toString :test-result: PASS vector<bool> -> toString diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index 3ac53920..a37b1a2b 100644 --- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -23,6 +23,7 @@ :test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 :test-result: PASS #2152 - ULP checks between differently signed values were wrong - double :test-result: PASS #2152 - ULP checks between differently signed values were wrong - float +:test-result: XFAIL #2615 - Throwing in constructor generator fails test case but does not abort :test-result: XFAIL #748 - captures with unexpected exceptions :test-result: PASS #809 :test-result: PASS #833 @@ -127,8 +128,8 @@ :test-result: FAIL Custom std-exceptions can be custom translated :test-result: PASS Default scale is invisible to comparison :test-result: PASS Directly creating an EnumInfo +:test-result: SKIP Empty generators can SKIP in constructor :test-result: PASS Empty stream name opens cout stream -:test-result: PASS Empty tag is not allowed :test-result: FAIL EndsWith string matcher :test-result: PASS Enums can quickly have stringification enabled using REGISTER_ENUM :test-result: PASS Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM @@ -140,6 +141,7 @@ :test-result: PASS Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified :test-result: FAIL Exception matchers that fail :test-result: PASS Exception matchers that succeed +:test-result: PASS Exception message can be matched :test-result: PASS Exception messages can be tested for :test-result: PASS Exceptions matchers :test-result: FAIL Expected exceptions that don't throw or unexpected exceptions fail the test @@ -147,8 +149,10 @@ :test-result: FAIL FAIL does not require an argument :test-result: FAIL FAIL_CHECK does not abort the test :test-result: PASS Factorials are computed +:test-result: PASS Filter generator throws exception for empty generator :test-result: PASS Floating point matchers: double :test-result: PASS Floating point matchers: float +:test-result: PASS GENERATE can combine literals and generators :test-result: PASS Generators -- adapters :test-result: PASS Generators -- simple :test-result: PASS Generators internals @@ -157,12 +161,16 @@ :test-result: PASS Hashers with same seed produce same hash :test-result: PASS Hashing different test cases produces different result :test-result: PASS Hashing test case produces same hash across multiple calls +:test-result: FAIL INFO and UNSCOPED_INFO can stream multiple arguments :test-result: FAIL INFO and WARN do not abort tests :test-result: FAIL INFO gets logged on failure :test-result: FAIL INFO gets logged on failure, even if captured before successful assertions :test-result: FAIL INFO is reset for each loop +:test-result: XFAIL Incomplete AssertionHandler :test-result: XFAIL Inequality checks that should fail :test-result: PASS Inequality checks that should succeed +:test-result: PASS JsonWriter +:test-result: PASS JsonWriter escapes charaters in strings properly :test-result: PASS Lambdas in assertions :test-result: PASS Less-than inequalities with different epsilons :test-result: PASS ManuallyRegistered @@ -255,12 +263,15 @@ :test-result: PASS Testing checked-if :test-result: XFAIL Testing checked-if 2 :test-result: XFAIL Testing checked-if 3 +:test-result: XFAIL Testing checked-if 4 +:test-result: XFAIL Testing checked-if 5 :test-result: FAIL The NO_FAIL macro reports a failure but does not fail the test :test-result: PASS The default listing implementation write to provided stream :test-result: FAIL This test 'should' fail but doesn't :test-result: FAIL Thrown string literals are translated :test-result: PASS Tracker :test-result: PASS Trim strings +:test-result: PASS Type conversions of RangeEquals and similar :test-result: FAIL Unexpected exceptions can be translated :test-result: PASS Upcasting special member functions :test-result: PASS Usage of AllMatch range matcher @@ -269,6 +280,8 @@ :test-result: PASS Usage of AnyTrue range matcher :test-result: PASS Usage of NoneMatch range matcher :test-result: PASS Usage of NoneTrue range matcher +:test-result: PASS Usage of RangeEquals range matcher +:test-result: PASS Usage of UnorderedRangeEquals range matcher :test-result: PASS Usage of the SizeIs range matcher :test-result: PASS Use a custom approx :test-result: PASS Variadic macros @@ -289,6 +302,7 @@ :test-result: PASS X/level/1/b :test-result: PASS XmlEncode :test-result: PASS XmlWriter writes boolean attributes as true/false +:test-result: SKIP a succeeding test can still be skipped :test-result: PASS analyse no analysis :test-result: PASS array<int, N> -> toString :test-result: PASS benchmark function call @@ -301,10 +315,14 @@ :test-result: PASS comparisons between const int variables :test-result: PASS comparisons between int variables :test-result: PASS convertToBits +:test-result: SKIP dynamic skipping works with generators :test-result: PASS empty tags are not allowed :test-result: PASS erfc_inv :test-result: PASS estimate_clock_resolution :test-result: PASS even more nested SECTION tests +:test-result: XFAIL failed assertions before SKIP cause test case to fail +:test-result: XFAIL failing for some generator values causes entire test case to fail +:test-result: XFAIL failing in some unskipped sections causes entire test case to fail :test-result: FAIL first tag :test-result: FAIL has printf :test-result: PASS is_unary_function @@ -322,6 +340,7 @@ :test-result: FAIL mix info, unscoped info and warning :test-result: FAIL more nested SECTION tests :test-result: PASS nested SECTION tests +:test-result: FAIL nested sections can be skipped dynamically at runtime :test-result: PASS non streamable - with conv. op :test-result: PASS non-copyable objects :test-result: PASS normal_cdf @@ -343,9 +362,11 @@ :test-result: PASS run_for_at_least, chronometer :test-result: PASS run_for_at_least, int :test-result: FAIL second tag +:test-result: SKIP sections can be skipped dynamically at runtime :test-result: FAIL send a single char to INFO :test-result: FAIL sends information to INFO :test-result: PASS shortened hide tags are split apart +:test-result: SKIP skipped tests can optionally provide a reason :test-result: PASS splitString :test-result: FAIL stacks unscoped info in loops :test-result: PASS startsWith @@ -367,6 +388,7 @@ :test-result: PASS strlen3 :test-result: PASS tables :test-result: PASS tags with dots in later positions are not parsed as hidden +:test-result: SKIP tests can be skipped dynamically at runtime :test-result: FAIL thrown std::strings are translated :test-result: PASS toString on const wchar_t const pointer returns the string contents :test-result: PASS toString on const wchar_t pointer returns the string contents @@ -382,6 +404,7 @@ :test-result: PASS tuple<string,string> :test-result: PASS tuple<tuple<int>,tuple<>,float> :test-result: PASS uniform samples +:test-result: PASS uniform_integer_distribution can return the bounds :test-result: PASS unique_ptr reimplementation: basic functionality :test-result: PASS vec<vec<string,alloc>> -> toString :test-result: PASS vector<bool> -> toString diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 5073c080..0669fdbb 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -84,6 +84,7 @@ Matchers.tests.cpp:<line number>: passed: smallest_non_zero, WithinULP( -smalles Matchers.tests.cpp:<line number>: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) Matchers.tests.cpp:<line number>: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) Matchers.tests.cpp:<line number>: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +Generators.tests.cpp:<line number>: failed: unexpected exception with message: 'failure to init' 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' @@ -330,7 +331,7 @@ MatchersRanges.tests.cpp:<line number>: passed: inner_lists_are_empty.front(), I MatchersRanges.tests.cpp:<line number>: passed: has_empty{}, !IsEmpty() for: {?} not is empty MatchersRanges.tests.cpp:<line number>: passed: unrelated::ADL_empty{}, IsEmpty() for: {?} is empty Message.tests.cpp:<line number>: passed: with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' -Message.tests.cpp:<line number>: passed: with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +Message.tests.cpp:<line number>: passed: with 7 messages: 'custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op<int>{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op<int>{1, 2, 3}[0] := 0' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' Message.tests.cpp:<line number>: passed: with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: 'i := 2' ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: '3' @@ -519,8 +520,8 @@ ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: V ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +Skip.tests.cpp:<line number>: skipped: 'This generator is empty' Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isConsole() for: true -Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" @@ -572,6 +573,10 @@ Matchers.tests.cpp:<line number>: failed: throwsSpecialException( 3 ), SpecialEx Matchers.tests.cpp:<line number>: failed: throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" Exception.tests.cpp:<line number>: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) Exception.tests.cpp:<line number>: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" @@ -594,6 +599,7 @@ Misc.tests.cpp:<line number>: passed: Factorial(1) == 1 for: 1 == 1 Misc.tests.cpp:<line number>: passed: Factorial(2) == 2 for: 2 == 2 Misc.tests.cpp:<line number>: passed: Factorial(3) == 6 for: 6 == 6 Misc.tests.cpp:<line number>: passed: Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) +GeneratorsImpl.tests.cpp:<line number>: passed: filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException Matchers.tests.cpp:<line number>: passed: 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.1 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.2 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0 are within 99% of each other @@ -623,6 +629,7 @@ Matchers.tests.cpp:<line number>: passed: WithinULP( 1., 0 ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1., 0. ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1., -0.2 ), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinRel( 1., 1. ), std::domain_error +Matchers.tests.cpp:<line number>: passed: 1., !IsNaN() for: 1.0 not is NaN Matchers.tests.cpp:<line number>: passed: 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.1 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.2 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0 are within 99% of each other @@ -655,6 +662,11 @@ Matchers.tests.cpp:<line number>: passed: WithinULP( 1.f, static_cast<uint64_t>( Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, 0.f ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, -0.2f ), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, 1.f ), std::domain_error +Matchers.tests.cpp:<line number>: passed: 1., !IsNaN() for: 1.0 not is NaN +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 @@ -936,6 +948,7 @@ TestCaseInfoHasher.tests.cpp:<line number>: passed: h( dummy1 ) != h( dummy2 ) f TestCaseInfoHasher.tests.cpp:<line number>: passed: h( dummy ) == h( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>) +Message.tests.cpp:<line number>: failed: explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' Message.tests.cpp:<line number>: warning: 'this is a message' with 1 message: 'this is a warning' Message.tests.cpp:<line number>: failed: a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' Message.tests.cpp:<line number>: passed: a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' @@ -953,6 +966,7 @@ Message.tests.cpp:<line number>: passed: i < 10 for: 7 < 10 with 2 messages: 'cu Message.tests.cpp:<line number>: passed: i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' Message.tests.cpp:<line number>: passed: i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' Message.tests.cpp:<line number>: failed: i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +AssertionHandler.tests.cpp:<line number>: failed: unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy Condition.tests.cpp:<line number>: failed: data.int_seven != 7 for: 7 != 7 Condition.tests.cpp:<line number>: failed: data.float_nine_point_one != Approx( 9.1f ) for: 9.1f != Approx( 9.1000003815 ) Condition.tests.cpp:<line number>: failed: data.double_pi != Approx( 3.1415926535 ) for: 3.1415926535 != Approx( 3.1415926535 ) @@ -969,6 +983,91 @@ Condition.tests.cpp:<line number>: passed: data.str_hello != "goodbye" for: "hel Condition.tests.cpp:<line number>: passed: data.str_hello != "hell" for: "hello" != "hell" Condition.tests.cpp:<line number>: passed: data.str_hello != "hello1" for: "hello" != "hello1" Condition.tests.cpp:<line number>: passed: data.str_hello.size() != 6 for: 5 != 6 +Json.tests.cpp:<line number>: passed: stream.str() == "" for: "" == "" +Json.tests.cpp:<line number>: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) +Json.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) +Json.tests.cpp:<line number>: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:<line number>: passed: stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +Json.tests.cpp:<line number>: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:<line number>: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:<line number>: passed: stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"/\"" for: ""/"" == ""/"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" Compilation.tests.cpp:<line number>: passed: []() { return true; }() for: true Approx.tests.cpp:<line number>: passed: d <= Approx( 1.24 ) for: 1.23 <= Approx( 1.24 ) Approx.tests.cpp:<line number>: passed: d <= Approx( 1.23 ) for: 1.23 <= Approx( 1.23 ) @@ -1333,6 +1432,60 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] @@ -1742,6 +1895,10 @@ Misc.tests.cpp:<line number>: passed: true Misc.tests.cpp:<line number>: failed: explicitly Misc.tests.cpp:<line number>: failed - but was ok: false Misc.tests.cpp:<line number>: failed: explicitly +Misc.tests.cpp:<line number>: passed: true +Misc.tests.cpp:<line number>: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Misc.tests.cpp:<line number>: failed - but was ok: false +Misc.tests.cpp:<line number>: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} Message.tests.cpp:<line number>: failed - but was ok: 1 == 2 Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] @@ -1855,6 +2012,23 @@ There is no extra whitespace here StringManip.tests.cpp:<line number>: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:<line number>: passed: a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } Exception.tests.cpp:<line number>: failed: unexpected exception with message: '3.14' UniquePtr.tests.cpp:<line number>: passed: bptr->i == 3 for: 3 == 3 UniquePtr.tests.cpp:<line number>: passed: bptr->i == 3 for: 3 == 3 @@ -1960,6 +2134,38 @@ MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:<line number>: passed: !(mocked1.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:<line number>: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[3] for: true +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(0) for: { } has size == 0 MatchersRanges.tests.cpp:<line number>: passed: empty_vec, !SizeIs(2) for: { } not has size == 2 MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 @@ -2056,6 +2262,8 @@ Xml.tests.cpp:<line number>: passed: encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F Xml.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" ) +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.point.count() == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 @@ -2145,6 +2353,9 @@ FloatingPoint.tests.cpp:<line number>: passed: convertToBits( -0. ) == ( 1ULL << 9223372036854775808 (0x<hex digits>) FloatingPoint.tests.cpp:<line number>: passed: convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 for: 1 == 1 FloatingPoint.tests.cpp:<line number>: passed: convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 for: 1 == 1 +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 41' +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43' Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) InternalBenchmark.tests.cpp:<line number>: passed: erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.0920368762 == Approx( -0.0920368762 ) InternalBenchmark.tests.cpp:<line number>: passed: erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.0598029112 == Approx( -0.0598029112 ) @@ -2154,6 +2365,14 @@ InternalBenchmark.tests.cpp:<line number>: passed: res.outliers.total() == 0 for Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: failed: 3 == 4 +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly loose text artifact Clara.tests.cpp:<line number>: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value' Clara.tests.cpp:<line number>: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary2)>::value' @@ -2211,6 +2430,10 @@ Misc.tests.cpp:<line number>: passed: a < b for: 1 < 2 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2 Misc.tests.cpp:<line number>: passed: b != a for: 2 != 1 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2 +a! +b1! +Skip.tests.cpp:<line number>: skipped: +! Tricky.tests.cpp:<line number>: passed: s == "7" for: "7" == "7" Tricky.tests.cpp:<line number>: passed: ti == typeid(int) for: {?} == {?} InternalBenchmark.tests.cpp:<line number>: passed: normal_cdf(0.000000) == Approx(0.50000000000000000) for: 0.5 == Approx( 0.5 ) @@ -2295,9 +2518,13 @@ InternalBenchmark.tests.cpp:<line number>: passed: x >= old_x for: 128 >= 64 InternalBenchmark.tests.cpp:<line number>: passed: Timing.elapsed >= time for: 128 ns >= 100 ns InternalBenchmark.tests.cpp:<line number>: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 InternalBenchmark.tests.cpp:<line number>: passed: Timing.iterations >= time.count() for: 128 >= 100 +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: failed: false with 1 message: '3' Message.tests.cpp:<line number>: failed: false with 2 messages: 'hi' and 'i := 7' Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43' StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { } StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc } StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def } @@ -2363,6 +2590,7 @@ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6 Tag.tests.cpp:<line number>: passed: testcase.tags.size() == 1 for: 1 == 1 Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +Skip.tests.cpp:<line number>: skipped: Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?' Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" @@ -2394,6 +2622,8 @@ InternalBenchmark.tests.cpp:<line number>: passed: e.point == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.upper_bound == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.lower_bound == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.confidence_interval == 0.95 for: 0.95 == 0.95 +RandomNumberGeneration.tests.cpp:<line number>: passed: dist.a() == -10 for: -10 == -10 +RandomNumberGeneration.tests.cpp:<line number>: passed: dist.b() == 10 for: 10 == 10 UniquePtr.tests.cpp:<line number>: passed: !(ptr) for: !{?} UniquePtr.tests.cpp:<line number>: passed: ptr.get() == 0 for: 0 == 0 UniquePtr.tests.cpp:<line number>: passed: ptr for: {?} @@ -2459,7 +2689,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: -test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected +test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index af348dda..214fef74 100644 --- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -82,6 +82,7 @@ Matchers.tests.cpp:<line number>: passed: smallest_non_zero, WithinULP( -smalles Matchers.tests.cpp:<line number>: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) Matchers.tests.cpp:<line number>: passed: smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) Matchers.tests.cpp:<line number>: passed: smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +Generators.tests.cpp:<line number>: failed: unexpected exception with message: 'failure to init' 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' @@ -328,7 +329,7 @@ MatchersRanges.tests.cpp:<line number>: passed: inner_lists_are_empty.front(), I MatchersRanges.tests.cpp:<line number>: passed: has_empty{}, !IsEmpty() for: {?} not is empty MatchersRanges.tests.cpp:<line number>: passed: unrelated::ADL_empty{}, IsEmpty() for: {?} is empty Message.tests.cpp:<line number>: passed: with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' -Message.tests.cpp:<line number>: passed: with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +Message.tests.cpp:<line number>: passed: with 7 messages: 'custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op<int>{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op<int>{1, 2, 3}[0] := 0' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' Message.tests.cpp:<line number>: passed: with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: 'i := 2' ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: '3' @@ -517,8 +518,8 @@ ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: V ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +Skip.tests.cpp:<line number>: skipped: 'This generator is empty' Stream.tests.cpp:<line number>: passed: Catch::makeStream( "" )->isConsole() for: true -Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1" @@ -570,6 +571,10 @@ Matchers.tests.cpp:<line number>: failed: throwsSpecialException( 3 ), SpecialEx Matchers.tests.cpp:<line number>: failed: throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" Exception.tests.cpp:<line number>: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive) Exception.tests.cpp:<line number>: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected" @@ -592,6 +597,7 @@ Misc.tests.cpp:<line number>: passed: Factorial(1) == 1 for: 1 == 1 Misc.tests.cpp:<line number>: passed: Factorial(2) == 2 for: 2 == 2 Misc.tests.cpp:<line number>: passed: Factorial(3) == 6 for: 6 == 6 Misc.tests.cpp:<line number>: passed: Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) +GeneratorsImpl.tests.cpp:<line number>: passed: filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException Matchers.tests.cpp:<line number>: passed: 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.1 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 10., !WithinRel( 11.2, 0.1 ) for: 10.0 not and 11.2 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 1., !WithinRel( 0., 0.99 ) for: 1.0 not and 0 are within 99% of each other @@ -621,6 +627,7 @@ Matchers.tests.cpp:<line number>: passed: WithinULP( 1., 0 ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1., 0. ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1., -0.2 ), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinRel( 1., 1. ), std::domain_error +Matchers.tests.cpp:<line number>: passed: 1., !IsNaN() for: 1.0 not is NaN Matchers.tests.cpp:<line number>: passed: 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.1 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 10.f, !WithinRel( 11.2f, 0.1f ) for: 10.0f not and 11.2 are within 10% of each other Matchers.tests.cpp:<line number>: passed: 1.f, !WithinRel( 0.f, 0.99f ) for: 1.0f not and 0 are within 99% of each other @@ -653,6 +660,11 @@ Matchers.tests.cpp:<line number>: passed: WithinULP( 1.f, static_cast<uint64_t>( Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, 0.f ) Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, -0.2f ), std::domain_error Matchers.tests.cpp:<line number>: passed: WithinRel( 1.f, 1.f ), std::domain_error +Matchers.tests.cpp:<line number>: passed: 1., !IsNaN() for: 1.0 not is NaN +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 +Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0 @@ -934,6 +946,7 @@ TestCaseInfoHasher.tests.cpp:<line number>: passed: h( dummy1 ) != h( dummy2 ) f TestCaseInfoHasher.tests.cpp:<line number>: passed: h( dummy ) == h( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>) +Message.tests.cpp:<line number>: failed: explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' Message.tests.cpp:<line number>: warning: 'this is a message' with 1 message: 'this is a warning' Message.tests.cpp:<line number>: failed: a == 1 for: 2 == 1 with 2 messages: 'this message should be logged' and 'so should this' Message.tests.cpp:<line number>: passed: a == 2 for: 2 == 2 with 1 message: 'this message may be logged later' @@ -951,6 +964,7 @@ Message.tests.cpp:<line number>: passed: i < 10 for: 7 < 10 with 2 messages: 'cu Message.tests.cpp:<line number>: passed: i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and 'i := 8' Message.tests.cpp:<line number>: passed: i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' Message.tests.cpp:<line number>: failed: i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +AssertionHandler.tests.cpp:<line number>: failed: unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy Condition.tests.cpp:<line number>: failed: data.int_seven != 7 for: 7 != 7 Condition.tests.cpp:<line number>: failed: data.float_nine_point_one != Approx( 9.1f ) for: 9.1f != Approx( 9.1000003815 ) Condition.tests.cpp:<line number>: failed: data.double_pi != Approx( 3.1415926535 ) for: 3.1415926535 != Approx( 3.1415926535 ) @@ -967,6 +981,91 @@ Condition.tests.cpp:<line number>: passed: data.str_hello != "goodbye" for: "hel Condition.tests.cpp:<line number>: passed: data.str_hello != "hell" for: "hello" != "hell" Condition.tests.cpp:<line number>: passed: data.str_hello != "hello1" for: "hello" != "hello1" Condition.tests.cpp:<line number>: passed: data.str_hello.size() != 6 for: 5 != 6 +Json.tests.cpp:<line number>: passed: stream.str() == "" for: "" == "" +Json.tests.cpp:<line number>: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) +Json.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) +Json.tests.cpp:<line number>: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:<line number>: passed: stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +Json.tests.cpp:<line number>: passed: stream.str() == "{\n}" for: "{ +}" +== +"{ +}" +Json.tests.cpp:<line number>: passed: stream.str() == "[\n]" for: "[ +]" +== +"[ +]" +Json.tests.cpp:<line number>: passed: stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"/\"" for: ""/"" == ""/"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +Json.tests.cpp:<line number>: passed: sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" Compilation.tests.cpp:<line number>: passed: []() { return true; }() for: true Approx.tests.cpp:<line number>: passed: d <= Approx( 1.24 ) for: 1.23 <= Approx( 1.24 ) Approx.tests.cpp:<line number>: passed: d <= Approx( 1.23 ) for: 1.23 <= Approx( 1.23 ) @@ -1331,6 +1430,60 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console' Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false +Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] @@ -1735,6 +1888,10 @@ Misc.tests.cpp:<line number>: passed: true Misc.tests.cpp:<line number>: failed: explicitly Misc.tests.cpp:<line number>: failed - but was ok: false Misc.tests.cpp:<line number>: failed: explicitly +Misc.tests.cpp:<line number>: passed: true +Misc.tests.cpp:<line number>: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +Misc.tests.cpp:<line number>: failed - but was ok: false +Misc.tests.cpp:<line number>: failed: unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} Message.tests.cpp:<line number>: failed - but was ok: 1 == 2 Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] @@ -1848,6 +2005,23 @@ There is no extra whitespace here StringManip.tests.cpp:<line number>: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:<line number>: passed: a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } Exception.tests.cpp:<line number>: failed: unexpected exception with message: '3.14' UniquePtr.tests.cpp:<line number>: passed: bptr->i == 3 for: 3 == 3 UniquePtr.tests.cpp:<line number>: passed: bptr->i == 3 for: 3 == 3 @@ -1953,6 +2127,38 @@ MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[1] for: true MatchersRanges.tests.cpp:<line number>: passed: mocked.m_derefed[2] for: true MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[3]) for: !false MatchersRanges.tests.cpp:<line number>: passed: !(mocked.m_derefed[4]) for: !false +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:<line number>: passed: !(mocked1.m_derefed[3]) for: !false +MatchersRanges.tests.cpp:<line number>: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true +MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[3] for: true +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +MatchersRanges.tests.cpp:<line number>: passed: non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +MatchersRanges.tests.cpp:<line number>: passed: vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(0) for: { } has size == 0 MatchersRanges.tests.cpp:<line number>: passed: empty_vec, !SizeIs(2) for: { } not has size == 2 MatchersRanges.tests.cpp:<line number>: passed: empty_vec, SizeIs(Lt(2)) for: { } size matches is less than 2 @@ -2049,6 +2255,8 @@ Xml.tests.cpp:<line number>: passed: encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F Xml.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" ) +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.point.count() == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.lower_bound.count() == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.upper_bound.count() == 23 for: 23.0 == 23 @@ -2138,6 +2346,9 @@ FloatingPoint.tests.cpp:<line number>: passed: convertToBits( -0. ) == ( 1ULL << 9223372036854775808 (0x<hex digits>) FloatingPoint.tests.cpp:<line number>: passed: convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 for: 1 == 1 FloatingPoint.tests.cpp:<line number>: passed: convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 for: 1 == 1 +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 41' +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43' Tag.tests.cpp:<line number>: passed: Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) InternalBenchmark.tests.cpp:<line number>: passed: erfc_inv(1.103560) == Approx(-0.09203687623843015) for: -0.0920368762 == Approx( -0.0920368762 ) InternalBenchmark.tests.cpp:<line number>: passed: erfc_inv(1.067400) == Approx(-0.05980291115763361) for: -0.0598029112 == Approx( -0.0598029112 ) @@ -2147,6 +2358,14 @@ InternalBenchmark.tests.cpp:<line number>: passed: res.outliers.total() == 0 for Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: failed: 3 == 4 +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: failed: explicitly Clara.tests.cpp:<line number>: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value' Clara.tests.cpp:<line number>: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary2)>::value' Clara.tests.cpp:<line number>: passed: with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary3)>::value' @@ -2203,6 +2422,7 @@ Misc.tests.cpp:<line number>: passed: a < b for: 1 < 2 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2 Misc.tests.cpp:<line number>: passed: b != a for: 2 != 1 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2 +Skip.tests.cpp:<line number>: skipped: Tricky.tests.cpp:<line number>: passed: s == "7" for: "7" == "7" Tricky.tests.cpp:<line number>: passed: ti == typeid(int) for: {?} == {?} InternalBenchmark.tests.cpp:<line number>: passed: normal_cdf(0.000000) == Approx(0.50000000000000000) for: 0.5 == Approx( 0.5 ) @@ -2287,9 +2507,13 @@ InternalBenchmark.tests.cpp:<line number>: passed: x >= old_x for: 128 >= 64 InternalBenchmark.tests.cpp:<line number>: passed: Timing.elapsed >= time for: 128 ns >= 100 ns InternalBenchmark.tests.cpp:<line number>: passed: Timing.result == Timing.iterations + 17 for: 145 == 145 InternalBenchmark.tests.cpp:<line number>: passed: Timing.iterations >= time.count() for: 128 >= 100 +Skip.tests.cpp:<line number>: passed: +Skip.tests.cpp:<line number>: skipped: +Skip.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: failed: false with 1 message: '3' Message.tests.cpp:<line number>: failed: false with 2 messages: 'hi' and 'i := 7' Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43' StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { } StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc } StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def } @@ -2355,6 +2579,7 @@ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6 Tag.tests.cpp:<line number>: passed: testcase.tags.size() == 1 for: 1 == 1 Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +Skip.tests.cpp:<line number>: skipped: Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?' Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load"" @@ -2386,6 +2611,8 @@ InternalBenchmark.tests.cpp:<line number>: passed: e.point == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.upper_bound == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.lower_bound == 23 for: 23.0 == 23 InternalBenchmark.tests.cpp:<line number>: passed: e.confidence_interval == 0.95 for: 0.95 == 0.95 +RandomNumberGeneration.tests.cpp:<line number>: passed: dist.a() == -10 for: -10 == -10 +RandomNumberGeneration.tests.cpp:<line number>: passed: dist.b() == 10 for: 10 == 10 UniquePtr.tests.cpp:<line number>: passed: !(ptr) for: !{?} UniquePtr.tests.cpp:<line number>: passed: ptr.get() == 0 for: 0 == 0 UniquePtr.tests.cpp:<line number>: passed: ptr for: {?} @@ -2451,7 +2678,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:<line number>: passed: Misc.tests.cpp:<line number>: passed: -test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected +test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index 5ad8447a..25426256 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -28,6 +28,16 @@ explicitly with message: 1514 ------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -374,6 +384,16 @@ due to unexpected exception with message: custom std exception ------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- EndsWith string matcher ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> @@ -580,6 +600,18 @@ Message.tests.cpp:<line number>: warning: This message appears in the output ------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- INFO and WARN do not abort tests ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -640,6 +672,17 @@ with messages: i := 10 ------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp:<line number> +............................................................................... + +AssertionHandler.tests.cpp:<line number>: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- Inequality checks that should fail ------------------------------------------------------------------------------- Condition.tests.cpp:<line number> @@ -978,6 +1021,28 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: FAILED: ------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- Thrown string literals are translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -1165,6 +1230,14 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- checkedElse, failing ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -1186,6 +1259,87 @@ Misc.tests.cpp:<line number>: FAILED: with expansion: false +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + loose text artifact ------------------------------------------------------------------------------- just failure @@ -1304,6 +1458,19 @@ Misc.tests.cpp:<line number>: FAILED: with expansion: 1 == 2 +a! +b1! +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +! ------------------------------------------------------------------------------- not prints unscoped info from previous failures ------------------------------------------------------------------------------- @@ -1339,6 +1506,15 @@ with message: this SHOULD be seen only ONCE ------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- send a single char to INFO ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -1362,6 +1538,16 @@ with messages: i := 7 ------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- stacks unscoped info in loops ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -1384,6 +1570,14 @@ with messages: 6 ------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -1394,6 +1588,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 394 | 318 passed | 69 failed | 7 failed as expected -assertions: 2144 | 1989 passed | 128 failed | 27 failed as expected +test cases: 417 | 326 passed | 70 failed | 7 skipped | 14 failed as expected +assertions: 2243 | 2079 passed | 129 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 1ef94ee5..077b7bf7 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -762,6 +762,16 @@ with expansion: 00000000e+00]) ------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -2730,9 +2740,9 @@ Message.tests.cpp:<line number> Message.tests.cpp:<line number>: PASSED: with messages: - std::vector<int>{1, 2, 3}[0, 1, 2] := 3 - std::vector<int>{1, 2, 3}[(0, 1)] := 2 - std::vector<int>{1, 2, 3}[0] := 1 + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 + custom_index_op<int>{1, 2, 3}[0] := 0 (helper_1436<int, int>{12, -12}) := { 12, -12 } (helper_1436<int, int>(-12, 12)) := { -12, 12 } (1, 2) := 2 @@ -3947,6 +3957,16 @@ with expansion: "{** unexpected enum value **}" ------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- Empty stream name opens cout stream ------------------------------------------------------------------------------- Stream.tests.cpp:<line number> @@ -3958,15 +3978,6 @@ with expansion: true ------------------------------------------------------------------------------- -Empty tag is not allowed -------------------------------------------------------------------------------- -Tag.tests.cpp:<line number> -............................................................................... - -Tag.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS( Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) ) - -------------------------------------------------------------------------------- EndsWith string matcher ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> @@ -4283,6 +4294,32 @@ with expansion: SpecialException::what special exception has value of 2 ------------------------------------------------------------------------------- +Exception message can be matched +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) ) +with expansion: + DerivedException::what matches "starts with: "Derived"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "ends with: "::what"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "not starts with: "::what"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) ) +with expansion: + SpecialException::what matches "starts with: "Special"" + +------------------------------------------------------------------------------- Exception messages can be tested for exact match ------------------------------------------------------------------------------- @@ -4442,6 +4479,15 @@ with expansion: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) ------------------------------------------------------------------------------- +Filter generator throws exception for empty generator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp:<line number> +............................................................................... + +GeneratorsImpl.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_AS( filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException ) + +------------------------------------------------------------------------------- Floating point matchers: double Relative ------------------------------------------------------------------------------- @@ -4627,6 +4673,18 @@ Matchers.tests.cpp:<line number>: PASSED: REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ) ------------------------------------------------------------------------------- +Floating point matchers: double + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- Floating point matchers: float Relative ------------------------------------------------------------------------------- @@ -4820,6 +4878,62 @@ Matchers.tests.cpp:<line number>: PASSED: REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ) ------------------------------------------------------------------------------- +Floating point matchers: float + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- Generators -- adapters Filtering by predicate Basic usage @@ -6913,6 +7027,18 @@ with expansion: 3422778688 (0x<hex digits>) ------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- INFO and WARN do not abort tests ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -7074,6 +7200,17 @@ with messages: i := 10 ------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp:<line number> +............................................................................... + +AssertionHandler.tests.cpp:<line number>: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- Inequality checks that should fail ------------------------------------------------------------------------------- Condition.tests.cpp:<line number> @@ -7166,6 +7303,291 @@ with expansion: 5 != 6 ------------------------------------------------------------------------------- +JsonWriter + Newly constructed JsonWriter does nothing +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject with key will create an object to write the value +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ) +with expansion: + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] + }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: + ""true": true," and contains: ""false": false," and contains: ""string": + "this is a string"," and contains: ""array": [ + 1, + 2 + ] + }" ) + +------------------------------------------------------------------------------- +JsonWriter + nesting objects +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) ) +with expansion: + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } + }" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray creates array to write the values to +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ) +with expansion: + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + == + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonObjectWriter shall not insert superfluous brace +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonArrayWriter shall not insert superfluous bracket +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Custom class shall be quoted +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "\"custom\"" ) +with expansion: + ""custom"" == ""custom"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Quote in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\"\"" ) +with expansion: + ""\""" == ""\""" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backslash in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\\\"" ) +with expansion: + ""\\"" == ""\\"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Forward slash in a string is **not** escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"/\"" ) +with expansion: + ""/"" == ""/"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backspace in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\b\"" ) +with expansion: + ""\b"" == ""\b"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Formfeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\f\"" ) +with expansion: + ""\f"" == ""\f"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + linefeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\n\"" ) +with expansion: + ""\n"" == ""\n"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + carriage return in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\r\"" ) +with expansion: + ""\r"" == ""\r"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + tab in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\t\"" ) +with expansion: + ""\t"" == ""\t"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + combination of characters is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ) +with expansion: + ""\\/\t\r\n"" == ""\\/\t\r\n"" + +------------------------------------------------------------------------------- Lambdas in assertions ------------------------------------------------------------------------------- Compilation.tests.cpp:<line number> @@ -9670,6 +10092,129 @@ with expansion: ------------------------------------------------------------------------------- Reporter's write listings to provided stream + JSON reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream JUnit reporter lists tags ------------------------------------------------------------------------------- Reporters.tests.cpp:<line number> @@ -12453,6 +12998,34 @@ Misc.tests.cpp:<line number>: FAILED - but was ok: Misc.tests.cpp:<line number>: FAILED: ------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- The NO_FAIL macro reports a failure but does not fail the test ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -13073,6 +13646,154 @@ with expansion: There is no extra whitespace here ------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types (differ in array N) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types and value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers, one random access, one not +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: +with message: + ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( + list_char_a ) + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two non-equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Ranges with begin that needs ADL +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( a, !RangeEquals( b ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 2, 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, RangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- Unexpected exceptions can be translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -13243,7 +13964,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AllTrue range matcher Basic usage - One false evalutes to false + One false evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13282,7 +14003,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AllTrue range matcher Contained type is convertible to bool - One false evalutes to false + One false evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13518,7 +14239,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AnyTrue range matcher Basic usage - One true evalutes to true + One true evaluates to true ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13557,7 +14278,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AnyTrue range matcher Contained type is convertible to bool - One true evalutes to true + One true evaluates to true ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13793,7 +14514,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of NoneTrue range matcher Basic usage - One true evalutes to false + One true evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13832,7 +14553,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of NoneTrue range matcher Contained type is convertible to bool - One true evalutes to false + One true evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13932,6 +14653,324 @@ with expansion: !false ------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ) +with expansion: + { } elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ) +with expansion: + { } not elements are { 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ) +with expansion: + { 1 } not elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ) +with expansion: + { 1 } elements are { 1 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, RangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 2, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_c ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers (with same first elements) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + Check short-circuits on failure +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( mocked1.m_derefed[3] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + All elements are checked on success +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( mocked1, RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[3] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ) +with expansion: + { } unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, !UnorderedRangeEquals( non_empty_vector ) ) +with expansion: + { } not unordered elements are { 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_vector, !UnorderedRangeEquals( empty_vector ) ) +with expansion: + { 1 } not unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_array, UnorderedRangeEquals( non_empty_array ) ) +with expansion: + { 1 } unordered elements are { 1 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + +------------------------------------------------------------------------------- Usage of the SizeIs range matcher Some with stdlib containers ------------------------------------------------------------------------------- @@ -14634,6 +15673,16 @@ with expansion: " ( contains: "attr1="true"" and contains: "attr2="false"" ) ------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- analyse no analysis ------------------------------------------------------------------------------- InternalBenchmark.tests.cpp:<line number> @@ -15179,6 +16228,34 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- empty tags are not allowed ------------------------------------------------------------------------------- Tag.tests.cpp:<line number> @@ -15254,6 +16331,67 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: ------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- first tag ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -15749,6 +16887,40 @@ Misc.tests.cpp:<line number>: PASSED: with expansion: 1 != 2 +a------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + A +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + + +No assertions in section 'A' + +! +b1------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B1 +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + + +No assertions in section 'B1' + +! +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +! ------------------------------------------------------------------------------- non streamable - with conv. op ------------------------------------------------------------------------------- @@ -16351,6 +17523,33 @@ Misc.tests.cpp:<line number> No assertions in test case 'second tag' ------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + also not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- send a single char to INFO ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -16385,6 +17584,16 @@ with expansion: { {?}, {?} } ( Contains: {?} and Contains: {?} ) ------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- splitString ------------------------------------------------------------------------------- StringManip.tests.cpp:<line number> @@ -16812,6 +18021,14 @@ with expansion: magic.tag == magic.tag ------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -17032,6 +18249,22 @@ with expansion: 0.95 == 0.95 ------------------------------------------------------------------------------- +uniform_integer_distribution can return the bounds +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp:<line number> +............................................................................... + +RandomNumberGeneration.tests.cpp:<line number>: PASSED: + REQUIRE( dist.a() == -10 ) +with expansion: + -10 == -10 + +RandomNumberGeneration.tests.cpp:<line number>: PASSED: + REQUIRE( dist.b() == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- unique_ptr reimplementation: basic functionality Default constructed unique_ptr is empty ------------------------------------------------------------------------------- @@ -17518,6 +18751,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected +test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt index c281374f..5d204990 100644 --- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -760,6 +760,16 @@ with expansion: 00000000e+00]) ------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -2728,9 +2738,9 @@ Message.tests.cpp:<line number> Message.tests.cpp:<line number>: PASSED: with messages: - std::vector<int>{1, 2, 3}[0, 1, 2] := 3 - std::vector<int>{1, 2, 3}[(0, 1)] := 2 - std::vector<int>{1, 2, 3}[0] := 1 + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 + custom_index_op<int>{1, 2, 3}[0] := 0 (helper_1436<int, int>{12, -12}) := { 12, -12 } (helper_1436<int, int>(-12, 12)) := { -12, 12 } (1, 2) := 2 @@ -3945,6 +3955,16 @@ with expansion: "{** unexpected enum value **}" ------------------------------------------------------------------------------- +Empty generators can SKIP in constructor +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + This generator is empty + +------------------------------------------------------------------------------- Empty stream name opens cout stream ------------------------------------------------------------------------------- Stream.tests.cpp:<line number> @@ -3956,15 +3976,6 @@ with expansion: true ------------------------------------------------------------------------------- -Empty tag is not allowed -------------------------------------------------------------------------------- -Tag.tests.cpp:<line number> -............................................................................... - -Tag.tests.cpp:<line number>: PASSED: - REQUIRE_THROWS( Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) ) - -------------------------------------------------------------------------------- EndsWith string matcher ------------------------------------------------------------------------------- Matchers.tests.cpp:<line number> @@ -4281,6 +4292,32 @@ with expansion: SpecialException::what special exception has value of 2 ------------------------------------------------------------------------------- +Exception message can be matched +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) ) +with expansion: + DerivedException::what matches "starts with: "Derived"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "ends with: "::what"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) ) +with expansion: + DerivedException::what matches "not starts with: "::what"" + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) ) +with expansion: + SpecialException::what matches "starts with: "Special"" + +------------------------------------------------------------------------------- Exception messages can be tested for exact match ------------------------------------------------------------------------------- @@ -4440,6 +4477,15 @@ with expansion: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) ------------------------------------------------------------------------------- +Filter generator throws exception for empty generator +------------------------------------------------------------------------------- +GeneratorsImpl.tests.cpp:<line number> +............................................................................... + +GeneratorsImpl.tests.cpp:<line number>: PASSED: + REQUIRE_THROWS_AS( filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException ) + +------------------------------------------------------------------------------- Floating point matchers: double Relative ------------------------------------------------------------------------------- @@ -4625,6 +4671,18 @@ Matchers.tests.cpp:<line number>: PASSED: REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ) ------------------------------------------------------------------------------- +Floating point matchers: double + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- Floating point matchers: float Relative ------------------------------------------------------------------------------- @@ -4818,6 +4876,62 @@ Matchers.tests.cpp:<line number>: PASSED: REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ) ------------------------------------------------------------------------------- +Floating point matchers: float + IsNaN +------------------------------------------------------------------------------- +Matchers.tests.cpp:<line number> +............................................................................... + +Matchers.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( 1., !IsNaN() ) +with expansion: + 1.0 not is NaN + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +GENERATE can combine literals and generators +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: PASSED: + REQUIRE( i % 2 == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- Generators -- adapters Filtering by predicate Basic usage @@ -6911,6 +7025,18 @@ with expansion: 3422778688 (0x<hex digits>) ------------------------------------------------------------------------------- +INFO and UNSCOPED_INFO can stream multiple arguments +------------------------------------------------------------------------------- +Message.tests.cpp:<line number> +............................................................................... + +Message.tests.cpp:<line number>: FAILED: +explicitly with messages: + This info has multiple parts. + This unscoped info has multiple parts. + Show infos! + +------------------------------------------------------------------------------- INFO and WARN do not abort tests ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -7072,6 +7198,17 @@ with messages: i := 10 ------------------------------------------------------------------------------- +Incomplete AssertionHandler +------------------------------------------------------------------------------- +AssertionHandler.tests.cpp:<line number> +............................................................................... + +AssertionHandler.tests.cpp:<line number>: FAILED: + REQUIRE( Dummy ) +due to unexpected exception with message: + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + +------------------------------------------------------------------------------- Inequality checks that should fail ------------------------------------------------------------------------------- Condition.tests.cpp:<line number> @@ -7164,6 +7301,291 @@ with expansion: 5 != 6 ------------------------------------------------------------------------------- +JsonWriter + Newly constructed JsonWriter does nothing +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeObject with key will create an object to write the value +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ) +with expansion: + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] + }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: + ""true": true," and contains: ""false": false," and contains: ""string": + "this is a string"," and contains: ""array": [ + 1, + 2 + ] + }" ) + +------------------------------------------------------------------------------- +JsonWriter + nesting objects +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) ) +with expansion: + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } + }" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray will create an empty pair of braces +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Calling writeArray creates array to write the values to +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ) +with expansion: + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + == + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] + ]" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonObjectWriter shall not insert superfluous brace +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "{\n}" ) +with expansion: + "{ + }" + == + "{ + }" + +------------------------------------------------------------------------------- +JsonWriter + Moved from JsonArrayWriter shall not insert superfluous bracket +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "[\n]" ) +with expansion: + "[ + ]" + == + "[ + ]" + +------------------------------------------------------------------------------- +JsonWriter + Custom class shall be quoted +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( stream.str() == "\"custom\"" ) +with expansion: + ""custom"" == ""custom"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Quote in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\"\"" ) +with expansion: + ""\""" == ""\""" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backslash in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\\\"" ) +with expansion: + ""\\"" == ""\\"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Forward slash in a string is **not** escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"/\"" ) +with expansion: + ""/"" == ""/"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Backspace in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\b\"" ) +with expansion: + ""\b"" == ""\b"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + Formfeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\f\"" ) +with expansion: + ""\f"" == ""\f"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + linefeed in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\n\"" ) +with expansion: + ""\n"" == ""\n"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + carriage return in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\r\"" ) +with expansion: + ""\r"" == ""\r"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + tab in a string is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\t\"" ) +with expansion: + ""\t"" == ""\t"" + +------------------------------------------------------------------------------- +JsonWriter escapes charaters in strings properly + combination of characters is escaped +------------------------------------------------------------------------------- +Json.tests.cpp:<line number> +............................................................................... + +Json.tests.cpp:<line number>: PASSED: + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ) +with expansion: + ""\\/\t\r\n"" == ""\\/\t\r\n"" + +------------------------------------------------------------------------------- Lambdas in assertions ------------------------------------------------------------------------------- Compilation.tests.cpp:<line number> @@ -9668,6 +10090,129 @@ with expansion: ------------------------------------------------------------------------------- Reporter's write listings to provided stream + JSON reporter lists tags +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists reporters +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream + JSON reporter lists tests +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ) +with expansion: + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) +with message: + Tested reporter: JSON + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream +------------------------------------------------------------------------------- +Reporters.tests.cpp:<line number> +............................................................................... + +Reporters.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( factories.empty() ) +with expansion: + !false + +------------------------------------------------------------------------------- +Reporter's write listings to provided stream JUnit reporter lists tags ------------------------------------------------------------------------------- Reporters.tests.cpp:<line number> @@ -12446,6 +12991,34 @@ Misc.tests.cpp:<line number>: FAILED - but was ok: Misc.tests.cpp:<line number>: FAILED: ------------------------------------------------------------------------------- +Testing checked-if 4 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: PASSED: + CHECKED_ELSE( true ) + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- +Testing checked-if 5 +------------------------------------------------------------------------------- +Misc.tests.cpp:<line number> +............................................................................... + +Misc.tests.cpp:<line number>: FAILED - but was ok: + CHECKED_ELSE( false ) + +Misc.tests.cpp:<line number>: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + Uncaught exception should fail! + +------------------------------------------------------------------------------- The NO_FAIL macro reports a failure but does not fail the test ------------------------------------------------------------------------------- Message.tests.cpp:<line number> @@ -13066,6 +13639,154 @@ with expansion: There is no extra whitespace here ------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types (differ in array N) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers of different container types and value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Container conversions + Two equal containers, one random access, one not +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: +with message: + ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( + list_char_a ) + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Value type + Two non-equal containers of different value types +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Ranges with begin that needs ADL +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( a, !RangeEquals( b ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 2, 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + +------------------------------------------------------------------------------- +Type conversions of RangeEquals and similar + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, RangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- Unexpected exceptions can be translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -13236,7 +13957,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AllTrue range matcher Basic usage - One false evalutes to false + One false evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13275,7 +13996,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AllTrue range matcher Contained type is convertible to bool - One false evalutes to false + One false evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13511,7 +14232,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AnyTrue range matcher Basic usage - One true evalutes to true + One true evaluates to true ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13550,7 +14271,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of AnyTrue range matcher Contained type is convertible to bool - One true evalutes to true + One true evaluates to true ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13786,7 +14507,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of NoneTrue range matcher Basic usage - One true evalutes to false + One true evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13825,7 +14546,7 @@ with expansion: ------------------------------------------------------------------------------- Usage of NoneTrue range matcher Contained type is convertible to bool - One true evalutes to false + One true evaluates to false ------------------------------------------------------------------------------- MatchersRanges.tests.cpp:<line number> ............................................................................... @@ -13925,6 +14646,324 @@ with expansion: !false ------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ) +with expansion: + { } elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ) +with expansion: + { } not elements are { 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ) +with expansion: + { 1 } not elements are { } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ) +with expansion: + { 1 } elements are { 1 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, RangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 2, 2, 3 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !RangeEquals( array_c ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 2 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers (with same first elements) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 2, 3 } elements are { 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 2, 3 } not elements are { 3, 3, 4 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) ) +with expansion: + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + Check short-circuits on failure +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_FALSE( mocked1.m_derefed[3] ) +with expansion: + !false + +------------------------------------------------------------------------------- +Usage of RangeEquals range matcher + Check short-circuiting behaviour + All elements are checked on success +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( mocked1, RangeEquals( arr ) ) +with expansion: + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[0] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[1] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[2] ) +with expansion: + true + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE( mocked1.m_derefed[3] ) +with expansion: + true + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container matches empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ) +with expansion: + { } unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Empty container does not match non-empty container +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( empty_vector, !UnorderedRangeEquals( non_empty_vector ) ) +with expansion: + { } not unordered elements are { 1 } + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_vector, !UnorderedRangeEquals( empty_vector ) ) +with expansion: + { 1 } not unordered elements are { } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal 1-length non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( non_empty_array, UnorderedRangeEquals( non_empty_array ) ) +with expansion: + { 1 } unordered elements are { 1 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ) +with expansion: + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two equal-sized, non-equal, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Basic usage + Two non-equal-sized, non-empty containers +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ) +with expansion: + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) ) +with expansion: + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Custom predicate + Two non-equal non-empty containers (close enough) +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b, close_enough ) ) +with expansion: + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + +------------------------------------------------------------------------------- +Usage of UnorderedRangeEquals range matcher + Ranges that need ADL begin/end +------------------------------------------------------------------------------- +MatchersRanges.tests.cpp:<line number> +............................................................................... + +MatchersRanges.tests.cpp:<line number>: PASSED: + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ) +with expansion: + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + +------------------------------------------------------------------------------- Usage of the SizeIs range matcher Some with stdlib containers ------------------------------------------------------------------------------- @@ -14627,6 +15666,16 @@ with expansion: " ( contains: "attr1="true"" and contains: "attr2="false"" ) ------------------------------------------------------------------------------- +a succeeding test can still be skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- analyse no analysis ------------------------------------------------------------------------------- InternalBenchmark.tests.cpp:<line number> @@ -15172,6 +16221,34 @@ with expansion: 1 == 1 ------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 41 + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +dynamic skipping works with generators +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- empty tags are not allowed ------------------------------------------------------------------------------- Tag.tests.cpp:<line number> @@ -15247,6 +16324,67 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: ------------------------------------------------------------------------------- +failed assertions before SKIP cause test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + CHECK( 3 == 4 ) + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- +failing for some generator values causes entire test case to fail +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +failing in some unskipped sections causes entire test case to fail + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: FAILED: + +------------------------------------------------------------------------------- first tag ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -15742,6 +16880,37 @@ with expansion: 1 != 2 ------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + A +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + + +No assertions in section 'A' + +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B1 +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + + +No assertions in section 'B1' + +------------------------------------------------------------------------------- +nested sections can be skipped dynamically at runtime + B + B2 +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- non streamable - with conv. op ------------------------------------------------------------------------------- Tricky.tests.cpp:<line number> @@ -16343,6 +17512,33 @@ Misc.tests.cpp:<line number> No assertions in test case 'second tag' ------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- +sections can be skipped dynamically at runtime + also not skipped +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: PASSED: + +------------------------------------------------------------------------------- send a single char to INFO ------------------------------------------------------------------------------- Misc.tests.cpp:<line number> @@ -16377,6 +17573,16 @@ with expansion: { {?}, {?} } ( Contains: {?} and Contains: {?} ) ------------------------------------------------------------------------------- +skipped tests can optionally provide a reason +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: +explicitly with message: + skipping because answer = 43 + +------------------------------------------------------------------------------- splitString ------------------------------------------------------------------------------- StringManip.tests.cpp:<line number> @@ -16804,6 +18010,14 @@ with expansion: magic.tag == magic.tag ------------------------------------------------------------------------------- +tests can be skipped dynamically at runtime +------------------------------------------------------------------------------- +Skip.tests.cpp:<line number> +............................................................................... + +Skip.tests.cpp:<line number>: SKIPPED: + +------------------------------------------------------------------------------- thrown std::strings are translated ------------------------------------------------------------------------------- Exception.tests.cpp:<line number> @@ -17024,6 +18238,22 @@ with expansion: 0.95 == 0.95 ------------------------------------------------------------------------------- +uniform_integer_distribution can return the bounds +------------------------------------------------------------------------------- +RandomNumberGeneration.tests.cpp:<line number> +............................................................................... + +RandomNumberGeneration.tests.cpp:<line number>: PASSED: + REQUIRE( dist.a() == -10 ) +with expansion: + -10 == -10 + +RandomNumberGeneration.tests.cpp:<line number>: PASSED: + REQUIRE( dist.b() == 10 ) +with expansion: + 10 == 10 + +------------------------------------------------------------------------------- unique_ptr reimplementation: basic functionality Default constructed unique_ptr is empty ------------------------------------------------------------------------------- @@ -17510,6 +18740,6 @@ Misc.tests.cpp:<line number> Misc.tests.cpp:<line number>: PASSED: =============================================================================== -test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected +test cases: 417 | 312 passed | 85 failed | 6 skipped | 14 failed as expected +assertions: 2260 | 2079 passed | 146 failed | 35 failed as expected diff --git a/tests/SelfTest/Baselines/console.swa4.approved.txt b/tests/SelfTest/Baselines/console.swa4.approved.txt index 60517504..41b7612a 100644 --- a/tests/SelfTest/Baselines/console.swa4.approved.txt +++ b/tests/SelfTest/Baselines/console.swa4.approved.txt @@ -762,6 +762,16 @@ with expansion: 00000000e+00]) ------------------------------------------------------------------------------- +#2615 - Throwing in constructor generator fails test case but does not abort +------------------------------------------------------------------------------- +Generators.tests.cpp:<line number> +............................................................................... + +Generators.tests.cpp:<line number>: FAILED: +due to unexpected exception with message: + failure to init + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -941,6 +951,6 @@ Condition.tests.cpp:<line number>: FAILED: CHECK( true != true ) =============================================================================== -test cases: 32 | 27 passed | 3 failed | 2 failed as expected -assertions: 101 | 94 passed | 4 failed | 3 failed as expected +test cases: 33 | 27 passed | 3 failed | 3 failed as expected +assertions: 102 | 94 passed | 4 failed | 4 failed as expected diff --git a/tests/SelfTest/Baselines/default.sw.multi.approved.txt b/tests/SelfTest/Baselines/default.sw.multi.approved.txt index 12717aa5..bb174844 100644 --- a/tests/SelfTest/Baselines/default.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/default.sw.multi.approved.txt @@ -6,3 +6,6 @@ A string sent to stderr via clog Message from section one Message from section two loose text artifact +a! +b1! +! diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index bd983051..48eccfc3 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="17" failures="126" tests="2159" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="129" skipped="12" tests="2272" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/> @@ -19,7 +19,7 @@ <failure type="FAIL"> FAILED: 1514 -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <system-out> This would not be caught previously @@ -48,13 +48,21 @@ Nor would this <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="#2152 - ULP checks between differently signed values were wrong - double" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - float" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#2615 - Throwing in constructor generator fails test case but does not abort" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error type="TEST_CASE"> +FAILED: +failure to init +at Generators.tests.cpp:<line number> + </error> + </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <error type="TEST_CASE"> FAILED: expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}" status="run"> @@ -64,7 +72,7 @@ FAILED: REQUIRE_NOTHROW( thisThrows() ) expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" time="{duration}" status="run"/> @@ -77,7 +85,7 @@ FAILED: CHECK( f() == 0 ) with expansion: 1 == 0 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="#872" time="{duration}" status="run"/> @@ -90,52 +98,52 @@ Misc.tests.cpp:<line number> <failure message="false != false" type="CHECK"> FAILED: CHECK( false != false ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="true != true" type="CHECK"> FAILED: CHECK( true != true ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!true" type="CHECK"> FAILED: CHECK( !true ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(true)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( true ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!trueValue" type="CHECK"> FAILED: CHECK( !trueValue ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(trueValue)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( trueValue ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(1 == 1)" type="CHECK"> FAILED: CHECK( !(1 == 1) ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(1 == 1)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( 1 == 1 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="'Not' checks that should succeed" time="{duration}" status="run"/> @@ -151,7 +159,7 @@ FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -161,7 +169,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -170,7 +178,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -179,7 +187,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -188,7 +196,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -201,7 +209,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -210,7 +218,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -219,7 +227,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -228,7 +236,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -241,7 +249,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0 == 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -250,7 +258,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0f == 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -259,7 +267,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -271,7 +279,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 1 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -280,7 +288,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 3 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -289,7 +297,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 6 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -301,7 +309,7 @@ FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that succeeds" time="{duration}" status="run"/> @@ -318,7 +326,7 @@ Class.tests.cpp:<line number> <failure type="FAIL"> FAILED: to infinity and beyond -Misc.tests.cpp:<line number> +at 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}" status="run"/> @@ -328,14 +336,14 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x<hex digits> == 0x<hex digits> -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <failure message="o1 == o2" type="CHECK"> FAILED: CHECK( o1 == o2 ) with expansion: {?} == {?} -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Absolute margin" time="{duration}" status="run"/> @@ -345,7 +353,7 @@ Tricky.tests.cpp:<line number> FAILED: {Unknown expression after the reported line} unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Anonymous test case 1" time="{duration}" status="run"/> @@ -415,14 +423,14 @@ FAILED: with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), ContainsSubstring( "STRING" )" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) with expansion: "this string contains 'abc' as a substring" contains: "STRING" -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -434,7 +442,7 @@ Matchers.tests.cpp:<line number> FAILED: REQUIRE_NOTHROW( throwCustom() ) custom exception - not std -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -442,27 +450,33 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_THROWS_AS( throwCustom(), std::exception ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <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> +at Exception.tests.cpp:<line number> </error> </testcase> <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="Empty generators can SKIP in constructor" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +This generator is empty +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="Empty stream name opens cout stream" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Empty tag is not allowed" 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" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -470,7 +484,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Enums can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/> @@ -483,91 +497,91 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven == 8" type="CHECK"> FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven == 0" type="CHECK"> FAILED: CHECK( data.int_seven == 0 ) with expansion: 7 == 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 9.11f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.11f ) ) with expansion: 9.1f == Approx( 9.1099996567 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 9.0f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: 9.1f == Approx( 9.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 1 )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: 9.1f == Approx( 1.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 0 )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: 9.1f == Approx( 0.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.double_pi == Approx( 3.1415 )" type="CHECK"> FAILED: CHECK( data.double_pi == Approx( 3.1415 ) ) with expansion: 3.1415926535 == Approx( 3.1415 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "goodbye"" type="CHECK"> FAILED: CHECK( data.str_hello == "goodbye" ) with expansion: "hello" == "goodbye" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "hell"" type="CHECK"> FAILED: CHECK( data.str_hello == "hell" ) with expansion: "hello" == "hell" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "hello1"" type="CHECK"> FAILED: CHECK( data.str_hello == "hello1" ) with expansion: "hello" == "hello1" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello.size() == 6" type="CHECK"> FAILED: CHECK( data.str_hello.size() == 6 ) with expansion: 5 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="x == Approx( 1.301 )" type="CHECK"> FAILED: CHECK( x == Approx( 1.301 ) ) with expansion: 1.3 == Approx( 1.301 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Equality checks that should succeed" time="{duration}" status="run"/> @@ -579,7 +593,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -587,7 +601,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -595,12 +609,12 @@ Matchers.tests.cpp:<line number> <failure message="doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }" type="CHECK_THROWS_MATCHES"> FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that fail/Type mismatch" time="{duration}" status="run"> @@ -608,13 +622,13 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> <error message="throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that fail/Contents are wrong" time="{duration}" status="run"> @@ -623,17 +637,18 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception message can be matched" 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"/> @@ -643,53 +658,57 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> <failure message="thisDoesntThrow(), std::domain_error" type="CHECK_THROWS_AS"> FAILED: CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> <error message="thisThrows()" type="CHECK_NOTHROW"> FAILED: CHECK_NOTHROW( thisThrows() ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Factorials are computed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Filter generator throws exception for empty generator" 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: double/IsNaN" 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="Floating point matchers: float/IsNaN" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="GENERATE can combine literals and generators" 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"/> @@ -734,6 +753,15 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Hashing different test cases produces different result/Different classname" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Hashing different test cases produces different result/Different tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Hashing test case produces same hash across multiple calls" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="INFO and UNSCOPED_INFO can stream multiple arguments" time="{duration}" status="run"> + <failure type="FAIL"> +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp:<line number> + </failure> + </testcase> <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"> @@ -743,7 +771,7 @@ with expansion: 2 == 1 this message should be logged so should this -Message.tests.cpp:<line number> +at 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}" status="run"> @@ -754,7 +782,7 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="a == 0" type="CHECK"> FAILED: @@ -764,7 +792,7 @@ with expansion: this message may be logged later this message should be logged and this, but later -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="INFO is reset for each loop" time="{duration}" status="run"> @@ -775,9 +803,18 @@ with expansion: 10 < 10 current counter 10 i := 10 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Incomplete AssertionHandler" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="Dummy" type="REQUIRE"> +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp:<line number> + </error> + </testcase> <testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure message="data.int_seven != 7" type="CHECK"> @@ -785,38 +822,56 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one != Approx( 9.1f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: 9.1f != Approx( 9.1000003815 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.double_pi != Approx( 3.1415926535 )" type="CHECK"> FAILED: CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: 3.1415926535 != Approx( 3.1415926535 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello != "hello"" type="CHECK"> FAILED: CHECK( data.str_hello != "hello" ) with expansion: "hello" != "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello.size() != 5" type="CHECK"> FAILED: CHECK( data.str_hello.size() != 5 ) with expansion: 5 != 5 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Inequality checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Newly constructed JsonWriter does nothing" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeObject will create an empty pair of braces" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeObject with key will create an object to write the value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/nesting objects" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeArray will create an empty pair of braces" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeArray creates array to write the values to" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Moved from JsonObjectWriter shall not insert superfluous brace" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Moved from JsonArrayWriter shall not insert superfluous bracket" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Custom class shall be quoted" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Quote in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Backslash in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Forward slash in a string is **not** escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Backspace in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Formfeed in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/linefeed in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/carriage return in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/tab in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/combination of characters is escaped" 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"/> @@ -830,7 +885,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator" time="{duration}" status="run"/> @@ -840,35 +895,35 @@ FAILED: CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) with expansion: "this string contains 'abc' as a substring" not contains: "substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/A" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/A" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/B" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/B" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}" status="run"> @@ -877,7 +932,7 @@ FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: "expected exception" equals: "should fail" -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Multireporter calls reporters and listeners in correct order" time="{duration}" status="run"/> @@ -890,7 +945,7 @@ Exception.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: custom exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Objects that evaluated in boolean contexts can be checked" time="{duration}" status="run"/> @@ -901,133 +956,133 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 7" type="CHECK"> FAILED: CHECK( data.int_seven < 7 ) with expansion: 7 < 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven > 8" type="CHECK"> FAILED: CHECK( data.int_seven > 8 ) with expansion: 7 > 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 6" type="CHECK"> FAILED: CHECK( data.int_seven < 6 ) with expansion: 7 < 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 0" type="CHECK"> FAILED: CHECK( data.int_seven < 0 ) with expansion: 7 < 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < -1" type="CHECK"> FAILED: CHECK( data.int_seven < -1 ) with expansion: 7 < -1 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven >= 8" type="CHECK"> FAILED: CHECK( data.int_seven >= 8 ) with expansion: 7 >= 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven <= 6" type="CHECK"> FAILED: CHECK( data.int_seven <= 6 ) with expansion: 7 <= 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one < 9" type="CHECK"> FAILED: CHECK( data.float_nine_point_one < 9 ) with expansion: 9.1f < 9 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one > 10" type="CHECK"> FAILED: CHECK( data.float_nine_point_one > 10 ) with expansion: 9.1f > 10 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one > 9.2" type="CHECK"> FAILED: CHECK( data.float_nine_point_one > 9.2 ) with expansion: 9.1f > 9.2 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "hello"" type="CHECK"> FAILED: CHECK( data.str_hello > "hello" ) with expansion: "hello" > "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "hello"" type="CHECK"> FAILED: CHECK( data.str_hello < "hello" ) with expansion: "hello" < "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "hellp"" type="CHECK"> FAILED: CHECK( data.str_hello > "hellp" ) with expansion: "hello" > "hellp" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "z"" type="CHECK"> FAILED: CHECK( data.str_hello > "z" ) with expansion: "hello" > "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "hellm"" type="CHECK"> FAILED: CHECK( data.str_hello < "hellm" ) with expansion: "hello" < "hellm" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "a"" type="CHECK"> FAILED: CHECK( data.str_hello < "a" ) with expansion: "hello" < "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello >= "z"" type="CHECK"> FAILED: CHECK( data.str_hello >= "z" ) with expansion: "hello" >= "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello <= "a"" type="CHECK"> FAILED: CHECK( data.str_hello <= "a" ) with expansion: "hello" <= "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Ordering comparison checks that should succeed" time="{duration}" status="run"/> @@ -1037,14 +1092,14 @@ Condition.tests.cpp:<line number> <failure type="FAIL"> FAILED: Message from section one -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Overloaded comma or address-of operators are not used" time="{duration}" status="run"/> @@ -1113,7 +1168,7 @@ FAILED: CHECK( truthy(false) ) with expansion: Hey, its truthy! -Decomposition.tests.cpp:<line number> +at Decomposition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Regex string matcher" time="{duration}" status="run"> @@ -1123,7 +1178,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Matches( "contains 'abc' as a substring" )" type="CHECK_THAT"> FAILED: @@ -1131,7 +1186,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Matches( "this string contains 'abc' as a" )" type="CHECK_THAT"> FAILED: @@ -1139,7 +1194,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/> @@ -1154,6 +1209,9 @@ Matchers.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists tests" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists tags" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists reporters" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists tests" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists tests" time="{duration}" status="run"/> @@ -1203,7 +1261,7 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -1211,7 +1269,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Single item" time="{duration}" status="run"/> @@ -1259,7 +1317,7 @@ with expansion: $a = 20; } " -Misc.tests.cpp:<line number> +at 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}" status="run"/> @@ -1332,16 +1390,34 @@ Misc.tests.cpp:<line number> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Testing checked-if 3" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Testing checked-if 4" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="{Unknown expression after the reported line}"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </error> + </testcase> + <testcase classname="<exe-name>.global" name="Testing checked-if 5" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="{Unknown expression after the reported line}"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </error> + </testcase> <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="The default listing implementation write to provided stream/Listing tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="The default listing implementation write to provided stream/Listing reporters" time="{duration}" status="run"/> @@ -1352,7 +1428,7 @@ Misc.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: For some reason someone is throwing a string literal! -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Tracker" time="{duration}" status="run"/> @@ -1366,11 +1442,19 @@ Exception.tests.cpp:<line number> <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="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types (differ in array N)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types and value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers, one random access, one not" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Value type/Two equal containers of different value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Value type/Two non-equal containers of different value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Ranges with begin that needs ADL" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Custom predicate/Two equal non-empty containers (close enough)" 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> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Upcasting special member functions/Move constructor" time="{duration}" status="run"/> @@ -1381,10 +1465,10 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> @@ -1394,10 +1478,10 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> @@ -1407,13 +1491,33 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Some with stdlib containers" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type requires ADL found size free function" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type has size member" time="{duration}" status="run"/> @@ -1429,7 +1533,7 @@ FAILED: CHECK_THAT( empty, Approx( t1 ) ) with expansion: { } is approx: { 1.0, 2.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Just different vectors" time="{duration}" status="run"> @@ -1438,7 +1542,7 @@ FAILED: CHECK_THAT( v1, Approx( v2 ) ) with expansion: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element)" time="{duration}" status="run"/> @@ -1452,14 +1556,14 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, VectorContains( 1 )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, VectorContains( 1 ) ) with expansion: { } Contains: 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (vector)" time="{duration}" status="run"> @@ -1468,14 +1572,14 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v, Contains( v2 )" type="CHECK_THAT"> FAILED: CHECK_THAT( v, Contains( v2 ) ) with expansion: { 1, 2, 3 } Contains: { 1, 2, 4 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/Equals" time="{duration}" status="run"> @@ -1484,28 +1588,28 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v2, Equals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( v2, Equals( v ) ) with expansion: { 1, 2 } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, Equals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, Equals( v ) ) with expansion: { } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v, Equals( empty )" type="CHECK_THAT"> FAILED: CHECK_THAT( v, Equals( empty ) ) with expansion: { 1, 2, 3 } Equals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/UnorderedEquals" time="{duration}" status="run"> @@ -1514,28 +1618,28 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, UnorderedEquals( v ) ) with expansion: { } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="permuted, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 1, 3 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="permuted, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 3, 1 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -1543,7 +1647,7 @@ Matchers.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1551,7 +1655,7 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1559,7 +1663,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1567,14 +1671,14 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> <error type="TEST_CASE"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="X/level/0/a" time="{duration}" status="run"/> @@ -1590,6 +1694,12 @@ Exception.tests.cpp:<line number> <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="XmlWriter writes boolean attributes as true/false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="a succeeding test can still be skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="analyse no analysis" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="array<int, N> -> toString" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="benchmark function call/without chronometer" time="{duration}" status="run"/> @@ -1602,7 +1712,7 @@ FAILED: REQUIRE( testCheckedElse( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="checkedIf" time="{duration}" status="run"/> @@ -1612,7 +1722,7 @@ FAILED: REQUIRE( testCheckedIf( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="classify_outliers/none" time="{duration}" status="run"/> @@ -1624,25 +1734,80 @@ Misc.tests.cpp:<line number> <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="convertToBits" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="dynamic skipping works with generators" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp:<line number> + </skipped> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="empty tags are not allowed" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="erfc_inv" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="estimate_clock_resolution" 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="failed assertions before SKIP cause test case to fail" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure message="3 == 4" type="CHECK"> +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing for some generator values causes entire test case to fail" time="{duration}" status="run"> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing in some unskipped sections causes entire test case to fail/skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing in some unskipped sections causes entire test case to fail/not skipped" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + </testcase> <testcase classname="<exe-name>.global" name="is_unary_function" 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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="long long" time="{duration}" status="run"/> @@ -1652,7 +1817,7 @@ FAILED: CHECK( b > a ) with expansion: 0 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 1" time="{duration}" status="run"> @@ -1661,7 +1826,7 @@ FAILED: CHECK( b > a ) with expansion: 1 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 2" time="{duration}" status="run"/> @@ -1679,7 +1844,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1687,7 +1852,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[1] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1695,7 +1860,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[3] (3) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1703,7 +1868,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[4] (5) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1711,7 +1876,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[6] (13) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1719,7 +1884,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[7] (21) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="makeStream recognizes %debug stream name" time="{duration}" status="run"/> @@ -1735,13 +1900,26 @@ FAILED: REQUIRE( a == b ) with expansion: 1 == 2 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <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="nested sections can be skipped dynamically at runtime/B2/B" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="nested sections can be skipped dynamically at runtime/B" time="{duration}" status="run"> + <system-out> +a! +b1! +! + </system-out> + </testcase> <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="normal_cdf" time="{duration}" status="run"/> @@ -1752,7 +1930,7 @@ Misc.tests.cpp:<line number> FAILED: REQUIRE( false ) this SHOULD be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="null strings" time="{duration}" status="run"/> @@ -1769,7 +1947,7 @@ FAILED: REQUIRE( false ) this SHOULD be seen this SHOULD also be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="prints unscoped info only for the first assertion" time="{duration}" status="run"> @@ -1777,7 +1955,7 @@ Message.tests.cpp:<line number> FAILED: CHECK( false ) this SHOULD be seen only ONCE -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="random SECTION tests/doesn't equal" time="{duration}" status="run"/> @@ -1793,12 +1971,20 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="resolution" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="run_for_at_least, chronometer" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="run_for_at_least, int" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/not skipped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/also not skipped" 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 ) 3 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="sends information to INFO" time="{duration}" status="run"> @@ -1807,10 +1993,17 @@ FAILED: REQUIRE( false ) hi i := 7 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="shortened hide tags are split apart" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="skipped tests can optionally provide a reason" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <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"> @@ -1820,7 +2013,7 @@ Count 1 to 3... 1 2 3 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="false" type="CHECK"> FAILED: @@ -1829,7 +2022,7 @@ Count 4 to 6... 4 5 6 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="startsWith" time="{duration}" status="run"/> @@ -1855,11 +2048,17 @@ Message.tests.cpp:<line number> <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="tags with dots in later positions are not parsed as hidden" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tests can be skipped dynamically at runtime" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <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> +at 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}" status="run"/> @@ -1876,6 +2075,7 @@ Exception.tests.cpp:<line number> <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="uniform samples" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="uniform_integer_distribution can return the bounds" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Default constructed unique_ptr is empty" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Take ownership of allocation" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Take ownership of allocation/Plain reset deallocates" time="{duration}" status="run"/> @@ -1904,6 +2104,9 @@ This would not be caught previously A string sent directly to stdout Message from section one Message from section two +a! +b1! +! </system-out> <system-err> Nor would this diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index 3231c3e8..d270c88f 100644 --- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuites> - <testsuite name="<exe-name>" errors="17" failures="126" tests="2159" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="17" failures="129" skipped="12" tests="2272" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <properties> <property name="random-seed" value="1"/> <property name="filters" value=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"/> @@ -18,7 +18,7 @@ <failure type="FAIL"> FAILED: 1514 -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <system-out> This would not be caught previously @@ -47,13 +47,21 @@ Nor would this <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="#2152 - ULP checks between differently signed values were wrong - double" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - float" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="#2615 - Throwing in constructor generator fails test case but does not abort" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error type="TEST_CASE"> +FAILED: +failure to init +at Generators.tests.cpp:<line number> + </error> + </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <error type="TEST_CASE"> FAILED: expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}" status="run"> @@ -63,7 +71,7 @@ FAILED: REQUIRE_NOTHROW( thisThrows() ) expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" time="{duration}" status="run"/> @@ -76,7 +84,7 @@ FAILED: CHECK( f() == 0 ) with expansion: 1 == 0 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="#872" time="{duration}" status="run"/> @@ -89,52 +97,52 @@ Misc.tests.cpp:<line number> <failure message="false != false" type="CHECK"> FAILED: CHECK( false != false ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="true != true" type="CHECK"> FAILED: CHECK( true != true ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!true" type="CHECK"> FAILED: CHECK( !true ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(true)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( true ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!trueValue" type="CHECK"> FAILED: CHECK( !trueValue ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(trueValue)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( trueValue ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(1 == 1)" type="CHECK"> FAILED: CHECK( !(1 == 1) ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="!(1 == 1)" type="CHECK_FALSE"> FAILED: CHECK_FALSE( 1 == 1 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="'Not' checks that should succeed" time="{duration}" status="run"/> @@ -150,7 +158,7 @@ FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -160,7 +168,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -169,7 +177,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -178,7 +186,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -187,7 +195,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -200,7 +208,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -209,7 +217,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -218,7 +226,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -227,7 +235,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -240,7 +248,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0 == 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -249,7 +257,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0f == 2 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -258,7 +266,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -270,7 +278,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 1 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -279,7 +287,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 3 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"> @@ -288,7 +296,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 6 == 0 -Class.tests.cpp:<line number> +at 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}" status="run"/> @@ -300,7 +308,7 @@ FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that succeeds" time="{duration}" status="run"/> @@ -317,7 +325,7 @@ Class.tests.cpp:<line number> <failure type="FAIL"> FAILED: to infinity and beyond -Misc.tests.cpp:<line number> +at 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}" status="run"/> @@ -327,14 +335,14 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x<hex digits> == 0x<hex digits> -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <failure message="o1 == o2" type="CHECK"> FAILED: CHECK( o1 == o2 ) with expansion: {?} == {?} -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Absolute margin" time="{duration}" status="run"/> @@ -344,7 +352,7 @@ Tricky.tests.cpp:<line number> FAILED: {Unknown expression after the reported line} unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Anonymous test case 1" time="{duration}" status="run"/> @@ -414,14 +422,14 @@ FAILED: with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), ContainsSubstring( "STRING" )" type="CHECK_THAT"> FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) with expansion: "this string contains 'abc' as a substring" contains: "STRING" -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -433,7 +441,7 @@ Matchers.tests.cpp:<line number> FAILED: REQUIRE_NOTHROW( throwCustom() ) custom exception - not std -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -441,27 +449,33 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_THROWS_AS( throwCustom(), std::exception ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <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> +at Exception.tests.cpp:<line number> </error> </testcase> <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="Empty generators can SKIP in constructor" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +This generator is empty +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="Empty stream name opens cout stream" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Empty tag is not allowed" 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" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -469,7 +483,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Enums can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/> @@ -482,91 +496,91 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven == 8" type="CHECK"> FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven == 0" type="CHECK"> FAILED: CHECK( data.int_seven == 0 ) with expansion: 7 == 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 9.11f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.11f ) ) with expansion: 9.1f == Approx( 9.1099996567 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 9.0f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: 9.1f == Approx( 9.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 1 )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: 9.1f == Approx( 1.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one == Approx( 0 )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: 9.1f == Approx( 0.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.double_pi == Approx( 3.1415 )" type="CHECK"> FAILED: CHECK( data.double_pi == Approx( 3.1415 ) ) with expansion: 3.1415926535 == Approx( 3.1415 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "goodbye"" type="CHECK"> FAILED: CHECK( data.str_hello == "goodbye" ) with expansion: "hello" == "goodbye" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "hell"" type="CHECK"> FAILED: CHECK( data.str_hello == "hell" ) with expansion: "hello" == "hell" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello == "hello1"" type="CHECK"> FAILED: CHECK( data.str_hello == "hello1" ) with expansion: "hello" == "hello1" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello.size() == 6" type="CHECK"> FAILED: CHECK( data.str_hello.size() == 6 ) with expansion: 5 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="x == Approx( 1.301 )" type="CHECK"> FAILED: CHECK( x == Approx( 1.301 ) ) with expansion: 1.3 == Approx( 1.301 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Equality checks that should succeed" time="{duration}" status="run"/> @@ -578,7 +592,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -586,7 +600,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -594,12 +608,12 @@ Matchers.tests.cpp:<line number> <failure message="doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }" type="CHECK_THROWS_MATCHES"> FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that fail/Type mismatch" time="{duration}" status="run"> @@ -607,13 +621,13 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> <error message="throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that fail/Contents are wrong" time="{duration}" status="run"> @@ -622,17 +636,18 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 }" type="REQUIRE_THROWS_MATCHES"> FAILED: REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Exception matchers that succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Exception message can be matched" 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"/> @@ -642,53 +657,57 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> <failure message="thisDoesntThrow(), std::domain_error" type="CHECK_THROWS_AS"> FAILED: CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> <error message="thisThrows()" type="CHECK_NOTHROW"> FAILED: CHECK_NOTHROW( thisThrows() ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Factorials are computed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Filter generator throws exception for empty generator" 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: double/IsNaN" 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="Floating point matchers: float/IsNaN" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="GENERATE can combine literals and generators" 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"/> @@ -733,6 +752,15 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Hashing different test cases produces different result/Different classname" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Hashing different test cases produces different result/Different tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Hashing test case produces same hash across multiple calls" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="INFO and UNSCOPED_INFO can stream multiple arguments" time="{duration}" status="run"> + <failure type="FAIL"> +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp:<line number> + </failure> + </testcase> <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"> @@ -742,7 +770,7 @@ with expansion: 2 == 1 this message should be logged so should this -Message.tests.cpp:<line number> +at 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}" status="run"> @@ -753,7 +781,7 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="a == 0" type="CHECK"> FAILED: @@ -763,7 +791,7 @@ with expansion: this message may be logged later this message should be logged and this, but later -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="INFO is reset for each loop" time="{duration}" status="run"> @@ -774,9 +802,18 @@ with expansion: 10 < 10 current counter 10 i := 10 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Incomplete AssertionHandler" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="Dummy" type="REQUIRE"> +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp:<line number> + </error> + </testcase> <testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure message="data.int_seven != 7" type="CHECK"> @@ -784,38 +821,56 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one != Approx( 9.1f )" type="CHECK"> FAILED: CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: 9.1f != Approx( 9.1000003815 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.double_pi != Approx( 3.1415926535 )" type="CHECK"> FAILED: CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: 3.1415926535 != Approx( 3.1415926535 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello != "hello"" type="CHECK"> FAILED: CHECK( data.str_hello != "hello" ) with expansion: "hello" != "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello.size() != 5" type="CHECK"> FAILED: CHECK( data.str_hello.size() != 5 ) with expansion: 5 != 5 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Inequality checks that should succeed" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Newly constructed JsonWriter does nothing" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeObject will create an empty pair of braces" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeObject with key will create an object to write the value" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/nesting objects" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeArray will create an empty pair of braces" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Calling writeArray creates array to write the values to" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Moved from JsonObjectWriter shall not insert superfluous brace" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Moved from JsonArrayWriter shall not insert superfluous bracket" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter/Custom class shall be quoted" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Quote in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Backslash in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Forward slash in a string is **not** escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Backspace in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/Formfeed in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/linefeed in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/carriage return in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/tab in a string is escaped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="JsonWriter escapes charaters in strings properly/combination of characters is escaped" 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"/> @@ -829,7 +884,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator" time="{duration}" status="run"/> @@ -839,35 +894,35 @@ FAILED: CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) with expansion: "this string contains 'abc' as a substring" not contains: "substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/A" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/A" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/B" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/B" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}" status="run"> @@ -876,7 +931,7 @@ FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: "expected exception" equals: "should fail" -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Multireporter calls reporters and listeners in correct order" time="{duration}" status="run"/> @@ -889,7 +944,7 @@ Exception.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: custom exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Objects that evaluated in boolean contexts can be checked" time="{duration}" status="run"/> @@ -900,133 +955,133 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 7" type="CHECK"> FAILED: CHECK( data.int_seven < 7 ) with expansion: 7 < 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven > 8" type="CHECK"> FAILED: CHECK( data.int_seven > 8 ) with expansion: 7 > 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 6" type="CHECK"> FAILED: CHECK( data.int_seven < 6 ) with expansion: 7 < 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < 0" type="CHECK"> FAILED: CHECK( data.int_seven < 0 ) with expansion: 7 < 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven < -1" type="CHECK"> FAILED: CHECK( data.int_seven < -1 ) with expansion: 7 < -1 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven >= 8" type="CHECK"> FAILED: CHECK( data.int_seven >= 8 ) with expansion: 7 >= 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.int_seven <= 6" type="CHECK"> FAILED: CHECK( data.int_seven <= 6 ) with expansion: 7 <= 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one < 9" type="CHECK"> FAILED: CHECK( data.float_nine_point_one < 9 ) with expansion: 9.1f < 9 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one > 10" type="CHECK"> FAILED: CHECK( data.float_nine_point_one > 10 ) with expansion: 9.1f > 10 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.float_nine_point_one > 9.2" type="CHECK"> FAILED: CHECK( data.float_nine_point_one > 9.2 ) with expansion: 9.1f > 9.2 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "hello"" type="CHECK"> FAILED: CHECK( data.str_hello > "hello" ) with expansion: "hello" > "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "hello"" type="CHECK"> FAILED: CHECK( data.str_hello < "hello" ) with expansion: "hello" < "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "hellp"" type="CHECK"> FAILED: CHECK( data.str_hello > "hellp" ) with expansion: "hello" > "hellp" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello > "z"" type="CHECK"> FAILED: CHECK( data.str_hello > "z" ) with expansion: "hello" > "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "hellm"" type="CHECK"> FAILED: CHECK( data.str_hello < "hellm" ) with expansion: "hello" < "hellm" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello < "a"" type="CHECK"> FAILED: CHECK( data.str_hello < "a" ) with expansion: "hello" < "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello >= "z"" type="CHECK"> FAILED: CHECK( data.str_hello >= "z" ) with expansion: "hello" >= "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="data.str_hello <= "a"" type="CHECK"> FAILED: CHECK( data.str_hello <= "a" ) with expansion: "hello" <= "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Ordering comparison checks that should succeed" time="{duration}" status="run"/> @@ -1036,14 +1091,14 @@ Condition.tests.cpp:<line number> <failure type="FAIL"> FAILED: Message from section one -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Overloaded comma or address-of operators are not used" time="{duration}" status="run"/> @@ -1112,7 +1167,7 @@ FAILED: CHECK( truthy(false) ) with expansion: Hey, its truthy! -Decomposition.tests.cpp:<line number> +at Decomposition.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Regex string matcher" time="{duration}" status="run"> @@ -1122,7 +1177,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Matches( "contains 'abc' as a substring" )" type="CHECK_THAT"> FAILED: @@ -1130,7 +1185,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), Matches( "this string contains 'abc' as a" )" type="CHECK_THAT"> FAILED: @@ -1138,7 +1193,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Registering reporter with '::' in name fails" time="{duration}" status="run"/> @@ -1153,6 +1208,9 @@ Matchers.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/console reporter lists tests" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists tags" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists reporters" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JSON reporter lists tests" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists reporters" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Reporter's write listings to provided stream/JUnit reporter lists tests" time="{duration}" status="run"/> @@ -1202,7 +1260,7 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No )" type="CHECK_THAT"> FAILED: @@ -1210,7 +1268,7 @@ FAILED: with expansion: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Single item" time="{duration}" status="run"/> @@ -1258,7 +1316,7 @@ with expansion: $a = 20; } " -Misc.tests.cpp:<line number> +at 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}" status="run"/> @@ -1331,16 +1389,34 @@ Misc.tests.cpp:<line number> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Testing checked-if 3" time="{duration}" status="run"> <skipped message="TEST_CASE tagged with !mayfail"/> <failure type="FAIL"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> + <testcase classname="<exe-name>.global" name="Testing checked-if 4" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="{Unknown expression after the reported line}"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </error> + </testcase> + <testcase classname="<exe-name>.global" name="Testing checked-if 5" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <error message="{Unknown expression after the reported line}"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </error> + </testcase> <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="The default listing implementation write to provided stream/Listing tags" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="The default listing implementation write to provided stream/Listing reporters" time="{duration}" status="run"/> @@ -1351,7 +1427,7 @@ Misc.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: For some reason someone is throwing a string literal! -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Tracker" time="{duration}" status="run"/> @@ -1365,11 +1441,19 @@ Exception.tests.cpp:<line number> <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="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types (differ in array N)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types and value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers, one random access, one not" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Value type/Two equal containers of different value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Value type/Two non-equal containers of different value types" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Ranges with begin that needs ADL" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Type conversions of RangeEquals and similar/Custom predicate/Two equal non-empty containers (close enough)" 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> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="Upcasting special member functions/Move constructor" time="{duration}" status="run"/> @@ -1380,10 +1464,10 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/One false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> @@ -1393,10 +1477,10 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/One true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> @@ -1406,13 +1490,33 @@ Exception.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/One true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" time="{duration}" status="run"/> - <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evaluates to false" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Some with stdlib containers" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type requires ADL found size free function" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="Usage of the SizeIs range matcher/Type has size member" time="{duration}" status="run"/> @@ -1428,7 +1532,7 @@ FAILED: CHECK_THAT( empty, Approx( t1 ) ) with expansion: { } is approx: { 1.0, 2.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Just different vectors" time="{duration}" status="run"> @@ -1437,7 +1541,7 @@ FAILED: CHECK_THAT( v1, Approx( v2 ) ) with expansion: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element)" time="{duration}" status="run"/> @@ -1451,14 +1555,14 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, VectorContains( 1 )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, VectorContains( 1 ) ) with expansion: { } Contains: 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/Contains (vector)" time="{duration}" status="run"> @@ -1467,14 +1571,14 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v, Contains( v2 )" type="CHECK_THAT"> FAILED: CHECK_THAT( v, Contains( v2 ) ) with expansion: { 1, 2, 3 } Contains: { 1, 2, 4 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/Equals" time="{duration}" status="run"> @@ -1483,28 +1587,28 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v2, Equals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( v2, Equals( v ) ) with expansion: { 1, 2 } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, Equals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, Equals( v ) ) with expansion: { } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="v, Equals( empty )" type="CHECK_THAT"> FAILED: CHECK_THAT( v, Equals( empty ) ) with expansion: { 1, 2, 3 } Equals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Vector matchers that fail/UnorderedEquals" time="{duration}" status="run"> @@ -1513,28 +1617,28 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="empty, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( empty, UnorderedEquals( v ) ) with expansion: { } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="permuted, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 1, 3 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="permuted, UnorderedEquals( v )" type="CHECK_THAT"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 3, 1 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at 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}" status="run"/> @@ -1542,7 +1646,7 @@ Matchers.tests.cpp:<line number> <error type="TEST_CASE"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1550,7 +1654,7 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1558,7 +1662,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> @@ -1566,14 +1670,14 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at 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}" status="run"> <error type="TEST_CASE"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testcase> <testcase classname="<exe-name>.global" name="X/level/0/a" time="{duration}" status="run"/> @@ -1589,6 +1693,12 @@ Exception.tests.cpp:<line number> <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="XmlWriter writes boolean attributes as true/false" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="a succeeding test can still be skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="analyse no analysis" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="array<int, N> -> toString" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="benchmark function call/without chronometer" time="{duration}" status="run"/> @@ -1601,7 +1711,7 @@ FAILED: REQUIRE( testCheckedElse( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="checkedIf" time="{duration}" status="run"/> @@ -1611,7 +1721,7 @@ FAILED: REQUIRE( testCheckedIf( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="classify_outliers/none" time="{duration}" status="run"/> @@ -1623,25 +1733,80 @@ Misc.tests.cpp:<line number> <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="convertToBits" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="dynamic skipping works with generators" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp:<line number> + </skipped> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <testcase classname="<exe-name>.global" name="empty tags are not allowed" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="erfc_inv" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="estimate_clock_resolution" 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="failed assertions before SKIP cause test case to fail" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure message="3 == 4" type="CHECK"> +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing for some generator values causes entire test case to fail" time="{duration}" status="run"> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing in some unskipped sections causes entire test case to fail/skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="failing in some unskipped sections causes entire test case to fail/not skipped" time="{duration}" status="run"> + <skipped message="TEST_CASE tagged with !mayfail"/> + <failure type="FAIL"> +FAILED: +at Skip.tests.cpp:<line number> + </failure> + </testcase> <testcase classname="<exe-name>.global" name="is_unary_function" 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> +at Message.tests.cpp:<line number> </failure> </testcase> <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> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="long long" time="{duration}" status="run"/> @@ -1651,7 +1816,7 @@ FAILED: CHECK( b > a ) with expansion: 0 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 1" time="{duration}" status="run"> @@ -1660,7 +1825,7 @@ FAILED: CHECK( b > a ) with expansion: 1 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="looped SECTION tests/b is currently: 2" time="{duration}" status="run"/> @@ -1678,7 +1843,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1686,7 +1851,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[1] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1694,7 +1859,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[3] (3) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1702,7 +1867,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[4] (5) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1710,7 +1875,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[6] (13) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="( fib[i] % 2 ) == 0" type="CHECK"> FAILED: @@ -1718,7 +1883,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[7] (21) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="makeStream recognizes %debug stream name" time="{duration}" status="run"/> @@ -1734,13 +1899,26 @@ FAILED: REQUIRE( a == b ) with expansion: 1 == 2 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <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="nested sections can be skipped dynamically at runtime/B2/B" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="nested sections can be skipped dynamically at runtime/B" time="{duration}" status="run"> + <system-out> +a! +b1! +! + </system-out> + </testcase> <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="normal_cdf" time="{duration}" status="run"/> @@ -1751,7 +1929,7 @@ Misc.tests.cpp:<line number> FAILED: REQUIRE( false ) this SHOULD be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="null strings" time="{duration}" status="run"/> @@ -1768,7 +1946,7 @@ FAILED: REQUIRE( false ) this SHOULD be seen this SHOULD also be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="prints unscoped info only for the first assertion" time="{duration}" status="run"> @@ -1776,7 +1954,7 @@ Message.tests.cpp:<line number> FAILED: CHECK( false ) this SHOULD be seen only ONCE -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="random SECTION tests/doesn't equal" time="{duration}" status="run"/> @@ -1792,12 +1970,20 @@ Message.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="resolution" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="run_for_at_least, chronometer" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="run_for_at_least, int" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/not skipped" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/skipped" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> + <testcase classname="<exe-name>.global" name="sections can be skipped dynamically at runtime/also not skipped" 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 ) 3 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="sends information to INFO" time="{duration}" status="run"> @@ -1806,10 +1992,17 @@ FAILED: REQUIRE( false ) hi i := 7 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="shortened hide tags are split apart" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="skipped tests can optionally provide a reason" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <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"> @@ -1819,7 +2012,7 @@ Count 1 to 3... 1 2 3 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="false" type="CHECK"> FAILED: @@ -1828,7 +2021,7 @@ Count 4 to 6... 4 5 6 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="startsWith" time="{duration}" status="run"/> @@ -1854,11 +2047,17 @@ Message.tests.cpp:<line number> <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="tags with dots in later positions are not parsed as hidden" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="tests can be skipped dynamically at runtime" time="{duration}" status="run"> + <skipped type="SKIP"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testcase> <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> +at 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}" status="run"/> @@ -1875,6 +2074,7 @@ Exception.tests.cpp:<line number> <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="uniform samples" time="{duration}" status="run"/> + <testcase classname="<exe-name>.global" name="uniform_integer_distribution can return the bounds" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Default constructed unique_ptr is empty" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Take ownership of allocation" time="{duration}" status="run"/> <testcase classname="<exe-name>.global" name="unique_ptr reimplementation: basic functionality/Take ownership of allocation/Plain reset deallocates" time="{duration}" status="run"/> @@ -1903,6 +2103,9 @@ This would not be caught previously A string sent directly to stdout Message from section one Message from section two +a! +b1! +! </system-out> <system-err> Nor would this diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 122e3dda..36b05e54 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -2,6 +2,16 @@ <!-- filters='"*" ~[!nonportable] ~[!benchmark] ~[approvals]' rng-seed=1 --> <testExecutions version="1"loose text artifact > + <file path="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp"> + <testCase name="Incomplete AssertionHandler" duration="{duration}"> + <skipped message="REQUIRE(Dummy)"> +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp:<line number> + </skipped> + </testCase> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp"> <testCase name="Clara::Arg supports single-arg parse the way Opt does" duration="{duration}"/> <testCase name="Clara::Opt supports accept-many lambdas/Parsing fails on multiple options without accept_many" duration="{duration}"/> @@ -71,6 +81,7 @@ <testCase name="convertToBits" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp"> + <testCase name="Filter generator throws exception for empty generator" duration="{duration}"/> <testCase name="Generators internals/Single value" duration="{duration}"/> <testCase name="Generators internals/Preset values" duration="{duration}"/> <testCase name="Generators internals/Generator combinator" duration="{duration}"/> @@ -119,6 +130,26 @@ <testCase name="warmup" duration="{duration}"/> <testCase name="weighted_average_quantile" duration="{duration}"/> </file> + <file path="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp"> + <testCase name="JsonWriter/Newly constructed JsonWriter does nothing" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeObject will create an empty pair of braces" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeObject with key will create an object to write the value" duration="{duration}"/> + <testCase name="JsonWriter/nesting objects" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeArray will create an empty pair of braces" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeArray creates array to write the values to" duration="{duration}"/> + <testCase name="JsonWriter/Moved from JsonObjectWriter shall not insert superfluous brace" duration="{duration}"/> + <testCase name="JsonWriter/Moved from JsonArrayWriter shall not insert superfluous bracket" duration="{duration}"/> + <testCase name="JsonWriter/Custom class shall be quoted" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Quote in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Backslash in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Forward slash in a string is **not** escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Backspace in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Formfeed in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/linefeed in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/carriage return in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/tab in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/combination of characters is escaped" duration="{duration}"/> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp"> <testCase name="Parse uints/proper inputs" duration="{duration}"/> <testCase name="Parse uints/Bad inputs" duration="{duration}"/> @@ -150,6 +181,7 @@ <testCase name="Our PCG implementation provides expected results for known seeds/Specific seed" duration="{duration}"/> <testCase name="Random seed generation accepts known methods" duration="{duration}"/> <testCase name="Random seed generation reports unknown methods" duration="{duration}"/> + <testCase name="uniform_integer_distribution can return the bounds" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp"> <testCase name="Multireporter calls reporters and listeners in correct order" duration="{duration}"/> @@ -167,6 +199,9 @@ <testCase name="Reporter's write listings to provided stream/console reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/console reporter lists reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/console reporter lists tests" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists tags" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists reporters" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists tests" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists tests" duration="{duration}"/> @@ -232,7 +267,6 @@ <testCase name="startsWith" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp"> - <testCase name="Empty tag is not allowed" duration="{duration}"/> <testCase name="Tag alias can be registered against tag patterns/The same tag alias can only be registered once" duration="{duration}"/> <testCase name="Tag alias can be registered against tag patterns/Tag aliases must be of the form [@name]" duration="{duration}"/> <testCase name="Tags with spaces and non-alphanumerical characters are accepted" duration="{duration}"/> @@ -330,7 +364,7 @@ FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A METHOD_AS_TEST_CASE based test run that succeeds" duration="{duration}"/> @@ -340,7 +374,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" duration="{duration}"> @@ -349,7 +383,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" duration="{duration}"> @@ -358,7 +392,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" duration="{duration}"> @@ -367,7 +401,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" duration="{duration}"/> @@ -380,7 +414,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" duration="{duration}"> @@ -389,7 +423,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" duration="{duration}"> @@ -398,7 +432,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" duration="{duration}"> @@ -407,7 +441,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" duration="{duration}"/> @@ -420,7 +454,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" duration="{duration}"> @@ -429,7 +463,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0f == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" duration="{duration}"> @@ -438,7 +472,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" duration="{duration}"/> @@ -450,7 +484,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 1 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" duration="{duration}"> @@ -459,7 +493,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 3 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" duration="{duration}"> @@ -468,7 +502,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 6 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" duration="{duration}"/> @@ -480,7 +514,7 @@ FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEST_CASE_METHOD based test run that succeeds" duration="{duration}"/> @@ -508,52 +542,52 @@ Class.tests.cpp:<line number> <failure message="CHECK(false != false)"> FAILED: CHECK( false != false ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(true != true)"> FAILED: CHECK( true != true ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!true)"> FAILED: CHECK( !true ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(true))"> FAILED: CHECK_FALSE( true ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!trueValue)"> FAILED: CHECK( !trueValue ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(trueValue))"> FAILED: CHECK_FALSE( trueValue ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!(1 == 1))"> FAILED: CHECK( !(1 == 1) ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(1 == 1))"> FAILED: CHECK_FALSE( 1 == 1 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testCase> <testCase name="'Not' checks that should succeed" duration="{duration}"/> @@ -566,91 +600,91 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.int_seven == 8)"> FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.int_seven == 0)"> FAILED: CHECK( data.int_seven == 0 ) with expansion: 7 == 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 9.11f ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.11f ) ) with expansion: 9.1f == Approx( 9.1099996567 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 9.0f ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: 9.1f == Approx( 9.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 1 ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: 9.1f == Approx( 1.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 0 ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: 9.1f == Approx( 0.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.double_pi == Approx( 3.1415 ))"> FAILED: CHECK( data.double_pi == Approx( 3.1415 ) ) with expansion: 3.1415926535 == Approx( 3.1415 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "goodbye")"> FAILED: CHECK( data.str_hello == "goodbye" ) with expansion: "hello" == "goodbye" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "hell")"> FAILED: CHECK( data.str_hello == "hell" ) with expansion: "hello" == "hell" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "hello1")"> FAILED: CHECK( data.str_hello == "hello1" ) with expansion: "hello" == "hello1" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello.size() == 6)"> FAILED: CHECK( data.str_hello.size() == 6 ) with expansion: 5 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(x == Approx( 1.301 ))"> FAILED: CHECK( x == Approx( 1.301 ) ) with expansion: 1.3 == Approx( 1.301 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Equality checks that should succeed" duration="{duration}"/> @@ -660,60 +694,60 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one != Approx( 9.1f ))"> FAILED: CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: 9.1f != Approx( 9.1000003815 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.double_pi != Approx( 3.1415926535 ))"> FAILED: CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: 3.1415926535 != Approx( 3.1415926535 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello != "hello")"> FAILED: CHECK( data.str_hello != "hello" ) with expansion: "hello" != "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello.size() != 5)"> FAILED: CHECK( data.str_hello.size() != 5 ) with expansion: 5 != 5 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Inequality checks that should succeed" duration="{duration}"/> <testCase name="Mayfail test case with nested sections/1/A" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/2/A" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/1/B" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/2/B" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Ordering comparison checks that should fail" duration="{duration}"> @@ -722,133 +756,133 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 7)"> FAILED: CHECK( data.int_seven < 7 ) with expansion: 7 < 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven > 8)"> FAILED: CHECK( data.int_seven > 8 ) with expansion: 7 > 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 6)"> FAILED: CHECK( data.int_seven < 6 ) with expansion: 7 < 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 0)"> FAILED: CHECK( data.int_seven < 0 ) with expansion: 7 < 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < -1)"> FAILED: CHECK( data.int_seven < -1 ) with expansion: 7 < -1 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven >= 8)"> FAILED: CHECK( data.int_seven >= 8 ) with expansion: 7 >= 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven <= 6)"> FAILED: CHECK( data.int_seven <= 6 ) with expansion: 7 <= 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one < 9)"> FAILED: CHECK( data.float_nine_point_one < 9 ) with expansion: 9.1f < 9 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one > 10)"> FAILED: CHECK( data.float_nine_point_one > 10 ) with expansion: 9.1f > 10 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one > 9.2)"> FAILED: CHECK( data.float_nine_point_one > 9.2 ) with expansion: 9.1f > 9.2 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "hello")"> FAILED: CHECK( data.str_hello > "hello" ) with expansion: "hello" > "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "hello")"> FAILED: CHECK( data.str_hello < "hello" ) with expansion: "hello" < "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "hellp")"> FAILED: CHECK( data.str_hello > "hellp" ) with expansion: "hello" > "hellp" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "z")"> FAILED: CHECK( data.str_hello > "z" ) with expansion: "hello" > "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "hellm")"> FAILED: CHECK( data.str_hello < "hellm" ) with expansion: "hello" < "hellm" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "a")"> FAILED: CHECK( data.str_hello < "a" ) with expansion: "hello" < "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello >= "z")"> FAILED: CHECK( data.str_hello >= "z" ) with expansion: "hello" >= "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello <= "a")"> FAILED: CHECK( data.str_hello <= "a" ) with expansion: "hello" <= "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testCase> <testCase name="Ordering comparison checks that should succeed" duration="{duration}"/> @@ -863,7 +897,7 @@ FAILED: CHECK( truthy(false) ) with expansion: Hey, its truthy! -Decomposition.tests.cpp:<line number> +at Decomposition.tests.cpp:<line number> </failure> </testCase> </file> @@ -881,7 +915,7 @@ Decomposition.tests.cpp:<line number> FAILED: expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </skipped> </testCase> <testCase name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" duration="{duration}"> @@ -890,7 +924,7 @@ FAILED: REQUIRE_NOTHROW( thisThrows() ) expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </skipped> </testCase> <testCase name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" duration="{duration}"/> @@ -899,7 +933,7 @@ Exception.tests.cpp:<line number> FAILED: {Unknown expression after the reported line} unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom exceptions can be translated when testing for nothrow" duration="{duration}"> @@ -907,7 +941,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_NOTHROW( throwCustom() ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom exceptions can be translated when testing for throwing as something else" duration="{duration}"> @@ -915,14 +949,14 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_THROWS_AS( throwCustom(), std::exception ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom std-exceptions can be custom translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: custom std exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Exception messages can be tested for/exact match" duration="{duration}"/> @@ -933,18 +967,18 @@ Exception.tests.cpp:<line number> FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> <failure message="CHECK_THROWS_AS(thisDoesntThrow(), std::domain_error)"> FAILED: CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> <error message="CHECK_NOTHROW(thisThrows())"> FAILED: CHECK_NOTHROW( thisThrows() ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Mismatching exception messages failing the test" duration="{duration}"> @@ -953,28 +987,28 @@ FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: "expected exception" equals: "should fail" -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> </testCase> <testCase name="Non-std exceptions can be translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: custom exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Thrown string literals are translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: For some reason someone is throwing a string literal! -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Unexpected exceptions can be translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: 3.14 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When checked exceptions are thrown they can be expected or unexpected" duration="{duration}"/> @@ -982,7 +1016,7 @@ Exception.tests.cpp:<line number> <error message="TEST_CASE()"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown during a CHECK the test should continue" duration="{duration}"> @@ -990,7 +1024,7 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" duration="{duration}"> @@ -998,7 +1032,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown from functions they are always failures" duration="{duration}"> @@ -1006,31 +1040,39 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown from sections they are always failures/section name" duration="{duration}"> <error message="TEST_CASE()"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="thrown std::strings are translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: Why would you throw a std::string? -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> </file> <file path="tests/<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="#2615 - Throwing in constructor generator fails test case but does not abort" duration="{duration}"> + <skipped message="TEST_CASE()"> +FAILED: +failure to init +at Generators.tests.cpp:<line number> + </skipped> + </testCase> <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}"/> <testCase name="Copy and then generate a range/Final validation" duration="{duration}"/> + <testCase name="GENERATE can combine literals and generators" duration="{duration}"/> <testCase name="Generators -- adapters/Filtering by predicate/Basic usage" duration="{duration}"/> <testCase name="Generators -- adapters/Filtering by predicate/Throws if there are no matching values" duration="{duration}"/> <testCase name="Generators -- adapters/Shortening a range" duration="{duration}"/> @@ -1070,14 +1112,14 @@ FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), ContainsSubstring( "STRING" ))"> FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) with expansion: "this string contains 'abc' as a substring" contains: "STRING" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="EndsWith string matcher" duration="{duration}"> @@ -1086,14 +1128,14 @@ FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Equals" duration="{duration}"/> @@ -1103,26 +1145,26 @@ FAILED: CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that fail/No exception" duration="{duration}"> <failure message="CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 })"> FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that fail/Type mismatch" duration="{duration}"> @@ -1130,13 +1172,13 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> <error message="REQUIRE_THROWS_MATCHES(throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> </testCase> <testCase name="Exception matchers that fail/Contents are wrong" duration="{duration}"> @@ -1145,17 +1187,18 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="REQUIRE_THROWS_MATCHES(throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that succeed" duration="{duration}"/> + <testCase name="Exception message can be matched" duration="{duration}"/> <testCase name="Exceptions matchers" duration="{duration}"/> <testCase name="Floating point matchers: double/Relative" duration="{duration}"/> <testCase name="Floating point matchers: double/Relative/Some subnormal values" duration="{duration}"/> @@ -1163,12 +1206,14 @@ Matchers.tests.cpp:<line number> <testCase name="Floating point matchers: double/ULPs" duration="{duration}"/> <testCase name="Floating point matchers: double/Composed" duration="{duration}"/> <testCase name="Floating point matchers: double/Constructor validation" duration="{duration}"/> + <testCase name="Floating point matchers: double/IsNaN" duration="{duration}"/> <testCase name="Floating point matchers: float/Relative" duration="{duration}"/> <testCase name="Floating point matchers: float/Relative/Some subnormal values" duration="{duration}"/> <testCase name="Floating point matchers: float/Margin" duration="{duration}"/> <testCase name="Floating point matchers: float/ULPs" duration="{duration}"/> <testCase name="Floating point matchers: float/Composed" duration="{duration}"/> <testCase name="Floating point matchers: float/Constructor validation" duration="{duration}"/> + <testCase name="Floating point matchers: float/IsNaN" duration="{duration}"/> <testCase name="Matchers can be (AllOf) composed with the && operator" duration="{duration}"/> <testCase name="Matchers can be (AnyOf) composed with the || operator" duration="{duration}"/> <testCase name="Matchers can be composed with both && and ||" duration="{duration}"/> @@ -1178,7 +1223,7 @@ FAILED: CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) with expansion: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Matchers can be negated (Not) with the ! operator" duration="{duration}"/> @@ -1188,7 +1233,7 @@ FAILED: CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) with expansion: "this string contains 'abc' as a substring" not contains: "substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Overloaded comma or address-of operators are not used" duration="{duration}"/> @@ -1199,21 +1244,21 @@ FAILED: CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Matches( "contains 'abc' as a substring" ))"> FAILED: CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Matches( "this string contains 'abc' as a" ))"> FAILED: CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) with expansion: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Regression test #1" duration="{duration}"/> @@ -1223,14 +1268,14 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="String matchers" duration="{duration}"/> @@ -1244,7 +1289,7 @@ FAILED: CHECK_THAT( empty, Approx( t1 ) ) with expansion: { } is approx: { 1.0, 2.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector Approx matcher -- failing/Just different vectors" duration="{duration}"> @@ -1253,7 +1298,7 @@ FAILED: CHECK_THAT( v1, Approx( v2 ) ) with expansion: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers/Contains (element)" duration="{duration}"/> @@ -1267,14 +1312,14 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, VectorContains( 1 ))"> FAILED: CHECK_THAT( empty, VectorContains( 1 ) ) with expansion: { } Contains: 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/Contains (vector)" duration="{duration}"> @@ -1283,14 +1328,14 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v, Contains( v2 ))"> FAILED: CHECK_THAT( v, Contains( v2 ) ) with expansion: { 1, 2, 3 } Contains: { 1, 2, 4 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/Equals" duration="{duration}"> @@ -1299,28 +1344,28 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v2, Equals( v ))"> FAILED: CHECK_THAT( v2, Equals( v ) ) with expansion: { 1, 2 } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, Equals( v ))"> FAILED: CHECK_THAT( empty, Equals( v ) ) with expansion: { } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v, Equals( empty ))"> FAILED: CHECK_THAT( v, Equals( empty ) ) with expansion: { 1, 2, 3 } Equals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/UnorderedEquals" duration="{duration}"> @@ -1329,28 +1374,28 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, UnorderedEquals( v ))"> FAILED: CHECK_THAT( empty, UnorderedEquals( v ) ) with expansion: { } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(permuted, UnorderedEquals( v ))"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 1, 3 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(permuted, UnorderedEquals( v ))"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 3, 1 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> </file> @@ -1364,16 +1409,24 @@ Matchers.tests.cpp:<line number> <testCase name="Basic use of the Empty range matcher/Simple, std-provided containers" duration="{duration}"/> <testCase name="Basic use of the Empty range matcher/Type with empty" duration="{duration}"/> <testCase name="Basic use of the Empty range matcher/Type requires ADL found empty free function" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types (differ in array N)" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types and value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers, one random access, one not" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Value type/Two equal containers of different value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Value type/Two non-equal containers of different value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Ranges with begin that needs ADL" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Basic usage" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Type requires ADL found begin and end" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/> - <testCase name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" duration="{duration}"/> + <testCase name="Usage of AllTrue range matcher/Basic usage/One false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/> - <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" duration="{duration}"/> + <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> @@ -1383,10 +1436,10 @@ Matchers.tests.cpp:<line number> <testCase name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" duration="{duration}"/> - <testCase name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" duration="{duration}"/> + <testCase name="Usage of AnyTrue range matcher/Basic usage/One true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/> - <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" duration="{duration}"/> + <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> @@ -1396,13 +1449,33 @@ Matchers.tests.cpp:<line number> <testCase name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/> - <testCase name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" duration="{duration}"/> + <testCase name="Usage of NoneTrue range matcher/Basic usage/One true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" duration="{duration}"/> - <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" duration="{duration}"/> + <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Some with stdlib containers" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Type requires ADL found size free function" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Type has size member" duration="{duration}"/> @@ -1416,20 +1489,29 @@ Matchers.tests.cpp:<line number> <failure message="FAIL()"> FAILED: This is a failure -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="FAIL does not require an argument" duration="{duration}"> <failure message="FAIL()"> FAILED: -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="FAIL_CHECK does not abort the test" duration="{duration}"> <failure message="FAIL_CHECK()"> FAILED: This is a failure -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> + </failure> + </testCase> + <testCase name="INFO and UNSCOPED_INFO can stream multiple arguments" duration="{duration}"> + <failure message="FAIL()"> +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO and WARN do not abort tests" duration="{duration}"/> @@ -1441,7 +1523,7 @@ with expansion: 2 == 1 this message should be logged so should this -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO gets logged on failure, even if captured before successful assertions" duration="{duration}"> @@ -1452,7 +1534,7 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="CHECK(a == 0)"> FAILED: @@ -1462,7 +1544,7 @@ with expansion: this message may be logged later this message should be logged and this, but later -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO is reset for each loop" duration="{duration}"> @@ -1473,21 +1555,21 @@ with expansion: 10 < 10 current counter 10 i := 10 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Output from all sections is reported/one" duration="{duration}"> <failure message="FAIL()"> FAILED: Message from section one -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Output from all sections is reported/two" duration="{duration}"> <failure message="FAIL()"> FAILED: Message from section two -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="SUCCEED counts as a test pass" duration="{duration}"/> @@ -1498,14 +1580,14 @@ Message.tests.cpp:<line number> <failure message="FAIL()"> FAILED: Previous info should not be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="just failure after unscoped info" duration="{duration}"> <failure message="FAIL()"> FAILED: previous unscoped info SHOULD not be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="mix info, unscoped info and warning" duration="{duration}"/> @@ -1514,7 +1596,7 @@ Message.tests.cpp:<line number> FAILED: REQUIRE( false ) this SHOULD be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="print unscoped info if passing unscoped info is printed" duration="{duration}"/> @@ -1524,7 +1606,7 @@ FAILED: REQUIRE( false ) this SHOULD be seen this SHOULD also be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="prints unscoped info only for the first assertion" duration="{duration}"> @@ -1532,7 +1614,7 @@ Message.tests.cpp:<line number> FAILED: CHECK( false ) this SHOULD be seen only ONCE -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="sends information to INFO" duration="{duration}"> @@ -1541,7 +1623,7 @@ FAILED: REQUIRE( false ) hi i := 7 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="stacks unscoped info in loops" duration="{duration}"> @@ -1552,7 +1634,7 @@ Count 1 to 3... 1 2 3 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="CHECK(false)"> FAILED: @@ -1561,7 +1643,7 @@ Count 4 to 6... 4 5 6 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> </file> @@ -1577,7 +1659,7 @@ FAILED: CHECK( f() == 0 ) with expansion: 1 == 0 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="#961 -- Dynamically created sections should all be reported/Looped section 0" duration="{duration}"/> @@ -1597,7 +1679,7 @@ Misc.tests.cpp:<line number> <failure message="FAIL()"> FAILED: to infinity and beyond -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="A couple of nested sections followed by a failure/Outer/Inner" duration="{duration}"/> @@ -1621,7 +1703,7 @@ with expansion: $a = 20; } " -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" duration="{duration}"/> @@ -1683,13 +1765,29 @@ Misc.tests.cpp:<line number> <testCase name="Testing checked-if 2" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="Testing checked-if 3" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="Testing checked-if 4" duration="{duration}"> + <skipped message="({Unknown expression after the reported line})"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="Testing checked-if 5" duration="{duration}"> + <skipped message="({Unknown expression after the reported line})"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="This test 'should' fail but doesn't" duration="{duration}"/> @@ -1700,7 +1798,7 @@ FAILED: REQUIRE( testCheckedElse( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="checkedIf" duration="{duration}"/> @@ -1710,7 +1808,7 @@ FAILED: REQUIRE( testCheckedIf( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="even more nested SECTION tests/c/d (leaf)" duration="{duration}"/> @@ -1723,7 +1821,7 @@ FAILED: CHECK( b > a ) with expansion: 0 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="looped SECTION tests/b is currently: 1" duration="{duration}"> @@ -1732,7 +1830,7 @@ FAILED: CHECK( b > a ) with expansion: 1 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="looped SECTION tests/b is currently: 2" duration="{duration}"/> @@ -1750,7 +1848,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1758,7 +1856,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[1] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1766,7 +1864,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[3] (3) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1774,7 +1872,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[4] (5) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1782,7 +1880,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[6] (13) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1790,7 +1888,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[7] (21) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="more nested SECTION tests/equal/doesn't equal" duration="{duration}"> @@ -1799,7 +1897,7 @@ FAILED: REQUIRE( a == b ) with expansion: 1 == 2 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="more nested SECTION tests/doesn't equal/not equal" duration="{duration}"/> @@ -1815,7 +1913,7 @@ Misc.tests.cpp:<line number> FAILED: REQUIRE( false ) 3 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="toString on const wchar_t const pointer returns the string contents" duration="{duration}"/> @@ -1831,6 +1929,102 @@ Misc.tests.cpp:<line number> <testCase 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>" duration="{duration}"/> <testCase name="xmlentitycheck/encoded chars: these should all be encoded: &&&"""<<<&"<<&"" duration="{duration}"/> </file> + <file path="tests/<exe-name>/UsageTests/Skip.tests.cpp"> + <testCase name="Empty generators can SKIP in constructor" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +This generator is empty +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="a succeeding test can still be skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="dynamic skipping works with generators" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failed assertions before SKIP cause test case to fail" duration="{duration}"> + <skipped message="CHECK(3 == 4)"> +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing for some generator values causes entire test case to fail" duration="{duration}"> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing in some unskipped sections causes entire test case to fail/skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing in some unskipped sections causes entire test case to fail/not skipped" duration="{duration}"> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="nested sections can be skipped dynamically at runtime/B2/B" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="nested sections can be skipped dynamically at runtime/B" duration="{duration}"/> + <testCase name="sections can be skipped dynamically at runtime/not skipped" duration="{duration}"/> + <testCase name="sections can be skipped dynamically at runtime/skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="sections can be skipped dynamically at runtime/also not skipped" duration="{duration}"/> + <testCase name="skipped tests can optionally provide a reason" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="tests can be skipped dynamically at runtime" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + </file> <file path="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp"> <testCase name="Stringifying std::chrono::duration helpers" duration="{duration}"/> <testCase name="Stringifying std::chrono::duration with weird ratios" duration="{duration}"/> @@ -1892,7 +2086,7 @@ Misc.tests.cpp:<line number> <failure message="FAIL()"> FAILED: 1514 -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testCase> <testCase name="(unimplemented) static bools can be evaluated/compare to true" duration="{duration}"/> @@ -1906,14 +2100,14 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x<hex digits> == 0x<hex digits> -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <failure message="CHECK(o1 == o2)"> FAILED: CHECK( o1 == o2 ) with expansion: {?} == {?} -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testCase> <testCase name="An expression with side-effects should only be evaluated once" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index 8025e455..c9d3d205 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -1,6 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- filters='"*" ~[!nonportable] ~[!benchmark] ~[approvals]' rng-seed=1 --> <testExecutions version="1"> + <file path="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp"> + <testCase name="Incomplete AssertionHandler" duration="{duration}"> + <skipped message="REQUIRE(Dummy)"> +FAILED: + REQUIRE( Dummy ) +Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE +at AssertionHandler.tests.cpp:<line number> + </skipped> + </testCase> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp"> <testCase name="Clara::Arg supports single-arg parse the way Opt does" duration="{duration}"/> <testCase name="Clara::Opt supports accept-many lambdas/Parsing fails on multiple options without accept_many" duration="{duration}"/> @@ -70,6 +80,7 @@ <testCase name="convertToBits" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp"> + <testCase name="Filter generator throws exception for empty generator" duration="{duration}"/> <testCase name="Generators internals/Single value" duration="{duration}"/> <testCase name="Generators internals/Preset values" duration="{duration}"/> <testCase name="Generators internals/Generator combinator" duration="{duration}"/> @@ -118,6 +129,26 @@ <testCase name="warmup" duration="{duration}"/> <testCase name="weighted_average_quantile" duration="{duration}"/> </file> + <file path="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp"> + <testCase name="JsonWriter/Newly constructed JsonWriter does nothing" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeObject will create an empty pair of braces" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeObject with key will create an object to write the value" duration="{duration}"/> + <testCase name="JsonWriter/nesting objects" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeArray will create an empty pair of braces" duration="{duration}"/> + <testCase name="JsonWriter/Calling writeArray creates array to write the values to" duration="{duration}"/> + <testCase name="JsonWriter/Moved from JsonObjectWriter shall not insert superfluous brace" duration="{duration}"/> + <testCase name="JsonWriter/Moved from JsonArrayWriter shall not insert superfluous bracket" duration="{duration}"/> + <testCase name="JsonWriter/Custom class shall be quoted" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Quote in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Backslash in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Forward slash in a string is **not** escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Backspace in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/Formfeed in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/linefeed in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/carriage return in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/tab in a string is escaped" duration="{duration}"/> + <testCase name="JsonWriter escapes charaters in strings properly/combination of characters is escaped" duration="{duration}"/> + </file> <file path="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp"> <testCase name="Parse uints/proper inputs" duration="{duration}"/> <testCase name="Parse uints/Bad inputs" duration="{duration}"/> @@ -149,6 +180,7 @@ <testCase name="Our PCG implementation provides expected results for known seeds/Specific seed" duration="{duration}"/> <testCase name="Random seed generation accepts known methods" duration="{duration}"/> <testCase name="Random seed generation reports unknown methods" duration="{duration}"/> + <testCase name="uniform_integer_distribution can return the bounds" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp"> <testCase name="Multireporter calls reporters and listeners in correct order" duration="{duration}"/> @@ -166,6 +198,9 @@ <testCase name="Reporter's write listings to provided stream/console reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/console reporter lists reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/console reporter lists tests" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists tags" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists reporters" duration="{duration}"/> + <testCase name="Reporter's write listings to provided stream/JSON reporter lists tests" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists tags" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists reporters" duration="{duration}"/> <testCase name="Reporter's write listings to provided stream/JUnit reporter lists tests" duration="{duration}"/> @@ -231,7 +266,6 @@ <testCase name="startsWith" duration="{duration}"/> </file> <file path="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp"> - <testCase name="Empty tag is not allowed" duration="{duration}"/> <testCase name="Tag alias can be registered against tag patterns/The same tag alias can only be registered once" duration="{duration}"/> <testCase name="Tag alias can be registered against tag patterns/Tag aliases must be of the form [@name]" duration="{duration}"/> <testCase name="Tags with spaces and non-alphanumerical characters are accepted" duration="{duration}"/> @@ -329,7 +363,7 @@ FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A METHOD_AS_TEST_CASE based test run that succeeds" duration="{duration}"/> @@ -339,7 +373,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" duration="{duration}"> @@ -348,7 +382,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" duration="{duration}"> @@ -357,7 +391,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" duration="{duration}"> @@ -366,7 +400,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 ) with expansion: 0 == 1 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" duration="{duration}"/> @@ -379,7 +413,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" duration="{duration}"> @@ -388,7 +422,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" duration="{duration}"> @@ -397,7 +431,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 6 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" duration="{duration}"> @@ -406,7 +440,7 @@ FAILED: REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 ) with expansion: 2 < 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" duration="{duration}"/> @@ -419,7 +453,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" duration="{duration}"> @@ -428,7 +462,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1.0f == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" duration="{duration}"> @@ -437,7 +471,7 @@ FAILED: REQUIRE( Template_Fixture<TestType>::m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" duration="{duration}"/> @@ -449,7 +483,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 1 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" duration="{duration}"> @@ -458,7 +492,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 3 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" duration="{duration}"> @@ -467,7 +501,7 @@ FAILED: REQUIRE( Nttp_Fixture<V>::value == 0 ) with expansion: 6 == 0 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" duration="{duration}"/> @@ -479,7 +513,7 @@ FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -Class.tests.cpp:<line number> +at Class.tests.cpp:<line number> </failure> </testCase> <testCase name="A TEST_CASE_METHOD based test run that succeeds" duration="{duration}"/> @@ -507,52 +541,52 @@ Class.tests.cpp:<line number> <failure message="CHECK(false != false)"> FAILED: CHECK( false != false ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(true != true)"> FAILED: CHECK( true != true ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!true)"> FAILED: CHECK( !true ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(true))"> FAILED: CHECK_FALSE( true ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!trueValue)"> FAILED: CHECK( !trueValue ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(trueValue))"> FAILED: CHECK_FALSE( trueValue ) with expansion: !true -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(!(1 == 1))"> FAILED: CHECK( !(1 == 1) ) with expansion: false -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK_FALSE(!(1 == 1))"> FAILED: CHECK_FALSE( 1 == 1 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testCase> <testCase name="'Not' checks that should succeed" duration="{duration}"/> @@ -565,91 +599,91 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.int_seven == 8)"> FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.int_seven == 0)"> FAILED: CHECK( data.int_seven == 0 ) with expansion: 7 == 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 9.11f ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.11f ) ) with expansion: 9.1f == Approx( 9.1099996567 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 9.0f ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: 9.1f == Approx( 9.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 1 ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: 9.1f == Approx( 1.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one == Approx( 0 ))"> FAILED: CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: 9.1f == Approx( 0.0 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.double_pi == Approx( 3.1415 ))"> FAILED: CHECK( data.double_pi == Approx( 3.1415 ) ) with expansion: 3.1415926535 == Approx( 3.1415 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "goodbye")"> FAILED: CHECK( data.str_hello == "goodbye" ) with expansion: "hello" == "goodbye" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "hell")"> FAILED: CHECK( data.str_hello == "hell" ) with expansion: "hello" == "hell" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello == "hello1")"> FAILED: CHECK( data.str_hello == "hello1" ) with expansion: "hello" == "hello1" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello.size() == 6)"> FAILED: CHECK( data.str_hello.size() == 6 ) with expansion: 5 == 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(x == Approx( 1.301 ))"> FAILED: CHECK( x == Approx( 1.301 ) ) with expansion: 1.3 == Approx( 1.301 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Equality checks that should succeed" duration="{duration}"/> @@ -659,60 +693,60 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.float_nine_point_one != Approx( 9.1f ))"> FAILED: CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: 9.1f != Approx( 9.1000003815 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.double_pi != Approx( 3.1415926535 ))"> FAILED: CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: 3.1415926535 != Approx( 3.1415926535 ) -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello != "hello")"> FAILED: CHECK( data.str_hello != "hello" ) with expansion: "hello" != "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> <skipped message="CHECK(data.str_hello.size() != 5)"> FAILED: CHECK( data.str_hello.size() != 5 ) with expansion: 5 != 5 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Inequality checks that should succeed" duration="{duration}"/> <testCase name="Mayfail test case with nested sections/1/A" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/2/A" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/1/B" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Mayfail test case with nested sections/2/B" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </skipped> </testCase> <testCase name="Ordering comparison checks that should fail" duration="{duration}"> @@ -721,133 +755,133 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 7)"> FAILED: CHECK( data.int_seven < 7 ) with expansion: 7 < 7 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven > 8)"> FAILED: CHECK( data.int_seven > 8 ) with expansion: 7 > 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 6)"> FAILED: CHECK( data.int_seven < 6 ) with expansion: 7 < 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < 0)"> FAILED: CHECK( data.int_seven < 0 ) with expansion: 7 < 0 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven < -1)"> FAILED: CHECK( data.int_seven < -1 ) with expansion: 7 < -1 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven >= 8)"> FAILED: CHECK( data.int_seven >= 8 ) with expansion: 7 >= 8 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.int_seven <= 6)"> FAILED: CHECK( data.int_seven <= 6 ) with expansion: 7 <= 6 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one < 9)"> FAILED: CHECK( data.float_nine_point_one < 9 ) with expansion: 9.1f < 9 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one > 10)"> FAILED: CHECK( data.float_nine_point_one > 10 ) with expansion: 9.1f > 10 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.float_nine_point_one > 9.2)"> FAILED: CHECK( data.float_nine_point_one > 9.2 ) with expansion: 9.1f > 9.2 -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "hello")"> FAILED: CHECK( data.str_hello > "hello" ) with expansion: "hello" > "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "hello")"> FAILED: CHECK( data.str_hello < "hello" ) with expansion: "hello" < "hello" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "hellp")"> FAILED: CHECK( data.str_hello > "hellp" ) with expansion: "hello" > "hellp" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello > "z")"> FAILED: CHECK( data.str_hello > "z" ) with expansion: "hello" > "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "hellm")"> FAILED: CHECK( data.str_hello < "hellm" ) with expansion: "hello" < "hellm" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello < "a")"> FAILED: CHECK( data.str_hello < "a" ) with expansion: "hello" < "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello >= "z")"> FAILED: CHECK( data.str_hello >= "z" ) with expansion: "hello" >= "z" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> <failure message="CHECK(data.str_hello <= "a")"> FAILED: CHECK( data.str_hello <= "a" ) with expansion: "hello" <= "a" -Condition.tests.cpp:<line number> +at Condition.tests.cpp:<line number> </failure> </testCase> <testCase name="Ordering comparison checks that should succeed" duration="{duration}"/> @@ -862,7 +896,7 @@ FAILED: CHECK( truthy(false) ) with expansion: Hey, its truthy! -Decomposition.tests.cpp:<line number> +at Decomposition.tests.cpp:<line number> </failure> </testCase> </file> @@ -880,7 +914,7 @@ Decomposition.tests.cpp:<line number> FAILED: expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </skipped> </testCase> <testCase name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" duration="{duration}"> @@ -889,7 +923,7 @@ FAILED: REQUIRE_NOTHROW( thisThrows() ) expected exception answer := 42 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </skipped> </testCase> <testCase name="#748 - captures with unexpected exceptions/inside REQUIRE_THROWS" duration="{duration}"/> @@ -898,7 +932,7 @@ Exception.tests.cpp:<line number> FAILED: {Unknown expression after the reported line} unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom exceptions can be translated when testing for nothrow" duration="{duration}"> @@ -906,7 +940,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_NOTHROW( throwCustom() ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom exceptions can be translated when testing for throwing as something else" duration="{duration}"> @@ -914,14 +948,14 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE_THROWS_AS( throwCustom(), std::exception ) custom exception - not std -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Custom std-exceptions can be custom translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: custom std exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Exception messages can be tested for/exact match" duration="{duration}"/> @@ -932,18 +966,18 @@ Exception.tests.cpp:<line number> FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> <failure message="CHECK_THROWS_AS(thisDoesntThrow(), std::domain_error)"> FAILED: CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> <error message="CHECK_NOTHROW(thisThrows())"> FAILED: CHECK_NOTHROW( thisThrows() ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Mismatching exception messages failing the test" duration="{duration}"> @@ -952,28 +986,28 @@ FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: "expected exception" equals: "should fail" -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </failure> </testCase> <testCase name="Non-std exceptions can be translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: custom exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Thrown string literals are translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: For some reason someone is throwing a string literal! -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="Unexpected exceptions can be translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: 3.14 -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When checked exceptions are thrown they can be expected or unexpected" duration="{duration}"/> @@ -981,7 +1015,7 @@ Exception.tests.cpp:<line number> <error message="TEST_CASE()"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown during a CHECK the test should continue" duration="{duration}"> @@ -989,7 +1023,7 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" duration="{duration}"> @@ -997,7 +1031,7 @@ Exception.tests.cpp:<line number> FAILED: REQUIRE( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown from functions they are always failures" duration="{duration}"> @@ -1005,31 +1039,39 @@ Exception.tests.cpp:<line number> FAILED: CHECK( thisThrows() == 0 ) expected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="When unchecked exceptions are thrown from sections they are always failures/section name" duration="{duration}"> <error message="TEST_CASE()"> FAILED: unexpected exception -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> <testCase name="thrown std::strings are translated" duration="{duration}"> <error message="TEST_CASE()"> FAILED: Why would you throw a std::string? -Exception.tests.cpp:<line number> +at Exception.tests.cpp:<line number> </error> </testCase> </file> <file path="tests/<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="#2615 - Throwing in constructor generator fails test case but does not abort" duration="{duration}"> + <skipped message="TEST_CASE()"> +FAILED: +failure to init +at Generators.tests.cpp:<line number> + </skipped> + </testCase> <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}"/> <testCase name="Copy and then generate a range/Final validation" duration="{duration}"/> + <testCase name="GENERATE can combine literals and generators" duration="{duration}"/> <testCase name="Generators -- adapters/Filtering by predicate/Basic usage" duration="{duration}"/> <testCase name="Generators -- adapters/Filtering by predicate/Throws if there are no matching values" duration="{duration}"/> <testCase name="Generators -- adapters/Shortening a range" duration="{duration}"/> @@ -1069,14 +1111,14 @@ FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), ContainsSubstring( "STRING" ))"> FAILED: CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) with expansion: "this string contains 'abc' as a substring" contains: "STRING" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="EndsWith string matcher" duration="{duration}"> @@ -1085,14 +1127,14 @@ FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" ends with: "this" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Equals" duration="{duration}"/> @@ -1102,26 +1144,26 @@ FAILED: CHECK_THAT( testStringForMatching(), Equals( "this string contains 'ABC' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" equals: "something else" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that fail/No exception" duration="{duration}"> <failure message="CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 })"> FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that fail/Type mismatch" duration="{duration}"> @@ -1129,13 +1171,13 @@ Matchers.tests.cpp:<line number> FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> <error message="REQUIRE_THROWS_MATCHES(throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </error> </testCase> <testCase name="Exception matchers that fail/Contents are wrong" duration="{duration}"> @@ -1144,17 +1186,18 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="REQUIRE_THROWS_MATCHES(throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 })"> FAILED: REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Exception matchers that succeed" duration="{duration}"/> + <testCase name="Exception message can be matched" duration="{duration}"/> <testCase name="Exceptions matchers" duration="{duration}"/> <testCase name="Floating point matchers: double/Relative" duration="{duration}"/> <testCase name="Floating point matchers: double/Relative/Some subnormal values" duration="{duration}"/> @@ -1162,12 +1205,14 @@ Matchers.tests.cpp:<line number> <testCase name="Floating point matchers: double/ULPs" duration="{duration}"/> <testCase name="Floating point matchers: double/Composed" duration="{duration}"/> <testCase name="Floating point matchers: double/Constructor validation" duration="{duration}"/> + <testCase name="Floating point matchers: double/IsNaN" duration="{duration}"/> <testCase name="Floating point matchers: float/Relative" duration="{duration}"/> <testCase name="Floating point matchers: float/Relative/Some subnormal values" duration="{duration}"/> <testCase name="Floating point matchers: float/Margin" duration="{duration}"/> <testCase name="Floating point matchers: float/ULPs" duration="{duration}"/> <testCase name="Floating point matchers: float/Composed" duration="{duration}"/> <testCase name="Floating point matchers: float/Constructor validation" duration="{duration}"/> + <testCase name="Floating point matchers: float/IsNaN" duration="{duration}"/> <testCase name="Matchers can be (AllOf) composed with the && operator" duration="{duration}"/> <testCase name="Matchers can be (AnyOf) composed with the || operator" duration="{duration}"/> <testCase name="Matchers can be composed with both && and ||" duration="{duration}"/> @@ -1177,7 +1222,7 @@ FAILED: CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) ) with expansion: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Matchers can be negated (Not) with the ! operator" duration="{duration}"/> @@ -1187,7 +1232,7 @@ FAILED: CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) ) with expansion: "this string contains 'abc' as a substring" not contains: "substring" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Overloaded comma or address-of operators are not used" duration="{duration}"/> @@ -1198,21 +1243,21 @@ FAILED: CHECK_THAT( testStringForMatching(), Matches( "this STRING contains 'abc' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Matches( "contains 'abc' as a substring" ))"> FAILED: CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" matches "contains 'abc' as a substring" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), Matches( "this string contains 'abc' as a" ))"> FAILED: CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) with expansion: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Regression test #1" duration="{duration}"/> @@ -1222,14 +1267,14 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ))"> FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) with expansion: "this string contains 'abc' as a substring" starts with: "string" (case insensitive) -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="String matchers" duration="{duration}"/> @@ -1243,7 +1288,7 @@ FAILED: CHECK_THAT( empty, Approx( t1 ) ) with expansion: { } is approx: { 1.0, 2.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector Approx matcher -- failing/Just different vectors" duration="{duration}"> @@ -1252,7 +1297,7 @@ FAILED: CHECK_THAT( v1, Approx( v2 ) ) with expansion: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers/Contains (element)" duration="{duration}"/> @@ -1266,14 +1311,14 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, VectorContains( 1 ))"> FAILED: CHECK_THAT( empty, VectorContains( 1 ) ) with expansion: { } Contains: 1 -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/Contains (vector)" duration="{duration}"> @@ -1282,14 +1327,14 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v, Contains( v2 ))"> FAILED: CHECK_THAT( v, Contains( v2 ) ) with expansion: { 1, 2, 3 } Contains: { 1, 2, 4 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/Equals" duration="{duration}"> @@ -1298,28 +1343,28 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v2, Equals( v ))"> FAILED: CHECK_THAT( v2, Equals( v ) ) with expansion: { 1, 2 } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, Equals( v ))"> FAILED: CHECK_THAT( empty, Equals( v ) ) with expansion: { } Equals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(v, Equals( empty ))"> FAILED: CHECK_THAT( v, Equals( empty ) ) with expansion: { 1, 2, 3 } Equals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> <testCase name="Vector matchers that fail/UnorderedEquals" duration="{duration}"> @@ -1328,28 +1373,28 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(empty, UnorderedEquals( v ))"> FAILED: CHECK_THAT( empty, UnorderedEquals( v ) ) with expansion: { } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(permuted, UnorderedEquals( v ))"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 1, 3 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> <failure message="CHECK_THAT(permuted, UnorderedEquals( v ))"> FAILED: CHECK_THAT( permuted, UnorderedEquals( v ) ) with expansion: { 3, 1 } UnorderedEquals: { 1, 2, 3 } -Matchers.tests.cpp:<line number> +at Matchers.tests.cpp:<line number> </failure> </testCase> </file> @@ -1363,16 +1408,24 @@ Matchers.tests.cpp:<line number> <testCase name="Basic use of the Empty range matcher/Simple, std-provided containers" duration="{duration}"/> <testCase name="Basic use of the Empty range matcher/Type with empty" duration="{duration}"/> <testCase name="Basic use of the Empty range matcher/Type requires ADL found empty free function" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types (differ in array N)" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers of different container types and value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Container conversions/Two equal containers, one random access, one not" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Value type/Two equal containers of different value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Value type/Two non-equal containers of different value types" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Ranges with begin that needs ADL" duration="{duration}"/> + <testCase name="Type conversions of RangeEquals and similar/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Basic usage" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Type requires ADL found begin and end" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AllMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/> - <testCase name="Usage of AllTrue range matcher/Basic usage/One false evalutes to false" duration="{duration}"/> + <testCase name="Usage of AllTrue range matcher/Basic usage/One false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/> - <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evalutes to false" duration="{duration}"/> + <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/One false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AllTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> @@ -1382,10 +1435,10 @@ Matchers.tests.cpp:<line number> <testCase name="Usage of AnyMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/All true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/Empty evaluates to false" duration="{duration}"/> - <testCase name="Usage of AnyTrue range matcher/Basic usage/One true evalutes to true" duration="{duration}"/> + <testCase name="Usage of AnyTrue range matcher/Basic usage/One true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Basic usage/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All true evaluates to true" duration="{duration}"/> - <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evalutes to true" duration="{duration}"/> + <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/One true evaluates to true" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Contained type is convertible to bool/All false evaluates to false" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of AnyTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> @@ -1395,13 +1448,33 @@ Matchers.tests.cpp:<line number> <testCase name="Usage of NoneMatch range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/All true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/Empty evaluates to true" duration="{duration}"/> - <testCase name="Usage of NoneTrue range matcher/Basic usage/One true evalutes to false" duration="{duration}"/> + <testCase name="Usage of NoneTrue range matcher/Basic usage/One true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Basic usage/All false evaluates to true" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All true evaluates to false" duration="{duration}"/> - <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evalutes to false" duration="{duration}"/> + <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/One true evaluates to false" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Contained type is convertible to bool/All false evaluates to true" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Shortcircuiting/All are read" duration="{duration}"/> <testCase name="Usage of NoneTrue range matcher/Shortcircuiting/Short-circuited" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" duration="{duration}"/> + <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal-sized, non-equal, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/> + <testCase name="Usage of UnorderedRangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Some with stdlib containers" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Type requires ADL found size free function" duration="{duration}"/> <testCase name="Usage of the SizeIs range matcher/Type has size member" duration="{duration}"/> @@ -1415,20 +1488,29 @@ Matchers.tests.cpp:<line number> <failure message="FAIL()"> FAILED: This is a failure -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="FAIL does not require an argument" duration="{duration}"> <failure message="FAIL()"> FAILED: -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="FAIL_CHECK does not abort the test" duration="{duration}"> <failure message="FAIL_CHECK()"> FAILED: This is a failure -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> + </failure> + </testCase> + <testCase name="INFO and UNSCOPED_INFO can stream multiple arguments" duration="{duration}"> + <failure message="FAIL()"> +FAILED: +Show infos! +This info has multiple parts. +This unscoped info has multiple parts. +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO and WARN do not abort tests" duration="{duration}"/> @@ -1440,7 +1522,7 @@ with expansion: 2 == 1 this message should be logged so should this -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO gets logged on failure, even if captured before successful assertions" duration="{duration}"> @@ -1451,7 +1533,7 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="CHECK(a == 0)"> FAILED: @@ -1461,7 +1543,7 @@ with expansion: this message may be logged later this message should be logged and this, but later -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="INFO is reset for each loop" duration="{duration}"> @@ -1472,21 +1554,21 @@ with expansion: 10 < 10 current counter 10 i := 10 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Output from all sections is reported/one" duration="{duration}"> <failure message="FAIL()"> FAILED: Message from section one -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="Output from all sections is reported/two" duration="{duration}"> <failure message="FAIL()"> FAILED: Message from section two -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="SUCCEED counts as a test pass" duration="{duration}"/> @@ -1497,14 +1579,14 @@ Message.tests.cpp:<line number> <failure message="FAIL()"> FAILED: Previous info should not be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="just failure after unscoped info" duration="{duration}"> <failure message="FAIL()"> FAILED: previous unscoped info SHOULD not be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="mix info, unscoped info and warning" duration="{duration}"/> @@ -1513,7 +1595,7 @@ Message.tests.cpp:<line number> FAILED: REQUIRE( false ) this SHOULD be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="print unscoped info if passing unscoped info is printed" duration="{duration}"/> @@ -1523,7 +1605,7 @@ FAILED: REQUIRE( false ) this SHOULD be seen this SHOULD also be seen -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="prints unscoped info only for the first assertion" duration="{duration}"> @@ -1531,7 +1613,7 @@ Message.tests.cpp:<line number> FAILED: CHECK( false ) this SHOULD be seen only ONCE -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="sends information to INFO" duration="{duration}"> @@ -1540,7 +1622,7 @@ FAILED: REQUIRE( false ) hi i := 7 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> <testCase name="stacks unscoped info in loops" duration="{duration}"> @@ -1551,7 +1633,7 @@ Count 1 to 3... 1 2 3 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> <failure message="CHECK(false)"> FAILED: @@ -1560,7 +1642,7 @@ Count 4 to 6... 4 5 6 -Message.tests.cpp:<line number> +at Message.tests.cpp:<line number> </failure> </testCase> </file> @@ -1576,7 +1658,7 @@ FAILED: CHECK( f() == 0 ) with expansion: 1 == 0 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="#961 -- Dynamically created sections should all be reported/Looped section 0" duration="{duration}"/> @@ -1596,7 +1678,7 @@ Misc.tests.cpp:<line number> <failure message="FAIL()"> FAILED: to infinity and beyond -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="A couple of nested sections followed by a failure/Outer/Inner" duration="{duration}"/> @@ -1620,7 +1702,7 @@ with expansion: $a = 20; } " -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" duration="{duration}"/> @@ -1682,13 +1764,29 @@ Misc.tests.cpp:<line number> <testCase name="Testing checked-if 2" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="Testing checked-if 3" duration="{duration}"> <skipped message="FAIL()"> FAILED: -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="Testing checked-if 4" duration="{duration}"> + <skipped message="({Unknown expression after the reported line})"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="Testing checked-if 5" duration="{duration}"> + <skipped message="({Unknown expression after the reported line})"> +FAILED: + {Unknown expression after the reported line} +Uncaught exception should fail! +at Misc.tests.cpp:<line number> </skipped> </testCase> <testCase name="This test 'should' fail but doesn't" duration="{duration}"/> @@ -1699,7 +1797,7 @@ FAILED: REQUIRE( testCheckedElse( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="checkedIf" duration="{duration}"/> @@ -1709,7 +1807,7 @@ FAILED: REQUIRE( testCheckedIf( false ) ) with expansion: false -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="even more nested SECTION tests/c/d (leaf)" duration="{duration}"/> @@ -1722,7 +1820,7 @@ FAILED: CHECK( b > a ) with expansion: 0 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="looped SECTION tests/b is currently: 1" duration="{duration}"> @@ -1731,7 +1829,7 @@ FAILED: CHECK( b > a ) with expansion: 1 > 1 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="looped SECTION tests/b is currently: 2" duration="{duration}"/> @@ -1749,7 +1847,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1757,7 +1855,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[1] (1) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1765,7 +1863,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[3] (3) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1773,7 +1871,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[4] (5) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1781,7 +1879,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[6] (13) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> <failure message="CHECK(( fib[i] % 2 ) == 0)"> FAILED: @@ -1789,7 +1887,7 @@ FAILED: with expansion: 1 == 0 Testing if fib[7] (21) is even -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="more nested SECTION tests/equal/doesn't equal" duration="{duration}"> @@ -1798,7 +1896,7 @@ FAILED: REQUIRE( a == b ) with expansion: 1 == 2 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="more nested SECTION tests/doesn't equal/not equal" duration="{duration}"/> @@ -1814,7 +1912,7 @@ Misc.tests.cpp:<line number> FAILED: REQUIRE( false ) 3 -Misc.tests.cpp:<line number> +at Misc.tests.cpp:<line number> </failure> </testCase> <testCase name="toString on const wchar_t const pointer returns the string contents" duration="{duration}"/> @@ -1830,6 +1928,102 @@ Misc.tests.cpp:<line number> <testCase 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>" duration="{duration}"/> <testCase name="xmlentitycheck/encoded chars: these should all be encoded: &&&"""<<<&"<<&"" duration="{duration}"/> </file> + <file path="tests/<exe-name>/UsageTests/Skip.tests.cpp"> + <testCase name="Empty generators can SKIP in constructor" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +This generator is empty +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="a succeeding test can still be skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="dynamic skipping works with generators" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 41 +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failed assertions before SKIP cause test case to fail" duration="{duration}"> + <skipped message="CHECK(3 == 4)"> +FAILED: + CHECK( 3 == 4 ) +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing for some generator values causes entire test case to fail" duration="{duration}"> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing in some unskipped sections causes entire test case to fail/skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="failing in some unskipped sections causes entire test case to fail/not skipped" duration="{duration}"> + <skipped message="FAIL()"> +FAILED: +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="nested sections can be skipped dynamically at runtime/B2/B" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="nested sections can be skipped dynamically at runtime/B" duration="{duration}"/> + <testCase name="sections can be skipped dynamically at runtime/not skipped" duration="{duration}"/> + <testCase name="sections can be skipped dynamically at runtime/skipped" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="sections can be skipped dynamically at runtime/also not skipped" duration="{duration}"/> + <testCase name="skipped tests can optionally provide a reason" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +skipping because answer = 43 +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + <testCase name="tests can be skipped dynamically at runtime" duration="{duration}"> + <skipped message="SKIP()"> +SKIPPED +at Skip.tests.cpp:<line number> + </skipped> + </testCase> + </file> <file path="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp"> <testCase name="Stringifying std::chrono::duration helpers" duration="{duration}"/> <testCase name="Stringifying std::chrono::duration with weird ratios" duration="{duration}"/> @@ -1891,7 +2085,7 @@ Misc.tests.cpp:<line number> <failure message="FAIL()"> FAILED: 1514 -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testCase> <testCase name="(unimplemented) static bools can be evaluated/compare to true" duration="{duration}"/> @@ -1905,14 +2099,14 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x<hex digits> == 0x<hex digits> -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> <failure message="CHECK(o1 == o2)"> FAILED: CHECK( o1 == o2 ) with expansion: {?} == {?} -Tricky.tests.cpp:<line number> +at Tricky.tests.cpp:<line number> </failure> </testCase> <testCase name="An expression with side-effects should only be evaluated once" duration="{duration}"/> diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 1832282a..a02dbd95 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -164,6 +164,8 @@ ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0 ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) # #2152 - ULP checks between differently signed values were wrong - float ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +# #2615 - Throwing in constructor generator fails test case but does not abort +not ok {test-number} - unexpected exception with message: 'failure to init' # #748 - captures with unexpected exceptions not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' # #748 - captures with unexpected exceptions @@ -657,7 +659,7 @@ ok {test-number} - unrelated::ADL_empty{}, IsEmpty() for: {?} is empty # CAPTURE can deal with complex expressions ok {test-number} - with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' # CAPTURE can deal with complex expressions involving commas -ok {test-number} - with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +ok {test-number} - with 7 messages: 'custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op<int>{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op<int>{1, 2, 3}[0] := 0' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' # CAPTURE parses string and character constants ok {test-number} - with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' # Capture and info messages @@ -982,10 +984,10 @@ ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +# Empty generators can SKIP in constructor +ok {test-number} - # SKIP 'This generator is empty' # Empty stream name opens cout stream ok {test-number} - Catch::makeStream( "" )->isConsole() for: true -# Empty tag is not allowed -ok {test-number} - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) # EndsWith string matcher not ok {test-number} - testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" # EndsWith string matcher @@ -1076,6 +1078,14 @@ not ok {test-number} - throwsSpecialException( 4 ), SpecialException, ExceptionM ok {test-number} - throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 # Exception matchers that succeed ok {test-number} - throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +# Exception message can be matched +ok {test-number} - throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" # Exception messages can be tested for ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" # Exception messages can be tested for @@ -1120,6 +1130,8 @@ ok {test-number} - Factorial(2) == 2 for: 2 == 2 ok {test-number} - Factorial(3) == 6 for: 6 == 6 # Factorials are computed ok {test-number} - Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) +# Filter generator throws exception for empty generator +ok {test-number} - filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException # Floating point matchers: double ok {test-number} - 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.1 are within 10% of each other # Floating point matchers: double @@ -1178,6 +1190,8 @@ ok {test-number} - WithinRel( 1., 0. ) ok {test-number} - WithinRel( 1., -0.2 ), std::domain_error # Floating point matchers: double ok {test-number} - WithinRel( 1., 1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN # Floating point matchers: float ok {test-number} - 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.1 are within 10% of each other # Floating point matchers: float @@ -1242,6 +1256,16 @@ ok {test-number} - WithinRel( 1.f, 0.f ) ok {test-number} - WithinRel( 1.f, -0.2f ), std::domain_error # Floating point matchers: float ok {test-number} - WithinRel( 1.f, 1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 # Generators -- adapters ok {test-number} - i % 2 == 0 for: 0 == 0 # Generators -- adapters @@ -1780,6 +1804,8 @@ ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x<hex digits>) ! ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x<hex digits>) != 3429949824 (0x<hex digits>) # Hashing test case produces same hash across multiple calls ok {test-number} - h( dummy ) == h( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>) +# INFO and UNSCOPED_INFO can stream multiple arguments +not ok {test-number} - explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' # INFO and WARN do not abort tests warning {test-number} - 'this is a message' with 1 message: 'this is a warning' # INFO gets logged on failure @@ -1814,6 +1840,8 @@ ok {test-number} - i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and ' ok {test-number} - i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' # INFO is reset for each loop not ok {test-number} - i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +# Incomplete AssertionHandler +not ok {test-number} - unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy # Inequality checks that should fail not ok {test-number} - data.int_seven != 7 for: 7 != 7 # Inequality checks that should fail @@ -1846,6 +1874,42 @@ ok {test-number} - data.str_hello != "hell" for: "hello" != "hell" ok {test-number} - data.str_hello != "hello1" for: "hello" != "hello1" # Inequality checks that should succeed ok {test-number} - data.str_hello.size() != 6 for: 5 != 6 +# JsonWriter +ok {test-number} - stream.str() == "" for: "" == "" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ "int": 1, "double": 1.5, "true": true, "false": false, "string": "this is a string", "array": [ 1, 2 ] }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ 1, 2 ] }" ) +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ "empty_object": { }, "fully_object": { "key": 1 } }" ( contains: ""empty_object": { }," and contains: ""fully_object": { "key": 1 }" ) +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" == "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"/\"" for: ""/"" == ""/"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" # Lambdas in assertions ok {test-number} - []() { return true; }() for: true # Less-than inequalities with different epsilons @@ -2439,6 +2503,18 @@ ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && Cont # Reporter's write listings to provided stream ok {test-number} - !(factories.empty()) for: !false # Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "class-name": "", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' # Reporter's write listings to provided stream ok {test-number} - !(factories.empty()) for: !false @@ -3051,6 +3127,14 @@ not ok {test-number} - explicitly ok {test-number} - false # TODO # Testing checked-if 3 not ok {test-number} - explicitly +# Testing checked-if 4 +ok {test-number} - true +# Testing checked-if 4 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# Testing checked-if 5 +ok {test-number} - false # TODO +# Testing checked-if 5 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} # The NO_FAIL macro reports a failure but does not fail the test ok {test-number} - 1 == 2 # TODO # The default listing implementation write to provided stream @@ -3215,6 +3299,40 @@ ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespac ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here # Trim strings ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } # Unexpected exceptions can be translated not ok {test-number} - unexpected exception with message: '3.14' # Upcasting special member functions @@ -3425,6 +3543,70 @@ ok {test-number} - mocked.m_derefed[2] for: true ok {test-number} - !(mocked.m_derefed[3]) for: !false # Usage of NoneTrue range matcher ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - !(mocked1.m_derefed[3]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[3] for: true +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } # Usage of the SizeIs range matcher ok {test-number} - empty_vec, SizeIs(0) for: { } has size == 0 # Usage of the SizeIs range matcher @@ -3601,6 +3783,10 @@ ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" # XmlWriter writes boolean attributes as true/false ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" ) +# a succeeding test can still be skipped +ok {test-number} - +# a succeeding test can still be skipped +ok {test-number} - # SKIP # analyse no analysis ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23 # analyse no analysis @@ -3771,6 +3957,12 @@ ok {test-number} - convertToBits( -0. ) == ( 1ULL << 63 ) for: 92233720368547758 ok {test-number} - convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 for: 1 == 1 # convertToBits ok {test-number} - convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 for: 1 == 1 +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 41' +# dynamic skipping works with generators +ok {test-number} - +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 43' # empty tags are not allowed ok {test-number} - Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) # erfc_inv @@ -3789,6 +3981,22 @@ ok {test-number} - ok {test-number} - # even more nested SECTION tests ok {test-number} - +# failed assertions before SKIP cause test case to fail +not ok {test-number} - 3 == 4 +# failed assertions before SKIP cause test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +not ok {test-number} - explicitly loose text artifact # is_unary_function ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value' @@ -3898,6 +4106,11 @@ ok {test-number} - a != b for: 1 != 2 ok {test-number} - b != a for: 2 != 1 # nested SECTION tests ok {test-number} - a != b for: 1 != 2 +a! +b1! +# nested sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +! # non streamable - with conv. op ok {test-number} - s == "7" for: "7" == "7" # non-copyable objects @@ -4062,12 +4275,20 @@ ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 # run_for_at_least, int ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# sections can be skipped dynamically at runtime +ok {test-number} - +# sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +# sections can be skipped dynamically at runtime +ok {test-number} - # send a single char to INFO not ok {test-number} - false with 1 message: '3' # sends information to INFO not ok {test-number} - false with 2 messages: 'hi' and 'i := 7' # shortened hide tags are split apart ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# skipped tests can optionally provide a reason +ok {test-number} - # SKIP 'skipping because answer = 43' # splitString ok {test-number} - splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { } # splitString @@ -4150,6 +4371,8 @@ ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>( ok {test-number} - testcase.tags.size() == 1 for: 1 == 1 # tags with dots in later positions are not parsed as hidden ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +# tests can be skipped dynamically at runtime +ok {test-number} - # SKIP # thrown std::strings are translated not ok {test-number} - unexpected exception with message: 'Why would you throw a std::string?' # toString on const wchar_t const pointer returns the string contents @@ -4200,6 +4423,10 @@ ok {test-number} - e.upper_bound == 23 for: 23.0 == 23 ok {test-number} - e.lower_bound == 23 for: 23.0 == 23 # uniform samples ok {test-number} - e.confidence_interval == 0.95 for: 0.95 == 0.95 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.a() == -10 for: -10 == -10 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.b() == 10 for: 10 == 10 # unique_ptr reimplementation: basic functionality ok {test-number} - !(ptr) for: !{?} # unique_ptr reimplementation: basic functionality @@ -4322,5 +4549,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2159 +1..2272 diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 4446141d..13449bd4 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -162,6 +162,8 @@ ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0 ok {test-number} - smallest_non_zero, WithinULP( -smallest_non_zero, 2 ) for: 0.0f is within 2 ULPs of -1.40129846e-45f ([-4.20389539e-45, 1.40129846e-45]) # #2152 - ULP checks between differently signed values were wrong - float ok {test-number} - smallest_non_zero, !WithinULP( -smallest_non_zero, 1 ) for: 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) +# #2615 - Throwing in constructor generator fails test case but does not abort +not ok {test-number} - unexpected exception with message: 'failure to init' # #748 - captures with unexpected exceptions not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' # #748 - captures with unexpected exceptions @@ -655,7 +657,7 @@ ok {test-number} - unrelated::ADL_empty{}, IsEmpty() for: {?} is empty # CAPTURE can deal with complex expressions ok {test-number} - with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true' # CAPTURE can deal with complex expressions involving commas -ok {test-number} - with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' +ok {test-number} - with 7 messages: 'custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0' and 'custom_index_op<int>{1, 2, 3}[(0, 1)] := 0' and 'custom_index_op<int>{1, 2, 3}[0] := 0' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3' # CAPTURE parses string and character constants ok {test-number} - with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{'' # Capture and info messages @@ -980,10 +982,10 @@ ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1" ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2" # Directly creating an EnumInfo ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}" +# Empty generators can SKIP in constructor +ok {test-number} - # SKIP 'This generator is empty' # Empty stream name opens cout stream ok {test-number} - Catch::makeStream( "" )->isConsole() for: true -# Empty tag is not allowed -ok {test-number} - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) # EndsWith string matcher not ok {test-number} - testStringForMatching(), EndsWith( "Substring" ) for: "this string contains 'abc' as a substring" ends with: "Substring" # EndsWith string matcher @@ -1074,6 +1076,14 @@ not ok {test-number} - throwsSpecialException( 4 ), SpecialException, ExceptionM ok {test-number} - throwsSpecialException( 1 ), SpecialException, ExceptionMatcher{ 1 } for: SpecialException::what special exception has value of 1 # Exception matchers that succeed ok {test-number} - throwsSpecialException( 2 ), SpecialException, ExceptionMatcher{ 2 } for: SpecialException::what special exception has value of 2 +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) for: DerivedException::what matches "starts with: "Derived"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) for: DerivedException::what matches "ends with: "::what"" +# Exception message can be matched +ok {test-number} - throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) for: DerivedException::what matches "not starts with: "::what"" +# Exception message can be matched +ok {test-number} - throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) for: SpecialException::what matches "starts with: "Special"" # Exception messages can be tested for ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception" # Exception messages can be tested for @@ -1118,6 +1128,8 @@ ok {test-number} - Factorial(2) == 2 for: 2 == 2 ok {test-number} - Factorial(3) == 6 for: 6 == 6 # Factorials are computed ok {test-number} - Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) +# Filter generator throws exception for empty generator +ok {test-number} - filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException # Floating point matchers: double ok {test-number} - 10., WithinRel( 11.1, 0.1 ) for: 10.0 and 11.1 are within 10% of each other # Floating point matchers: double @@ -1176,6 +1188,8 @@ ok {test-number} - WithinRel( 1., 0. ) ok {test-number} - WithinRel( 1., -0.2 ), std::domain_error # Floating point matchers: double ok {test-number} - WithinRel( 1., 1. ), std::domain_error +# Floating point matchers: double +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN # Floating point matchers: float ok {test-number} - 10.f, WithinRel( 11.1f, 0.1f ) for: 10.0f and 11.1 are within 10% of each other # Floating point matchers: float @@ -1240,6 +1254,16 @@ ok {test-number} - WithinRel( 1.f, 0.f ) ok {test-number} - WithinRel( 1.f, -0.2f ), std::domain_error # Floating point matchers: float ok {test-number} - WithinRel( 1.f, 1.f ), std::domain_error +# Floating point matchers: float +ok {test-number} - 1., !IsNaN() for: 1.0 not is NaN +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 +# GENERATE can combine literals and generators +ok {test-number} - i % 2 == 0 for: 0 == 0 # Generators -- adapters ok {test-number} - i % 2 == 0 for: 0 == 0 # Generators -- adapters @@ -1778,6 +1802,8 @@ ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2673152918 (0x<hex digits>) ! ok {test-number} - h( dummy1 ) != h( dummy2 ) for: 2074929312 (0x<hex digits>) != 3429949824 (0x<hex digits>) # Hashing test case produces same hash across multiple calls ok {test-number} - h( dummy ) == h( dummy ) for: 3422778688 (0x<hex digits>) == 3422778688 (0x<hex digits>) +# INFO and UNSCOPED_INFO can stream multiple arguments +not ok {test-number} - explicitly with 3 messages: 'This info has multiple parts.' and 'This unscoped info has multiple parts.' and 'Show infos!' # INFO and WARN do not abort tests warning {test-number} - 'this is a message' with 1 message: 'this is a warning' # INFO gets logged on failure @@ -1812,6 +1838,8 @@ ok {test-number} - i < 10 for: 8 < 10 with 2 messages: 'current counter 8' and ' ok {test-number} - i < 10 for: 9 < 10 with 2 messages: 'current counter 9' and 'i := 9' # INFO is reset for each loop not ok {test-number} - i < 10 for: 10 < 10 with 2 messages: 'current counter 10' and 'i := 10' +# Incomplete AssertionHandler +not ok {test-number} - unexpected exception with message: 'Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE'; expression was: Dummy # Inequality checks that should fail not ok {test-number} - data.int_seven != 7 for: 7 != 7 # Inequality checks that should fail @@ -1844,6 +1872,42 @@ ok {test-number} - data.str_hello != "hell" for: "hello" != "hell" ok {test-number} - data.str_hello != "hello1" for: "hello" != "hello1" # Inequality checks that should succeed ok {test-number} - data.str_hello.size() != 6 for: 5 != 6 +# JsonWriter +ok {test-number} - stream.str() == "" for: "" == "" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) for: "{ "int": 1, "double": 1.5, "true": true, "false": false, "string": "this is a string", "array": [ 1, 2 ] }" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ 1, 2 ] }" ) +# JsonWriter +ok {test-number} - stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) for: "{ "empty_object": { }, "fully_object": { "key": 1 } }" ( contains: ""empty_object": { }," and contains: ""fully_object": { "key": 1 }" ) +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" for: "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" == "[ 1, 1.5, true, false, "this is a string", { "object": 42 }, [ "array", 42.5 ] ]" +# JsonWriter +ok {test-number} - stream.str() == "{\n}" for: "{ }" == "{ }" +# JsonWriter +ok {test-number} - stream.str() == "[\n]" for: "[ ]" == "[ ]" +# JsonWriter +ok {test-number} - stream.str() == "\"custom\"" for: ""custom"" == ""custom"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\"\"" for: ""\""" == ""\""" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\\"" for: ""\\"" == ""\\"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"/\"" for: ""/"" == ""/"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\b\"" for: ""\b"" == ""\b"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\f\"" for: ""\f"" == ""\f"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\n\"" for: ""\n"" == ""\n"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\r\"" for: ""\r"" == ""\r"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\t\"" for: ""\t"" == ""\t"" +# JsonWriter escapes charaters in strings properly +ok {test-number} - sstream.str() == "\"\\\\/\\t\\r\\n\"" for: ""\\/\t\r\n"" == ""\\/\t\r\n"" # Lambdas in assertions ok {test-number} - []() { return true; }() for: true # Less-than inequalities with different epsilons @@ -2437,6 +2501,18 @@ ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && Cont # Reporter's write listings to provided stream ok {test-number} - !(factories.empty()) for: !false # Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tags": [ { "aliases": [ "fakeTag" ], "count": 1 } ]" contains: "fakeTag" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "reporters": [ { "name": "fake reporter", "description": "fake description" } ]" contains: "fake reporter" with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream +ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "{ "version": 1, "metadata": { "name": "", "rng-seed": 1234, "catch2-version": "<version>" }, "listings": { "tests": [ { "name": "fake test name", "class-name": "", "tags": [ "fakeTestTag" ], "source-location": { "filename": "fake-file.cpp", "line": 123456789 } } ]" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: JSON' +# Reporter's write listings to provided stream +ok {test-number} - !(factories.empty()) for: !false +# Reporter's write listings to provided stream ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: JUnit' # Reporter's write listings to provided stream ok {test-number} - !(factories.empty()) for: !false @@ -3044,6 +3120,14 @@ not ok {test-number} - explicitly ok {test-number} - false # TODO # Testing checked-if 3 not ok {test-number} - explicitly +# Testing checked-if 4 +ok {test-number} - true +# Testing checked-if 4 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} +# Testing checked-if 5 +ok {test-number} - false # TODO +# Testing checked-if 5 +not ok {test-number} - unexpected exception with message: 'Uncaught exception should fail!'; expression was: {Unknown expression after the reported line} # The NO_FAIL macro reports a failure but does not fail the test ok {test-number} - 1 == 2 # TODO # The default listing implementation write to provided stream @@ -3208,6 +3292,40 @@ ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespac ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here # Trim strings ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_3, !UnorderedRangeEquals( array_int_4 ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - with 1 message: 'ContainerIsRandomAccess( array_int_a ) != ContainerIsRandomAccess( list_char_a )' +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, RangeEquals( list_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - array_int_a, UnorderedRangeEquals( list_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, RangeEquals( vector_char_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, UnorderedRangeEquals( vector_char_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !RangeEquals( vector_char_b ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_int_a, !UnorderedRangeEquals( vector_char_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 2 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, !RangeEquals( b ) for: { 1, 2, 3 } not elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - a, UnorderedRangeEquals( b ) for: { 1, 2, 3 } unordered elements are { 3, 2, 1 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, RangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Type conversions of RangeEquals and similar +ok {test-number} - vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) for: { 1, 2, 3 } unordered elements are { 2, 3, 4 } # Unexpected exceptions can be translated not ok {test-number} - unexpected exception with message: '3.14' # Upcasting special member functions @@ -3418,6 +3536,70 @@ ok {test-number} - mocked.m_derefed[2] for: true ok {test-number} - !(mocked.m_derefed[3]) for: !false # Usage of NoneTrue range matcher ok {test-number} - !(mocked.m_derefed[4]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, RangeEquals( empty_vector ) for: { } elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - empty_vector, !RangeEquals( non_empty_vector ) for: { } not elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_vector, !RangeEquals( empty_vector ) for: { 1 } not elements are { } +# Usage of RangeEquals range matcher +ok {test-number} - non_empty_array, RangeEquals( non_empty_array ) for: { 1 } elements are { 1 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, RangeEquals( array_a ) for: { 1, 2, 3 } elements are { 1, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_b ) for: { 1, 2, 3 } not elements are { 2, 2, 3 } +# Usage of RangeEquals range matcher +ok {test-number} - array_a, !RangeEquals( array_c ) for: { 1, 2, 3 } not elements are { 1, 2, 2 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } +# Usage of RangeEquals range matcher +ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - !(mocked1.m_derefed[3]) for: !false +# Usage of RangeEquals range matcher +ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[0] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[1] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[2] for: true +# Usage of RangeEquals range matcher +ok {test-number} - mocked1.m_derefed[3] for: true +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: { } unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: { } not unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are { } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - non_empty_array, UnorderedRangeEquals( non_empty_array ) for: { 1 } unordered elements are { 1 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, UnorderedRangeEquals( array_a ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - array_a, !UnorderedRangeEquals( array_b ) for: { 1, 2, 3 } not unordered elements are { 2, 2, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b ) for: { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) for: { 1, 10, 20 } unordered elements are { 11, 21, 2 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - vector_a, !UnorderedRangeEquals( vector_b, close_enough ) for: { 1, 10, 21 } not unordered elements are { 11, 21, 3 } +# Usage of UnorderedRangeEquals range matcher +ok {test-number} - needs_adl1, UnorderedRangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } # Usage of the SizeIs range matcher ok {test-number} - empty_vec, SizeIs(0) for: { } has size == 0 # Usage of the SizeIs range matcher @@ -3594,6 +3776,10 @@ ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]" ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]" # XmlWriter writes boolean attributes as true/false ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" ) +# a succeeding test can still be skipped +ok {test-number} - +# a succeeding test can still be skipped +ok {test-number} - # SKIP # analyse no analysis ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23 # analyse no analysis @@ -3764,6 +3950,12 @@ ok {test-number} - convertToBits( -0. ) == ( 1ULL << 63 ) for: 92233720368547758 ok {test-number} - convertToBits( std::numeric_limits<float>::denorm_min() ) == 1 for: 1 == 1 # convertToBits ok {test-number} - convertToBits( std::numeric_limits<double>::denorm_min() ) == 1 for: 1 == 1 +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 41' +# dynamic skipping works with generators +ok {test-number} - +# dynamic skipping works with generators +ok {test-number} - # SKIP 'skipping because answer = 43' # empty tags are not allowed ok {test-number} - Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) # erfc_inv @@ -3782,6 +3974,22 @@ ok {test-number} - ok {test-number} - # even more nested SECTION tests ok {test-number} - +# failed assertions before SKIP cause test case to fail +not ok {test-number} - 3 == 4 +# failed assertions before SKIP cause test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing for some generator values causes entire test case to fail +not ok {test-number} - explicitly +# failing for some generator values causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +ok {test-number} - # SKIP +# failing in some unskipped sections causes entire test case to fail +not ok {test-number} - explicitly # is_unary_function ok {test-number} - with 1 message: 'Catch::Clara::Detail::is_unary_function<decltype(unary1)>::value' # is_unary_function @@ -3890,6 +4098,8 @@ ok {test-number} - a != b for: 1 != 2 ok {test-number} - b != a for: 2 != 1 # nested SECTION tests ok {test-number} - a != b for: 1 != 2 +# nested sections can be skipped dynamically at runtime +ok {test-number} - # SKIP # non streamable - with conv. op ok {test-number} - s == "7" for: "7" == "7" # non-copyable objects @@ -4054,12 +4264,20 @@ ok {test-number} - Timing.elapsed >= time for: 128 ns >= 100 ns ok {test-number} - Timing.result == Timing.iterations + 17 for: 145 == 145 # run_for_at_least, int ok {test-number} - Timing.iterations >= time.count() for: 128 >= 100 +# sections can be skipped dynamically at runtime +ok {test-number} - +# sections can be skipped dynamically at runtime +ok {test-number} - # SKIP +# sections can be skipped dynamically at runtime +ok {test-number} - # send a single char to INFO not ok {test-number} - false with 1 message: '3' # sends information to INFO not ok {test-number} - false with 2 messages: 'hi' and 'i := 7' # shortened hide tags are split apart ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} ) +# skipped tests can optionally provide a reason +ok {test-number} - # SKIP 'skipping because answer = 43' # splitString ok {test-number} - splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { } # splitString @@ -4142,6 +4360,8 @@ ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>( ok {test-number} - testcase.tags.size() == 1 for: 1 == 1 # tags with dots in later positions are not parsed as hidden ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag +# tests can be skipped dynamically at runtime +ok {test-number} - # SKIP # thrown std::strings are translated not ok {test-number} - unexpected exception with message: 'Why would you throw a std::string?' # toString on const wchar_t const pointer returns the string contents @@ -4192,6 +4412,10 @@ ok {test-number} - e.upper_bound == 23 for: 23.0 == 23 ok {test-number} - e.lower_bound == 23 for: 23.0 == 23 # uniform samples ok {test-number} - e.confidence_interval == 0.95 for: 0.95 == 0.95 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.a() == -10 for: -10 == -10 +# uniform_integer_distribution can return the bounds +ok {test-number} - dist.b() == 10 for: 10 == 10 # unique_ptr reimplementation: basic functionality ok {test-number} - !(ptr) for: !{?} # unique_ptr reimplementation: basic functionality @@ -4314,5 +4538,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2159 +1..2272 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 7049f2b6..2a2c40cf 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -18,7 +18,7 @@ ##teamcity[testStarted name='#1455 - INFO and WARN can start with a linebreak'] ##teamcity[testFinished name='#1455 - INFO and WARN can start with a linebreak' duration="{duration}"] ##teamcity[testStarted name='#1514: stderr/stdout is not captured in tests aborted by an exception'] -Tricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] +##teamcity[testFailed name='#1514: stderr/stdout is not captured in tests aborted by an exception' message='Tricky.tests.cpp:<line number>|n...............................................................................|n|nTricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] ##teamcity[testStdOut name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='This would not be caught previously|n'] ##teamcity[testStdErr name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='Nor would this|n'] ##teamcity[testFinished name='#1514: stderr/stdout is not captured in tests aborted by an exception' duration="{duration}"] @@ -52,30 +52,33 @@ Tricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] ##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - double' duration="{duration}"] ##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - float'] ##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - float' duration="{duration}"] +##teamcity[testStarted name='#2615 - Throwing in constructor generator fails test case but does not abort'] +##teamcity[testIgnored name='#2615 - Throwing in constructor generator fails test case but does not abort' message='Generators.tests.cpp:<line number>|n...............................................................................|n|nGenerators.tests.cpp:<line number>|nunexpected exception with message:|n "failure to init"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#2615 - Throwing in constructor generator fails test case but does not abort' duration="{duration}"] ##teamcity[testStarted name='#748 - captures with unexpected exceptions'] -Exception.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] -Exception.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|noutside assertions|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|ninside REQUIRE_NOTHROW|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='#748 - captures with unexpected exceptions' duration="{duration}"] ##teamcity[testStarted name='#809'] ##teamcity[testFinished name='#809' duration="{duration}"] ##teamcity[testStarted name='#833'] ##teamcity[testFinished name='#833' duration="{duration}"] ##teamcity[testStarted name='#835 -- errno should not be touched by Catch2'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#835 -- errno should not be touched by Catch2' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='#835 -- errno should not be touched by Catch2' duration="{duration}"] ##teamcity[testStarted name='#872'] ##teamcity[testFinished name='#872' duration="{duration}"] ##teamcity[testStarted name='#961 -- Dynamically created sections should all be reported'] ##teamcity[testFinished name='#961 -- Dynamically created sections should all be reported' duration="{duration}"] ##teamcity[testStarted name='|'Not|' checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] ##teamcity[testFinished name='|'Not|' checks that should fail' duration="{duration}"] ##teamcity[testStarted name='|'Not|' checks that should succeed'] ##teamcity[testFinished name='|'Not|' checks that should succeed' duration="{duration}"] @@ -84,21 +87,21 @@ Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nw ##teamcity[testStarted name='3x3x3 ints'] ##teamcity[testFinished name='3x3x3 ints' duration="{duration}"] ##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that fails'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] +##teamcity[testFailed name='A METHOD_AS_TEST_CASE based test run that fails' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] ##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that fails' duration="{duration}"] ##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that succeeds'] ##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that succeeds' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>' duration="{duration}"] @@ -109,16 +112,16 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2< ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>' duration="{duration}"] @@ -129,13 +132,13 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2< ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double' duration="{duration}"] @@ -144,13 +147,13 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<Te ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 3 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 3 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 6 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 6 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1' duration="{duration}"] @@ -159,7 +162,7 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::va ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6' duration="{duration}"] ##teamcity[testStarted name='A TEST_CASE_METHOD based test run that fails'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='A TEST_CASE_METHOD based test run that fails' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='A TEST_CASE_METHOD based test run that fails' duration="{duration}"] ##teamcity[testStarted name='A TEST_CASE_METHOD based test run that succeeds'] ##teamcity[testFinished name='A TEST_CASE_METHOD based test run that succeeds' duration="{duration}"] @@ -182,11 +185,11 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith ex ##teamcity[testStarted name='A comparison that uses literals instead of the normal constructor'] ##teamcity[testFinished name='A comparison that uses literals instead of the normal constructor' duration="{duration}"] ##teamcity[testStarted name='A couple of nested sections followed by a failure'] -Misc.tests.cpp:<line number>|nexplicit failure with message:|n "to infinity and beyond"'] +##teamcity[testFailed name='A couple of nested sections followed by a failure' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure with message:|n "to infinity and beyond"'] ##teamcity[testFinished name='A couple of nested sections followed by a failure' duration="{duration}"] ##teamcity[testStarted name='A failing expression with a non streamable type is still captured'] -Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x<hex digits> == 0x<hex digits>|n'] -Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:<line number>|n...............................................................................|n|nTricky.tests.cpp:<line number>|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x<hex digits> == 0x<hex digits>|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] ##teamcity[testFinished name='A failing expression with a non streamable type is still captured' duration="{duration}"] ##teamcity[testStarted name='Absolute margin'] ##teamcity[testFinished name='Absolute margin' duration="{duration}"] @@ -195,7 +198,7 @@ Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith exp ##teamcity[testStarted name='An expression with side-effects should only be evaluated once'] ##teamcity[testFinished name='An expression with side-effects should only be evaluated once' duration="{duration}"] ##teamcity[testStarted name='An unchecked exception reports the line of the last assertion'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] +##teamcity[testFailed name='An unchecked exception reports the line of the last assertion' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] ##teamcity[testFinished name='An unchecked exception reports the line of the last assertion' duration="{duration}"] ##teamcity[testStarted name='Anonymous test case 1'] ##teamcity[testFinished name='Anonymous test case 1' duration="{duration}"] @@ -276,33 +279,34 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testStarted name='Composed matchers shortcircuit'] ##teamcity[testFinished name='Composed matchers shortcircuit' duration="{duration}"] ##teamcity[testStarted name='Contains string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] ##teamcity[testFinished name='Contains string matcher' duration="{duration}"] ##teamcity[testStarted name='Copy and then generate a range'] ##teamcity[testFinished name='Copy and then generate a range' duration="{duration}"] ##teamcity[testStarted name='Cout stream properly declares it writes to stdout'] ##teamcity[testFinished name='Cout stream properly declares it writes to stdout' duration="{duration}"] ##teamcity[testStarted name='Custom exceptions can be translated when testing for nothrow'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for nothrow' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] ##teamcity[testFinished name='Custom exceptions can be translated when testing for nothrow' duration="{duration}"] ##teamcity[testStarted name='Custom exceptions can be translated when testing for throwing as something else'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for throwing as something else' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] ##teamcity[testFinished name='Custom exceptions can be translated when testing for throwing as something else' duration="{duration}"] ##teamcity[testStarted name='Custom std-exceptions can be custom translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom std exception"'] +##teamcity[testFailed name='Custom std-exceptions can be custom translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom std exception"'] ##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] ##teamcity[testStarted name='Default scale is invisible to comparison'] ##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] ##teamcity[testStarted name='Directly creating an EnumInfo'] ##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] +##teamcity[testStarted name='Empty generators can SKIP in constructor'] +##teamcity[testIgnored name='Empty generators can SKIP in constructor' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "This generator is empty"'] +##teamcity[testFinished name='Empty generators can SKIP in constructor' duration="{duration}"] ##teamcity[testStarted name='Empty stream name opens cout stream'] ##teamcity[testFinished name='Empty stream name opens cout stream' duration="{duration}"] -##teamcity[testStarted name='Empty tag is not allowed'] -##teamcity[testFinished name='Empty tag is not allowed' duration="{duration}"] ##teamcity[testStarted name='EndsWith string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] ##teamcity[testFinished name='EndsWith string matcher' duration="{duration}"] ##teamcity[testStarted name='Enums can quickly have stringification enabled using REGISTER_ENUM'] ##teamcity[testFinished name='Enums can quickly have stringification enabled using REGISTER_ENUM' duration="{duration}"] @@ -311,64 +315,70 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStarted name='Epsilon only applies to Approx|'s value'] ##teamcity[testFinished name='Epsilon only applies to Approx|'s value' duration="{duration}"] ##teamcity[testStarted name='Equality checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.1f == Approx( 9.1099996567 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.1f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.1f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.1f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.1415926535 == Approx( 3.1415 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.3 == Approx( 1.301 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.1f == Approx( 9.1099996567 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.1f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.1f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.1f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.1415926535 == Approx( 3.1415 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.3 == Approx( 1.301 )|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Equality checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Equality checks that should succeed'] ##teamcity[testFinished name='Equality checks that should succeed' duration="{duration}"] ##teamcity[testStarted name='Equals'] ##teamcity[testFinished name='Equals' duration="{duration}"] ##teamcity[testStarted name='Equals string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] ##teamcity[testFinished name='Equals string matcher' duration="{duration}"] ##teamcity[testStarted name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified'] ##teamcity[testFinished name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified' duration="{duration}"] ##teamcity[testStarted name='Exception matchers that fail'] -Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nNo exception|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nType mismatch|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nContents are wrong|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] ##teamcity[testFinished name='Exception matchers that fail' duration="{duration}"] ##teamcity[testStarted name='Exception matchers that succeed'] ##teamcity[testFinished name='Exception matchers that succeed' duration="{duration}"] +##teamcity[testStarted name='Exception message can be matched'] +##teamcity[testFinished name='Exception message can be matched' duration="{duration}"] ##teamcity[testStarted name='Exception messages can be tested for'] ##teamcity[testFinished name='Exception messages can be tested for' duration="{duration}"] ##teamcity[testStarted name='Exceptions matchers'] ##teamcity[testFinished name='Exceptions matchers' duration="{duration}"] ##teamcity[testStarted name='Expected exceptions that don|'t throw or unexpected exceptions fail the test'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] -Exception.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] ##teamcity[testFinished name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' duration="{duration}"] ##teamcity[testStarted name='FAIL aborts the test'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFailed name='FAIL aborts the test' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] ##teamcity[testFinished name='FAIL aborts the test' duration="{duration}"] ##teamcity[testStarted name='FAIL does not require an argument'] -Message.tests.cpp:<line number>|nexplicit failure'] +##teamcity[testFailed name='FAIL does not require an argument' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure'] ##teamcity[testFinished name='FAIL does not require an argument' duration="{duration}"] ##teamcity[testStarted name='FAIL_CHECK does not abort the test'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFailed name='FAIL_CHECK does not abort the test' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] ##teamcity[testFinished name='FAIL_CHECK does not abort the test' duration="{duration}"] ##teamcity[testStarted name='Factorials are computed'] ##teamcity[testFinished name='Factorials are computed' duration="{duration}"] +##teamcity[testStarted name='Filter generator throws exception for empty generator'] +##teamcity[testFinished name='Filter generator throws exception for empty generator' duration="{duration}"] ##teamcity[testStarted name='Floating point matchers: double'] ##teamcity[testFinished name='Floating point matchers: double' duration="{duration}"] ##teamcity[testStarted name='Floating point matchers: float'] ##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"] +##teamcity[testStarted name='GENERATE can combine literals and generators'] +##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"] ##teamcity[testStarted name='Generators -- adapters'] ##teamcity[testFinished name='Generators -- adapters' duration="{duration}"] ##teamcity[testStarted name='Generators -- simple'] @@ -385,27 +395,37 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a fa ##teamcity[testFinished name='Hashing different test cases produces different result' duration="{duration}"] ##teamcity[testStarted name='Hashing test case produces same hash across multiple calls'] ##teamcity[testFinished name='Hashing test case produces same hash across multiple calls' duration="{duration}"] +##teamcity[testStarted name='INFO and UNSCOPED_INFO can stream multiple arguments'] +##teamcity[testFailed name='INFO and UNSCOPED_INFO can stream multiple arguments' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with messages:|n "This info has multiple parts."|n "This unscoped info has multiple parts."|n "Show infos!"'] +##teamcity[testFinished name='INFO and UNSCOPED_INFO can stream multiple arguments' duration="{duration}"] ##teamcity[testStarted name='INFO and WARN do not abort tests'] ##teamcity[testFinished name='INFO and WARN do not abort tests' duration="{duration}"] ##teamcity[testStarted name='INFO gets logged on failure'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] ##teamcity[testFinished name='INFO gets logged on failure' duration="{duration}"] ##teamcity[testStarted name='INFO gets logged on failure, even if captured before successful assertions'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] ##teamcity[testFinished name='INFO gets logged on failure, even if captured before successful assertions' duration="{duration}"] ##teamcity[testStarted name='INFO is reset for each loop'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] +##teamcity[testFailed name='INFO is reset for each loop' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] ##teamcity[testFinished name='INFO is reset for each loop' duration="{duration}"] +##teamcity[testStarted name='Incomplete AssertionHandler'] +##teamcity[testIgnored name='Incomplete AssertionHandler' message='AssertionHandler.tests.cpp:<line number>|n...............................................................................|n|nAssertionHandler.tests.cpp:<line number>|nunexpected exception with message:|n "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"|n REQUIRE( Dummy )|nwith expansion:|n Dummy|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Incomplete AssertionHandler' duration="{duration}"] ##teamcity[testStarted name='Inequality checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.1f != Approx( 9.1000003815 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.1415926535 != Approx( 3.1415926535 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.1f != Approx( 9.1000003815 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.1415926535 != Approx( 3.1415926535 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Inequality checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Inequality checks that should succeed'] ##teamcity[testFinished name='Inequality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='JsonWriter'] +##teamcity[testFinished name='JsonWriter' duration="{duration}"] +##teamcity[testStarted name='JsonWriter escapes charaters in strings properly'] +##teamcity[testFinished name='JsonWriter escapes charaters in strings properly' duration="{duration}"] ##teamcity[testStarted name='Lambdas in assertions'] ##teamcity[testFinished name='Lambdas in assertions' duration="{duration}"] ##teamcity[testStarted name='Less-than inequalities with different epsilons'] @@ -419,21 +439,21 @@ Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.si ##teamcity[testStarted name='Matchers can be composed with both && and ||||'] ##teamcity[testFinished name='Matchers can be composed with both && and ||||' duration="{duration}"] ##teamcity[testStarted name='Matchers can be composed with both && and |||| - failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] +##teamcity[testFailed name='Matchers can be composed with both && and |||| - failing' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] ##teamcity[testFinished name='Matchers can be composed with both && and |||| - failing' duration="{duration}"] ##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator'] ##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator' duration="{duration}"] ##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] +##teamcity[testFailed name='Matchers can be negated (Not) with the ! operator - failing' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] ##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"] ##teamcity[testStarted name='Mayfail test case with nested sections'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Mayfail test case with nested sections' duration="{duration}"] ##teamcity[testStarted name='Mismatching exception messages failing the test'] -Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] +##teamcity[testFailed name='Mismatching exception messages failing the test' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] ##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"] ##teamcity[testStarted name='Multireporter calls reporters and listeners in correct order'] ##teamcity[testFinished name='Multireporter calls reporters and listeners in correct order' duration="{duration}"] @@ -444,40 +464,40 @@ Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thi ##teamcity[testStarted name='Nice descriptive name'] ##teamcity[testFinished name='Nice descriptive name' duration="{duration}"] ##teamcity[testStarted name='Non-std exceptions can be translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception"'] +##teamcity[testFailed name='Non-std exceptions can be translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception"'] ##teamcity[testFinished name='Non-std exceptions can be translated' duration="{duration}"] ##teamcity[testStarted name='Objects that evaluated in boolean contexts can be checked'] ##teamcity[testFinished name='Objects that evaluated in boolean contexts can be checked' duration="{duration}"] ##teamcity[testStarted name='Optionally static assertions'] ##teamcity[testFinished name='Optionally static assertions' duration="{duration}"] ##teamcity[testStarted name='Ordering comparison checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.1f < 9|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.1f > 10|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.1f > 9.2|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.1f < 9|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.1f > 10|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.1f > 9.2|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] ##teamcity[testFinished name='Ordering comparison checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Ordering comparison checks that should succeed'] ##teamcity[testFinished name='Ordering comparison checks that should succeed' duration="{duration}"] ##teamcity[testStarted name='Our PCG implementation provides expected results for known seeds'] ##teamcity[testFinished name='Our PCG implementation provides expected results for known seeds' duration="{duration}"] ##teamcity[testStarted name='Output from all sections is reported'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section one"'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section two"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|none|n-------------------------------------------------------------------------------|nMessage.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section one"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|ntwo|n-------------------------------------------------------------------------------|nMessage.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section two"'] ##teamcity[testFinished name='Output from all sections is reported' duration="{duration}"] ##teamcity[testStarted name='Overloaded comma or address-of operators are not used'] ##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] @@ -512,12 +532,12 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from ##teamcity[testStarted name='Range type with sentinel'] ##teamcity[testFinished name='Range type with sentinel' duration="{duration}"] ##teamcity[testStarted name='Reconstruction should be based on stringification: #914'] -Decomposition.tests.cpp:<line number>|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] +##teamcity[testFailed name='Reconstruction should be based on stringification: #914' message='Decomposition.tests.cpp:<line number>|n...............................................................................|n|nDecomposition.tests.cpp:<line number>|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] ##teamcity[testFinished name='Reconstruction should be based on stringification: #914' duration="{duration}"] ##teamcity[testStarted name='Regex string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] ##teamcity[testFinished name='Regex string matcher' duration="{duration}"] ##teamcity[testStarted name='Registering reporter with |'::|' in name fails'] ##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"] @@ -549,8 +569,8 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStdOut name='Standard output from all sections is reported' out='Message from section one|nMessage from section two|n'] ##teamcity[testFinished name='Standard output from all sections is reported' duration="{duration}"] ##teamcity[testStarted name='StartsWith string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] ##teamcity[testFinished name='StartsWith string matcher' duration="{duration}"] ##teamcity[testStarted name='Static arrays are convertible to string'] ##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"] @@ -573,7 +593,7 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStarted name='Stringifying std::chrono::time_point<system_clock>'] ##teamcity[testFinished name='Stringifying std::chrono::time_point<system_clock>' duration="{duration}"] ##teamcity[testStarted name='Tabs and newlines show in output'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] +##teamcity[testFailed name='Tabs and newlines show in output' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] ##teamcity[testFinished name='Tabs and newlines show in output' duration="{duration}"] ##teamcity[testStarted name='Tag alias can be registered against tag patterns'] ##teamcity[testFinished name='Tag alias can be registered against tag patterns' duration="{duration}"] @@ -626,11 +646,17 @@ Misc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expan ##teamcity[testStarted name='Testing checked-if'] ##teamcity[testFinished name='Testing checked-if' duration="{duration}"] ##teamcity[testStarted name='Testing checked-if 2'] -Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Testing checked-if 2' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Testing checked-if 2' duration="{duration}"] ##teamcity[testStarted name='Testing checked-if 3'] -Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Testing checked-if 3' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Testing checked-if 3' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 4'] +##teamcity[testIgnored name='Testing checked-if 4' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 4' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 5'] +##teamcity[testIgnored name='Testing checked-if 5' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 5' duration="{duration}"] ##teamcity[testStarted name='The NO_FAIL macro reports a failure but does not fail the test'] ##teamcity[testFinished name='The NO_FAIL macro reports a failure but does not fail the test' duration="{duration}"] ##teamcity[testStarted name='The default listing implementation write to provided stream'] @@ -638,14 +664,16 @@ Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as ##teamcity[testStarted name='This test |'should|' fail but doesn|'t'] ##teamcity[testFinished name='This test |'should|' fail but doesn|'t' duration="{duration}"] ##teamcity[testStarted name='Thrown string literals are translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] +##teamcity[testFailed name='Thrown string literals are translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] ##teamcity[testFinished name='Thrown string literals are translated' duration="{duration}"] ##teamcity[testStarted name='Tracker'] ##teamcity[testFinished name='Tracker' duration="{duration}"] ##teamcity[testStarted name='Trim strings'] ##teamcity[testFinished name='Trim strings' duration="{duration}"] +##teamcity[testStarted name='Type conversions of RangeEquals and similar'] +##teamcity[testFinished name='Type conversions of RangeEquals and similar' duration="{duration}"] ##teamcity[testStarted name='Unexpected exceptions can be translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"'] +##teamcity[testFailed name='Unexpected exceptions can be translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"'] ##teamcity[testFinished name='Unexpected exceptions can be translated' duration="{duration}"] ##teamcity[testStarted name='Upcasting special member functions'] ##teamcity[testFinished name='Upcasting special member functions' duration="{duration}"] @@ -661,6 +689,10 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"' ##teamcity[testFinished name='Usage of NoneMatch range matcher' duration="{duration}"] ##teamcity[testStarted name='Usage of NoneTrue range matcher'] ##teamcity[testFinished name='Usage of NoneTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of RangeEquals range matcher'] +##teamcity[testFinished name='Usage of RangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of UnorderedRangeEquals range matcher'] +##teamcity[testFinished name='Usage of UnorderedRangeEquals range matcher' duration="{duration}"] ##teamcity[testStarted name='Usage of the SizeIs range matcher'] ##teamcity[testFinished name='Usage of the SizeIs range matcher' duration="{duration}"] ##teamcity[testStarted name='Use a custom approx'] @@ -670,41 +702,41 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"' ##teamcity[testStarted name='Vector Approx matcher'] ##teamcity[testFinished name='Vector Approx matcher' duration="{duration}"] ##teamcity[testStarted name='Vector Approx matcher -- failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nEmpty and non empty vectors are not approx equal|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nJust different vectors|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] ##teamcity[testFinished name='Vector Approx matcher -- failing' duration="{duration}"] ##teamcity[testStarted name='Vector matchers'] ##teamcity[testFinished name='Vector matchers' duration="{duration}"] ##teamcity[testStarted name='Vector matchers that fail'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (element)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (vector)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nUnorderedEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] ##teamcity[testFinished name='Vector matchers that fail' duration="{duration}"] ##teamcity[testStarted name='When checked exceptions are thrown they can be expected or unexpected'] ##teamcity[testFinished name='When checked exceptions are thrown they can be expected or unexpected' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown directly they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFailed name='When unchecked exceptions are thrown directly they are always failures' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] ##teamcity[testFinished name='When unchecked exceptions are thrown directly they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown during a CHECK the test should continue'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a CHECK the test should continue' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown during a CHECK the test should continue' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown from functions they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown from functions they are always failures' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown from functions they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown from sections they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFailed name='When unchecked exceptions are thrown from sections they are always failures' message='-------------------------------------------------------------------------------|nsection name|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] ##teamcity[testFinished name='When unchecked exceptions are thrown from sections they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown, but caught, they do not affect the test'] ##teamcity[testFinished name='When unchecked exceptions are thrown, but caught, they do not affect the test' duration="{duration}"] @@ -720,6 +752,9 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='XmlEncode' duration="{duration}"] ##teamcity[testStarted name='XmlWriter writes boolean attributes as true/false'] ##teamcity[testFinished name='XmlWriter writes boolean attributes as true/false' duration="{duration}"] +##teamcity[testStarted name='a succeeding test can still be skipped'] +##teamcity[testIgnored name='a succeeding test can still be skipped' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='a succeeding test can still be skipped' duration="{duration}"] ##teamcity[testStarted name='analyse no analysis'] ##teamcity[testFinished name='analyse no analysis' duration="{duration}"] ##teamcity[testStarted name='array<int, N> -> toString'] @@ -731,12 +766,12 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testStarted name='checkedElse'] ##teamcity[testFinished name='checkedElse' duration="{duration}"] ##teamcity[testStarted name='checkedElse, failing'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='checkedElse, failing' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] ##teamcity[testFinished name='checkedElse, failing' duration="{duration}"] ##teamcity[testStarted name='checkedIf'] ##teamcity[testFinished name='checkedIf' duration="{duration}"] ##teamcity[testStarted name='checkedIf, failing'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='checkedIf, failing' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] ##teamcity[testFinished name='checkedIf, failing' duration="{duration}"] ##teamcity[testStarted name='classify_outliers'] ##teamcity[testFinished name='classify_outliers' duration="{duration}"] @@ -746,6 +781,10 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ##teamcity[testFinished name='comparisons between int variables' duration="{duration}"] ##teamcity[testStarted name='convertToBits'] ##teamcity[testFinished name='convertToBits' duration="{duration}"] +##teamcity[testStarted name='dynamic skipping works with generators'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 41"'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='dynamic skipping works with generators' duration="{duration}"] ##teamcity[testStarted name='empty tags are not allowed'] ##teamcity[testFinished name='empty tags are not allowed' duration="{duration}"] ##teamcity[testStarted name='erfc_inv'] @@ -754,6 +793,20 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ##teamcity[testFinished name='estimate_clock_resolution' duration="{duration}"] ##teamcity[testStarted name='even more nested SECTION tests'] ##teamcity[testFinished name='even more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='failed assertions before SKIP cause test case to fail'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexpression failed|n CHECK( 3 == 4 )|nwith expansion:|n 3 == 4|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='failed assertions before SKIP cause test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing for some generator values causes entire test case to fail'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='failing for some generator values causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing in some unskipped sections causes entire test case to fail'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nnot skipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='failing in some unskipped sections causes entire test case to fail' duration="{duration}"] ##teamcity[testStarted name='first tag'] ##teamcity[testFinished name='first tag' duration="{duration}"] ##teamcity[testStarted name='has printf'] @@ -762,10 +815,10 @@ loose text artifact ##teamcity[testStarted name='is_unary_function'] ##teamcity[testFinished name='is_unary_function' duration="{duration}"] ##teamcity[testStarted name='just failure'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Previous info should not be seen"'] +##teamcity[testFailed name='just failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Previous info should not be seen"'] ##teamcity[testFinished name='just failure' duration="{duration}"] ##teamcity[testStarted name='just failure after unscoped info'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] +##teamcity[testFailed name='just failure after unscoped info' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] ##teamcity[testFinished name='just failure after unscoped info' duration="{duration}"] ##teamcity[testStarted name='just info'] ##teamcity[testFinished name='just info' duration="{duration}"] @@ -774,16 +827,16 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "previous uns ##teamcity[testStarted name='long long'] ##teamcity[testFinished name='long long' duration="{duration}"] ##teamcity[testStarted name='looped SECTION tests'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 0|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 1|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] ##teamcity[testFinished name='looped SECTION tests' duration="{duration}"] ##teamcity[testStarted name='looped tests'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='looped tests' duration="{duration}"] ##teamcity[testStarted name='makeStream recognizes %debug stream name'] ##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] @@ -796,10 +849,14 @@ Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib ##teamcity[testStarted name='mix info, unscoped info and warning'] ##teamcity[testFinished name='mix info, unscoped info and warning' duration="{duration}"] ##teamcity[testStarted name='more nested SECTION tests'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='more nested SECTION tests' message='-------------------------------------------------------------------------------|ndoesn|'t equal|nequal|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='more nested SECTION tests' duration="{duration}"] ##teamcity[testStarted name='nested SECTION tests'] ##teamcity[testFinished name='nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='nested sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nB|nB2|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testStdOut name='nested sections can be skipped dynamically at runtime' out='a!|nb1!|n!|n'] +##teamcity[testFinished name='nested sections can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='non streamable - with conv. op'] ##teamcity[testFinished name='non streamable - with conv. op' duration="{duration}"] ##teamcity[testStarted name='non-copyable objects'] @@ -811,7 +868,7 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expan ##teamcity[testStarted name='not allowed'] ##teamcity[testFinished name='not allowed' duration="{duration}"] ##teamcity[testStarted name='not prints unscoped info from previous failures'] -Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='not prints unscoped info from previous failures' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='not prints unscoped info from previous failures' duration="{duration}"] ##teamcity[testStarted name='null strings'] ##teamcity[testFinished name='null strings' duration="{duration}"] @@ -826,10 +883,10 @@ Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD ##teamcity[testStarted name='print unscoped info if passing unscoped info is printed'] ##teamcity[testFinished name='print unscoped info if passing unscoped info is printed' duration="{duration}"] ##teamcity[testStarted name='prints unscoped info on failure'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='prints unscoped info on failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='prints unscoped info on failure' duration="{duration}"] ##teamcity[testStarted name='prints unscoped info only for the first assertion'] -Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='prints unscoped info only for the first assertion' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='prints unscoped info only for the first assertion' duration="{duration}"] ##teamcity[testStarted name='random SECTION tests'] ##teamcity[testFinished name='random SECTION tests' duration="{duration}"] @@ -845,19 +902,25 @@ Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD ##teamcity[testFinished name='run_for_at_least, int' duration="{duration}"] ##teamcity[testStarted name='second tag'] ##teamcity[testFinished name='second tag' duration="{duration}"] +##teamcity[testStarted name='sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='sections can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='send a single char to INFO'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='send a single char to INFO' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='send a single char to INFO' duration="{duration}"] ##teamcity[testStarted name='sends information to INFO'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='sends information to INFO' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='sends information to INFO' duration="{duration}"] ##teamcity[testStarted name='shortened hide tags are split apart'] ##teamcity[testFinished name='shortened hide tags are split apart' duration="{duration}"] +##teamcity[testStarted name='skipped tests can optionally provide a reason'] +##teamcity[testIgnored name='skipped tests can optionally provide a reason' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='skipped tests can optionally provide a reason' duration="{duration}"] ##teamcity[testStarted name='splitString'] ##teamcity[testFinished name='splitString' duration="{duration}"] ##teamcity[testStarted name='stacks unscoped info in loops'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='stacks unscoped info in loops' duration="{duration}"] ##teamcity[testStarted name='startsWith'] ##teamcity[testFinished name='startsWith' duration="{duration}"] @@ -897,8 +960,11 @@ Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to ##teamcity[testFinished name='tables' duration="{duration}"] ##teamcity[testStarted name='tags with dots in later positions are not parsed as hidden'] ##teamcity[testFinished name='tags with dots in later positions are not parsed as hidden' duration="{duration}"] +##teamcity[testStarted name='tests can be skipped dynamically at runtime'] +##teamcity[testIgnored name='tests can be skipped dynamically at runtime' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='tests can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='thrown std::strings are translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "Why would you throw a std::string?"'] +##teamcity[testFailed name='thrown std::strings are translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "Why would you throw a std::string?"'] ##teamcity[testFinished name='thrown std::strings are translated' duration="{duration}"] ##teamcity[testStarted name='toString on const wchar_t const pointer returns the string contents'] ##teamcity[testFinished name='toString on const wchar_t const pointer returns the string contents' duration="{duration}"] @@ -928,6 +994,8 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "Why wo ##teamcity[testFinished name='tuple<tuple<int>,tuple<>,float>' duration="{duration}"] ##teamcity[testStarted name='uniform samples'] ##teamcity[testFinished name='uniform samples' duration="{duration}"] +##teamcity[testStarted name='uniform_integer_distribution can return the bounds'] +##teamcity[testFinished name='uniform_integer_distribution can return the bounds' duration="{duration}"] ##teamcity[testStarted name='unique_ptr reimplementation: basic functionality'] ##teamcity[testFinished name='unique_ptr reimplementation: basic functionality' duration="{duration}"] ##teamcity[testStarted name='vec<vec<string,alloc>> -> toString'] diff --git a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index 96de7dd8..24ed5d98 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -18,7 +18,7 @@ ##teamcity[testStarted name='#1455 - INFO and WARN can start with a linebreak'] ##teamcity[testFinished name='#1455 - INFO and WARN can start with a linebreak' duration="{duration}"] ##teamcity[testStarted name='#1514: stderr/stdout is not captured in tests aborted by an exception'] -Tricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] +##teamcity[testFailed name='#1514: stderr/stdout is not captured in tests aborted by an exception' message='Tricky.tests.cpp:<line number>|n...............................................................................|n|nTricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] ##teamcity[testStdOut name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='This would not be caught previously|n'] ##teamcity[testStdErr name='#1514: stderr/stdout is not captured in tests aborted by an exception' out='Nor would this|n'] ##teamcity[testFinished name='#1514: stderr/stdout is not captured in tests aborted by an exception' duration="{duration}"] @@ -52,30 +52,33 @@ Tricky.tests.cpp:<line number>|nexplicit failure with message:|n "1514"'] ##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - double' duration="{duration}"] ##teamcity[testStarted name='#2152 - ULP checks between differently signed values were wrong - float'] ##teamcity[testFinished name='#2152 - ULP checks between differently signed values were wrong - float' duration="{duration}"] +##teamcity[testStarted name='#2615 - Throwing in constructor generator fails test case but does not abort'] +##teamcity[testIgnored name='#2615 - Throwing in constructor generator fails test case but does not abort' message='Generators.tests.cpp:<line number>|n...............................................................................|n|nGenerators.tests.cpp:<line number>|nunexpected exception with message:|n "failure to init"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='#2615 - Throwing in constructor generator fails test case but does not abort' duration="{duration}"] ##teamcity[testStarted name='#748 - captures with unexpected exceptions'] -Exception.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] -Exception.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|noutside assertions|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#748 - captures with unexpected exceptions' message='-------------------------------------------------------------------------------|ninside REQUIRE_NOTHROW|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='#748 - captures with unexpected exceptions' duration="{duration}"] ##teamcity[testStarted name='#809'] ##teamcity[testFinished name='#809' duration="{duration}"] ##teamcity[testStarted name='#833'] ##teamcity[testFinished name='#833' duration="{duration}"] ##teamcity[testStarted name='#835 -- errno should not be touched by Catch2'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='#835 -- errno should not be touched by Catch2' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( f() == 0 )|nwith expansion:|n 1 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='#835 -- errno should not be touched by Catch2' duration="{duration}"] ##teamcity[testStarted name='#872'] ##teamcity[testFinished name='#872' duration="{duration}"] ##teamcity[testStarted name='#961 -- Dynamically created sections should all be reported'] ##teamcity[testFinished name='#961 -- Dynamically created sections should all be reported' duration="{duration}"] ##teamcity[testStarted name='|'Not|' checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( false != false )|nwith expansion:|n false != false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( true != true )|nwith expansion:|n true != true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !true )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( true )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !trueValue )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( trueValue )|nwith expansion:|n !true|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( !(1 == 1) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='|'Not|' checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nwith expansion:|n !(1 == 1)|n'] ##teamcity[testFinished name='|'Not|' checks that should fail' duration="{duration}"] ##teamcity[testStarted name='|'Not|' checks that should succeed'] ##teamcity[testFinished name='|'Not|' checks that should succeed' duration="{duration}"] @@ -84,21 +87,21 @@ Condition.tests.cpp:<line number>|nexpression failed|n CHECK_FALSE( 1 == 1 )|nw ##teamcity[testStarted name='3x3x3 ints'] ##teamcity[testFinished name='3x3x3 ints' duration="{duration}"] ##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that fails'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] +##teamcity[testFailed name='A METHOD_AS_TEST_CASE based test run that fails' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( s == "world" )|nwith expansion:|n "hello" == "world"|n'] ##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that fails' duration="{duration}"] ##teamcity[testStarted name='A METHOD_AS_TEST_CASE based test run that succeeds'] ##teamcity[testFinished name='A METHOD_AS_TEST_CASE based test run that succeeds' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 )|nwith expansion:|n 0 == 1|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>' duration="{duration}"] @@ -109,16 +112,16 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2< ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 6 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] +##teamcity[testFailed name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )|nwith expansion:|n 2 < 2|n'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>' duration="{duration}"] @@ -129,13 +132,13 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture_2< ##teamcity[testStarted name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>'] ##teamcity[testFinished name='A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0 == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - double' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1.0f == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - float' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<TestType>::m_a == 2 )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that fails - int' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double' duration="{duration}"] @@ -144,13 +147,13 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Template_Fixture<Te ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 3 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 3 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 6 == 0|n'] +##teamcity[testFailed name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::value == 0 )|nwith expansion:|n 6 == 0|n'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6' duration="{duration}"] ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1' duration="{duration}"] @@ -159,7 +162,7 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( Nttp_Fixture<V>::va ##teamcity[testStarted name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6'] ##teamcity[testFinished name='A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6' duration="{duration}"] ##teamcity[testStarted name='A TEST_CASE_METHOD based test run that fails'] -Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='A TEST_CASE_METHOD based test run that fails' message='Class.tests.cpp:<line number>|n...............................................................................|n|nClass.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='A TEST_CASE_METHOD based test run that fails' duration="{duration}"] ##teamcity[testStarted name='A TEST_CASE_METHOD based test run that succeeds'] ##teamcity[testFinished name='A TEST_CASE_METHOD based test run that succeeds' duration="{duration}"] @@ -182,11 +185,11 @@ Class.tests.cpp:<line number>|nexpression failed|n REQUIRE( m_a == 2 )|nwith ex ##teamcity[testStarted name='A comparison that uses literals instead of the normal constructor'] ##teamcity[testFinished name='A comparison that uses literals instead of the normal constructor' duration="{duration}"] ##teamcity[testStarted name='A couple of nested sections followed by a failure'] -Misc.tests.cpp:<line number>|nexplicit failure with message:|n "to infinity and beyond"'] +##teamcity[testFailed name='A couple of nested sections followed by a failure' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure with message:|n "to infinity and beyond"'] ##teamcity[testFinished name='A couple of nested sections followed by a failure' duration="{duration}"] ##teamcity[testStarted name='A failing expression with a non streamable type is still captured'] -Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x<hex digits> == 0x<hex digits>|n'] -Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:<line number>|n...............................................................................|n|nTricky.tests.cpp:<line number>|nexpression failed|n CHECK( &o1 == &o2 )|nwith expansion:|n 0x<hex digits> == 0x<hex digits>|n'] +##teamcity[testFailed name='A failing expression with a non streamable type is still captured' message='Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith expansion:|n {?} == {?}|n'] ##teamcity[testFinished name='A failing expression with a non streamable type is still captured' duration="{duration}"] ##teamcity[testStarted name='Absolute margin'] ##teamcity[testFinished name='Absolute margin' duration="{duration}"] @@ -195,7 +198,7 @@ Tricky.tests.cpp:<line number>|nexpression failed|n CHECK( o1 == o2 )|nwith exp ##teamcity[testStarted name='An expression with side-effects should only be evaluated once'] ##teamcity[testFinished name='An expression with side-effects should only be evaluated once' duration="{duration}"] ##teamcity[testStarted name='An unchecked exception reports the line of the last assertion'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] +##teamcity[testFailed name='An unchecked exception reports the line of the last assertion' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n'] ##teamcity[testFinished name='An unchecked exception reports the line of the last assertion' duration="{duration}"] ##teamcity[testStarted name='Anonymous test case 1'] ##teamcity[testFinished name='Anonymous test case 1' duration="{duration}"] @@ -276,33 +279,34 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testStarted name='Composed matchers shortcircuit'] ##teamcity[testFinished name='Composed matchers shortcircuit' duration="{duration}"] ##teamcity[testStarted name='Contains string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n'] +##teamcity[testFailed name='Contains string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n'] ##teamcity[testFinished name='Contains string matcher' duration="{duration}"] ##teamcity[testStarted name='Copy and then generate a range'] ##teamcity[testFinished name='Copy and then generate a range' duration="{duration}"] ##teamcity[testStarted name='Cout stream properly declares it writes to stdout'] ##teamcity[testFinished name='Cout stream properly declares it writes to stdout' duration="{duration}"] ##teamcity[testStarted name='Custom exceptions can be translated when testing for nothrow'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for nothrow' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_NOTHROW( throwCustom() )|nwith expansion:|n throwCustom()|n'] ##teamcity[testFinished name='Custom exceptions can be translated when testing for nothrow' duration="{duration}"] ##teamcity[testStarted name='Custom exceptions can be translated when testing for throwing as something else'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] +##teamcity[testFailed name='Custom exceptions can be translated when testing for throwing as something else' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception - not std"|n REQUIRE_THROWS_AS( throwCustom(), std::exception )|nwith expansion:|n throwCustom(), std::exception|n'] ##teamcity[testFinished name='Custom exceptions can be translated when testing for throwing as something else' duration="{duration}"] ##teamcity[testStarted name='Custom std-exceptions can be custom translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom std exception"'] +##teamcity[testFailed name='Custom std-exceptions can be custom translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom std exception"'] ##teamcity[testFinished name='Custom std-exceptions can be custom translated' duration="{duration}"] ##teamcity[testStarted name='Default scale is invisible to comparison'] ##teamcity[testFinished name='Default scale is invisible to comparison' duration="{duration}"] ##teamcity[testStarted name='Directly creating an EnumInfo'] ##teamcity[testFinished name='Directly creating an EnumInfo' duration="{duration}"] +##teamcity[testStarted name='Empty generators can SKIP in constructor'] +##teamcity[testIgnored name='Empty generators can SKIP in constructor' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "This generator is empty"'] +##teamcity[testFinished name='Empty generators can SKIP in constructor' duration="{duration}"] ##teamcity[testStarted name='Empty stream name opens cout stream'] ##teamcity[testFinished name='Empty stream name opens cout stream' duration="{duration}"] -##teamcity[testStarted name='Empty tag is not allowed'] -##teamcity[testFinished name='Empty tag is not allowed' duration="{duration}"] ##teamcity[testStarted name='EndsWith string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "Substring"|n'] +##teamcity[testFailed name='EndsWith string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ends with: "this" (case insensitive)|n'] ##teamcity[testFinished name='EndsWith string matcher' duration="{duration}"] ##teamcity[testStarted name='Enums can quickly have stringification enabled using REGISTER_ENUM'] ##teamcity[testFinished name='Enums can quickly have stringification enabled using REGISTER_ENUM' duration="{duration}"] @@ -311,64 +315,70 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStarted name='Epsilon only applies to Approx|'s value'] ##teamcity[testFinished name='Epsilon only applies to Approx|'s value' duration="{duration}"] ##teamcity[testStarted name='Equality checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.1f == Approx( 9.1099996567 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.1f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.1f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.1f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.1415926535 == Approx( 3.1415 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.3 == Approx( 1.301 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 6 )|nwith expansion:|n 7 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 8 )|nwith expansion:|n 7 == 8|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven == 0 )|nwith expansion:|n 7 == 0|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.11f ) )|nwith expansion:|n 9.1f == Approx( 9.1099996567 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 9.0f ) )|nwith expansion:|n 9.1f == Approx( 9.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 1 ) )|nwith expansion:|n 9.1f == Approx( 1.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one == Approx( 0 ) )|nwith expansion:|n 9.1f == Approx( 0.0 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi == Approx( 3.1415 ) )|nwith expansion:|n 3.1415926535 == Approx( 3.1415 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "goodbye" )|nwith expansion:|n "hello" == "goodbye"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hell" )|nwith expansion:|n "hello" == "hell"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello == "hello1" )|nwith expansion:|n "hello" == "hello1"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() == 6 )|nwith expansion:|n 5 == 6|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Equality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( x == Approx( 1.301 ) )|nwith expansion:|n 1.3 == Approx( 1.301 )|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Equality checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Equality checks that should succeed'] ##teamcity[testFinished name='Equality checks that should succeed' duration="{duration}"] ##teamcity[testStarted name='Equals'] ##teamcity[testFinished name='Equals' duration="{duration}"] ##teamcity[testStarted name='Equals string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "this string contains |'ABC|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "this string contains |'ABC|' as a substring"|n'] +##teamcity[testFailed name='Equals string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" equals: "something else" (case insensitive)|n'] ##teamcity[testFinished name='Equals string matcher' duration="{duration}"] ##teamcity[testStarted name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified'] ##teamcity[testFinished name='Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified' duration="{duration}"] ##teamcity[testStarted name='Exception matchers that fail'] -Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nNo exception|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nno exception was thrown where one was expected|n REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nType mismatch|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nunexpected exception with message:|n "Unknown exception"|n REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 }|n'] +##teamcity[testFailed name='Exception matchers that fail' message='-------------------------------------------------------------------------------|nContents are wrong|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] +##teamcity[testFailed name='Exception matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } )|nwith expansion:|n SpecialException::what special exception has value of 1|n'] ##teamcity[testFinished name='Exception matchers that fail' duration="{duration}"] ##teamcity[testStarted name='Exception matchers that succeed'] ##teamcity[testFinished name='Exception matchers that succeed' duration="{duration}"] +##teamcity[testStarted name='Exception message can be matched'] +##teamcity[testFinished name='Exception message can be matched' duration="{duration}"] ##teamcity[testStarted name='Exception messages can be tested for'] ##teamcity[testFinished name='Exception messages can be tested for' duration="{duration}"] ##teamcity[testStarted name='Exceptions matchers'] ##teamcity[testFinished name='Exceptions matchers' duration="{duration}"] ##teamcity[testStarted name='Expected exceptions that don|'t throw or unexpected exceptions fail the test'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] -Exception.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_THROWS_AS( thisThrows(), std::string )|nwith expansion:|n thisThrows(), std::string|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|nno exception was thrown where one was expected|n CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error )|nwith expansion:|n thisDoesntThrow(), std::domain_error|n'] +##teamcity[testFailed name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' message='Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n'] ##teamcity[testFinished name='Expected exceptions that don|'t throw or unexpected exceptions fail the test' duration="{duration}"] ##teamcity[testStarted name='FAIL aborts the test'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFailed name='FAIL aborts the test' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] ##teamcity[testFinished name='FAIL aborts the test' duration="{duration}"] ##teamcity[testStarted name='FAIL does not require an argument'] -Message.tests.cpp:<line number>|nexplicit failure'] +##teamcity[testFailed name='FAIL does not require an argument' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure'] ##teamcity[testFinished name='FAIL does not require an argument' duration="{duration}"] ##teamcity[testStarted name='FAIL_CHECK does not abort the test'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] +##teamcity[testFailed name='FAIL_CHECK does not abort the test' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "This is a failure"'] ##teamcity[testFinished name='FAIL_CHECK does not abort the test' duration="{duration}"] ##teamcity[testStarted name='Factorials are computed'] ##teamcity[testFinished name='Factorials are computed' duration="{duration}"] +##teamcity[testStarted name='Filter generator throws exception for empty generator'] +##teamcity[testFinished name='Filter generator throws exception for empty generator' duration="{duration}"] ##teamcity[testStarted name='Floating point matchers: double'] ##teamcity[testFinished name='Floating point matchers: double' duration="{duration}"] ##teamcity[testStarted name='Floating point matchers: float'] ##teamcity[testFinished name='Floating point matchers: float' duration="{duration}"] +##teamcity[testStarted name='GENERATE can combine literals and generators'] +##teamcity[testFinished name='GENERATE can combine literals and generators' duration="{duration}"] ##teamcity[testStarted name='Generators -- adapters'] ##teamcity[testFinished name='Generators -- adapters' duration="{duration}"] ##teamcity[testStarted name='Generators -- simple'] @@ -385,27 +395,37 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "This is a fa ##teamcity[testFinished name='Hashing different test cases produces different result' duration="{duration}"] ##teamcity[testStarted name='Hashing test case produces same hash across multiple calls'] ##teamcity[testFinished name='Hashing test case produces same hash across multiple calls' duration="{duration}"] +##teamcity[testStarted name='INFO and UNSCOPED_INFO can stream multiple arguments'] +##teamcity[testFailed name='INFO and UNSCOPED_INFO can stream multiple arguments' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with messages:|n "This info has multiple parts."|n "This unscoped info has multiple parts."|n "Show infos!"'] +##teamcity[testFinished name='INFO and UNSCOPED_INFO can stream multiple arguments' duration="{duration}"] ##teamcity[testStarted name='INFO and WARN do not abort tests'] ##teamcity[testFinished name='INFO and WARN do not abort tests' duration="{duration}"] ##teamcity[testStarted name='INFO gets logged on failure'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this message should be logged"|n "so should this"|n REQUIRE( a == 1 )|nwith expansion:|n 2 == 1|n'] ##teamcity[testFinished name='INFO gets logged on failure' duration="{duration}"] ##teamcity[testStarted name='INFO gets logged on failure, even if captured before successful assertions'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n CHECK( a == 1 )|nwith expansion:|n 2 == 1|n'] +##teamcity[testFailed name='INFO gets logged on failure, even if captured before successful assertions' message='Message.tests.cpp:<line number>|nexpression failed with messages:|n "this message may be logged later"|n "this message should be logged"|n "and this, but later"|n CHECK( a == 0 )|nwith expansion:|n 2 == 0|n'] ##teamcity[testFinished name='INFO gets logged on failure, even if captured before successful assertions' duration="{duration}"] ##teamcity[testStarted name='INFO is reset for each loop'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] +##teamcity[testFailed name='INFO is reset for each loop' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "current counter 10"|n "i := 10"|n REQUIRE( i < 10 )|nwith expansion:|n 10 < 10|n'] ##teamcity[testFinished name='INFO is reset for each loop' duration="{duration}"] +##teamcity[testStarted name='Incomplete AssertionHandler'] +##teamcity[testIgnored name='Incomplete AssertionHandler' message='AssertionHandler.tests.cpp:<line number>|n...............................................................................|n|nAssertionHandler.tests.cpp:<line number>|nunexpected exception with message:|n "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"|n REQUIRE( Dummy )|nwith expansion:|n Dummy|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Incomplete AssertionHandler' duration="{duration}"] ##teamcity[testStarted name='Inequality checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.1f != Approx( 9.1000003815 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.1415926535 != Approx( 3.1415926535 )|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven != 7 )|nwith expansion:|n 7 != 7|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one != Approx( 9.1f ) )|nwith expansion:|n 9.1f != Approx( 9.1000003815 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.double_pi != Approx( 3.1415926535 ) )|nwith expansion:|n 3.1415926535 != Approx( 3.1415926535 )|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello != "hello" )|nwith expansion:|n "hello" != "hello"|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Inequality checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.size() != 5 )|nwith expansion:|n 5 != 5|n- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Inequality checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Inequality checks that should succeed'] ##teamcity[testFinished name='Inequality checks that should succeed' duration="{duration}"] +##teamcity[testStarted name='JsonWriter'] +##teamcity[testFinished name='JsonWriter' duration="{duration}"] +##teamcity[testStarted name='JsonWriter escapes charaters in strings properly'] +##teamcity[testFinished name='JsonWriter escapes charaters in strings properly' duration="{duration}"] ##teamcity[testStarted name='Lambdas in assertions'] ##teamcity[testFinished name='Lambdas in assertions' duration="{duration}"] ##teamcity[testStarted name='Less-than inequalities with different epsilons'] @@ -419,21 +439,21 @@ Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.si ##teamcity[testStarted name='Matchers can be composed with both && and ||||'] ##teamcity[testFinished name='Matchers can be composed with both && and ||||' duration="{duration}"] ##teamcity[testStarted name='Matchers can be composed with both && and |||| - failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] +##teamcity[testFailed name='Matchers can be composed with both && and |||| - failing' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n'] ##teamcity[testFinished name='Matchers can be composed with both && and |||| - failing' duration="{duration}"] ##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator'] ##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator' duration="{duration}"] ##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] +##teamcity[testFailed name='Matchers can be negated (Not) with the ! operator - failing' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n'] ##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"] ##teamcity[testStarted name='Mayfail test case with nested sections'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] -Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nA|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n1|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Mayfail test case with nested sections' message='-------------------------------------------------------------------------------|nB|n2|n-------------------------------------------------------------------------------|nCondition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Mayfail test case with nested sections' duration="{duration}"] ##teamcity[testStarted name='Mismatching exception messages failing the test'] -Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] +##teamcity[testFailed name='Mismatching exception messages failing the test' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n'] ##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"] ##teamcity[testStarted name='Multireporter calls reporters and listeners in correct order'] ##teamcity[testFinished name='Multireporter calls reporters and listeners in correct order' duration="{duration}"] @@ -444,40 +464,40 @@ Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thi ##teamcity[testStarted name='Nice descriptive name'] ##teamcity[testFinished name='Nice descriptive name' duration="{duration}"] ##teamcity[testStarted name='Non-std exceptions can be translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception"'] +##teamcity[testFailed name='Non-std exceptions can be translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "custom exception"'] ##teamcity[testFinished name='Non-std exceptions can be translated' duration="{duration}"] ##teamcity[testStarted name='Objects that evaluated in boolean contexts can be checked'] ##teamcity[testFinished name='Objects that evaluated in boolean contexts can be checked' duration="{duration}"] ##teamcity[testStarted name='Optionally static assertions'] ##teamcity[testFinished name='Optionally static assertions' duration="{duration}"] ##teamcity[testStarted name='Ordering comparison checks that should fail'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.1f < 9|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.1f > 10|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.1f > 9.2|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] -Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|n...............................................................................|n|nCondition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 7 )|nwith expansion:|n 7 > 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 7 )|nwith expansion:|n 7 < 7|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven > 8 )|nwith expansion:|n 7 > 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 6 )|nwith expansion:|n 7 < 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < 0 )|nwith expansion:|n 7 < 0|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven < -1 )|nwith expansion:|n 7 < -1|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven >= 8 )|nwith expansion:|n 7 >= 8|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.int_seven <= 6 )|nwith expansion:|n 7 <= 6|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one < 9 )|nwith expansion:|n 9.1f < 9|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 10 )|nwith expansion:|n 9.1f > 10|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.float_nine_point_one > 9.2 )|nwith expansion:|n 9.1f > 9.2|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hello" )|nwith expansion:|n "hello" > "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hello" )|nwith expansion:|n "hello" < "hello"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "hellp" )|nwith expansion:|n "hello" > "hellp"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello > "z" )|nwith expansion:|n "hello" > "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "hellm" )|nwith expansion:|n "hello" < "hellm"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello < "a" )|nwith expansion:|n "hello" < "a"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello >= "z" )|nwith expansion:|n "hello" >= "z"|n'] +##teamcity[testFailed name='Ordering comparison checks that should fail' message='Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello <= "a" )|nwith expansion:|n "hello" <= "a"|n'] ##teamcity[testFinished name='Ordering comparison checks that should fail' duration="{duration}"] ##teamcity[testStarted name='Ordering comparison checks that should succeed'] ##teamcity[testFinished name='Ordering comparison checks that should succeed' duration="{duration}"] ##teamcity[testStarted name='Our PCG implementation provides expected results for known seeds'] ##teamcity[testFinished name='Our PCG implementation provides expected results for known seeds' duration="{duration}"] ##teamcity[testStarted name='Output from all sections is reported'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section one"'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section two"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|none|n-------------------------------------------------------------------------------|nMessage.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section one"'] +##teamcity[testFailed name='Output from all sections is reported' message='-------------------------------------------------------------------------------|ntwo|n-------------------------------------------------------------------------------|nMessage.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Message from section two"'] ##teamcity[testFinished name='Output from all sections is reported' duration="{duration}"] ##teamcity[testStarted name='Overloaded comma or address-of operators are not used'] ##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] @@ -512,12 +532,12 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "Message from ##teamcity[testStarted name='Range type with sentinel'] ##teamcity[testFinished name='Range type with sentinel' duration="{duration}"] ##teamcity[testStarted name='Reconstruction should be based on stringification: #914'] -Decomposition.tests.cpp:<line number>|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] +##teamcity[testFailed name='Reconstruction should be based on stringification: #914' message='Decomposition.tests.cpp:<line number>|n...............................................................................|n|nDecomposition.tests.cpp:<line number>|nexpression failed|n CHECK( truthy(false) )|nwith expansion:|n Hey, its truthy!|n'] ##teamcity[testFinished name='Reconstruction should be based on stringification: #914' duration="{duration}"] ##teamcity[testStarted name='Regex string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this STRING contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this STRING contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "contains |'abc|' as a substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "contains |'abc|' as a substring" case sensitively|n'] +##teamcity[testFailed name='Regex string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Matches( "this string contains |'abc|' as a" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" matches "this string contains |'abc|' as a" case sensitively|n'] ##teamcity[testFinished name='Regex string matcher' duration="{duration}"] ##teamcity[testStarted name='Registering reporter with |'::|' in name fails'] ##teamcity[testFinished name='Registering reporter with |'::|' in name fails' duration="{duration}"] @@ -549,8 +569,8 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStdOut name='Standard output from all sections is reported' out='Message from section one|nMessage from section two|n'] ##teamcity[testFinished name='Standard output from all sections is reported' duration="{duration}"] ##teamcity[testStarted name='StartsWith string matcher'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "This String"|n'] +##teamcity[testFailed name='StartsWith string matcher' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" starts with: "string" (case insensitive)|n'] ##teamcity[testFinished name='StartsWith string matcher' duration="{duration}"] ##teamcity[testStarted name='Static arrays are convertible to string'] ##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"] @@ -573,7 +593,7 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor ##teamcity[testStarted name='Stringifying std::chrono::time_point<system_clock>'] ##teamcity[testFinished name='Stringifying std::chrono::time_point<system_clock>' duration="{duration}"] ##teamcity[testStarted name='Tabs and newlines show in output'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] +##teamcity[testFailed name='Tabs and newlines show in output' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expansion:|n "if ($b == 10) {|n $a = 20;|n}"|n==|n"if ($b == 10) {|n $a = 20;|n}|n"|n'] ##teamcity[testFinished name='Tabs and newlines show in output' duration="{duration}"] ##teamcity[testStarted name='Tag alias can be registered against tag patterns'] ##teamcity[testFinished name='Tag alias can be registered against tag patterns' duration="{duration}"] @@ -626,11 +646,17 @@ Misc.tests.cpp:<line number>|nexpression failed|n CHECK( s1 == s2 )|nwith expan ##teamcity[testStarted name='Testing checked-if'] ##teamcity[testFinished name='Testing checked-if' duration="{duration}"] ##teamcity[testStarted name='Testing checked-if 2'] -Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Testing checked-if 2' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Testing checked-if 2' duration="{duration}"] ##teamcity[testStarted name='Testing checked-if 3'] -Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='Testing checked-if 3' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] ##teamcity[testFinished name='Testing checked-if 3' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 4'] +##teamcity[testIgnored name='Testing checked-if 4' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 4' duration="{duration}"] +##teamcity[testStarted name='Testing checked-if 5'] +##teamcity[testIgnored name='Testing checked-if 5' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nunexpected exception with message:|n "Uncaught exception should fail!"|n {Unknown expression after the reported line}|nwith expansion:|n {Unknown expression after the reported line}|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='Testing checked-if 5' duration="{duration}"] ##teamcity[testStarted name='The NO_FAIL macro reports a failure but does not fail the test'] ##teamcity[testFinished name='The NO_FAIL macro reports a failure but does not fail the test' duration="{duration}"] ##teamcity[testStarted name='The default listing implementation write to provided stream'] @@ -638,14 +664,16 @@ Misc.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as ##teamcity[testStarted name='This test |'should|' fail but doesn|'t'] ##teamcity[testFinished name='This test |'should|' fail but doesn|'t' duration="{duration}"] ##teamcity[testStarted name='Thrown string literals are translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] +##teamcity[testFailed name='Thrown string literals are translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "For some reason someone is throwing a string literal!"'] ##teamcity[testFinished name='Thrown string literals are translated' duration="{duration}"] ##teamcity[testStarted name='Tracker'] ##teamcity[testFinished name='Tracker' duration="{duration}"] ##teamcity[testStarted name='Trim strings'] ##teamcity[testFinished name='Trim strings' duration="{duration}"] +##teamcity[testStarted name='Type conversions of RangeEquals and similar'] +##teamcity[testFinished name='Type conversions of RangeEquals and similar' duration="{duration}"] ##teamcity[testStarted name='Unexpected exceptions can be translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"'] +##teamcity[testFailed name='Unexpected exceptions can be translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"'] ##teamcity[testFinished name='Unexpected exceptions can be translated' duration="{duration}"] ##teamcity[testStarted name='Upcasting special member functions'] ##teamcity[testFinished name='Upcasting special member functions' duration="{duration}"] @@ -661,6 +689,10 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"' ##teamcity[testFinished name='Usage of NoneMatch range matcher' duration="{duration}"] ##teamcity[testStarted name='Usage of NoneTrue range matcher'] ##teamcity[testFinished name='Usage of NoneTrue range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of RangeEquals range matcher'] +##teamcity[testFinished name='Usage of RangeEquals range matcher' duration="{duration}"] +##teamcity[testStarted name='Usage of UnorderedRangeEquals range matcher'] +##teamcity[testFinished name='Usage of UnorderedRangeEquals range matcher' duration="{duration}"] ##teamcity[testStarted name='Usage of the SizeIs range matcher'] ##teamcity[testFinished name='Usage of the SizeIs range matcher' duration="{duration}"] ##teamcity[testStarted name='Use a custom approx'] @@ -670,41 +702,41 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "3.14"' ##teamcity[testStarted name='Vector Approx matcher'] ##teamcity[testFinished name='Vector Approx matcher' duration="{duration}"] ##teamcity[testStarted name='Vector Approx matcher -- failing'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nEmpty and non empty vectors are not approx equal|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Approx( t1 ) )|nwith expansion:|n { } is approx: { 1.0, 2.0 }|n'] +##teamcity[testFailed name='Vector Approx matcher -- failing' message='-------------------------------------------------------------------------------|nJust different vectors|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v1, Approx( v2 ) )|nwith expansion:|n { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }|n'] ##teamcity[testFinished name='Vector Approx matcher -- failing' duration="{duration}"] ##teamcity[testStarted name='Vector matchers'] ##teamcity[testFinished name='Vector matchers' duration="{duration}"] ##teamcity[testStarted name='Vector matchers that fail'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] -Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (element)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, VectorContains( -1 ) )|nwith expansion:|n { 1, 2, 3 } Contains: -1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, VectorContains( 1 ) )|nwith expansion:|n { } Contains: 1|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nContains (vector)|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Contains( v ) )|nwith expansion:|n { } Contains: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Contains( v2 ) )|nwith expansion:|n { 1, 2, 3 } Contains: { 1, 2, 4 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( v2 ) )|nwith expansion:|n { 1, 2, 3 } Equals: { 1, 2 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v2, Equals( v ) )|nwith expansion:|n { 1, 2 } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, Equals( v ) )|nwith expansion:|n { } Equals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, Equals( empty ) )|nwith expansion:|n { 1, 2, 3 } Equals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='-------------------------------------------------------------------------------|nUnorderedEquals|n-------------------------------------------------------------------------------|nMatchers.tests.cpp:<line number>|n...............................................................................|n|nMatchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( v, UnorderedEquals( empty ) )|nwith expansion:|n { 1, 2, 3 } UnorderedEquals: { }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( empty, UnorderedEquals( v ) )|nwith expansion:|n { } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 1, 3 } UnorderedEquals: { 1, 2, 3 }|n'] +##teamcity[testFailed name='Vector matchers that fail' message='Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( permuted, UnorderedEquals( v ) )|nwith expansion:|n { 3, 1 } UnorderedEquals: { 1, 2, 3 }|n'] ##teamcity[testFinished name='Vector matchers that fail' duration="{duration}"] ##teamcity[testStarted name='When checked exceptions are thrown they can be expected or unexpected'] ##teamcity[testFinished name='When checked exceptions are thrown they can be expected or unexpected' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown directly they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFailed name='When unchecked exceptions are thrown directly they are always failures' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] ##teamcity[testFinished name='When unchecked exceptions are thrown directly they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown during a CHECK the test should continue'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a CHECK the test should continue' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown during a CHECK the test should continue' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n REQUIRE( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown during a REQUIRE the test should abort fail' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown from functions they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] +##teamcity[testFailed name='When unchecked exceptions are thrown from functions they are always failures' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "expected exception"|n CHECK( thisThrows() == 0 )|nwith expansion:|n thisThrows() == 0|n'] ##teamcity[testFinished name='When unchecked exceptions are thrown from functions they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown from sections they are always failures'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] +##teamcity[testFailed name='When unchecked exceptions are thrown from sections they are always failures' message='-------------------------------------------------------------------------------|nsection name|n-------------------------------------------------------------------------------|nException.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "unexpected exception"'] ##teamcity[testFinished name='When unchecked exceptions are thrown from sections they are always failures' duration="{duration}"] ##teamcity[testStarted name='When unchecked exceptions are thrown, but caught, they do not affect the test'] ##teamcity[testFinished name='When unchecked exceptions are thrown, but caught, they do not affect the test' duration="{duration}"] @@ -720,6 +752,9 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testFinished name='XmlEncode' duration="{duration}"] ##teamcity[testStarted name='XmlWriter writes boolean attributes as true/false'] ##teamcity[testFinished name='XmlWriter writes boolean attributes as true/false' duration="{duration}"] +##teamcity[testStarted name='a succeeding test can still be skipped'] +##teamcity[testIgnored name='a succeeding test can still be skipped' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='a succeeding test can still be skipped' duration="{duration}"] ##teamcity[testStarted name='analyse no analysis'] ##teamcity[testFinished name='analyse no analysis' duration="{duration}"] ##teamcity[testStarted name='array<int, N> -> toString'] @@ -731,12 +766,12 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe ##teamcity[testStarted name='checkedElse'] ##teamcity[testFinished name='checkedElse' duration="{duration}"] ##teamcity[testStarted name='checkedElse, failing'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='checkedElse, failing' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedElse( false ) )|nwith expansion:|n false|n'] ##teamcity[testFinished name='checkedElse, failing' duration="{duration}"] ##teamcity[testStarted name='checkedIf'] ##teamcity[testFinished name='checkedIf' duration="{duration}"] ##teamcity[testStarted name='checkedIf, failing'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] +##teamcity[testFailed name='checkedIf, failing' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ) )|nwith expansion:|n false|n'] ##teamcity[testFinished name='checkedIf, failing' duration="{duration}"] ##teamcity[testStarted name='classify_outliers'] ##teamcity[testFinished name='classify_outliers' duration="{duration}"] @@ -746,6 +781,10 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ##teamcity[testFinished name='comparisons between int variables' duration="{duration}"] ##teamcity[testStarted name='convertToBits'] ##teamcity[testFinished name='convertToBits' duration="{duration}"] +##teamcity[testStarted name='dynamic skipping works with generators'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 41"'] +##teamcity[testIgnored name='dynamic skipping works with generators' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='dynamic skipping works with generators' duration="{duration}"] ##teamcity[testStarted name='empty tags are not allowed'] ##teamcity[testFinished name='empty tags are not allowed' duration="{duration}"] ##teamcity[testStarted name='erfc_inv'] @@ -754,6 +793,20 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ##teamcity[testFinished name='estimate_clock_resolution' duration="{duration}"] ##teamcity[testStarted name='even more nested SECTION tests'] ##teamcity[testFinished name='even more nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='failed assertions before SKIP cause test case to fail'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexpression failed|n CHECK( 3 == 4 )|nwith expansion:|n 3 == 4|n- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failed assertions before SKIP cause test case to fail' message='Skip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='failed assertions before SKIP cause test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing for some generator values causes entire test case to fail'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testIgnored name='failing for some generator values causes entire test case to fail' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='failing for some generator values causes entire test case to fail' duration="{duration}"] +##teamcity[testStarted name='failing in some unskipped sections causes entire test case to fail'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testIgnored name='failing in some unskipped sections causes entire test case to fail' message='-------------------------------------------------------------------------------|nnot skipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n'] +##teamcity[testFinished name='failing in some unskipped sections causes entire test case to fail' duration="{duration}"] ##teamcity[testStarted name='first tag'] ##teamcity[testFinished name='first tag' duration="{duration}"] ##teamcity[testStarted name='has printf'] @@ -761,10 +814,10 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( testCheckedIf( false ##teamcity[testStarted name='is_unary_function'] ##teamcity[testFinished name='is_unary_function' duration="{duration}"] ##teamcity[testStarted name='just failure'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "Previous info should not be seen"'] +##teamcity[testFailed name='just failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "Previous info should not be seen"'] ##teamcity[testFinished name='just failure' duration="{duration}"] ##teamcity[testStarted name='just failure after unscoped info'] -Message.tests.cpp:<line number>|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] +##teamcity[testFailed name='just failure after unscoped info' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexplicit failure with message:|n "previous unscoped info SHOULD not be seen"'] ##teamcity[testFinished name='just failure after unscoped info' duration="{duration}"] ##teamcity[testStarted name='just info'] ##teamcity[testFinished name='just info' duration="{duration}"] @@ -773,16 +826,16 @@ Message.tests.cpp:<line number>|nexplicit failure with message:|n "previous uns ##teamcity[testStarted name='long long'] ##teamcity[testFinished name='long long' duration="{duration}"] ##teamcity[testStarted name='looped SECTION tests'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] -Misc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 0|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 0 > 1|n'] +##teamcity[testFailed name='looped SECTION tests' message='-------------------------------------------------------------------------------|nb is currently: 1|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n CHECK( b > a )|nwith expansion:|n 1 > 1|n'] ##teamcity[testFinished name='looped SECTION tests' duration="{duration}"] ##teamcity[testStarted name='looped tests'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[0|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[1|] (1) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[3|] (3) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[4|] (5) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[6|] (13) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] +##teamcity[testFailed name='looped tests' message='Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib|[7|] (21) is even"|n CHECK( ( fib|[i|] % 2 ) == 0 )|nwith expansion:|n 1 == 0|n'] ##teamcity[testFinished name='looped tests' duration="{duration}"] ##teamcity[testStarted name='makeStream recognizes %debug stream name'] ##teamcity[testFinished name='makeStream recognizes %debug stream name' duration="{duration}"] @@ -795,10 +848,14 @@ Misc.tests.cpp:<line number>|nexpression failed with message:|n "Testing if fib ##teamcity[testStarted name='mix info, unscoped info and warning'] ##teamcity[testFinished name='mix info, unscoped info and warning' duration="{duration}"] ##teamcity[testStarted name='more nested SECTION tests'] -Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] +##teamcity[testFailed name='more nested SECTION tests' message='-------------------------------------------------------------------------------|ndoesn|'t equal|nequal|n-------------------------------------------------------------------------------|nMisc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expansion:|n 1 == 2|n'] ##teamcity[testFinished name='more nested SECTION tests' duration="{duration}"] ##teamcity[testStarted name='nested SECTION tests'] ##teamcity[testFinished name='nested SECTION tests' duration="{duration}"] +##teamcity[testStarted name='nested sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='nested sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nB|nB2|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testStdOut name='nested sections can be skipped dynamically at runtime' out='a!|nb1!|n!|n'] +##teamcity[testFinished name='nested sections can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='non streamable - with conv. op'] ##teamcity[testFinished name='non streamable - with conv. op' duration="{duration}"] ##teamcity[testStarted name='non-copyable objects'] @@ -810,7 +867,7 @@ Misc.tests.cpp:<line number>|nexpression failed|n REQUIRE( a == b )|nwith expan ##teamcity[testStarted name='not allowed'] ##teamcity[testFinished name='not allowed' duration="{duration}"] ##teamcity[testStarted name='not prints unscoped info from previous failures'] -Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='not prints unscoped info from previous failures' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='not prints unscoped info from previous failures' duration="{duration}"] ##teamcity[testStarted name='null strings'] ##teamcity[testFinished name='null strings' duration="{duration}"] @@ -825,10 +882,10 @@ Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD ##teamcity[testStarted name='print unscoped info if passing unscoped info is printed'] ##teamcity[testFinished name='print unscoped info if passing unscoped info is printed' duration="{duration}"] ##teamcity[testStarted name='prints unscoped info on failure'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='prints unscoped info on failure' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "this SHOULD be seen"|n "this SHOULD also be seen"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='prints unscoped info on failure' duration="{duration}"] ##teamcity[testStarted name='prints unscoped info only for the first assertion'] -Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='prints unscoped info only for the first assertion' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD be seen only ONCE"|n CHECK( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='prints unscoped info only for the first assertion' duration="{duration}"] ##teamcity[testStarted name='random SECTION tests'] ##teamcity[testFinished name='random SECTION tests' duration="{duration}"] @@ -844,19 +901,25 @@ Message.tests.cpp:<line number>|nexpression failed with message:|n "this SHOULD ##teamcity[testFinished name='run_for_at_least, int' duration="{duration}"] ##teamcity[testStarted name='second tag'] ##teamcity[testFinished name='second tag' duration="{duration}"] +##teamcity[testStarted name='sections can be skipped dynamically at runtime'] +##teamcity[testIgnored name='sections can be skipped dynamically at runtime' message='-------------------------------------------------------------------------------|nskipped|n-------------------------------------------------------------------------------|nSkip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='sections can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='send a single char to INFO'] -Misc.tests.cpp:<line number>|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='send a single char to INFO' message='Misc.tests.cpp:<line number>|n...............................................................................|n|nMisc.tests.cpp:<line number>|nexpression failed with message:|n "3"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='send a single char to INFO' duration="{duration}"] ##teamcity[testStarted name='sends information to INFO'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='sends information to INFO' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "hi"|n "i := 7"|n REQUIRE( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='sends information to INFO' duration="{duration}"] ##teamcity[testStarted name='shortened hide tags are split apart'] ##teamcity[testFinished name='shortened hide tags are split apart' duration="{duration}"] +##teamcity[testStarted name='skipped tests can optionally provide a reason'] +##teamcity[testIgnored name='skipped tests can optionally provide a reason' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip with message:|n "skipping because answer = 43"'] +##teamcity[testFinished name='skipped tests can optionally provide a reason' duration="{duration}"] ##teamcity[testStarted name='splitString'] ##teamcity[testFinished name='splitString' duration="{duration}"] ##teamcity[testStarted name='stacks unscoped info in loops'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] -Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:<line number>|n...............................................................................|n|nMessage.tests.cpp:<line number>|nexpression failed with messages:|n "Count 1 to 3..."|n "1"|n "2"|n "3"|n CHECK( false )|nwith expansion:|n false|n'] +##teamcity[testFailed name='stacks unscoped info in loops' message='Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to 6..."|n "4"|n "5"|n "6"|n CHECK( false )|nwith expansion:|n false|n'] ##teamcity[testFinished name='stacks unscoped info in loops' duration="{duration}"] ##teamcity[testStarted name='startsWith'] ##teamcity[testFinished name='startsWith' duration="{duration}"] @@ -896,8 +959,11 @@ Message.tests.cpp:<line number>|nexpression failed with messages:|n "Count 4 to ##teamcity[testFinished name='tables' duration="{duration}"] ##teamcity[testStarted name='tags with dots in later positions are not parsed as hidden'] ##teamcity[testFinished name='tags with dots in later positions are not parsed as hidden' duration="{duration}"] +##teamcity[testStarted name='tests can be skipped dynamically at runtime'] +##teamcity[testIgnored name='tests can be skipped dynamically at runtime' message='Skip.tests.cpp:<line number>|n...............................................................................|n|nSkip.tests.cpp:<line number>|nexplicit skip'] +##teamcity[testFinished name='tests can be skipped dynamically at runtime' duration="{duration}"] ##teamcity[testStarted name='thrown std::strings are translated'] -Exception.tests.cpp:<line number>|nunexpected exception with message:|n "Why would you throw a std::string?"'] +##teamcity[testFailed name='thrown std::strings are translated' message='Exception.tests.cpp:<line number>|n...............................................................................|n|nException.tests.cpp:<line number>|nunexpected exception with message:|n "Why would you throw a std::string?"'] ##teamcity[testFinished name='thrown std::strings are translated' duration="{duration}"] ##teamcity[testStarted name='toString on const wchar_t const pointer returns the string contents'] ##teamcity[testFinished name='toString on const wchar_t const pointer returns the string contents' duration="{duration}"] @@ -927,6 +993,8 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "Why wo ##teamcity[testFinished name='tuple<tuple<int>,tuple<>,float>' duration="{duration}"] ##teamcity[testStarted name='uniform samples'] ##teamcity[testFinished name='uniform samples' duration="{duration}"] +##teamcity[testStarted name='uniform_integer_distribution can return the bounds'] +##teamcity[testFinished name='uniform_integer_distribution can return the bounds' duration="{duration}"] ##teamcity[testStarted name='unique_ptr reimplementation: basic functionality'] ##teamcity[testFinished name='unique_ptr reimplementation: basic functionality' duration="{duration}"] ##teamcity[testStarted name='vec<vec<string,alloc>> -> toString'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 4ff2e4f2..be57798b 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="2" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> +<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="3" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> <TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1027: Bitfields can be captured" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -20,7 +20,7 @@ 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1147" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -71,16 +71,16 @@ {?} >= {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1175 - Hidden Test" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1238" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > uarr := "123" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > sarr := "456" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -91,10 +91,10 @@ 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > uarr := "123" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > sarr := "456" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -105,16 +105,16 @@ 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1245" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1319: Sections can have description (even if it is not saved" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Section name="SectionName" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1403" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -125,24 +125,24 @@ [1403 helper] == [1403 helper] </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1455 - INFO and WARN can start with a linebreak" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This info message starts with a linebreak </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This warning message starts with a linebreak </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="#1514: stderr/stdout is not captured in tests aborted by an exception" tags="[.][output-capture][regression]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > 1514 </Failure> - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> This would not be caught previously </StdOut> @@ -160,7 +160,7 @@ Nor would this true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1905 -- test spec parser properly clears internal state between compound tests" tags="[command-line][test-spec]" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -187,7 +187,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1912 -- test spec parser handles escaping" tags="[command-line][test-spec]" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Section name="Various parentheses" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -215,7 +215,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="backslash in test name" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -226,9 +226,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1913 - GENERATE inside a for loop should not keep recreating the generator" tags="[generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -247,7 +247,7 @@ Nor would this 6 < 7 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1913 - GENERATEs can share a line" tags="[generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -282,11 +282,11 @@ Nor would this 2 != 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - GENERATE after a section" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -297,7 +297,7 @@ Nor would this 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -308,7 +308,7 @@ Nor would this 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -319,9 +319,9 @@ Nor would this 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - Section followed by flat generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -333,7 +333,7 @@ Nor would this 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -351,7 +351,7 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - flat generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -378,100 +378,100 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - mixed sections and generates" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - nested generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -618,16 +618,16 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#2152 - ULP checks between differently signed values were wrong - double" tags="[floating-point][matchers][ulp]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -646,7 +646,7 @@ Nor would this 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#2152 - ULP checks between differently signed values were wrong - float" tags="[floating-point][matchers][ulp]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -665,20 +665,26 @@ Nor would this 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="#2615 - Throwing in constructor generator fails test case but does not abort" tags="[!shouldfail][generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Exception filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + failure to init + </Exception> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#748 - captures with unexpected exceptions" tags="[!shouldfail][!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="outside assertions" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > expected exception </Exception> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="inside REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Expression success="false" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -692,10 +698,10 @@ Nor would this expected exception </Exception> </Expression> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="inside REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -706,9 +712,9 @@ Nor would this thisThrows() </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#809" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -719,7 +725,7 @@ Nor would this 42 == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#833" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -778,7 +784,7 @@ Nor would this true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#835 -- errno should not be touched by Catch2" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -797,10 +803,10 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#872" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > dummy := 0 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -811,25 +817,25 @@ Nor would this {?} == 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#961 -- Dynamically created sections should all be reported" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Looped section 0" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 1" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 2" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 3" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 4" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="'Not' checks that should fail" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -896,7 +902,7 @@ Nor would this !(1 == 1) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="'Not' checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -963,7 +969,7 @@ Nor would this !(1 == 2) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="(unimplemented) static bools can be evaluated" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Section name="compare to true" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -983,7 +989,7 @@ Nor would this true == true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="compare to false" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1002,7 +1008,7 @@ Nor would this false == false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="negation" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1013,7 +1019,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="double negation" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1024,7 +1030,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="direct" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1043,9 +1049,9 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="3x3x3 ints" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1696,7 +1702,7 @@ Nor would this 3 < 9 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A METHOD_AS_TEST_CASE based test run that fails" tags="[.][class][failing]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1707,7 +1713,7 @@ Nor would this "hello" == "world" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A METHOD_AS_TEST_CASE based test run that succeeds" tags="[class]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1718,7 +1724,7 @@ Nor would this "hello" == "hello" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1729,7 +1735,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1740,7 +1746,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1751,7 +1757,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1762,7 +1768,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1773,7 +1779,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<int>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1784,7 +1790,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<float>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1795,7 +1801,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1806,7 +1812,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1817,7 +1823,7 @@ Nor would this 6 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1828,7 +1834,7 @@ Nor would this 2 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1839,7 +1845,7 @@ Nor would this 6 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1850,7 +1856,7 @@ Nor would this 2 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1861,7 +1867,7 @@ Nor would this 6 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<int,2>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1872,7 +1878,7 @@ Nor would this 2 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<float,6>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1883,7 +1889,7 @@ Nor would this 6 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1894,7 +1900,7 @@ Nor would this 2 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1905,7 +1911,7 @@ Nor would this 1.0 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1916,7 +1922,7 @@ Nor would this 1.0f == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1927,7 +1933,7 @@ Nor would this 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1938,7 +1944,7 @@ Nor would this 1.0 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1949,7 +1955,7 @@ Nor would this 1.0f == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1960,7 +1966,7 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1971,7 +1977,7 @@ Nor would this 1 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1982,7 +1988,7 @@ Nor would this 3 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1993,7 +1999,7 @@ Nor would this 6 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2004,7 +2010,7 @@ Nor would this 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2015,7 +2021,7 @@ Nor would this 3 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2026,7 +2032,7 @@ Nor would this 6 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEST_CASE_METHOD based test run that fails" tags="[.][class][failing]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2037,7 +2043,7 @@ Nor would this 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEST_CASE_METHOD based test run that succeeds" tags="[class]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2048,7 +2054,7 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - Foo<float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2059,7 +2065,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - Foo<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2070,7 +2076,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - std::vector<float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2081,7 +2087,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - std::vector<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2092,7 +2098,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - Bar<float, 42>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2103,7 +2109,7 @@ Nor would this 42 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - Bar<int, 9>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2114,7 +2120,7 @@ Nor would this 9 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - std::array<float, 42>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2125,7 +2131,7 @@ Nor would this 42 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - std::array<int, 9>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2136,7 +2142,7 @@ Nor would this 9 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A comparison that uses literals instead of the normal constructor" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2187,19 +2193,19 @@ Nor would this 1.23 == Approx( 1.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A couple of nested sections followed by a failure" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Outer" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Inner" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > to infinity and beyond </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A failing expression with a non streamable type is still captured" tags="[.][failing][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2218,7 +2224,7 @@ Nor would this {?} == {?} </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Absolute margin" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2269,10 +2275,10 @@ Nor would this 100.3 == Approx( 100.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="An empty test with no assertions" tags="[empty]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="An expression with side-effects should only be evaluated once" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2291,7 +2297,7 @@ Nor would this 8 == 8 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="An unchecked exception reports the line of the last assertion" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -2313,10 +2319,10 @@ Nor would this unexpected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Anonymous test case 1" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approx setters validate their arguments" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2375,7 +2381,7 @@ Nor would this Approx(0).epsilon(1.0001), std::domain_error </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approx with exactly-representable margin" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2418,7 +2424,7 @@ Nor would this 245.5f == Approx( 245.25 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate PI" tags="[Approx][PI]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2437,7 +2443,7 @@ Nor would this 3.1428571429 != Approx( 3.141 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2456,7 +2462,7 @@ Nor would this 1.23 == Approx( 1.231 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with floats" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2475,7 +2481,7 @@ Nor would this 0.0f == Approx( 0.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with ints" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2494,7 +2500,7 @@ Nor would this 0 == Approx( 0.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with mixed numeric types" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2537,7 +2543,7 @@ Nor would this 1.234 == Approx( 1.2339999676 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Arbitrary predicate matcher" tags="[generic][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Function pointer" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -2557,7 +2563,7 @@ Nor would this 1 not matches predicate: "always false" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Lambdas + different type" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -2576,9 +2582,9 @@ Nor would this "This wouldn't pass" not matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Assertion macros support bit operators and bool conversions" tags="[bitops][compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -2621,7 +2627,7 @@ Nor would this !(Val: 1 ^ Val: 1) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Assertions then sections" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2650,9 +2656,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Original> @@ -2680,11 +2686,11 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Basic use of the Contains range matcher" tags="[contains][matchers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Different argument ranges, same element type, default comparison" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2712,7 +2718,7 @@ Nor would this { 4, 5, 6 } not contains element 1 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different argument ranges, same element type, custom comparison" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2739,7 +2745,7 @@ Nor would this { 4, 5, 6 } not contains element 0 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different element type, custom comparisons" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2750,7 +2756,7 @@ Nor would this { "abc", "abcd", "abcde" } contains element 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Can handle type that requires ADL-found free function begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2769,7 +2775,7 @@ Nor would this { 1, 2, 3, 4, 5 } not contains element 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Initialization with move only types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2788,7 +2794,7 @@ Nor would this { 1, 2, 3 } not contains element 9 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Matching using matcher" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2799,9 +2805,9 @@ Nor would this { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Basic use of the Empty range matcher" tags="[empty][matchers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Simple, std-provided containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2853,7 +2859,7 @@ Nor would this { } is empty </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type with empty" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2864,7 +2870,7 @@ Nor would this {?} not is empty </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found empty free function" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2875,97 +2881,97 @@ Nor would this {?} is empty </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE can deal with complex expressions" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > b := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > c := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a + b := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a+b := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > c > b := true </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a == 1 := true </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE can deal with complex expressions involving commas" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> - std::vector<int>{1, 2, 3}[0, 1, 2] := 3 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 </Info> - <Info> - std::vector<int>{1, 2, 3}[(0, 1)] := 2 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 </Info> - <Info> - std::vector<int>{1, 2, 3}[0] := 1 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[0] := 0 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (helper_1436<int, int>{12, -12}) := { 12, -12 } </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (helper_1436<int, int>(-12, 12)) := { -12, 12 } </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (1, 2) := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (2, 3) := 3 </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE parses string and character constants" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ("comma, in string", "escaped, \", ") := "escaped, ", " </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "single quote in string,'," := "single quote in string,'," </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "some escapes, \\,\\\\" := "some escapes, \,\\" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '"' := '"' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '\'' := ''' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ',' := ',' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '}' := '}' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ')' := ')' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '(' := '(' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '{' := '{' </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Capture and info messages" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Capture should stringify like assertions" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > i := 2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -2976,10 +2982,10 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Info should NOT stringify the way assertions do" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > 3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -2990,9 +2996,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CaseInsensitiveEqualsTo is case insensitive" tags="[comparisons][string-case]" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Section name="Degenerate cases" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3012,7 +3018,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Plain comparisons" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3063,9 +3069,9 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CaseInsensitiveLess is case insensitive" tags="[comparisons][string-case]" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Section name="Degenerate cases" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3093,7 +3099,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Plain comparisons" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3128,9 +3134,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Character pretty printing" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Specifically escaped" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3166,7 +3172,7 @@ Nor would this '\f' == '\f' </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="General chars" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3209,7 +3215,7 @@ Nor would this 'Z' == 'Z' </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Low ASCII" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3252,9 +3258,9 @@ Nor would this 5 == 5 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Clara::Arg supports single-arg parse the way Opt does" tags="[arg][clara][compilation]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3273,7 +3279,7 @@ Nor would this "foo" == "foo" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Clara::Opt supports accept-many lambdas" tags="[clara][opt]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Section name="Parsing fails on multiple options without accept_many" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3285,7 +3291,7 @@ Nor would this !{?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Parsing succeeds on multiple options with accept_many" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3304,9 +3310,9 @@ Nor would this { "aaa", "bbb" } == { "aaa", "bbb" } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="ColourGuard behaviour" tags="[console-colours]" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Section name="ColourGuard is disengaged by default" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3318,7 +3324,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ColourGuard is engaged by op<<" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3341,7 +3347,7 @@ Using code: 0 " </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ColourGuard can be engaged explicitly" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3364,9 +3370,9 @@ C " </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchAllOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3393,7 +3399,7 @@ C 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchAnyOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3420,7 +3426,7 @@ C 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchNotOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3455,10 +3461,10 @@ C 1 equals: (int) 1 or (string) "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining concrete matchers does not use templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining only templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3485,7 +3491,7 @@ C 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining templated and concrete matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3544,7 +3550,7 @@ C "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3555,7 +3561,7 @@ C { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Commas in various macros are allowed" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -3654,7 +3660,7 @@ C { 1, 2 } == { 1, 2 } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparing function pointers" tags="[function pointer][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -3673,7 +3679,7 @@ C 0x<hex digits> == 0x<hex digits> </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparison ops" tags="[rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -3708,7 +3714,7 @@ C !({?} != {?}) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparison with explicitly convertible types" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -3807,7 +3813,7 @@ C Approx( 11.0 ) >= StrongDoubleTypedef(10) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons between ints where one side is computed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3818,7 +3824,7 @@ C 54 == 54 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3869,7 +3875,7 @@ C -2147483648 > 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons with int literals don't warn when mixing signed/ unsigned" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3976,7 +3982,7 @@ C 4294967295 (0x<hex digits>) > 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Composed generic matchers shortcircuit" tags="[composed][generic][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="MatchAllOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4004,7 +4010,7 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="MatchAnyOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4031,9 +4037,9 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Composed matchers shortcircuit" tags="[composed][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="MatchAllOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4061,7 +4067,7 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="MatchAnyOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4088,9 +4094,9 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Contains string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4109,7 +4115,7 @@ C "this string contains 'abc' as a substring" contains: "STRING" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Copy and then generate a range" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4121,7 +4127,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4132,7 +4138,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4143,7 +4149,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4154,7 +4160,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4165,7 +4171,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4176,7 +4182,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4187,7 +4193,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4198,7 +4204,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4209,7 +4215,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4220,7 +4226,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4231,7 +4237,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4242,7 +4248,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Final validation" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4261,9 +4267,9 @@ C 6 == 6 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Cout stream properly declares it writes to stdout" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -4274,7 +4280,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Custom exceptions can be translated when testing for nothrow" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4288,7 +4294,7 @@ C custom exception - not std </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Custom exceptions can be translated when testing for throwing as something else" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4302,13 +4308,13 @@ C custom exception - not std </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Custom std-exceptions can be custom translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > custom std exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Default scale is invisible to comparison" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -4327,7 +4333,7 @@ C 0.00001 != Approx( 0.0000001 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Directly creating an EnumInfo" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -4356,7 +4362,13 @@ C "{** unexpected enum value **}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Empty generators can SKIP in constructor" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + This generator is empty + </Skip> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="Empty stream name opens cout stream" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -4367,18 +4379,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Empty tag is not allowed" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > - <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > - <Original> - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) - </Original> - <Expanded> - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) - </Expanded> - </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4397,7 +4398,7 @@ C "this string contains 'abc' as a substring" ends with: "this" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Enums can quickly have stringification enabled using REGISTER_ENUM" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -4442,7 +4443,7 @@ C "Value2" == "Value2" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -4461,7 +4462,7 @@ C "Blue" == "Blue" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Epsilon only applies to Approx's value" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -4472,7 +4473,7 @@ C 101.01 != Approx( 100.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equality checks that should fail" tags="[!mayfail][.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -4579,7 +4580,7 @@ C 1.3 == Approx( 1.301 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equality checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -4638,7 +4639,7 @@ C 1.3 == Approx( 1.3 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equals" tags="[matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4657,7 +4658,7 @@ C "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equals string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4676,7 +4677,7 @@ C "this string contains 'abc' as a substring" equals: "something else" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified" tags="[exception][toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -4707,7 +4708,7 @@ C "StringMakerException" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exception matchers that fail" tags="[!throws][.][exceptions][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="No exception" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4727,7 +4728,7 @@ C doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Type mismatch" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4752,7 +4753,7 @@ C Unknown exception </Exception> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Contents are wrong" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4771,9 +4772,9 @@ C SpecialException::what special exception has value of 1 </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Exception matchers that succeed" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4792,7 +4793,42 @@ C SpecialException::what special exception has value of 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Exception message can be matched" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) + </Original> + <Expanded> + DerivedException::what matches "starts with: "Derived"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) + </Original> + <Expanded> + DerivedException::what matches "ends with: "::what"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) + </Original> + <Expanded> + DerivedException::what matches "not starts with: "::what"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) + </Original> + <Expanded> + SpecialException::what matches "starts with: "Special"" + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exception messages can be tested for" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="exact match" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4804,7 +4840,7 @@ C "expected exception" equals: "expected exception" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="different case" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4815,7 +4851,7 @@ C "expected exception" equals: "expected exception" (case insensitive) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="wildcarded" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4850,9 +4886,9 @@ C "expected exception" contains: "except" (case insensitive) </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exceptions matchers" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4887,7 +4923,7 @@ C SpecialException::what exception message matches "SpecialException::what" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Expected exceptions that don't throw or unexpected exceptions fail the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4920,26 +4956,26 @@ C expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL aborts the test" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This is a failure </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL does not require an argument" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" /> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL_CHECK does not abort the test" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This is a failure </Failure> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This message appears in the output </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Factorials are computed" tags="[factorial]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -4982,7 +5018,18 @@ C 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Filter generator throws exception for empty generator" tags="[generators]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Original> + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + </Original> + <Expanded> + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Floating point matchers: double" tags="[floating-point][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Relative" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5027,9 +5074,9 @@ C 0.0 and 2.22507e-308 are within 2.22045e-12% of each other </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Margin" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5096,7 +5143,7 @@ C -10.0 is within 0.5 of -9.6 </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ULPs" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5155,7 +5202,7 @@ C -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5182,7 +5229,7 @@ C 0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other ) </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Constructor validation" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5233,9 +5280,20 @@ C WithinRel( 1., 1. ), std::domain_error </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="IsNaN" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1., !IsNaN() + </Original> + <Expanded> + 1.0 not is NaN + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Floating point matchers: float" tags="[floating-point][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Relative" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5280,9 +5338,9 @@ C 0.0f and 1.17549e-38 are within 0.00119209% of each other </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Margin" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5357,7 +5415,7 @@ C -10.0f is within 0.5 of -9.6000003815 </Expanded> </Expression> - <OverallResults successes="9" failures="0" expectedFailures="0"/> + <OverallResults successes="9" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ULPs" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5424,7 +5482,7 @@ C -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5451,7 +5509,7 @@ C 0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other ) </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Constructor validation" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5510,9 +5568,55 @@ C WithinRel( 1.f, 1.f ), std::domain_error </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <Section name="IsNaN" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1., !IsNaN() + </Original> + <Expanded> + 1.0 not is NaN + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="GENERATE can combine literals and generators" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators -- adapters" tags="[generators][generic]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5525,9 +5629,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5539,9 +5643,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5553,9 +5657,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Throws if there are no matching values" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5567,9 +5671,9 @@ C filter([] (int) {return false; }, value(1)), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5580,7 +5684,7 @@ C 1 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5591,7 +5695,7 @@ C 2 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5602,7 +5706,7 @@ C 3 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5614,9 +5718,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5628,9 +5732,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5642,9 +5746,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5656,9 +5760,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5670,9 +5774,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5684,9 +5788,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5698,9 +5802,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5712,9 +5816,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5726,9 +5830,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5739,7 +5843,7 @@ C 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5750,7 +5854,7 @@ C 2 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5761,7 +5865,7 @@ C 3 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5772,7 +5876,7 @@ C 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5783,7 +5887,7 @@ C 2 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5794,7 +5898,7 @@ C 3 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5814,9 +5918,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5836,9 +5940,9 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5858,9 +5962,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is not divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5888,9 +5992,9 @@ C 1 < 3 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is not divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5918,9 +6022,9 @@ C 2 < 3 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5932,9 +6036,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5946,9 +6050,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5960,9 +6064,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Throws on too small generators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5974,11 +6078,11 @@ C chunk(2, value(1)), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators -- simple" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5990,7 +6094,7 @@ C -3 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6001,7 +6105,7 @@ C -2 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6012,7 +6116,7 @@ C -1 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6023,7 +6127,7 @@ C 4 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6034,7 +6138,7 @@ C 4 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6045,7 +6149,7 @@ C 4 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6056,7 +6160,7 @@ C -3 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6067,7 +6171,7 @@ C -2 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6078,7 +6182,7 @@ C -1 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6089,7 +6193,7 @@ C 8 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6100,7 +6204,7 @@ C 8 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6111,7 +6215,7 @@ C 8 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6122,7 +6226,7 @@ C -3 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6133,7 +6237,7 @@ C -2 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6144,7 +6248,7 @@ C -1 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6155,7 +6259,7 @@ C 12 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6166,7 +6270,7 @@ C 12 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6177,9 +6281,9 @@ C 12 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators internals" tags="[generators][internals]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Single value" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6199,7 +6303,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Preset values" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6250,7 +6354,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Generator combinator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6333,7 +6437,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Explicitly typed generator sequence" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6392,7 +6496,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Simple filtering" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6428,9 +6532,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Filter out multiple elements at the start and end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6466,9 +6570,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Throws on construction if it can't get initial element" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6488,9 +6592,9 @@ C filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Take less" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6526,9 +6630,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Take more" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6548,9 +6652,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Map with explicit return type" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6601,7 +6705,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Map with deduced return type" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6652,7 +6756,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Singular repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6672,9 +6776,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Actual repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6774,9 +6878,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive auto step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6845,11 +6949,11 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative auto step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6918,11 +7022,11 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6992,13 +7096,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7068,13 +7172,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7160,19 +7264,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Exact" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7183,7 +7287,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7194,7 +7298,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7205,7 +7309,7 @@ C -0.9 == Approx( -0.9 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7216,7 +7320,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7227,7 +7331,7 @@ C -0.8 == Approx( -0.8 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7238,7 +7342,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7249,7 +7353,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7260,7 +7364,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7271,7 +7375,7 @@ C -0.6 == Approx( -0.6 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7282,7 +7386,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7293,7 +7397,7 @@ C -0.5 == Approx( -0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7304,7 +7408,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7315,7 +7419,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7326,7 +7430,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7337,7 +7441,7 @@ C -0.3 == Approx( -0.3 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7348,7 +7452,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7359,7 +7463,7 @@ C -0.2 == Approx( -0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7370,7 +7474,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7381,7 +7485,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7392,7 +7496,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1.38778e-16 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7403,7 +7507,7 @@ C -0.0 == Approx( -0.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1.38778e-16 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7414,7 +7518,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7425,7 +7529,7 @@ C 0.1 == Approx( 0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7436,7 +7540,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7447,7 +7551,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7458,7 +7562,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7469,7 +7573,7 @@ C 0.3 == Approx( 0.3 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7480,7 +7584,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7491,7 +7595,7 @@ C 0.4 == Approx( 0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7502,7 +7606,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7513,7 +7617,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7524,7 +7628,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7535,7 +7639,7 @@ C 0.6 == Approx( 0.6 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7546,7 +7650,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7557,7 +7661,7 @@ C 0.7 == Approx( 0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7568,7 +7672,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7579,7 +7683,7 @@ C 0.8 == Approx( 0.8 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7590,7 +7694,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7601,7 +7705,7 @@ C 0.9 == Approx( 0.9 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7628,19 +7732,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Slightly over end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7651,7 +7755,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7662,7 +7766,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7673,7 +7777,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7684,7 +7788,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7695,7 +7799,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7706,7 +7810,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7717,7 +7821,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7728,7 +7832,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7739,7 +7843,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7750,7 +7854,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7761,7 +7865,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7780,19 +7884,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Slightly under end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7803,7 +7907,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7814,7 +7918,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7825,7 +7929,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7836,7 +7940,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7847,7 +7951,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7858,7 +7962,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7869,7 +7973,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7880,7 +7984,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7891,7 +7995,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7902,7 +8006,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7913,7 +8017,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7932,13 +8036,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8008,13 +8112,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8084,13 +8188,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8176,15 +8280,15 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Greater-than inequalities with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -8219,7 +8323,7 @@ C 1.23 >= Approx( 1.24 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashers with different seed produce different hash with same test case" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8232,7 +8336,7 @@ C 130711275 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashers with same seed produce same hash" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8245,7 +8349,7 @@ C 3422778688 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashing different test cases produces different result" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Section name="Different test name" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8259,7 +8363,7 @@ C 2668622104 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different classname" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8272,7 +8376,7 @@ C 3916075712 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different tags" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8285,9 +8389,9 @@ C 3429949824 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashing test case produces same hash across multiple calls" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8300,22 +8404,34 @@ C 3422778688 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="INFO and UNSCOPED_INFO can stream multiple arguments" tags="[.][failing][info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + This info has multiple parts. + </Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + This unscoped info has multiple parts. + </Info> + <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + Show infos! + </Failure> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO and WARN do not abort tests" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this is a message </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this is a warning </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO gets logged on failure" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > so should this </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8326,10 +8442,10 @@ C 2 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO gets logged on failure, even if captured before successful assertions" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8340,10 +8456,10 @@ C 2 == 2 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8354,13 +8470,13 @@ C 2 == 1 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and this, but later </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8371,16 +8487,16 @@ C 2 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and this, but later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > but not this </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8391,13 +8507,13 @@ C 2 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO is reset for each loop" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 0 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 0 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8408,10 +8524,10 @@ C 0 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8422,10 +8538,10 @@ C 1 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8436,10 +8552,10 @@ C 2 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8450,10 +8566,10 @@ C 3 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 4 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8464,10 +8580,10 @@ C 4 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 5 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8478,10 +8594,10 @@ C 5 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 6 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8492,10 +8608,10 @@ C 6 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 7 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8506,10 +8622,10 @@ C 7 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 8 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8520,10 +8636,10 @@ C 8 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 9 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8534,10 +8650,10 @@ C 9 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 10 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 10 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8548,7 +8664,21 @@ C 10 < 10 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> + </TestCase> + <TestCase name="Incomplete AssertionHandler" tags="[!shouldfail][assertion-handler]" filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + <Original> + Dummy + </Original> + <Expanded> + Dummy + </Expanded> + <Exception filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Inequality checks that should fail" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -8591,7 +8721,7 @@ C 5 != 5 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Inequality checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -8682,7 +8812,278 @@ C 5 != 6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="JsonWriter" tags="[JSON][JsonWriter]" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Section name="Newly constructed JsonWriter does nothing" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "" + </Original> + <Expanded> + "" == "" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeObject will create an empty pair of braces" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "{\n}" + </Original> + <Expanded> + "{ +}" +== +"{ +}" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeObject with key will create an object to write the value" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) + </Original> + <Expanded> + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="nesting objects" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) + </Original> + <Expanded> + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeArray will create an empty pair of braces" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n]" + </Original> + <Expanded> + "[ +]" +== +"[ +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeArray creates array to write the values to" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" + </Original> + <Expanded> + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Moved from JsonObjectWriter shall not insert superfluous brace" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "{\n}" + </Original> + <Expanded> + "{ +}" +== +"{ +}" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Moved from JsonArrayWriter shall not insert superfluous bracket" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n]" + </Original> + <Expanded> + "[ +]" +== +"[ +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom class shall be quoted" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "\"custom\"" + </Original> + <Expanded> + ""custom"" == ""custom"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="JsonWriter escapes charaters in strings properly" tags="[JsonWriter]" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Section name="Quote in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\"\"" + </Original> + <Expanded> + ""\""" == ""\""" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Backslash in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\\\"" + </Original> + <Expanded> + ""\\"" == ""\\"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Forward slash in a string is **not** escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"/\"" + </Original> + <Expanded> + ""/"" == ""/"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Backspace in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\b\"" + </Original> + <Expanded> + ""\b"" == ""\b"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Formfeed in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\f\"" + </Original> + <Expanded> + ""\f"" == ""\f"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="linefeed in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\n\"" + </Original> + <Expanded> + ""\n"" == ""\n"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="carriage return in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\r\"" + </Original> + <Expanded> + ""\r"" == ""\r"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="tab in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\t\"" + </Original> + <Expanded> + ""\t"" == ""\t"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="combination of characters is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\\/\\t\\r\\n\"" + </Original> + <Expanded> + ""\\/\t\r\n"" == ""\\/\t\r\n"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Lambdas in assertions" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -8693,7 +9094,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Less-than inequalities with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -8728,10 +9129,10 @@ C 1.23 <= Approx( 1.22 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="ManuallyRegistered" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be (AllOf) composed with the && operator" tags="[matchers][operator&&][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8742,7 +9143,7 @@ C "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be (AnyOf) composed with the || operator" tags="[matchers][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8761,7 +9162,7 @@ C "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be composed with both && and ||" tags="[matchers][operator&&][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8772,7 +9173,7 @@ C "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be composed with both && and || - failing" tags="[.][failing][matchers][operator&&][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8783,7 +9184,7 @@ C "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Matchers can be negated (Not) with the ! operator" tags="[matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8794,7 +9195,7 @@ C "this string contains 'abc' as a substring" not contains: "different" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be negated (Not) with the ! operator - failing" tags="[.][failing][matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8805,44 +9206,44 @@ C "this string contains 'abc' as a substring" not contains: "substring" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Mayfail test case with nested sections" tags="[!mayfail]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > - <OverallResults successes="0" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > - <OverallResults successes="0" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Mismatching exception messages failing the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -8861,7 +9262,7 @@ C "expected exception" equals: "should fail" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Multireporter calls reporters and listeners in correct order" tags="[multi-reporter][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -8874,7 +9275,7 @@ C { "Hello", "world", "Goodbye", "world" } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Multireporter updates ReporterPreferences properly" tags="[multi-reporter][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -8942,7 +9343,7 @@ C true == true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -9009,9 +9410,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Nested generators and captured variables" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -9142,19 +9543,19 @@ C 99 > -6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Nice descriptive name" tags="[.][tag1][tag2][tag3]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > This one ran </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Non-std exceptions can be translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > custom exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Objects that evaluated in boolean contexts can be checked" tags="[SafeBool][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -9181,10 +9582,10 @@ C !{?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Optionally static assertions" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Ordering comparison checks that should fail" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -9339,7 +9740,7 @@ C "hello" <= "a" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Ordering comparison checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -9478,7 +9879,7 @@ C "hello" > "a" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Our PCG implementation provides expected results for known seeds" tags="[rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Section name="Default seeded" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -9532,7 +9933,7 @@ C 1827115164 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Specific seed" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -9635,24 +10036,24 @@ C 4261393167 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Output from all sections is reported" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Message from section one </Failure> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Message from section two </Failure> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Overloaded comma or address-of operators are not used" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -9687,7 +10088,7 @@ C ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parse uints" tags="[parse-numbers]" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > <Section name="proper inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > @@ -9723,7 +10124,7 @@ C {?} == {?} </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Bad inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > @@ -9782,9 +10183,9 @@ C !{?} </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsed tags are matched case insensitive" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9811,7 +10212,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing sharding-related cli flags" tags="[sharding]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="shard-count" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9831,7 +10232,7 @@ C 8 == 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Negative shard count reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9850,7 +10251,7 @@ C "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Zero shard count reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9869,7 +10270,7 @@ C "Shard count must be positive" contains: "Shard count must be positive" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="shard-index" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9888,7 +10289,7 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Negative shard index reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9907,7 +10308,7 @@ C "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shard index 0 is accepted" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9926,12 +10327,12 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing tags with non-alphabetical characters is pass-through" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9942,7 +10343,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9953,7 +10354,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9964,7 +10365,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9975,7 +10376,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9986,7 +10387,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9997,7 +10398,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing warnings" tags="[cli][warnings]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="NoAssertions" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10017,7 +10418,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="NoTests is no longer supported" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10028,7 +10429,7 @@ C !{?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Combining multiple warnings" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10047,9 +10448,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Pointers can be compared to null" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -10116,7 +10517,7 @@ C 0 != 0x<hex digits> </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Precision of floating point stringification can be set" tags="[floatingPoint][toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Floats" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -10136,7 +10537,7 @@ C 13 == 13 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Double" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -10155,9 +10556,9 @@ C 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Predicate matcher can accept const char*" tags="[compilation][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -10168,7 +10569,7 @@ C "foo" matches undescribed predicate </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Process can be configured on command line" tags="[command-line][config]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="empty args don't cause a crash" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10188,7 +10589,7 @@ C "" == "" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="default - no arguments" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10279,7 +10680,7 @@ C {?} == {?} </Expanded> </Expression> - <OverallResults successes="11" failures="0" expectedFailures="0"/> + <OverallResults successes="11" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case using" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10315,9 +10716,9 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case exclusion using exclude:" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10353,9 +10754,9 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case exclusion using ~" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10391,13 +10792,13 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-r/console" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10408,7 +10809,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10419,13 +10820,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-r/xml" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10436,7 +10837,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10447,13 +10848,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--reporter/junit" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10464,7 +10865,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10475,9 +10876,9 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="must match one of the available ones" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10497,13 +10898,13 @@ C "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="With output file" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10514,7 +10915,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10525,13 +10926,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="With Windows-like absolute path as output file" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10542,7 +10943,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10553,9 +10954,9 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10576,11 +10977,11 @@ C { {?}, {?} } == { {?}, {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10601,11 +11002,11 @@ C { {?}, {?} } == { {?}, {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10626,11 +11027,11 @@ C "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="debugger" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-b" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10650,9 +11051,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="debugger" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--break" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10672,9 +11073,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-a aborts after first failure" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10694,9 +11095,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-x 2 aborts after two failures" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10716,9 +11117,9 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-x must be numeric" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10738,9 +11139,9 @@ C "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10761,11 +11162,11 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10786,11 +11187,11 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10811,11 +11212,11 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10836,11 +11237,11 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10861,11 +11262,11 @@ C "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-e" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10885,9 +11286,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10907,9 +11308,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="output filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-o filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10929,9 +11330,9 @@ C "filename.ext" == "filename.ext" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="output filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--out" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10951,9 +11352,9 @@ C "filename.ext" == "filename.ext" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="combinations" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Single character flags can be combined" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10989,9 +11390,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="without option" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11011,9 +11412,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="auto" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11033,9 +11434,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="yes" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11055,9 +11456,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="no" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11077,9 +11478,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11099,9 +11500,9 @@ C "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="samples" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11121,9 +11522,9 @@ C 200 == 200 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="resamples" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11143,9 +11544,9 @@ C 20000 (0x<hex digits>) == 20000 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="confidence-interval" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11165,9 +11566,9 @@ C 0.99 == Approx( 0.99 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="no-analysis" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11187,9 +11588,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="warmup-time" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11209,11 +11610,11 @@ C 10 == 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int, double, float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11224,7 +11625,7 @@ C 3 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int, double>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11235,7 +11636,7 @@ C 2 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11246,7 +11647,7 @@ C 1 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Random seed generation accepts known methods" tags="[rng][seed]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -11273,7 +11674,7 @@ C Catch::generateRandomSeed(method) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Random seed generation reports unknown methods" tags="[rng][seed]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -11284,7 +11685,7 @@ C Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Range type with sentinel" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -11295,7 +11696,7 @@ C "{ }" == "{ }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reconstruction should be based on stringification: #914" tags="[.][Decomposition][failing]" filename="tests/<exe-name>/UsageTests/Decomposition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Decomposition.tests.cpp" > @@ -11306,7 +11707,7 @@ C Hey, its truthy! </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Regex string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -11333,7 +11734,7 @@ C "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Registering reporter with '::' in name fails" tags="[registration][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11344,7 +11745,7 @@ C "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Regression test #1" tags="[matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -11355,7 +11756,7 @@ C { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reporter's write listings to provided stream" tags="[reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11367,7 +11768,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11382,7 +11783,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11393,7 +11794,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11407,7 +11808,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11418,7 +11819,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11434,7 +11835,7 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11445,7 +11846,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11460,7 +11861,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11471,7 +11872,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11485,7 +11886,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11496,7 +11897,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11512,7 +11913,7 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11523,7 +11924,7 @@ C </Expanded> </Expression> <Section name="console reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11538,7 +11939,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11549,7 +11950,7 @@ C </Expanded> </Expression> <Section name="console reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11563,7 +11964,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11574,7 +11975,7 @@ C </Expanded> </Expression> <Section name="console reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11590,7 +11991,121 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring("fakeTag"s) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring("fake reporter"s) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11601,7 +12116,7 @@ C </Expanded> </Expression> <Section name="JUnit reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11617,7 +12132,7 @@ All available tags: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11628,7 +12143,7 @@ All available tags: </Expanded> </Expression> <Section name="JUnit reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11643,7 +12158,7 @@ Available reporters: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11654,7 +12169,7 @@ Available reporters: </Expanded> </Expression> <Section name="JUnit reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11671,7 +12186,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11682,7 +12197,7 @@ All available test cases: </Expanded> </Expression> <Section name="SonarQube reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11698,7 +12213,7 @@ All available tags: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11709,7 +12224,7 @@ All available tags: </Expanded> </Expression> <Section name="SonarQube reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11724,7 +12239,7 @@ Available reporters: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11735,7 +12250,7 @@ Available reporters: </Expanded> </Expression> <Section name="SonarQube reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11752,7 +12267,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11763,7 +12278,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11778,7 +12293,7 @@ All available test cases: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11789,7 +12304,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11803,7 +12318,7 @@ All available test cases: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11814,7 +12329,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11830,7 +12345,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11841,7 +12356,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11856,7 +12371,7 @@ All available test cases: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11867,7 +12382,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11881,7 +12396,7 @@ All available test cases: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11892,7 +12407,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11908,7 +12423,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11919,7 +12434,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11938,7 +12453,7 @@ All available test cases: </TagsFromMatchingTests>" contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11949,7 +12464,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11966,7 +12481,7 @@ All available test cases: </AvailableReporters>" contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11977,7 +12492,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11999,18 +12514,18 @@ All available test cases: </MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla" tags="[console-reporter]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="SUCCEED counts as a test pass" tags="[messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="SUCCEED does not require an argument" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods" tags="[bdd][fixtures]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: No operations precede me" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12032,13 +12547,13 @@ All available test cases: 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: Do that thing with the thing" tags="[Tags]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: This stuff exists" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12062,29 +12577,29 @@ All available test cases: true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: This is a really long scenario name to see how the list command deals with wrapping" tags="[anotherReallyLongTagNameButThisOneHasNoObviousWrapPointsSoShouldSplitWithinAWordUsingADashCharacter][long][lots][one very long tag name that should cause line wrapping writing out using the list command][tags][verbose][very long tags]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: A section name that is so long that it cannot fit in a single console width" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="When: The test headers are printed as part of the normal running of the scenario" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: Vector resizing affects size and capacity" tags="[bdd][capacity][size][vector]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: an empty vector" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12132,15 +12647,15 @@ All available test cases: 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Given: an empty vector" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12169,16 +12684,16 @@ All available test cases: 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Sends stuff to stdout and stderr" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> A string sent directly to stdout </StdOut> @@ -12253,16 +12768,16 @@ A string sent to stderr via clog Approx( 1.23 ) != 1.24 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Standard output from all sections is reported" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> Message from section one Message from section two @@ -12286,7 +12801,7 @@ Message from section two "this string contains 'abc' as a substring" starts with: "string" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Static arrays are convertible to string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12298,7 +12813,7 @@ Message from section two "{ 1 }" == "{ 1 }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Multiple" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12309,7 +12824,7 @@ Message from section two "{ 3, 2, 1 }" == "{ 3, 2, 1 }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Non-trivial inner items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12322,9 +12837,9 @@ Message from section two "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="String matchers" tags="[matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -12391,7 +12906,7 @@ Message from section two "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="StringRef" tags="[StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Empty string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12419,7 +12934,7 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From string literal" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12454,7 +12969,7 @@ Message from section two "hello" == "hello" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From sub-string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12473,7 +12988,7 @@ Message from section two original.data() </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Copy construction is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12484,7 +12999,7 @@ Message from section two "original string" == "original string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Copy assignment is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12495,7 +13010,7 @@ Message from section two "original string" == "original string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12531,9 +13046,9 @@ Message from section two hello == "hello" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="non-zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12553,9 +13068,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Pointer values of full refs should match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12567,9 +13082,9 @@ Message from section two "hello world!" == "hello world!" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Pointer values of substring refs should also match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12581,9 +13096,9 @@ Message from section two "hello world!" == "hello world!" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Past the end substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12595,9 +13110,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Substring off the end are trimmed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12609,9 +13124,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="substring start after the end is empty" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12623,9 +13138,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Comparisons are deep" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12652,7 +13167,7 @@ Message from section two Hello != Hel </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="implicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12672,9 +13187,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12694,9 +13209,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12716,9 +13231,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12738,9 +13253,9 @@ Message from section two 11 == 11 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12760,9 +13275,9 @@ Message from section two 11 == 11 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="std::string += StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12775,7 +13290,7 @@ Message from section two "some string += the stringref contents" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="StringRef + StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12786,18 +13301,18 @@ Message from section two "abrakadabra" == "abrakadabra" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="StringRef at compilation time" tags="[constexpr][StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Simple constructors" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="UDL construction" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12816,7 +13331,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - signed char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12835,7 +13350,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - unsigned char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12854,7 +13369,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::duration helpers" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12889,7 +13404,7 @@ Message from section two 1 ns != 1 us </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::duration with weird ratios" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12908,7 +13423,7 @@ Message from section two 1 ps != 1 as </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::time_point<system_clock>" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12921,7 +13436,7 @@ Message from section two {iso8601-timestamp} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Tabs and newlines show in output" tags="[.][failing][whitespace]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -12939,7 +13454,7 @@ Message from section two " </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Tag alias can be registered against tag patterns" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Section name="The same tag alias can only be registered once" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -12983,7 +13498,7 @@ Message from section two Redefined at: file:10" contains: "10" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Tag aliases must be of the form [@name]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="CHECK_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -13018,9 +13533,9 @@ Message from section two registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Tags with spaces and non-alphanumerical characters are accepted" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -13039,7 +13554,7 @@ Message from section two { {?}, {?} } ( Contains: {?} and Contains: {?} ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 0" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13050,7 +13565,7 @@ Message from section two 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 1" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13061,7 +13576,7 @@ Message from section two 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 2" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13072,7 +13587,7 @@ Message from section two 1.0 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13083,7 +13598,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13094,7 +13609,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13105,7 +13620,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13116,7 +13631,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13127,7 +13642,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13138,7 +13653,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 2" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13149,7 +13664,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - float" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13185,7 +13700,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13229,9 +13744,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13266,7 +13781,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13301,9 +13816,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - int" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13339,7 +13854,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13383,9 +13898,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13420,7 +13935,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13455,9 +13970,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - std::string" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13493,7 +14008,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13537,9 +14052,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13574,7 +14089,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13609,9 +14124,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13647,7 +14162,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13691,9 +14206,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13728,7 +14243,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13763,9 +14278,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13801,7 +14316,7 @@ Message from section two 12 >= 12 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13845,9 +14360,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13882,7 +14397,7 @@ Message from section two 12 >= 12 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13917,9 +14432,9 @@ Message from section two 6 >= 6 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - float,4" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13955,7 +14470,7 @@ Message from section two 8 >= 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13999,9 +14514,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14036,7 +14551,7 @@ Message from section two 8 >= 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14071,9 +14586,9 @@ Message from section two 4 >= 4 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - int,5" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14109,7 +14624,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14153,9 +14668,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14190,7 +14705,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14225,9 +14740,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - std::string,15" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14263,7 +14778,7 @@ Message from section two 30 >= 30 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14307,9 +14822,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14344,7 +14859,7 @@ Message from section two 30 >= 30 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14379,9 +14894,9 @@ Message from section two 15 >= 15 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test case with identical tags keeps just one" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -14400,10 +14915,10 @@ Message from section two {?} == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test case with one argument" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test enum bit values" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -14414,10 +14929,10 @@ Message from section two 3221225472 (0x<hex digits>) == 3221225472 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test with special, characters "in name" tags="[cli][regression]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if" tags="[checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14452,7 +14967,7 @@ Message from section two false </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if 2" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14464,7 +14979,7 @@ Message from section two </Expanded> </Expression> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" /> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if 3" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14476,7 +14991,51 @@ Message from section two </Expanded> </Expression> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" /> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Testing checked-if 4" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Expression success="true" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + true + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="false" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + {Unknown expression after the reported line} + </Original> + <Expanded> + {Unknown expression after the reported line} + </Expanded> + <Exception filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + Uncaught exception should fail! + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Testing checked-if 5" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + false + </Original> + <Expanded> + false + </Expanded> + </Expression> + <Expression success="false" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + {Unknown expression after the reported line} + </Original> + <Expanded> + {Unknown expression after the reported line} + </Expanded> + <Exception filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + Uncaught exception should fail! + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="The NO_FAIL macro reports a failure but does not fail the test" tags="[messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Expression success="false" type="CHECK_NOFAIL" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -14487,7 +15046,7 @@ Message from section two 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="The default listing implementation write to provided stream" tags="[reporter-helpers][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Section name="Listing tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14503,7 +15062,7 @@ Message from section two " contains: "[fakeTag]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14517,7 +15076,7 @@ Message from section two " ( contains: "fake reporter" and contains: "fake description" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14533,7 +15092,7 @@ Message from section two " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing listeners" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14547,18 +15106,18 @@ Message from section two " ( contains: "fakeListener" and contains: "fake description" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="This test 'should' fail but doesn't" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Thrown string literals are translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > For some reason someone is throwing a string literal! </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Tracker" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -14610,7 +15169,7 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14710,9 +15269,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14820,9 +15379,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="11" failures="0" expectedFailures="0"/> + <OverallResults successes="11" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14923,11 +15482,11 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -15060,11 +15619,11 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="14" failures="0" expectedFailures="0"/> + <OverallResults successes="14" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -15131,9 +15690,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Trim strings" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -15216,13 +15775,189 @@ There is no extra whitespace here There is no extra whitespace here </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Type conversions of RangeEquals and similar" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( c_array ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( c_array ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types (differ in array N)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_3, !RangeEquals( array_int_4 ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_3, !UnorderedRangeEquals( array_int_4 ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types and value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers, one random access, one not" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( list_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( list_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Value type" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, RangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, UnorderedRangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Value type" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal containers of different value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, !RangeEquals( vector_char_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 2 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, !UnorderedRangeEquals( vector_char_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges with begin that needs ADL" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + a, !RangeEquals( b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 3, 2, 1 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + a, UnorderedRangeEquals( b ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, RangeEquals( array_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Unexpected exceptions can be translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > 3.14 </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Upcasting special member functions" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="Move constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -15234,7 +15969,7 @@ There is no extra whitespace here 3 == 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="move assignment" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -15245,9 +15980,9 @@ There is no extra whitespace here 3 == 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AllMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15267,7 +16002,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15278,7 +16013,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } all match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15330,9 +16065,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15384,11 +16119,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AllTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15401,9 +16136,9 @@ There is no extra whitespace here { true, true, true, true, true } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15415,12 +16150,12 @@ There is no extra whitespace here { } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One false evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !AllTrue() @@ -15429,9 +16164,9 @@ There is no extra whitespace here { true, true, false, true, true } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15443,9 +16178,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15457,12 +16192,12 @@ There is no extra whitespace here { true, true, true, true, true } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One false evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !AllTrue() @@ -15471,9 +16206,9 @@ There is no extra whitespace here { true, true, false, true, true } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15485,9 +16220,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15539,9 +16274,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15593,11 +16328,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AnyMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15617,7 +16352,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15628,7 +16363,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } any match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15680,9 +16415,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15734,11 +16469,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AnyTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15751,9 +16486,9 @@ There is no extra whitespace here { true, true, true, true, true } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15765,12 +16500,12 @@ There is no extra whitespace here { } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, AnyTrue() @@ -15779,9 +16514,9 @@ There is no extra whitespace here { false, false, true, false, false } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15793,9 +16528,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15807,12 +16542,12 @@ There is no extra whitespace here { true, true, true, true, true } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, AnyTrue() @@ -15821,9 +16556,9 @@ There is no extra whitespace here { false, false, true, false, false } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15835,9 +16570,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15889,9 +16624,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15943,11 +16678,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of NoneMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15967,7 +16702,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15978,7 +16713,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } none match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16030,9 +16765,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16084,11 +16819,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of NoneTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16101,9 +16836,9 @@ There is no extra whitespace here { true, true, true, true, true } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16115,12 +16850,12 @@ There is no extra whitespace here { } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !NoneTrue() @@ -16129,9 +16864,9 @@ There is no extra whitespace here { false, false, true, false, false } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16143,9 +16878,9 @@ There is no extra whitespace here { false, false, false, false, false } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16157,12 +16892,12 @@ There is no extra whitespace here { true, true, true, true, true } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !NoneTrue() @@ -16171,9 +16906,9 @@ There is no extra whitespace here { false, false, true, false, false } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16185,9 +16920,9 @@ There is no extra whitespace here { false, false, false, false, false } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16239,9 +16974,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16293,11 +17028,387 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Usage of RangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container matches empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, RangeEquals( empty_vector ) + </Original> + <Expanded> + { } elements are { } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container does not match non-empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, !RangeEquals( non_empty_vector ) + </Original> + <Expanded> + { } not elements are { 1 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_vector, !RangeEquals( empty_vector ) + </Original> + <Expanded> + { 1 } not elements are { } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal 1-length non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_array, RangeEquals( non_empty_array ) + </Original> + <Expanded> + { 1 } elements are { 1 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, RangeEquals( array_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, non-equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !RangeEquals( array_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 2, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !RangeEquals( array_c ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 2 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal-sized, non-empty containers (with same first elements)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !RangeEquals( vector_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, RangeEquals( vector_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !RangeEquals( vector_b, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 3, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, RangeEquals( needs_adl2 ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Check short-circuits on failure" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1, !RangeEquals( arr ) + </Original> + <Expanded> + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[0] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[1] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[2] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + !(mocked1.m_derefed[3]) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="All elements are checked on success" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1, RangeEquals( arr ) + </Original> + <Expanded> + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[0] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[1] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[2] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[3] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Usage of UnorderedRangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container matches empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, UnorderedRangeEquals( empty_vector ) + </Original> + <Expanded> + { } unordered elements are { } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container does not match non-empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, !UnorderedRangeEquals( non_empty_vector ) + </Original> + <Expanded> + { } not unordered elements are { 1 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_vector, !UnorderedRangeEquals( empty_vector ) + </Original> + <Expanded> + { 1 } not unordered elements are { } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal 1-length non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_array, UnorderedRangeEquals( non_empty_array ) + </Original> + <Expanded> + { 1 } unordered elements are { 1 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, UnorderedRangeEquals( array_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, non-equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !UnorderedRangeEquals( array_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal-sized, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !UnorderedRangeEquals( vector_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !UnorderedRangeEquals( vector_b, close_enough ) + </Original> + <Expanded> + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, UnorderedRangeEquals( needs_adl2 ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of the SizeIs range matcher" tags="[matchers][size][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Some with stdlib containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16357,7 +17468,7 @@ There is no extra whitespace here { {?}, {?}, {?} } has size == 3 </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found size free function" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16368,7 +17479,7 @@ There is no extra whitespace here {?} has size == 12 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type has size member" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16379,9 +17490,9 @@ There is no extra whitespace here {?} has size == 13 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Use a custom approx" tags="[Approx][custom]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -16448,13 +17559,13 @@ There is no extra whitespace here Approx( 1.23 ) != 1.25 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Variadic macros" tags="[sections][variadic]" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > <Section name="Section with one argument" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector Approx matcher" tags="[approx][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Empty vector is roughly equal to an empty vector" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16466,7 +17577,7 @@ There is no extra whitespace here { } is approx: { } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="A vector is approx equal to itself" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16486,9 +17597,9 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Different length" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16500,9 +17611,9 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Same length, different elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16538,11 +17649,11 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector Approx matcher -- failing" tags="[.][approx][failing][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Empty and non empty vectors are not approx equal" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16554,7 +17665,7 @@ There is no extra whitespace here { } is approx: { 1.0, 2.0 } </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="Just different vectors" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16565,9 +17676,9 @@ There is no extra whitespace here { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Vector matchers" tags="[matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Contains (element)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16595,7 +17706,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (vector)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16662,7 +17773,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2 } </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (element), composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16673,7 +17784,7 @@ There is no extra whitespace here { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Equals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16724,7 +17835,7 @@ There is no extra whitespace here { 1, 2, 3 } Equals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="UnorderedEquals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16783,9 +17894,9 @@ There is no extra whitespace here { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector matchers that fail" tags="[.][failing][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Contains (element)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16805,7 +17916,7 @@ There is no extra whitespace here { } Contains: 1 </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (vector)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16824,7 +17935,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2, 4 } </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Equals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16859,7 +17970,7 @@ There is no extra whitespace here { 1, 2, 3 } Equals: { } </Expanded> </Expression> - <OverallResults successes="0" failures="4" expectedFailures="0"/> + <OverallResults successes="0" failures="4" expectedFailures="0" skipped="false"/> </Section> <Section name="UnorderedEquals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16894,9 +18005,9 @@ There is no extra whitespace here { 3, 1 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="0" failures="4" expectedFailures="0"/> + <OverallResults successes="0" failures="4" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When checked exceptions are thrown they can be expected or unexpected" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16923,13 +18034,13 @@ There is no extra whitespace here thisThrows() </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown directly they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > unexpected exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown during a CHECK the test should continue" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16943,7 +18054,7 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16957,7 +18068,7 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown from functions they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16971,31 +18082,31 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown from sections they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="section name" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > unexpected exception </Exception> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown, but caught, they do not affect the test" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="X/level/0/a" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/0/b" tags="[fizz][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/1/a" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/1/b" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="XmlEncode" tags="[XML]" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Section name="normal string" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17007,7 +18118,7 @@ There is no extra whitespace here "normal string" == "normal string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="empty string" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17018,7 +18129,7 @@ There is no extra whitespace here "" == "" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with ampersand" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17029,7 +18140,7 @@ There is no extra whitespace here "smith &amp; jones" == "smith &amp; jones" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with less-than" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17040,7 +18151,7 @@ There is no extra whitespace here "smith &lt; jones" == "smith &lt; jones" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with greater-than" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17061,7 +18172,7 @@ There is no extra whitespace here "smith ]]&gt; jones" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with quotes" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17084,7 +18195,7 @@ There is no extra whitespace here "don't &quot;quote&quot; me on that" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with control char (1)" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17095,7 +18206,7 @@ There is no extra whitespace here "[\x01]" == "[\x01]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with control char (x7F)" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17106,9 +18217,9 @@ There is no extra whitespace here "[\x7F]" == "[\x7F]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="XmlWriter writes boolean attributes as true/false" tags="[XML][XmlWriter]" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17121,7 +18232,11 @@ There is no extra whitespace here " ( contains: "attr1="true"" and contains: "attr2="false"" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="a succeeding test can still be skipped" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="analyse no analysis" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17228,7 +18343,7 @@ There is no extra whitespace here 0.0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="array<int, N> -> toString" tags="[array][containers][toString]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -17255,7 +18370,7 @@ There is no extra whitespace here "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="benchmark function call" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Section name="without chronometer" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17299,7 +18414,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="with chronometer" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17342,9 +18457,9 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="boolean member" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -17355,7 +18470,7 @@ There is no extra whitespace here 0x<hex digits> != 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedElse" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17374,7 +18489,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedElse, failing" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17393,7 +18508,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="checkedIf" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17412,7 +18527,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedIf, failing" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17431,7 +18546,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="classify_outliers" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Section name="none" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17483,7 +18598,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="low severe" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17534,7 +18649,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="low mild" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17585,7 +18700,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="high mild" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17636,7 +18751,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="high severe" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17687,7 +18802,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="mixed" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17738,9 +18853,9 @@ There is no extra whitespace here 2 == 2 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="comparisons between const int variables" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -17775,7 +18890,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="comparisons between int variables" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -17810,7 +18925,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="convertToBits" tags="[conversion][floating-point]" filename="tests/<exe-name>/IntrospectiveTests/FloatingPoint.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/FloatingPoint.tests.cpp" > @@ -17865,7 +18980,16 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="dynamic skipping works with generators" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 41 + </Skip> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 43 + </Skip> + <OverallResult success="true" skips="2"/> </TestCase> <TestCase name="empty tags are not allowed" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -17876,7 +19000,7 @@ There is no extra whitespace here Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="erfc_inv" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17903,7 +19027,7 @@ There is no extra whitespace here 1.3859038243 == Approx( 1.3859038243 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="estimate_clock_resolution" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17922,53 +19046,83 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="even more nested SECTION tests" tags="[sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="c" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="d (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="c" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="e (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="f (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="failed assertions before SKIP cause test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Original> + 3 == 4 + </Original> + <Expanded> + 3 == 4 + </Expanded> + </Expression> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> + </TestCase> + <TestCase name="failing for some generator values causes entire test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="2"/> + </TestCase> + <TestCase name="failing in some unskipped sections causes entire test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> + </Section> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="first tag" tags="[tag1]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="has printf" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > loose text artifact - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="is_unary_function" tags="[clara][compilation]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="just failure" tags="[.][fail][isolated info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Previous info should not be seen </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just failure after unscoped info" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > previous unscoped info SHOULD not be seen </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just info" tags="[info][isolated info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just unscoped info" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="long long" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17981,7 +19135,7 @@ loose text artifact 9223372036854775807 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="looped SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="b is currently: 0" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17993,7 +19147,7 @@ loose text artifact 0 > 1 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 1" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18004,7 +19158,7 @@ loose text artifact 1 > 1 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 2" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18015,7 +19169,7 @@ loose text artifact 2 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 3" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18026,7 +19180,7 @@ loose text artifact 3 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 4" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18037,7 +19191,7 @@ loose text artifact 4 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 5" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18048,7 +19202,7 @@ loose text artifact 5 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 6" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18059,7 +19213,7 @@ loose text artifact 6 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 7" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18070,7 +19224,7 @@ loose text artifact 7 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 8" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18081,7 +19235,7 @@ loose text artifact 8 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 9" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18092,12 +19246,12 @@ loose text artifact 9 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="looped tests" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[0] (1) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18108,7 +19262,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[1] (1) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18119,7 +19273,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[2] (2) is even </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18130,7 +19284,7 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[3] (3) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18141,7 +19295,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[4] (5) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18152,7 +19306,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[5] (8) is even </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18163,7 +19317,7 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[6] (13) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18174,7 +19328,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[7] (21) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18185,7 +19339,7 @@ loose text artifact 1 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="makeStream recognizes %debug stream name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -18196,7 +19350,7 @@ loose text artifact Catch::makeStream( "%debug" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="make_unique reimplementation" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="From lvalue copies" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18208,7 +19362,7 @@ loose text artifact !false </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From rvalue moves" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18219,7 +19373,7 @@ loose text artifact true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Variadic constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18230,9 +19384,9 @@ loose text artifact {?} == {?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="mean" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18243,7 +19397,7 @@ loose text artifact 19.0 == 19.0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="measure" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18310,28 +19464,28 @@ loose text artifact 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="mix info, unscoped info and warning" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > info </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > unscoped info </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and warn may mix </Warning> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > info </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > unscoped info </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > they are not cleared after warnings </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="more nested SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18344,9 +19498,9 @@ loose text artifact 1 == 2 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="not equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18358,9 +19512,9 @@ loose text artifact 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="less than" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18372,11 +19526,11 @@ loose text artifact 1 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="nested SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18405,11 +19559,39 @@ loose text artifact 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="nested sections can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="A" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> + </Section> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="B1" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="B2" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="false" skips="1"> + <StdOut> +a! +b1! +! + </StdOut> + </OverallResult> </TestCase> <TestCase name="non streamable - with conv. op" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18420,7 +19602,7 @@ loose text artifact "7" == "7" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="non-copyable objects" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18431,7 +19613,7 @@ loose text artifact {?} == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="normal_cdf" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18474,7 +19656,7 @@ loose text artifact 0.088096521 == Approx( 0.088096521 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="normal_quantile" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18501,13 +19683,13 @@ loose text artifact -1.9599639845 == Approx( -1.9599639845 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="not allowed" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="not prints unscoped info from previous failures" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen only for the FIRST assertion IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18518,7 +19700,7 @@ loose text artifact true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen only for the SECOND assertion IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18529,7 +19711,7 @@ loose text artifact true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18540,7 +19722,7 @@ loose text artifact false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="null strings" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18559,7 +19741,7 @@ loose text artifact {null string} == {null string} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="null_ptr" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18570,7 +19752,7 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="pair<pair<int,const char *,pair<std::string,int> > -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -18583,7 +19765,7 @@ loose text artifact "{ { 42, "Arthur" }, { "Ford", 24 } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="parseEnums" tags="[enums][Strings]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Section name="No enums" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18595,7 +19777,7 @@ loose text artifact { } Equals: { } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="One enum value" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18622,7 +19804,7 @@ loose text artifact { Value1 } Equals: { Value1 } </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Multiple enum values" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18649,9 +19831,9 @@ loose text artifact { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="pointer to class" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18662,10 +19844,10 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="print unscoped info if passing unscoped info is printed" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18676,13 +19858,13 @@ loose text artifact true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="prints unscoped info on failure" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD also be seen </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18693,10 +19875,10 @@ loose text artifact false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="prints unscoped info only for the first assertion" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen only ONCE </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18715,7 +19897,7 @@ loose text artifact true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY also be seen only ONCE IF info is printed for passing assertions </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18734,7 +19916,7 @@ loose text artifact true </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="random SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18754,7 +19936,7 @@ loose text artifact 2 != 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="not equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18765,9 +19947,9 @@ loose text artifact 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="replaceInPlace" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Section name="replace single char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18787,7 +19969,7 @@ loose text artifact "azcdefcg" == "azcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace two chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18806,7 +19988,7 @@ loose text artifact "abzdefzg" == "abzdefzg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace first char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18825,7 +20007,7 @@ loose text artifact "zbcdefcg" == "zbcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace last char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18844,7 +20026,7 @@ loose text artifact "abcdefcz" == "abcdefcz" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace all chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18863,7 +20045,7 @@ loose text artifact "replaced" == "replaced" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace no chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18882,7 +20064,7 @@ loose text artifact "abcdefcg" == "abcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="escape '" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18901,9 +20083,9 @@ loose text artifact "didn|'t" == "didn|'t" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="request an unknown %-starting stream fails" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -18914,7 +20096,7 @@ loose text artifact Catch::makeStream( "%somestream" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="resolution" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18997,7 +20179,7 @@ loose text artifact 1000.0 == 1000 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="run_for_at_least, chronometer" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19088,7 +20270,7 @@ loose text artifact 128 >= 100 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="run_for_at_least, int" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19179,13 +20361,26 @@ loose text artifact 128 >= 100 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="second tag" tags="[tag2]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> + </TestCase> + <TestCase name="sections can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="also not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="send a single char to INFO" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > 3 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19196,13 +20391,13 @@ loose text artifact false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="sends information to INFO" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > hi </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 7 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19213,7 +20408,7 @@ loose text artifact false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="shortened hide tags are split apart" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -19224,7 +20419,13 @@ loose text artifact { {?}, {?} } ( Contains: {?} and Contains: {?} ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="skipped tests can optionally provide a reason" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 43 + </Skip> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="splitString" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -19251,19 +20452,19 @@ loose text artifact { abc, def } Equals: { abc, def } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stacks unscoped info in loops" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Count 1 to 3... </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 3 </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19274,16 +20475,16 @@ loose text artifact false </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Count 4 to 6... </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 4 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 5 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 6 </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19294,7 +20495,7 @@ loose text artifact false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="startsWith" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -19321,7 +20522,7 @@ loose text artifact true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::map is convertible string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="empty" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19333,7 +20534,7 @@ loose text artifact "{ }" == "{ }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19344,7 +20545,7 @@ loose text artifact "{ { "one", 1 } }" == "{ { "one", 1 } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="several items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19357,9 +20558,9 @@ loose text artifact "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::pair<int,const std::string> -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19370,7 +20571,7 @@ loose text artifact "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::pair<int,std::string> -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19381,7 +20582,7 @@ loose text artifact "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::set is convertible string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="empty" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19393,7 +20594,7 @@ loose text artifact "{ }" == "{ }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19404,7 +20605,7 @@ loose text artifact "{ "one" }" == "{ "one" }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="several items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19417,9 +20618,9 @@ loose text artifact "{ "abc", "def", "ghi" }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::vector<std::pair<std::string,int> > -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19432,7 +20633,7 @@ loose text artifact "{ { "green", 55 } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stdout and stderr streams have %-starting name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -19451,7 +20652,7 @@ loose text artifact true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify ranges" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19490,7 +20691,7 @@ loose text artifact "{?}" == "{?}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_maker )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19503,7 +20704,7 @@ loose text artifact "StringMaker<has_maker>" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_maker_and_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19516,7 +20717,7 @@ loose text artifact "StringMaker<has_maker_and_operator>" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_neither )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19527,7 +20728,7 @@ loose text artifact "{?}" == "{?}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19540,7 +20741,7 @@ loose text artifact "operator<<( has_operator )" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_template_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19553,7 +20754,7 @@ loose text artifact "operator<<( has_template_operator )" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_maker> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19566,7 +20767,7 @@ loose text artifact "{ StringMaker<has_maker> }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_maker_and_operator> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19579,7 +20780,7 @@ loose text artifact "{ StringMaker<has_maker_and_operator> }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_operator> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19592,7 +20793,7 @@ loose text artifact "{ operator<<( has_operator ) }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="strlen3" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -19627,7 +20828,7 @@ loose text artifact 4 == 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tables" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -19662,7 +20863,7 @@ loose text artifact 6 == 6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tags with dots in later positions are not parsed as hidden" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -19681,13 +20882,17 @@ loose text artifact magic.tag == magic.tag </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="tests can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="thrown std::strings are translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > Why would you throw a std::string? </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="toString on const wchar_t const pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19698,7 +20903,7 @@ loose text artifact ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on const wchar_t pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19709,7 +20914,7 @@ loose text artifact ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on wchar_t const pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19720,7 +20925,7 @@ loose text artifact ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on wchar_t returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19731,7 +20936,7 @@ loose text artifact ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum class w/operator<<)" tags="[enum][enumClass][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19760,7 +20965,7 @@ loose text artifact "Unknown enum value 10" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum class)" tags="[enum][enumClass][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19779,7 +20984,7 @@ loose text artifact "1" == "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum w/operator<<)" tags="[enum][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19798,7 +21003,7 @@ loose text artifact "E2{1}" == "E2{1}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum)" tags="[enum][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19817,7 +21022,7 @@ loose text artifact "1" == "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19836,7 +21041,7 @@ loose text artifact "{ }" == "{ }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<float,int>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19855,7 +21060,7 @@ loose text artifact "{ 1.2f, 0 }" == "{ 1.2f, 0 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<int>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19866,7 +21071,7 @@ loose text artifact "{ 0 }" == "{ 0 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<string,string>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19879,7 +21084,7 @@ loose text artifact "{ "hello", "world" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<tuple<int>,tuple<>,float>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19892,7 +21097,7 @@ loose text artifact "{ { 42 }, { }, 1.2f }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="uniform samples" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19927,7 +21132,26 @@ loose text artifact 0.95 == 0.95 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="uniform_integer_distribution can return the bounds" tags="[distribution][rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Original> + dist.a() == -10 + </Original> + <Expanded> + -10 == -10 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Original> + dist.b() == 10 + </Original> + <Expanded> + 10 == 10 + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="unique_ptr reimplementation: basic functionality" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="Default constructed unique_ptr is empty" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -19947,7 +21171,7 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take ownership of allocation" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -19991,9 +21215,9 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take ownership of allocation" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20045,9 +21269,9 @@ loose text artifact 2 == 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Release releases ownership" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20066,7 +21290,7 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Move constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20093,7 +21317,7 @@ loose text artifact 1 == 1 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Move assignment" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20120,7 +21344,7 @@ loose text artifact 2 == 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="free swap" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20139,9 +21363,9 @@ loose text artifact 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vec<vec<string,alloc>> -> toString" tags="[toString][vector,allocator]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20162,7 +21386,7 @@ loose text artifact "{ { "hello" }, { "world" } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<bool> -> toString" tags="[containers][toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20189,7 +21413,7 @@ loose text artifact "{ true, false }" == "{ true, false }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<int,allocator> -> toString" tags="[toString][vector,allocator]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20216,7 +21440,7 @@ loose text artifact "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<int> -> toString" tags="[toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20243,7 +21467,7 @@ loose text artifact "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<string> -> toString" tags="[toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20272,7 +21496,7 @@ loose text artifact "{ "hello", "world" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vectors can be sized and resized" tags="[vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -20308,7 +21532,7 @@ loose text artifact 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20352,9 +21576,9 @@ loose text artifact 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20389,7 +21613,7 @@ loose text artifact 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20424,9 +21648,9 @@ loose text artifact 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="warmup" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -20445,7 +21669,7 @@ loose text artifact 310016000 ns > 100 ms </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="weighted_average_quantile" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -20472,17 +21696,17 @@ loose text artifact 23.0 == 23.0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="xmlentitycheck" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="embedded xml: <test>it should be possible to embed xml characters, such as <, " or &, or even whole <xml>documents</xml> within an attribute</test>" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="encoded chars: these should all be encoded: &&&"""<<<&"<<&"" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> - <OverallResults successes="1989" failures="143" expectedFailures="27"/> - <OverallResultsCases successes="304" failures="83" expectedFailures="7"/> + <OverallResults successes="2079" failures="146" expectedFailures="35" skips="12"/> + <OverallResultsCases successes="312" failures="85" expectedFailures="14" skips="6"/> </Catch2TestRun> diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index a0096170..08ff6c43 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="2" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> +<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="3" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> <TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1027: Bitfields can be captured" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -20,7 +20,7 @@ 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1147" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -71,16 +71,16 @@ {?} >= {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1175 - Hidden Test" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1238" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > uarr := "123" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > sarr := "456" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -91,10 +91,10 @@ 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > uarr := "123" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > sarr := "456" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -105,16 +105,16 @@ 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1245" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1319: Sections can have description (even if it is not saved" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Section name="SectionName" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1403" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -125,24 +125,24 @@ [1403 helper] == [1403 helper] </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1455 - INFO and WARN can start with a linebreak" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This info message starts with a linebreak </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This warning message starts with a linebreak </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="#1514: stderr/stdout is not captured in tests aborted by an exception" tags="[.][output-capture][regression]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > 1514 </Failure> - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> This would not be caught previously </StdOut> @@ -160,7 +160,7 @@ Nor would this true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1905 -- test spec parser properly clears internal state between compound tests" tags="[command-line][test-spec]" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -187,7 +187,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1912 -- test spec parser handles escaping" tags="[command-line][test-spec]" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Section name="Various parentheses" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -215,7 +215,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="backslash in test name" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpec.tests.cpp" > @@ -226,9 +226,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1913 - GENERATE inside a for loop should not keep recreating the generator" tags="[generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -247,7 +247,7 @@ Nor would this 6 < 7 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1913 - GENERATEs can share a line" tags="[generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -282,11 +282,11 @@ Nor would this 2 != 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - GENERATE after a section" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -297,7 +297,7 @@ Nor would this 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -308,7 +308,7 @@ Nor would this 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -319,9 +319,9 @@ Nor would this 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - Section followed by flat generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -333,7 +333,7 @@ Nor would this 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -351,7 +351,7 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - flat generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -378,100 +378,100 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - mixed sections and generates" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="A" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> <Section name="B" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 5 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > i := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > j := 4 </Info> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > k := 6 </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1938 - nested generate" tags="[.][generators][regression]" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -618,16 +618,16 @@ Nor would this 3 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0" tags="[.][compilation][regression]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#2152 - ULP checks between differently signed values were wrong - double" tags="[floating-point][matchers][ulp]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -646,7 +646,7 @@ Nor would this 0.0 not is within 1 ULPs of -4.9406564584124654e-324 ([-9.8813129168249309e-324, -0.0000000000000000e+00]) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#2152 - ULP checks between differently signed values were wrong - float" tags="[floating-point][matchers][ulp]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -665,20 +665,26 @@ Nor would this 0.0f not is within 1 ULPs of -1.40129846e-45f ([-2.80259693e-45, -0.00000000e+00]) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="#2615 - Throwing in constructor generator fails test case but does not abort" tags="[!shouldfail][generators][regression]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Exception filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + failure to init + </Exception> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#748 - captures with unexpected exceptions" tags="[!shouldfail][!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="outside assertions" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > expected exception </Exception> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="inside REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Expression success="false" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -692,10 +698,10 @@ Nor would this expected exception </Exception> </Expression> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="inside REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > answer := 42 </Info> <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -706,9 +712,9 @@ Nor would this thisThrows() </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#809" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -719,7 +725,7 @@ Nor would this 42 == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#833" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -778,7 +784,7 @@ Nor would this true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#835 -- errno should not be touched by Catch2" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -797,10 +803,10 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#872" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > dummy := 0 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -811,25 +817,25 @@ Nor would this {?} == 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="#961 -- Dynamically created sections should all be reported" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Looped section 0" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 1" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 2" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 3" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Looped section 4" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="'Not' checks that should fail" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -896,7 +902,7 @@ Nor would this !(1 == 1) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="'Not' checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -963,7 +969,7 @@ Nor would this !(1 == 2) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="(unimplemented) static bools can be evaluated" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Section name="compare to true" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -983,7 +989,7 @@ Nor would this true == true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="compare to false" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1002,7 +1008,7 @@ Nor would this false == false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="negation" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1013,7 +1019,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="double negation" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1024,7 +1030,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="direct" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -1043,9 +1049,9 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="3x3x3 ints" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -1696,7 +1702,7 @@ Nor would this 3 < 9 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A METHOD_AS_TEST_CASE based test run that fails" tags="[.][class][failing]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1707,7 +1713,7 @@ Nor would this "hello" == "world" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A METHOD_AS_TEST_CASE based test run that succeeds" tags="[class]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1718,7 +1724,7 @@ Nor would this "hello" == "hello" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<float>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1729,7 +1735,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - Template_Foo<int>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1740,7 +1746,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<float>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1751,7 +1757,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails - std::vector<int>" tags="[.][class][failing][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1762,7 +1768,7 @@ Nor would this 0 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<float>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1773,7 +1779,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo<int>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1784,7 +1790,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<float>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1795,7 +1801,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector<int>" tags="[class][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1806,7 +1812,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<float, 6>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1817,7 +1823,7 @@ Nor would this 6 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2<int, 2>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1828,7 +1834,7 @@ Nor would this 2 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<float, 6>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1839,7 +1845,7 @@ Nor would this 6 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array<int, 2>" tags="[.][class][failing][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1850,7 +1856,7 @@ Nor would this 2 < 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<float,6>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1861,7 +1867,7 @@ Nor would this 6 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2<int,2>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1872,7 +1878,7 @@ Nor would this 2 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<float,6>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1883,7 +1889,7 @@ Nor would this 6 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array<int,2>" tags="[class][nttp][product][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1894,7 +1900,7 @@ Nor would this 2 >= 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1905,7 +1911,7 @@ Nor would this 1.0 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - float" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1916,7 +1922,7 @@ Nor would this 1.0f == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - int" tags="[.][class][failing][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1927,7 +1933,7 @@ Nor would this 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1938,7 +1944,7 @@ Nor would this 1.0 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1949,7 +1955,7 @@ Nor would this 1.0f == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int" tags="[class][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1960,7 +1966,7 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1971,7 +1977,7 @@ Nor would this 1 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1982,7 +1988,7 @@ Nor would this 3 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" tags="[.][class][failing][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -1993,7 +1999,7 @@ Nor would this 6 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2004,7 +2010,7 @@ Nor would this 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2015,7 +2021,7 @@ Nor would this 3 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" tags="[class][nttp][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2026,7 +2032,7 @@ Nor would this 6 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A TEST_CASE_METHOD based test run that fails" tags="[.][class][failing]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2037,7 +2043,7 @@ Nor would this 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A TEST_CASE_METHOD based test run that succeeds" tags="[class]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -2048,7 +2054,7 @@ Nor would this 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - Foo<float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2059,7 +2065,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - Foo<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2070,7 +2076,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - std::vector<float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2081,7 +2087,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case - std::vector<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2092,7 +2098,7 @@ Nor would this 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - Bar<float, 42>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2103,7 +2109,7 @@ Nor would this 42 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - Bar<int, 9>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2114,7 +2120,7 @@ Nor would this 9 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - std::array<float, 42>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2125,7 +2131,7 @@ Nor would this 42 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A Template product test case with array signature - std::array<int, 9>" tags="[nttp][product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -2136,7 +2142,7 @@ Nor would this 9 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A comparison that uses literals instead of the normal constructor" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2187,19 +2193,19 @@ Nor would this 1.23 == Approx( 1.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="A couple of nested sections followed by a failure" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Outer" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="Inner" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > to infinity and beyond </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="A failing expression with a non streamable type is still captured" tags="[.][failing][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2218,7 +2224,7 @@ Nor would this {?} == {?} </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Absolute margin" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2269,10 +2275,10 @@ Nor would this 100.3 == Approx( 100.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="An empty test with no assertions" tags="[empty]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="An expression with side-effects should only be evaluated once" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2291,7 +2297,7 @@ Nor would this 8 == 8 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="An unchecked exception reports the line of the last assertion" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -2313,10 +2319,10 @@ Nor would this unexpected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Anonymous test case 1" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approx setters validate their arguments" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2375,7 +2381,7 @@ Nor would this Approx(0).epsilon(1.0001), std::domain_error </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approx with exactly-representable margin" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2418,7 +2424,7 @@ Nor would this 245.5f == Approx( 245.25 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate PI" tags="[Approx][PI]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2437,7 +2443,7 @@ Nor would this 3.1428571429 != Approx( 3.141 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2456,7 +2462,7 @@ Nor would this 1.23 == Approx( 1.231 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with floats" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2475,7 +2481,7 @@ Nor would this 0.0f == Approx( 0.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with ints" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2494,7 +2500,7 @@ Nor would this 0 == Approx( 0.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Approximate comparisons with mixed numeric types" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -2537,7 +2543,7 @@ Nor would this 1.234 == Approx( 1.2339999676 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Arbitrary predicate matcher" tags="[generic][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Function pointer" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -2557,7 +2563,7 @@ Nor would this 1 not matches predicate: "always false" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Lambdas + different type" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -2576,9 +2582,9 @@ Nor would this "This wouldn't pass" not matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Assertion macros support bit operators and bool conversions" tags="[bitops][compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -2621,7 +2627,7 @@ Nor would this !(Val: 1 ^ Val: 1) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Assertions then sections" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -2650,9 +2656,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Original> @@ -2680,11 +2686,11 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Basic use of the Contains range matcher" tags="[contains][matchers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Different argument ranges, same element type, default comparison" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2712,7 +2718,7 @@ Nor would this { 4, 5, 6 } not contains element 1 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different argument ranges, same element type, custom comparison" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2739,7 +2745,7 @@ Nor would this { 4, 5, 6 } not contains element 0 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different element type, custom comparisons" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2750,7 +2756,7 @@ Nor would this { "abc", "abcd", "abcde" } contains element 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Can handle type that requires ADL-found free function begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2769,7 +2775,7 @@ Nor would this { 1, 2, 3, 4, 5 } not contains element 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Initialization with move only types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2788,7 +2794,7 @@ Nor would this { 1, 2, 3 } not contains element 9 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Matching using matcher" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2799,9 +2805,9 @@ Nor would this { 1.0, 2.0, 3.0, 0.0 } contains element matching is within 0.5 of 0.5 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Basic use of the Empty range matcher" tags="[empty][matchers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Simple, std-provided containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2853,7 +2859,7 @@ Nor would this { } is empty </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type with empty" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2864,7 +2870,7 @@ Nor would this {?} not is empty </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found empty free function" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -2875,97 +2881,97 @@ Nor would this {?} is empty </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE can deal with complex expressions" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a := 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > b := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > c := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a + b := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a+b := 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > c > b := true </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > a == 1 := true </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE can deal with complex expressions involving commas" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> - std::vector<int>{1, 2, 3}[0, 1, 2] := 3 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[0, 1, 2] := 0 </Info> - <Info> - std::vector<int>{1, 2, 3}[(0, 1)] := 2 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[(0, 1)] := 0 </Info> - <Info> - std::vector<int>{1, 2, 3}[0] := 1 + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + custom_index_op<int>{1, 2, 3}[0] := 0 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (helper_1436<int, int>{12, -12}) := { 12, -12 } </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (helper_1436<int, int>(-12, 12)) := { -12, 12 } </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (1, 2) := 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > (2, 3) := 3 </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CAPTURE parses string and character constants" tags="[capture][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ("comma, in string", "escaped, \", ") := "escaped, ", " </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "single quote in string,'," := "single quote in string,'," </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "some escapes, \\,\\\\" := "some escapes, \,\\" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<" </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '"' := '"' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '\'' := ''' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ',' := ',' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '}' := '}' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > ')' := ')' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '(' := '(' </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > '{' := '{' </Info> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Capture and info messages" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Capture should stringify like assertions" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > i := 2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -2976,10 +2982,10 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Info should NOT stringify the way assertions do" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > 3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -2990,9 +2996,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CaseInsensitiveEqualsTo is case insensitive" tags="[comparisons][string-case]" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Section name="Degenerate cases" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3012,7 +3018,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Plain comparisons" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3063,9 +3069,9 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="CaseInsensitiveLess is case insensitive" tags="[comparisons][string-case]" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Section name="Degenerate cases" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3093,7 +3099,7 @@ Nor would this !false </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Plain comparisons" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Details.tests.cpp" > @@ -3128,9 +3134,9 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Character pretty printing" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Specifically escaped" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3166,7 +3172,7 @@ Nor would this '\f' == '\f' </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="General chars" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3209,7 +3215,7 @@ Nor would this 'Z' == 'Z' </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Low ASCII" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -3252,9 +3258,9 @@ Nor would this 5 == 5 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Clara::Arg supports single-arg parse the way Opt does" tags="[arg][clara][compilation]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3273,7 +3279,7 @@ Nor would this "foo" == "foo" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Clara::Opt supports accept-many lambdas" tags="[clara][opt]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Section name="Parsing fails on multiple options without accept_many" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3285,7 +3291,7 @@ Nor would this !{?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Parsing succeeds on multiple options with accept_many" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > @@ -3304,9 +3310,9 @@ Nor would this { "aaa", "bbb" } == { "aaa", "bbb" } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="ColourGuard behaviour" tags="[console-colours]" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Section name="ColourGuard is disengaged by default" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3318,7 +3324,7 @@ Nor would this true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ColourGuard is engaged by op<<" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3341,7 +3347,7 @@ Using code: 0 " </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ColourGuard can be engaged explicitly" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/ColourImpl.tests.cpp" > @@ -3364,9 +3370,9 @@ C " </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchAllOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3393,7 +3399,7 @@ C 1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchAnyOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3420,7 +3426,7 @@ C 1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining MatchNotOfGeneric does not nest" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3455,10 +3461,10 @@ C 1 equals: (int) 1 or (string) "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining concrete matchers does not use templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining only templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3485,7 +3491,7 @@ C 1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining templated and concrete matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3544,7 +3550,7 @@ C "foobar" ( ( starts with: "foo" and ends with: "bar" ) or Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Combining templated matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -3555,7 +3561,7 @@ C { 1, 2, 3 } ( Equals: { 1, 2, 3 } or Equals: { 0, 1, 2 } or Equals: { 4, 5, 6 } ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Commas in various macros are allowed" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -3654,7 +3660,7 @@ C { 1, 2 } == { 1, 2 } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparing function pointers" tags="[function pointer][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -3673,7 +3679,7 @@ C 0x<hex digits> == 0x<hex digits> </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparison ops" tags="[rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -3708,7 +3714,7 @@ C !({?} != {?}) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparison with explicitly convertible types" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -3807,7 +3813,7 @@ C Approx( 11.0 ) >= StrongDoubleTypedef(10) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons between ints where one side is computed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3818,7 +3824,7 @@ C 54 == 54 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3869,7 +3875,7 @@ C -2147483648 > 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Comparisons with int literals don't warn when mixing signed/ unsigned" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -3976,7 +3982,7 @@ C 4294967295 (0x<hex digits>) > 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Composed generic matchers shortcircuit" tags="[composed][generic][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="MatchAllOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4004,7 +4010,7 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="MatchAnyOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4031,9 +4037,9 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Composed matchers shortcircuit" tags="[composed][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="MatchAllOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4061,7 +4067,7 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="MatchAnyOf" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4088,9 +4094,9 @@ C true </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Contains string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4109,7 +4115,7 @@ C "this string contains 'abc' as a substring" contains: "STRING" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Copy and then generate a range" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4121,7 +4127,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4132,7 +4138,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4143,7 +4149,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4154,7 +4160,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4165,7 +4171,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from var and iterators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4176,7 +4182,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4187,7 +4193,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4198,7 +4204,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4209,7 +4215,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4220,7 +4226,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4231,7 +4237,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From a temporary container" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4242,7 +4248,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Final validation" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -4261,9 +4267,9 @@ C 6 == 6 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Cout stream properly declares it writes to stdout" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -4274,7 +4280,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Custom exceptions can be translated when testing for nothrow" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4288,7 +4294,7 @@ C custom exception - not std </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Custom exceptions can be translated when testing for throwing as something else" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4302,13 +4308,13 @@ C custom exception - not std </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Custom std-exceptions can be custom translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > custom std exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Default scale is invisible to comparison" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -4327,7 +4333,7 @@ C 0.00001 != Approx( 0.0000001 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Directly creating an EnumInfo" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -4356,7 +4362,13 @@ C "{** unexpected enum value **}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Empty generators can SKIP in constructor" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + This generator is empty + </Skip> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="Empty stream name opens cout stream" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -4367,18 +4379,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> - </TestCase> - <TestCase name="Empty tag is not allowed" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > - <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > - <Original> - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) - </Original> - <Expanded> - Catch::TestCaseInfo( "", { "fake test name", "[]" }, dummySourceLineInfo ) - </Expanded> - </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4397,7 +4398,7 @@ C "this string contains 'abc' as a substring" ends with: "this" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Enums can quickly have stringification enabled using REGISTER_ENUM" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -4442,7 +4443,7 @@ C "Value2" == "Value2" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -4461,7 +4462,7 @@ C "Blue" == "Blue" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Epsilon only applies to Approx's value" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -4472,7 +4473,7 @@ C 101.01 != Approx( 100.0 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equality checks that should fail" tags="[!mayfail][.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -4579,7 +4580,7 @@ C 1.3 == Approx( 1.301 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equality checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -4638,7 +4639,7 @@ C 1.3 == Approx( 1.3 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equals" tags="[matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4657,7 +4658,7 @@ C "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Equals string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4676,7 +4677,7 @@ C "this string contains 'abc' as a substring" equals: "something else" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Exception as a value (e.g. in REQUIRE_THROWS_MATCHES) can be stringified" tags="[exception][toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -4707,7 +4708,7 @@ C "StringMakerException" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exception matchers that fail" tags="[!throws][.][exceptions][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="No exception" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4727,7 +4728,7 @@ C doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Type mismatch" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4752,7 +4753,7 @@ C Unknown exception </Exception> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Contents are wrong" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4771,9 +4772,9 @@ C SpecialException::what special exception has value of 1 </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Exception matchers that succeed" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4792,7 +4793,42 @@ C SpecialException::what special exception has value of 2 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Exception message can be matched" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( StartsWith( "Derived" ) ) + </Original> + <Expanded> + DerivedException::what matches "starts with: "Derived"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( EndsWith( "::what" ) ) + </Original> + <Expanded> + DerivedException::what matches "ends with: "::what"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsDerivedException(), DerivedException, MessageMatches( !StartsWith( "::what" ) ) + </Original> + <Expanded> + DerivedException::what matches "not starts with: "::what"" + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + throwsSpecialException( 2 ), SpecialException, MessageMatches( StartsWith( "Special" ) ) + </Original> + <Expanded> + SpecialException::what matches "starts with: "Special"" + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exception messages can be tested for" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="exact match" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4804,7 +4840,7 @@ C "expected exception" equals: "expected exception" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="different case" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4815,7 +4851,7 @@ C "expected exception" equals: "expected exception" (case insensitive) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="wildcarded" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4850,9 +4886,9 @@ C "expected exception" contains: "except" (case insensitive) </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Exceptions matchers" tags="[!throws][exceptions][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -4887,7 +4923,7 @@ C SpecialException::what exception message matches "SpecialException::what" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Expected exceptions that don't throw or unexpected exceptions fail the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -4920,26 +4956,26 @@ C expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL aborts the test" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This is a failure </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL does not require an argument" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" /> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="FAIL_CHECK does not abort the test" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This is a failure </Failure> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > This message appears in the output </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Factorials are computed" tags="[factorial]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -4982,7 +5018,18 @@ C 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Filter generator throws exception for empty generator" tags="[generators]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > + <Original> + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + </Original> + <Expanded> + filter( []( int ) { return false; }, value( 3 ) ), Catch::GeneratorException + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Floating point matchers: double" tags="[floating-point][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Relative" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5027,9 +5074,9 @@ C 0.0 and 2.22507e-308 are within 2.22045e-12% of each other </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Margin" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5096,7 +5143,7 @@ C -10.0 is within 0.5 of -9.6 </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ULPs" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5155,7 +5202,7 @@ C -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00]) </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5182,7 +5229,7 @@ C 0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other ) </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Constructor validation" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5233,9 +5280,20 @@ C WithinRel( 1., 1. ), std::domain_error </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="IsNaN" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1., !IsNaN() + </Original> + <Expanded> + 1.0 not is NaN + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Floating point matchers: float" tags="[floating-point][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Relative" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5280,9 +5338,9 @@ C 0.0f and 1.17549e-38 are within 0.00119209% of each other </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Margin" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5357,7 +5415,7 @@ C -10.0f is within 0.5 of -9.6000003815 </Expanded> </Expression> - <OverallResults successes="9" failures="0" expectedFailures="0"/> + <OverallResults successes="9" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="ULPs" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5424,7 +5482,7 @@ C -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00]) </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5451,7 +5509,7 @@ C 0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other ) </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Constructor validation" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -5510,9 +5568,55 @@ C WithinRel( 1.f, 1.f ), std::domain_error </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <Section name="IsNaN" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > + <Original> + 1., !IsNaN() + </Original> + <Expanded> + 1.0 not is NaN + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="GENERATE can combine literals and generators" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > + <Original> + i % 2 == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators -- adapters" tags="[generators][generic]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5525,9 +5629,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5539,9 +5643,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5553,9 +5657,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filtering by predicate" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Throws if there are no matching values" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5567,9 +5671,9 @@ C filter([] (int) {return false; }, value(1)), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5580,7 +5684,7 @@ C 1 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5591,7 +5695,7 @@ C 2 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortening a range" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5602,7 +5706,7 @@ C 3 < 4 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5614,9 +5718,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5628,9 +5732,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Same type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5642,9 +5746,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5656,9 +5760,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5670,9 +5774,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5684,9 +5788,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5698,9 +5802,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5712,9 +5816,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Transforming elements" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Different deduced type" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5726,9 +5830,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5739,7 +5843,7 @@ C 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5750,7 +5854,7 @@ C 2 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5761,7 +5865,7 @@ C 3 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5772,7 +5876,7 @@ C 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5783,7 +5887,7 @@ C 2 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeating a generator" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5794,7 +5898,7 @@ C 3 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5814,9 +5918,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5836,9 +5940,9 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5858,9 +5962,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is not divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5888,9 +5992,9 @@ C 1 < 3 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Number of elements in source is not divisible by chunk size" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5918,9 +6022,9 @@ C 2 < 3 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5932,9 +6036,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5946,9 +6050,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Chunk size of zero" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5960,9 +6064,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Chunking a generator into sized pieces" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="Throws on too small generators" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5974,11 +6078,11 @@ C chunk(2, value(1)), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators -- simple" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -5990,7 +6094,7 @@ C -3 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6001,7 +6105,7 @@ C -2 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6012,7 +6116,7 @@ C -1 < 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6023,7 +6127,7 @@ C 4 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6034,7 +6138,7 @@ C 4 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6045,7 +6149,7 @@ C 4 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6056,7 +6160,7 @@ C -3 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6067,7 +6171,7 @@ C -2 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6078,7 +6182,7 @@ C -1 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6089,7 +6193,7 @@ C 8 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6100,7 +6204,7 @@ C 8 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6111,7 +6215,7 @@ C 8 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6122,7 +6226,7 @@ C -3 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6133,7 +6237,7 @@ C -2 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="one" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6144,7 +6248,7 @@ C -1 < 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6155,7 +6259,7 @@ C 12 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6166,7 +6270,7 @@ C 12 > 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -6177,9 +6281,9 @@ C 12 > 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Generators internals" tags="[generators][internals]" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Single value" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6199,7 +6303,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Preset values" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6250,7 +6354,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Generator combinator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6333,7 +6437,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Explicitly typed generator sequence" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6392,7 +6496,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Simple filtering" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6428,9 +6532,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Filter out multiple elements at the start and end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6466,9 +6570,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Filter generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Throws on construction if it can't get initial element" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6488,9 +6592,9 @@ C filter([](int) { return false; }, values({ 1, 2, 3 })), Catch::GeneratorException </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Take less" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6526,9 +6630,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take generator" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Take more" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6548,9 +6652,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Map with explicit return type" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6601,7 +6705,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Map with deduced return type" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6652,7 +6756,7 @@ C !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Singular repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6672,9 +6776,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Actual repeat" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6774,9 +6878,9 @@ C !false </Expanded> </Expression> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive auto step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6845,11 +6949,11 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative auto step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6918,11 +7022,11 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -6992,13 +7096,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7068,13 +7172,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7160,19 +7264,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Exact" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7183,7 +7287,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7194,7 +7298,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7205,7 +7309,7 @@ C -0.9 == Approx( -0.9 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7216,7 +7320,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7227,7 +7331,7 @@ C -0.8 == Approx( -0.8 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7238,7 +7342,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7249,7 +7353,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7260,7 +7364,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7271,7 +7375,7 @@ C -0.6 == Approx( -0.6 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7282,7 +7386,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7293,7 +7397,7 @@ C -0.5 == Approx( -0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7304,7 +7408,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7315,7 +7419,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7326,7 +7430,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7337,7 +7441,7 @@ C -0.3 == Approx( -0.3 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7348,7 +7452,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7359,7 +7463,7 @@ C -0.2 == Approx( -0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7370,7 +7474,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7381,7 +7485,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7392,7 +7496,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1.38778e-16 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7403,7 +7507,7 @@ C -0.0 == Approx( -0.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1.38778e-16 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7414,7 +7518,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7425,7 +7529,7 @@ C 0.1 == Approx( 0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7436,7 +7540,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7447,7 +7551,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7458,7 +7562,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7469,7 +7573,7 @@ C 0.3 == Approx( 0.3 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7480,7 +7584,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7491,7 +7595,7 @@ C 0.4 == Approx( 0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7502,7 +7606,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7513,7 +7617,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7524,7 +7628,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7535,7 +7639,7 @@ C 0.6 == Approx( 0.6 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7546,7 +7650,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7557,7 +7661,7 @@ C 0.7 == Approx( 0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7568,7 +7672,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7579,7 +7683,7 @@ C 0.8 == Approx( 0.8 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7590,7 +7694,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7601,7 +7705,7 @@ C 0.9 == Approx( 0.9 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7628,19 +7732,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="42" failures="0" expectedFailures="0"/> + <OverallResults successes="42" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Slightly over end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7651,7 +7755,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7662,7 +7766,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7673,7 +7777,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7684,7 +7788,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7695,7 +7799,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7706,7 +7810,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7717,7 +7821,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7728,7 +7832,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7739,7 +7843,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7750,7 +7854,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7761,7 +7865,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7780,19 +7884,19 @@ C !false </Expanded> </Expression> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Positive manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Floating Point" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Slightly under end" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7803,7 +7907,7 @@ C -1.0 == Approx( -1.0 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7814,7 +7918,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7825,7 +7929,7 @@ C -0.7 == Approx( -0.7 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7836,7 +7940,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7847,7 +7951,7 @@ C -0.4 == Approx( -0.4 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7858,7 +7962,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7869,7 +7973,7 @@ C -0.1 == Approx( -0.1 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is -0.1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7880,7 +7984,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7891,7 +7995,7 @@ C 0.2 == Approx( 0.2 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7902,7 +8006,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7913,7 +8017,7 @@ C 0.5 == Approx( 0.5 ) </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > Current expected value is 0.5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -7932,13 +8036,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="13" failures="0" expectedFailures="0"/> + <OverallResults successes="13" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8008,13 +8112,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8084,13 +8188,13 @@ C !false </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Range" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > <Section name="Negative manual step" filename="tests/<exe-name>/IntrospectiveTests/GeneratorsImpl.tests.cpp" > @@ -8176,15 +8280,15 @@ C !false </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Greater-than inequalities with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -8219,7 +8323,7 @@ C 1.23 >= Approx( 1.24 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashers with different seed produce different hash with same test case" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8232,7 +8336,7 @@ C 130711275 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashers with same seed produce same hash" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8245,7 +8349,7 @@ C 3422778688 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashing different test cases produces different result" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Section name="Different test name" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8259,7 +8363,7 @@ C 2668622104 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different classname" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8272,7 +8376,7 @@ C 3916075712 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Different tags" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8285,9 +8389,9 @@ C 3429949824 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Hashing test case produces same hash across multiple calls" tags="[test-case-hash]" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestCaseInfoHasher.tests.cpp" > @@ -8300,22 +8404,34 @@ C 3422778688 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="INFO and UNSCOPED_INFO can stream multiple arguments" tags="[.][failing][info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + This info has multiple parts. + </Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + This unscoped info has multiple parts. + </Info> + <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > + Show infos! + </Failure> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO and WARN do not abort tests" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this is a message </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this is a warning </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO gets logged on failure" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > so should this </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8326,10 +8442,10 @@ C 2 == 1 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO gets logged on failure, even if captured before successful assertions" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8340,10 +8456,10 @@ C 2 == 2 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8354,13 +8470,13 @@ C 2 == 1 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and this, but later </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8371,16 +8487,16 @@ C 2 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message may be logged later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this message should be logged </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and this, but later </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > but not this </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8391,13 +8507,13 @@ C 2 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="INFO is reset for each loop" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 0 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 0 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8408,10 +8524,10 @@ C 0 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 1 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8422,10 +8538,10 @@ C 1 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 2 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8436,10 +8552,10 @@ C 2 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 3 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 3 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8450,10 +8566,10 @@ C 3 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 4 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 4 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8464,10 +8580,10 @@ C 4 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 5 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 5 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8478,10 +8594,10 @@ C 5 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 6 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 6 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8492,10 +8608,10 @@ C 6 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 7 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 7 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8506,10 +8622,10 @@ C 7 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 8 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 8 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8520,10 +8636,10 @@ C 8 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 9 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 9 </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8534,10 +8650,10 @@ C 9 < 10 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > current counter 10 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 10 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -8548,7 +8664,21 @@ C 10 < 10 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> + </TestCase> + <TestCase name="Incomplete AssertionHandler" tags="[!shouldfail][assertion-handler]" filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + <Original> + Dummy + </Original> + <Expanded> + Dummy + </Expanded> + <Exception filename="tests/<exe-name>/IntrospectiveTests/AssertionHandler.tests.cpp" > + Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Inequality checks that should fail" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -8591,7 +8721,7 @@ C 5 != 5 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Inequality checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -8682,7 +8812,278 @@ C 5 != 6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="JsonWriter" tags="[JSON][JsonWriter]" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Section name="Newly constructed JsonWriter does nothing" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "" + </Original> + <Expanded> + "" == "" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeObject will create an empty pair of braces" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "{\n}" + </Original> + <Expanded> + "{ +}" +== +"{ +}" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeObject with key will create an object to write the value" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str(), ContainsSubstring( "\"int\": 1," ) && ContainsSubstring( "\"double\": 1.5," ) && ContainsSubstring( "\"true\": true," ) && ContainsSubstring( "\"false\": false," ) && ContainsSubstring( "\"string\": \"this is a string\"," ) && ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) + </Original> + <Expanded> + "{ + "int": 1, + "double": 1.5, + "true": true, + "false": false, + "string": "this is a string", + "array": [ + 1, + 2 + ] +}" ( contains: ""int": 1," and contains: ""double": 1.5," and contains: ""true": true," and contains: ""false": false," and contains: ""string": "this is a string"," and contains: ""array": [ + 1, + 2 + ] +}" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="nesting objects" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str(), ContainsSubstring( "\"empty_object\": {\n }," ) && ContainsSubstring( "\"fully_object\": {\n \"key\": 1\n }" ) + </Original> + <Expanded> + "{ + "empty_object": { + }, + "fully_object": { + "key": 1 + } +}" ( contains: ""empty_object": { + }," and contains: ""fully_object": { + "key": 1 + }" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeArray will create an empty pair of braces" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n]" + </Original> + <Expanded> + "[ +]" +== +"[ +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Calling writeArray creates array to write the values to" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" + </Original> + <Expanded> + "[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" +== +"[ + 1, + 1.5, + true, + false, + "this is a string", + { + "object": 42 + }, + [ + "array", + 42.5 + ] +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Moved from JsonObjectWriter shall not insert superfluous brace" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "{\n}" + </Original> + <Expanded> + "{ +}" +== +"{ +}" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Moved from JsonArrayWriter shall not insert superfluous bracket" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "[\n]" + </Original> + <Expanded> + "[ +]" +== +"[ +]" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom class shall be quoted" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + stream.str() == "\"custom\"" + </Original> + <Expanded> + ""custom"" == ""custom"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="JsonWriter escapes charaters in strings properly" tags="[JsonWriter]" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Section name="Quote in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\"\"" + </Original> + <Expanded> + ""\""" == ""\""" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Backslash in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\\\"" + </Original> + <Expanded> + ""\\"" == ""\\"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Forward slash in a string is **not** escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"/\"" + </Original> + <Expanded> + ""/"" == ""/"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Backspace in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\b\"" + </Original> + <Expanded> + ""\b"" == ""\b"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Formfeed in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\f\"" + </Original> + <Expanded> + ""\f"" == ""\f"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="linefeed in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\n\"" + </Original> + <Expanded> + ""\n"" == ""\n"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="carriage return in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\r\"" + </Original> + <Expanded> + ""\r"" == ""\r"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="tab in a string is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\t\"" + </Original> + <Expanded> + ""\t"" == ""\t"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="combination of characters is escaped" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Json.tests.cpp" > + <Original> + sstream.str() == "\"\\\\/\\t\\r\\n\"" + </Original> + <Expanded> + ""\\/\t\r\n"" == ""\\/\t\r\n"" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Lambdas in assertions" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > @@ -8693,7 +9094,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Less-than inequalities with different epsilons" tags="[Approx]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -8728,10 +9129,10 @@ C 1.23 <= Approx( 1.22 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="ManuallyRegistered" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be (AllOf) composed with the && operator" tags="[matchers][operator&&][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8742,7 +9143,7 @@ C "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be (AnyOf) composed with the || operator" tags="[matchers][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8761,7 +9162,7 @@ C "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be composed with both && and ||" tags="[matchers][operator&&][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8772,7 +9173,7 @@ C "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be composed with both && and || - failing" tags="[.][failing][matchers][operator&&][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8783,7 +9184,7 @@ C "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Matchers can be negated (Not) with the ! operator" tags="[matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8794,7 +9195,7 @@ C "this string contains 'abc' as a substring" not contains: "different" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Matchers can be negated (Not) with the ! operator - failing" tags="[.][failing][matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -8805,44 +9206,44 @@ C "this string contains 'abc' as a substring" not contains: "substring" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Mayfail test case with nested sections" tags="[!mayfail]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > - <OverallResults successes="0" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" /> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> - <OverallResults successes="0" failures="0" expectedFailures="1"/> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> </Section> <Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > - <OverallResults successes="0" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Mismatching exception messages failing the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -8861,7 +9262,7 @@ C "expected exception" equals: "should fail" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Multireporter calls reporters and listeners in correct order" tags="[multi-reporter][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -8874,7 +9275,7 @@ C { "Hello", "world", "Goodbye", "world" } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Multireporter updates ReporterPreferences properly" tags="[multi-reporter][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -8942,7 +9343,7 @@ C true == true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -9009,9 +9410,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Nested generators and captured variables" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -9142,19 +9543,19 @@ C 99 > -6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Nice descriptive name" tags="[.][tag1][tag2][tag3]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > This one ran </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Non-std exceptions can be translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > custom exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Objects that evaluated in boolean contexts can be checked" tags="[SafeBool][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -9181,10 +9582,10 @@ C !{?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Optionally static assertions" tags="[compilation]" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Ordering comparison checks that should fail" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -9339,7 +9740,7 @@ C "hello" <= "a" </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Ordering comparison checks that should succeed" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -9478,7 +9879,7 @@ C "hello" > "a" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Our PCG implementation provides expected results for known seeds" tags="[rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Section name="Default seeded" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -9532,7 +9933,7 @@ C 1827115164 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Specific seed" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -9635,24 +10036,24 @@ C 4261393167 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Output from all sections is reported" tags="[.][failing][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Message from section one </Failure> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Message from section two </Failure> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Overloaded comma or address-of operators are not used" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -9687,7 +10088,7 @@ C ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parse uints" tags="[parse-numbers]" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > <Section name="proper inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > @@ -9723,7 +10124,7 @@ C {?} == {?} </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Bad inputs" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Parse.tests.cpp" > @@ -9782,9 +10183,9 @@ C !{?} </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsed tags are matched case insensitive" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9811,7 +10212,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing sharding-related cli flags" tags="[sharding]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="shard-count" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9831,7 +10232,7 @@ C 8 == 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Negative shard count reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9850,7 +10251,7 @@ C "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Zero shard count reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9869,7 +10270,7 @@ C "Shard count must be positive" contains: "Shard count must be positive" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="shard-index" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9888,7 +10289,7 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Negative shard index reports error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9907,7 +10308,7 @@ C "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shard index 0 is accepted" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -9926,12 +10327,12 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing tags with non-alphabetical characters is pass-through" tags="[test-spec][test-spec-parser]" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9942,7 +10343,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9953,7 +10354,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[tag with spaces]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9964,7 +10365,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9975,7 +10376,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9986,7 +10387,7 @@ C true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > tagString := "[I said "good day" sir!]" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/TestSpecParser.tests.cpp" > @@ -9997,7 +10398,7 @@ C true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Parsing warnings" tags="[cli][warnings]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="NoAssertions" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10017,7 +10418,7 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="NoTests is no longer supported" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10028,7 +10429,7 @@ C !{?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Combining multiple warnings" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10047,9 +10448,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Pointers can be compared to null" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -10116,7 +10517,7 @@ C 0 != 0x<hex digits> </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Precision of floating point stringification can be set" tags="[floatingPoint][toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Floats" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -10136,7 +10537,7 @@ C 13 == 13 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Double" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -10155,9 +10556,9 @@ C 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Predicate matcher can accept const char*" tags="[compilation][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -10168,7 +10569,7 @@ C "foo" matches undescribed predicate </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Process can be configured on command line" tags="[command-line][config]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="empty args don't cause a crash" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10188,7 +10589,7 @@ C "" == "" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="default - no arguments" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10279,7 +10680,7 @@ C {?} == {?} </Expanded> </Expression> - <OverallResults successes="11" failures="0" expectedFailures="0"/> + <OverallResults successes="11" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case using" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10315,9 +10716,9 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case exclusion using exclude:" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10353,9 +10754,9 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Specify one test case exclusion using ~" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10391,13 +10792,13 @@ C true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-r/console" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10408,7 +10809,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10419,13 +10820,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-r/xml" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10436,7 +10837,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10447,13 +10848,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--reporter/junit" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10464,7 +10865,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10475,9 +10876,9 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="must match one of the available ones" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10497,13 +10898,13 @@ C "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="With output file" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10514,7 +10915,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10525,13 +10926,13 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="With Windows-like absolute path as output file" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10542,7 +10943,7 @@ C {?} </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > result.errorMessage() := "" </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10553,9 +10954,9 @@ C { {?} } == { {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10576,11 +10977,11 @@ C { {?}, {?} } == { {?}, {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10601,11 +11002,11 @@ C { {?}, {?} } == { {?}, {?} } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="reporter" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Multiple reporters" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10626,11 +11027,11 @@ C "Only one reporter may have unspecified output file." contains: "Only one reporter may have unspecified output file." </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="debugger" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-b" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10650,9 +11051,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="debugger" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--break" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10672,9 +11073,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-a aborts after first failure" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10694,9 +11095,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-x 2 aborts after two failures" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10716,9 +11117,9 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-x must be numeric" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10738,9 +11139,9 @@ C "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10761,11 +11162,11 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10786,11 +11187,11 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10811,11 +11212,11 @@ C 2 == 2 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10836,11 +11237,11 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="abort" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="wait-for-keypress" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10861,11 +11262,11 @@ C "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-e" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10885,9 +11286,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--nothrow" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10907,9 +11308,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="output filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="-o filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10929,9 +11330,9 @@ C "filename.ext" == "filename.ext" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="output filename" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="--out" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10951,9 +11352,9 @@ C "filename.ext" == "filename.ext" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="combinations" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="Single character flags can be combined" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -10989,9 +11390,9 @@ C true == true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="without option" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11011,9 +11412,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="auto" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11033,9 +11434,9 @@ C 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="yes" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11055,9 +11456,9 @@ C 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="no" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11077,9 +11478,9 @@ C 3 == 3 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="use-colour" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="error" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11099,9 +11500,9 @@ C "colour mode must be one of: default, ansi, win32, or none. 'wrong' is not recognised" contains: "colour mode must be one of" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="samples" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11121,9 +11522,9 @@ C 200 == 200 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="resamples" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11143,9 +11544,9 @@ C 20000 (0x<hex digits>) == 20000 (0x<hex digits>) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="confidence-interval" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11165,9 +11566,9 @@ C 0.99 == Approx( 0.99 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="no-analysis" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11187,9 +11588,9 @@ C true </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Benchmark options" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > <Section name="warmup-time" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > @@ -11209,11 +11610,11 @@ C 10 == 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int, double, float>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11224,7 +11625,7 @@ C 3 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int, double>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11235,7 +11636,7 @@ C 2 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Product with differing arities - std::tuple<int>" tags="[product][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -11246,7 +11647,7 @@ C 1 >= 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Random seed generation accepts known methods" tags="[rng][seed]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -11273,7 +11674,7 @@ C Catch::generateRandomSeed(method) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Random seed generation reports unknown methods" tags="[rng][seed]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > @@ -11284,7 +11685,7 @@ C Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Range type with sentinel" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -11295,7 +11696,7 @@ C "{ }" == "{ }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reconstruction should be based on stringification: #914" tags="[.][Decomposition][failing]" filename="tests/<exe-name>/UsageTests/Decomposition.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Decomposition.tests.cpp" > @@ -11306,7 +11707,7 @@ C Hey, its truthy! </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Regex string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -11333,7 +11734,7 @@ C "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Registering reporter with '::' in name fails" tags="[registration][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11344,7 +11745,7 @@ C "'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is not allowed in reporter name: 'with::doublecolons'" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Regression test #1" tags="[matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -11355,7 +11756,7 @@ C { 'a', 'b' } not UnorderedEquals: { 'c', 'b' } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reporter's write listings to provided stream" tags="[reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11367,7 +11768,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11382,7 +11783,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11393,7 +11794,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11407,7 +11808,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11418,7 +11819,7 @@ C </Expanded> </Expression> <Section name="Automake reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: Automake </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11434,7 +11835,7 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11445,7 +11846,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11460,7 +11861,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11471,7 +11872,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11485,7 +11886,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11496,7 +11897,7 @@ C </Expanded> </Expression> <Section name="compact reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: compact </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11512,7 +11913,7 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11523,7 +11924,7 @@ C </Expanded> </Expression> <Section name="console reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11538,7 +11939,7 @@ C " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11549,7 +11950,7 @@ C </Expanded> </Expression> <Section name="console reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11563,7 +11964,7 @@ C " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11574,7 +11975,7 @@ C </Expanded> </Expression> <Section name="console reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: console </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11590,7 +11991,121 @@ C " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring("fakeTag"s) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tags": [ + { + "aliases": [ + "fakeTag" + ], + "count": 1 + } + ]" contains: "fakeTag" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring("fake reporter"s) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "reporters": [ + { + "name": "fake reporter", + "description": "fake description" + } + ]" contains: "fake reporter" + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + !(factories.empty()) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <Section name="JSON reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + Tested reporter: JSON + </Info> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > + <Original> + listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) + </Original> + <Expanded> + "{ + "version": 1, + "metadata": { + "name": "", + "rng-seed": 1234, + "catch2-version": "<version>" + }, + "listings": { + "tests": [ + { + "name": "fake test name", + "class-name": "", + "tags": [ + "fakeTestTag" + ], + "source-location": { + "filename": "fake-file.cpp", + "line": 123456789 + } + } + ]" ( contains: "fake test name" and contains: "fakeTestTag" ) + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11601,7 +12116,7 @@ C </Expanded> </Expression> <Section name="JUnit reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11617,7 +12132,7 @@ All available tags: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11628,7 +12143,7 @@ All available tags: </Expanded> </Expression> <Section name="JUnit reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11643,7 +12158,7 @@ Available reporters: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11654,7 +12169,7 @@ Available reporters: </Expanded> </Expression> <Section name="JUnit reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: JUnit </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11671,7 +12186,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11682,7 +12197,7 @@ All available test cases: </Expanded> </Expression> <Section name="SonarQube reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11698,7 +12213,7 @@ All available tags: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11709,7 +12224,7 @@ All available tags: </Expanded> </Expression> <Section name="SonarQube reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11724,7 +12239,7 @@ Available reporters: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11735,7 +12250,7 @@ Available reporters: </Expanded> </Expression> <Section name="SonarQube reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: SonarQube </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11752,7 +12267,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11763,7 +12278,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11778,7 +12293,7 @@ All available test cases: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11789,7 +12304,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11803,7 +12318,7 @@ All available test cases: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11814,7 +12329,7 @@ All available test cases: </Expanded> </Expression> <Section name="TAP reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TAP </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11830,7 +12345,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11841,7 +12356,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11856,7 +12371,7 @@ All available test cases: " contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11867,7 +12382,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11881,7 +12396,7 @@ All available test cases: " contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11892,7 +12407,7 @@ All available test cases: </Expanded> </Expression> <Section name="TeamCity reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: TeamCity </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11908,7 +12423,7 @@ All available test cases: " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11919,7 +12434,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11938,7 +12453,7 @@ All available test cases: </TagsFromMatchingTests>" contains: "fakeTag" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11949,7 +12464,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11966,7 +12481,7 @@ All available test cases: </AvailableReporters>" contains: "fake reporter" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Original> @@ -11977,7 +12492,7 @@ All available test cases: </Expanded> </Expression> <Section name="XML reporter lists tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > Tested reporter: XML </Info> <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -11999,18 +12514,18 @@ All available test cases: </MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Reproducer for #2309 - a very long description past 80 chars (default console width) with a late colon : blablabla" tags="[console-reporter]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="SUCCEED counts as a test pass" tags="[messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="SUCCEED does not require an argument" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or methods" tags="[bdd][fixtures]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: No operations precede me" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12032,13 +12547,13 @@ All available test cases: 1 > 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: Do that thing with the thing" tags="[Tags]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: This stuff exists" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12062,29 +12577,29 @@ All available test cases: true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: This is a really long scenario name to see how the list command deals with wrapping" tags="[anotherReallyLongTagNameButThisOneHasNoObviousWrapPointsSoShouldSplitWithinAWordUsingADashCharacter][long][lots][one very long tag name that should cause line wrapping writing out using the list command][tags][verbose][very long tags]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: A section name that is so long that it cannot fit in a single console width" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="When: The test headers are printed as part of the normal running of the scenario" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Scenario: Vector resizing affects size and capacity" tags="[bdd][capacity][size][vector]" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Section name="Given: an empty vector" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12132,15 +12647,15 @@ All available test cases: 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Given: an empty vector" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/BDD.tests.cpp" > @@ -12169,16 +12684,16 @@ All available test cases: 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Sends stuff to stdout and stderr" tags="[.]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> A string sent directly to stdout </StdOut> @@ -12253,16 +12768,16 @@ A string sent to stderr via clog Approx( 1.23 ) != 1.24 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Standard output from all sections is reported" tags="[.][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Section name="one" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="two" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"> + <OverallResult success="false" skips="0"> <StdOut> Message from section one Message from section two @@ -12286,7 +12801,7 @@ Message from section two "this string contains 'abc' as a substring" starts with: "string" (case insensitive) </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Static arrays are convertible to string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="Single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12298,7 +12813,7 @@ Message from section two "{ 1 }" == "{ 1 }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Multiple" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12309,7 +12824,7 @@ Message from section two "{ 3, 2, 1 }" == "{ 3, 2, 1 }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Non-trivial inner items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -12322,9 +12837,9 @@ Message from section two "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="String matchers" tags="[matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -12391,7 +12906,7 @@ Message from section two "this string contains 'abc' as a substring" ends with: " substring" (case insensitive) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="StringRef" tags="[StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Empty string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12419,7 +12934,7 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From string literal" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12454,7 +12969,7 @@ Message from section two "hello" == "hello" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From sub-string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12473,7 +12988,7 @@ Message from section two original.data() </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Copy construction is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12484,7 +12999,7 @@ Message from section two "original string" == "original string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Copy assignment is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12495,7 +13010,7 @@ Message from section two "original string" == "original string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12531,9 +13046,9 @@ Message from section two hello == "hello" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="non-zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12553,9 +13068,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Pointer values of full refs should match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12567,9 +13082,9 @@ Message from section two "hello world!" == "hello world!" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Pointer values of substring refs should also match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12581,9 +13096,9 @@ Message from section two "hello world!" == "hello world!" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Past the end substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12595,9 +13110,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Substring off the end are trimmed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12609,9 +13124,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="substring start after the end is empty" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12623,9 +13138,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Comparisons are deep" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12652,7 +13167,7 @@ Message from section two Hello != Hel </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="implicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12672,9 +13187,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12694,9 +13209,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12716,9 +13231,9 @@ Message from section two 17 == 17 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12738,9 +13253,9 @@ Message from section two 11 == 11 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12760,9 +13275,9 @@ Message from section two 11 == 11 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="std::string += StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12775,7 +13290,7 @@ Message from section two "some string += the stringref contents" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="StringRef + StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > @@ -12786,18 +13301,18 @@ Message from section two "abrakadabra" == "abrakadabra" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="StringRef at compilation time" tags="[constexpr][StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > <Section name="Simple constructors" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="UDL construction" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" > - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12816,7 +13331,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - signed char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12835,7 +13350,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying char arrays with statically known sizes - unsigned char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -12854,7 +13369,7 @@ Message from section two ""abc"" == ""abc"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::duration helpers" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12889,7 +13404,7 @@ Message from section two 1 ns != 1 us </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::duration with weird ratios" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12908,7 +13423,7 @@ Message from section two 1 ps != 1 as </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Stringifying std::chrono::time_point<system_clock>" tags="[chrono][toString]" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringChrono.tests.cpp" > @@ -12921,7 +13436,7 @@ Message from section two {iso8601-timestamp} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Tabs and newlines show in output" tags="[.][failing][whitespace]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -12939,7 +13454,7 @@ Message from section two " </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Tag alias can be registered against tag patterns" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Section name="The same tag alias can only be registered once" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -12983,7 +13498,7 @@ Message from section two Redefined at: file:10" contains: "10" </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Tag aliases must be of the form [@name]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="CHECK_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -13018,9 +13533,9 @@ Message from section two registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Tags with spaces and non-alphanumerical characters are accepted" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -13039,7 +13554,7 @@ Message from section two { {?}, {?} } ( Contains: {?} and Contains: {?} ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 0" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13050,7 +13565,7 @@ Message from section two 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 1" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13061,7 +13576,7 @@ Message from section two 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 2" tags="[class][list][template]" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Class.tests.cpp" > @@ -13072,7 +13587,7 @@ Message from section two 1.0 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13083,7 +13598,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13094,7 +13609,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13105,7 +13620,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13116,7 +13631,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 0" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13127,7 +13642,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 1" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13138,7 +13653,7 @@ Message from section two 1 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 2" tags="[list][template]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13149,7 +13664,7 @@ Message from section two 4 > 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - float" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13185,7 +13700,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13229,9 +13744,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13266,7 +13781,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13301,9 +13816,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - int" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13339,7 +13854,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13383,9 +13898,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13420,7 +13935,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13455,9 +13970,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - std::string" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13493,7 +14008,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13537,9 +14052,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13574,7 +14089,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13609,9 +14124,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTest: vectors can be sized and resized - std::tuple<int,float>" tags="[template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13647,7 +14162,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13691,9 +14206,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13728,7 +14243,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13763,9 +14278,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13801,7 +14316,7 @@ Message from section two 12 >= 12 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13845,9 +14360,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13882,7 +14397,7 @@ Message from section two 12 >= 12 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13917,9 +14432,9 @@ Message from section two 6 >= 6 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - float,4" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -13955,7 +14470,7 @@ Message from section two 8 >= 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -13999,9 +14514,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14036,7 +14551,7 @@ Message from section two 8 >= 8 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14071,9 +14586,9 @@ Message from section two 4 >= 4 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - int,5" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14109,7 +14624,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14153,9 +14668,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14190,7 +14705,7 @@ Message from section two 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14225,9 +14740,9 @@ Message from section two 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="TemplateTestSig: vectors can be sized and resized - std::string,15" tags="[nttp][template][vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14263,7 +14778,7 @@ Message from section two 30 >= 30 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14307,9 +14822,9 @@ Message from section two 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14344,7 +14859,7 @@ Message from section two 30 >= 30 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -14379,9 +14894,9 @@ Message from section two 15 >= 15 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test case with identical tags keeps just one" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -14400,10 +14915,10 @@ Message from section two {?} == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test case with one argument" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test enum bit values" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -14414,10 +14929,10 @@ Message from section two 3221225472 (0x<hex digits>) == 3221225472 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Test with special, characters "in name" tags="[cli][regression]" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if" tags="[checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14452,7 +14967,7 @@ Message from section two false </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if 2" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14464,7 +14979,7 @@ Message from section two </Expanded> </Expression> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" /> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Testing checked-if 3" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -14476,7 +14991,51 @@ Message from section two </Expanded> </Expression> <Failure filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" /> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Testing checked-if 4" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Expression success="true" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + true + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="false" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + {Unknown expression after the reported line} + </Original> + <Expanded> + {Unknown expression after the reported line} + </Expanded> + <Exception filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + Uncaught exception should fail! + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Testing checked-if 5" tags="[!shouldfail][checked-if]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + false + </Original> + <Expanded> + false + </Expanded> + </Expression> + <Expression success="false" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + <Original> + {Unknown expression after the reported line} + </Original> + <Expanded> + {Unknown expression after the reported line} + </Expanded> + <Exception filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > + Uncaught exception should fail! + </Exception> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="The NO_FAIL macro reports a failure but does not fail the test" tags="[messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Expression success="false" type="CHECK_NOFAIL" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -14487,7 +15046,7 @@ Message from section two 1 == 2 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="The default listing implementation write to provided stream" tags="[reporter-helpers][reporters]" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Section name="Listing tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14503,7 +15062,7 @@ Message from section two " contains: "[fakeTag]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14517,7 +15076,7 @@ Message from section two " ( contains: "fake reporter" and contains: "fake description" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14533,7 +15092,7 @@ Message from section two " ( contains: "fake test name" and contains: "fakeTestTag" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Listing listeners" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" > @@ -14547,18 +15106,18 @@ Message from section two " ( contains: "fakeListener" and contains: "fake description" ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="This test 'should' fail but doesn't" tags="[!shouldfail][.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Thrown string literals are translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > For some reason someone is throwing a string literal! </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Tracker" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > @@ -14610,7 +15169,7 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14710,9 +15269,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14820,9 +15379,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="11" failures="0" expectedFailures="0"/> + <OverallResults successes="11" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -14923,11 +15482,11 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="10" failures="0" expectedFailures="0"/> + <OverallResults successes="10" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -15060,11 +15619,11 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="12" failures="0" expectedFailures="0"/> + <OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="14" failures="0" expectedFailures="0"/> + <OverallResults successes="14" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp" > <Original> @@ -15131,9 +15690,9 @@ Message from section two true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Trim strings" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -15216,13 +15775,189 @@ There is no extra whitespace here There is no extra whitespace here </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Type conversions of RangeEquals and similar" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( c_array ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( c_array ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types (differ in array N)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_3, !RangeEquals( array_int_4 ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_3, !UnorderedRangeEquals( array_int_4 ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different container types and value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Container conversions" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers, one random access, one not" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, RangeEquals( list_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_int_a, UnorderedRangeEquals( list_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Value type" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal containers of different value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, RangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, UnorderedRangeEquals( vector_char_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Value type" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal containers of different value types" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, !RangeEquals( vector_char_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 2 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_int_a, !UnorderedRangeEquals( vector_char_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 2 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges with begin that needs ADL" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + a, !RangeEquals( b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 3, 2, 1 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + a, UnorderedRangeEquals( b ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 3, 2, 1 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, RangeEquals( array_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, UnorderedRangeEquals( array_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Unexpected exceptions can be translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > 3.14 </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Upcasting special member functions" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="Move constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -15234,7 +15969,7 @@ There is no extra whitespace here 3 == 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="move assignment" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -15245,9 +15980,9 @@ There is no extra whitespace here 3 == 3 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AllMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15267,7 +16002,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not all match ( contains element 0 and contains element 1 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15278,7 +16013,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } all match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15330,9 +16065,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15384,11 +16119,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AllTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15401,9 +16136,9 @@ There is no extra whitespace here { true, true, true, true, true } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15415,12 +16150,12 @@ There is no extra whitespace here { } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One false evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !AllTrue() @@ -15429,9 +16164,9 @@ There is no extra whitespace here { true, true, false, true, true } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15443,9 +16178,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15457,12 +16192,12 @@ There is no extra whitespace here { true, true, true, true, true } contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One false evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !AllTrue() @@ -15471,9 +16206,9 @@ There is no extra whitespace here { true, true, false, true, true } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15485,9 +16220,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains only true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15539,9 +16274,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15593,11 +16328,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AnyMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15617,7 +16352,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not any match ( contains element 0 and contains element 10 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15628,7 +16363,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } any match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15680,9 +16415,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15734,11 +16469,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of AnyTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15751,9 +16486,9 @@ There is no extra whitespace here { true, true, true, true, true } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15765,12 +16500,12 @@ There is no extra whitespace here { } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, AnyTrue() @@ -15779,9 +16514,9 @@ There is no extra whitespace here { false, false, true, false, false } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15793,9 +16528,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15807,12 +16542,12 @@ There is no extra whitespace here { true, true, true, true, true } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, AnyTrue() @@ -15821,9 +16556,9 @@ There is no extra whitespace here { false, false, true, false, false } contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15835,9 +16570,9 @@ There is no extra whitespace here { false, false, false, false, false } not contains at least one true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15889,9 +16624,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15943,11 +16678,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of NoneMatch range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15967,7 +16702,7 @@ There is no extra whitespace here { { 0, 1, 2, 3, 5 }, { 4, -3, -2, 5, 0 }, { 0, 0, 0, 5, 0 }, { 0, -5, 0, 5, 0 }, { 1, 0, 0, -1, 5 } } not none match ( contains element 0 and contains element 1 ) </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found begin and end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -15978,7 +16713,7 @@ There is no extra whitespace here { 1, 2, 3, 4, 5 } none match matches undescribed predicate </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16030,9 +16765,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16084,11 +16819,11 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of NoneTrue range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16101,9 +16836,9 @@ There is no extra whitespace here { true, true, true, true, true } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Empty evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16115,12 +16850,12 @@ There is no extra whitespace here { } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !NoneTrue() @@ -16129,9 +16864,9 @@ There is no extra whitespace here { false, false, true, false, false } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16143,9 +16878,9 @@ There is no extra whitespace here { false, false, false, false, false } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16157,12 +16892,12 @@ There is no extra whitespace here { true, true, true, true, true } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > - <Section name="One true evalutes to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="One true evaluates to false" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Original> data, !NoneTrue() @@ -16171,9 +16906,9 @@ There is no extra whitespace here { false, false, true, false, false } not contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contained type is convertible to bool" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All false evaluates to true" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16185,9 +16920,9 @@ There is no extra whitespace here { false, false, false, false, false } contains no true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="All are read" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16239,9 +16974,9 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Shortcircuiting" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Short-circuited" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16293,11 +17028,387 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Usage of RangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container matches empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, RangeEquals( empty_vector ) + </Original> + <Expanded> + { } elements are { } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container does not match non-empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, !RangeEquals( non_empty_vector ) + </Original> + <Expanded> + { } not elements are { 1 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_vector, !RangeEquals( empty_vector ) + </Original> + <Expanded> + { 1 } not elements are { } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal 1-length non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_array, RangeEquals( non_empty_array ) + </Original> + <Expanded> + { 1 } elements are { 1 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, RangeEquals( array_a ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, non-equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !RangeEquals( array_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 2, 2, 3 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !RangeEquals( array_c ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 2 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal-sized, non-empty containers (with same first elements)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !RangeEquals( vector_b ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, RangeEquals( vector_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } elements are { 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !RangeEquals( vector_b, close_enough ) + </Original> + <Expanded> + { 1, 2, 3 } not elements are { 3, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, RangeEquals( needs_adl2 ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Check short-circuits on failure" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1, !RangeEquals( arr ) + </Original> + <Expanded> + { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[0] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[1] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[2] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + !(mocked1.m_derefed[3]) + </Original> + <Expanded> + !false + </Expanded> + </Expression> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="All elements are checked on success" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1, RangeEquals( arr ) + </Original> + <Expanded> + { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[0] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[1] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[2] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + mocked1.m_derefed[3] + </Original> + <Expanded> + true + </Expanded> + </Expression> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="Usage of UnorderedRangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container matches empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, UnorderedRangeEquals( empty_vector ) + </Original> + <Expanded> + { } unordered elements are { } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Empty container does not match non-empty container" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + empty_vector, !UnorderedRangeEquals( non_empty_vector ) + </Original> + <Expanded> + { } not unordered elements are { 1 } + </Expanded> + </Expression> + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_vector, !UnorderedRangeEquals( empty_vector ) + </Original> + <Expanded> + { 1 } not unordered elements are { } + </Expanded> + </Expression> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal 1-length non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + non_empty_array, UnorderedRangeEquals( non_empty_array ) + </Original> + <Expanded> + { 1 } unordered elements are { 1 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, UnorderedRangeEquals( array_a ) + </Original> + <Expanded> + { 1, 2, 3 } unordered elements are { 1, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal-sized, non-equal, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + array_a, !UnorderedRangeEquals( array_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 2, 2, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Basic usage" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal-sized, non-empty containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !UnorderedRangeEquals( vector_b ) + </Original> + <Expanded> + { 1, 2, 3 } not unordered elements are { 1, 2, 3, 4 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, UnorderedRangeEquals( vector_a_plus_1, close_enough ) + </Original> + <Expanded> + { 1, 10, 20 } unordered elements are { 11, 21, 2 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Custom predicate" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Section name="Two non-equal non-empty containers (close enough)" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + vector_a, !UnorderedRangeEquals( vector_b, close_enough ) + </Original> + <Expanded> + { 1, 10, 21 } not unordered elements are { 11, 21, 3 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > + <Original> + needs_adl1, UnorderedRangeEquals( needs_adl2 ) + </Original> + <Expanded> + { 1, 2, 3, 4, 5 } unordered elements are { 1, 2, 3, 4, 5 } + </Expanded> + </Expression> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Usage of the SizeIs range matcher" tags="[matchers][size][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Section name="Some with stdlib containers" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16357,7 +17468,7 @@ There is no extra whitespace here { {?}, {?}, {?} } has size == 3 </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type requires ADL found size free function" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16368,7 +17479,7 @@ There is no extra whitespace here {?} has size == 12 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Type has size member" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" > @@ -16379,9 +17490,9 @@ There is no extra whitespace here {?} has size == 13 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Use a custom approx" tags="[Approx][custom]" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Approx.tests.cpp" > @@ -16448,13 +17559,13 @@ There is no extra whitespace here Approx( 1.23 ) != 1.25 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Variadic macros" tags="[sections][variadic]" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > <Section name="Section with one argument" filename="tests/<exe-name>/UsageTests/VariadicMacros.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector Approx matcher" tags="[approx][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Empty vector is roughly equal to an empty vector" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16466,7 +17577,7 @@ There is no extra whitespace here { } is approx: { } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="A vector is approx equal to itself" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16486,9 +17597,9 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 } </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Different length" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16500,9 +17611,9 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Vectors with elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Same length, different elements" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16538,11 +17649,11 @@ There is no extra whitespace here { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 } </Expanded> </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> + <OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector Approx matcher -- failing" tags="[.][approx][failing][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Empty and non empty vectors are not approx equal" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16554,7 +17665,7 @@ There is no extra whitespace here { } is approx: { 1.0, 2.0 } </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="Just different vectors" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16565,9 +17676,9 @@ There is no extra whitespace here { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 } </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="Vector matchers" tags="[matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Contains (element)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16595,7 +17706,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (vector)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16662,7 +17773,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2 } </Expanded> </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> + <OverallResults successes="8" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (element), composed" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16673,7 +17784,7 @@ There is no extra whitespace here { 1, 2, 3 } ( Contains: 1 and Contains: 2 ) </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Equals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16724,7 +17835,7 @@ There is no extra whitespace here { 1, 2, 3 } Equals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="UnorderedEquals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16783,9 +17894,9 @@ There is no extra whitespace here { 1, 3, 2 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="7" failures="0" expectedFailures="0"/> + <OverallResults successes="7" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="Vector matchers that fail" tags="[.][failing][matchers][vector]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Section name="Contains (element)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16805,7 +17916,7 @@ There is no extra whitespace here { } Contains: 1 </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Contains (vector)" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16824,7 +17935,7 @@ There is no extra whitespace here { 1, 2, 3 } Contains: { 1, 2, 4 } </Expanded> </Expression> - <OverallResults successes="0" failures="2" expectedFailures="0"/> + <OverallResults successes="0" failures="2" expectedFailures="0" skipped="false"/> </Section> <Section name="Equals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16859,7 +17970,7 @@ There is no extra whitespace here { 1, 2, 3 } Equals: { } </Expanded> </Expression> - <OverallResults successes="0" failures="4" expectedFailures="0"/> + <OverallResults successes="0" failures="4" expectedFailures="0" skipped="false"/> </Section> <Section name="UnorderedEquals" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > <Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" > @@ -16894,9 +18005,9 @@ There is no extra whitespace here { 3, 1 } UnorderedEquals: { 1, 2, 3 } </Expanded> </Expression> - <OverallResults successes="0" failures="4" expectedFailures="0"/> + <OverallResults successes="0" failures="4" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When checked exceptions are thrown they can be expected or unexpected" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS_AS" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16923,13 +18034,13 @@ There is no extra whitespace here thisThrows() </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown directly they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > unexpected exception </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown during a CHECK the test should continue" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16943,7 +18054,7 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16957,7 +18068,7 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown from functions they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > @@ -16971,31 +18082,31 @@ There is no extra whitespace here expected exception </Exception> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown from sections they are always failures" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Section name="section name" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > unexpected exception </Exception> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="When unchecked exceptions are thrown, but caught, they do not affect the test" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="X/level/0/a" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/0/b" tags="[fizz][Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/1/a" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="X/level/1/b" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="XmlEncode" tags="[XML]" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Section name="normal string" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17007,7 +18118,7 @@ There is no extra whitespace here "normal string" == "normal string" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="empty string" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17018,7 +18129,7 @@ There is no extra whitespace here "" == "" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with ampersand" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17029,7 +18140,7 @@ There is no extra whitespace here "smith &amp; jones" == "smith &amp; jones" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with less-than" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17040,7 +18151,7 @@ There is no extra whitespace here "smith &lt; jones" == "smith &lt; jones" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with greater-than" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17061,7 +18172,7 @@ There is no extra whitespace here "smith ]]&gt; jones" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with quotes" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17084,7 +18195,7 @@ There is no extra whitespace here "don't &quot;quote&quot; me on that" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with control char (1)" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17095,7 +18206,7 @@ There is no extra whitespace here "[\x01]" == "[\x01]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="string with control char (x7F)" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17106,9 +18217,9 @@ There is no extra whitespace here "[\x7F]" == "[\x7F]" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="XmlWriter writes boolean attributes as true/false" tags="[XML][XmlWriter]" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" > @@ -17121,7 +18232,11 @@ There is no extra whitespace here " ( contains: "attr1="true"" and contains: "attr2="false"" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="a succeeding test can still be skipped" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="analyse no analysis" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17228,7 +18343,7 @@ There is no extra whitespace here 0.0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="array<int, N> -> toString" tags="[array][containers][toString]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -17255,7 +18370,7 @@ There is no extra whitespace here "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="benchmark function call" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Section name="without chronometer" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17299,7 +18414,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="with chronometer" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17342,9 +18457,9 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="boolean member" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -17355,7 +18470,7 @@ There is no extra whitespace here 0x<hex digits> != 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedElse" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17374,7 +18489,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedElse, failing" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_ELSE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17393,7 +18508,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="checkedIf" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17412,7 +18527,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="checkedIf, failing" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECKED_IF" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17431,7 +18546,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="classify_outliers" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Section name="none" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17483,7 +18598,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="low severe" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17534,7 +18649,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="low mild" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17585,7 +18700,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="high mild" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17636,7 +18751,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="high severe" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17687,7 +18802,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="mixed" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17738,9 +18853,9 @@ There is no extra whitespace here 2 == 2 </Expanded> </Expression> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="comparisons between const int variables" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -17775,7 +18890,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="comparisons between int variables" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" > @@ -17810,7 +18925,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="convertToBits" tags="[conversion][floating-point]" filename="tests/<exe-name>/IntrospectiveTests/FloatingPoint.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/FloatingPoint.tests.cpp" > @@ -17865,7 +18980,16 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="dynamic skipping works with generators" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 41 + </Skip> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 43 + </Skip> + <OverallResult success="true" skips="2"/> </TestCase> <TestCase name="empty tags are not allowed" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -17876,7 +19000,7 @@ There is no extra whitespace here Catch::TestCaseInfo("", { "test with an empty tag", "[]" }, dummySourceLineInfo) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="erfc_inv" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17903,7 +19027,7 @@ There is no extra whitespace here 1.3859038243 == Approx( 1.3859038243 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="estimate_clock_resolution" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -17922,52 +19046,82 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="even more nested SECTION tests" tags="[sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="c" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="d (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="c" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="e (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="f (leaf)" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="failed assertions before SKIP cause test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Original> + 3 == 4 + </Original> + <Expanded> + 3 == 4 + </Expanded> + </Expression> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> + </TestCase> + <TestCase name="failing for some generator values causes entire test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="2"/> + </TestCase> + <TestCase name="failing in some unskipped sections causes entire test case to fail" tags="[!shouldfail][skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Failure filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="1" skipped="false"/> + </Section> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="first tag" tags="[tag1]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="has printf" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="is_unary_function" tags="[clara][compilation]" filename="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="just failure" tags="[.][fail][isolated info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Previous info should not be seen </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just failure after unscoped info" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > <Failure filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > previous unscoped info SHOULD not be seen </Failure> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just info" tags="[info][isolated info][messages]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="just unscoped info" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="long long" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17980,7 +19134,7 @@ There is no extra whitespace here 9223372036854775807 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="looped SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="b is currently: 0" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -17992,7 +19146,7 @@ There is no extra whitespace here 0 > 1 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 1" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18003,7 +19157,7 @@ There is no extra whitespace here 1 > 1 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 2" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18014,7 +19168,7 @@ There is no extra whitespace here 2 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 3" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18025,7 +19179,7 @@ There is no extra whitespace here 3 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 4" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18036,7 +19190,7 @@ There is no extra whitespace here 4 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 5" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18047,7 +19201,7 @@ There is no extra whitespace here 5 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 6" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18058,7 +19212,7 @@ There is no extra whitespace here 6 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 7" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18069,7 +19223,7 @@ There is no extra whitespace here 7 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 8" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18080,7 +19234,7 @@ There is no extra whitespace here 8 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="b is currently: 9" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18091,12 +19245,12 @@ There is no extra whitespace here 9 > 1 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="looped tests" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[0] (1) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18107,7 +19261,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[1] (1) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18118,7 +19272,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[2] (2) is even </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18129,7 +19283,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[3] (3) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18140,7 +19294,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[4] (5) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18151,7 +19305,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[5] (8) is even </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18162,7 +19316,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[6] (13) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18173,7 +19327,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > Testing if fib[7] (21) is even </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18184,7 +19338,7 @@ There is no extra whitespace here 1 == 0 </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="makeStream recognizes %debug stream name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -18195,7 +19349,7 @@ There is no extra whitespace here Catch::makeStream( "%debug" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="make_unique reimplementation" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="From lvalue copies" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18207,7 +19361,7 @@ There is no extra whitespace here !false </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="From rvalue moves" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18218,7 +19372,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Variadic constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -18229,9 +19383,9 @@ There is no extra whitespace here {?} == {?} </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="mean" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18242,7 +19396,7 @@ There is no extra whitespace here 19.0 == 19.0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="measure" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18309,28 +19463,28 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="mix info, unscoped info and warning" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > info </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > unscoped info </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > and warn may mix </Warning> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > info </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > unscoped info </Info> - <Warning> + <Warning filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > they are not cleared after warnings </Warning> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="more nested SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18343,9 +19497,9 @@ There is no extra whitespace here 1 == 2 </Expanded> </Expression> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="0" failures="1" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="not equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18357,9 +19511,9 @@ There is no extra whitespace here 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="less than" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18371,11 +19525,11 @@ There is no extra whitespace here 1 < 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="nested SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18404,11 +19558,39 @@ There is no extra whitespace here 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="nested sections can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="A" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> + </Section> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="B1" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="0" failures="1" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="B2" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="B" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="false" skips="1"> + <StdOut> +a! +b1! +! + </StdOut> + </OverallResult> </TestCase> <TestCase name="non streamable - with conv. op" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18419,7 +19601,7 @@ There is no extra whitespace here "7" == "7" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="non-copyable objects" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18430,7 +19612,7 @@ There is no extra whitespace here {?} == {?} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="normal_cdf" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18473,7 +19655,7 @@ There is no extra whitespace here 0.088096521 == Approx( 0.088096521 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="normal_quantile" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18500,13 +19682,13 @@ There is no extra whitespace here -1.9599639845 == Approx( -1.9599639845 ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="not allowed" tags="[!throws]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="not prints unscoped info from previous failures" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen only for the FIRST assertion IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18517,7 +19699,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen only for the SECOND assertion IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18528,7 +19710,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18539,7 +19721,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="null strings" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18558,7 +19740,7 @@ There is no extra whitespace here {null string} == {null string} </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="null_ptr" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18569,7 +19751,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="pair<pair<int,const char *,pair<std::string,int> > -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -18582,7 +19764,7 @@ There is no extra whitespace here "{ { 42, "Arthur" }, { "Ford", 24 } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="parseEnums" tags="[enums][Strings]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Section name="No enums" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18594,7 +19776,7 @@ There is no extra whitespace here { } Equals: { } </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="One enum value" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18621,7 +19803,7 @@ There is no extra whitespace here { Value1 } Equals: { Value1 } </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Multiple enum values" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" > @@ -18648,9 +19830,9 @@ There is no extra whitespace here { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 } </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="pointer to class" tags="[Tricky]" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Tricky.tests.cpp" > @@ -18661,10 +19843,10 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="print unscoped info if passing unscoped info is printed" tags="[info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY be seen IF info is printed for passing assertions </Info> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18675,13 +19857,13 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="prints unscoped info on failure" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD also be seen </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18692,10 +19874,10 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="prints unscoped info only for the first assertion" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this SHOULD be seen only ONCE </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18714,7 +19896,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > this MAY also be seen only ONCE IF info is printed for passing assertions </Info> <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -18733,7 +19915,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="random SECTION tests" tags="[.][failing][sections]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="doesn't equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18753,7 +19935,7 @@ There is no extra whitespace here 2 != 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="not equal" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -18764,9 +19946,9 @@ There is no extra whitespace here 1 != 2 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="replaceInPlace" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Section name="replace single char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18786,7 +19968,7 @@ There is no extra whitespace here "azcdefcg" == "azcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace two chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18805,7 +19987,7 @@ There is no extra whitespace here "abzdefzg" == "abzdefzg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace first char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18824,7 +20006,7 @@ There is no extra whitespace here "zbcdefcg" == "zbcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace last char" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18843,7 +20025,7 @@ There is no extra whitespace here "abcdefcz" == "abcdefcz" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace all chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18862,7 +20044,7 @@ There is no extra whitespace here "replaced" == "replaced" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="replace no chars" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18881,7 +20063,7 @@ There is no extra whitespace here "abcdefcg" == "abcdefcg" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="escape '" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -18900,9 +20082,9 @@ There is no extra whitespace here "didn|'t" == "didn|'t" </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="request an unknown %-starting stream fails" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE_THROWS" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -18913,7 +20095,7 @@ There is no extra whitespace here Catch::makeStream( "%somestream" ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="resolution" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -18996,7 +20178,7 @@ There is no extra whitespace here 1000.0 == 1000 (0x<hex digits>) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="run_for_at_least, chronometer" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19087,7 +20269,7 @@ There is no extra whitespace here 128 >= 100 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="run_for_at_least, int" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19178,13 +20360,26 @@ There is no extra whitespace here 128 >= 100 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="second tag" tags="[tag2]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> + </TestCase> + <TestCase name="sections can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Section name="not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <Section name="skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResults successes="0" failures="0" expectedFailures="0" skipped="true"/> + </Section> + <Section name="also not skipped" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> + </Section> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="send a single char to INFO" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > 3 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19195,13 +20390,13 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="sends information to INFO" tags="[.][failing]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > hi </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > i := 7 </Info> <Expression success="false" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19212,7 +20407,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="shortened hide tags are split apart" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -19223,7 +20418,13 @@ There is no extra whitespace here { {?}, {?} } ( Contains: {?} and Contains: {?} ) </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="skipped tests can optionally provide a reason" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + skipping because answer = 43 + </Skip> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="splitString" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -19250,19 +20451,19 @@ There is no extra whitespace here { abc, def } Equals: { abc, def } </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stacks unscoped info in loops" tags="[.][failing][info][unscoped]" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Count 1 to 3... </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 1 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 2 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 3 </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19273,16 +20474,16 @@ There is no extra whitespace here false </Expanded> </Expression> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > Count 4 to 6... </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 4 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 5 </Info> - <Info> + <Info filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > 6 </Info> <Expression success="false" type="CHECK" filename="tests/<exe-name>/UsageTests/Message.tests.cpp" > @@ -19293,7 +20494,7 @@ There is no extra whitespace here false </Expanded> </Expression> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="startsWith" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" > @@ -19320,7 +20521,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::map is convertible string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="empty" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19332,7 +20533,7 @@ There is no extra whitespace here "{ }" == "{ }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19343,7 +20544,7 @@ There is no extra whitespace here "{ { "one", 1 } }" == "{ { "one", 1 } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="several items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19356,9 +20557,9 @@ There is no extra whitespace here "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::pair<int,const std::string> -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19369,7 +20570,7 @@ There is no extra whitespace here "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::pair<int,std::string> -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19380,7 +20581,7 @@ There is no extra whitespace here "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::set is convertible string" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Section name="empty" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19392,7 +20593,7 @@ There is no extra whitespace here "{ }" == "{ }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="single item" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19403,7 +20604,7 @@ There is no extra whitespace here "{ "one" }" == "{ "one" }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="several items" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" > @@ -19416,9 +20617,9 @@ There is no extra whitespace here "{ "abc", "def", "ghi" }" </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="std::vector<std::pair<std::string,int> > -> toString" tags="[pair][toString]" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringPair.tests.cpp" > @@ -19431,7 +20632,7 @@ There is no extra whitespace here "{ { "green", 55 } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stdout and stderr streams have %-starting name" tags="[streams]" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Stream.tests.cpp" > @@ -19450,7 +20651,7 @@ There is no extra whitespace here true </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify ranges" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19489,7 +20690,7 @@ There is no extra whitespace here "{?}" == "{?}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_maker )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19502,7 +20703,7 @@ There is no extra whitespace here "StringMaker<has_maker>" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_maker_and_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19515,7 +20716,7 @@ There is no extra whitespace here "StringMaker<has_maker_and_operator>" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_neither )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19526,7 +20727,7 @@ There is no extra whitespace here "{?}" == "{?}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19539,7 +20740,7 @@ There is no extra whitespace here "operator<<( has_operator )" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( has_template_operator )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19552,7 +20753,7 @@ There is no extra whitespace here "operator<<( has_template_operator )" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_maker> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19565,7 +20766,7 @@ There is no extra whitespace here "{ StringMaker<has_maker> }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_maker_and_operator> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19578,7 +20779,7 @@ There is no extra whitespace here "{ StringMaker<has_maker_and_operator> }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="stringify( vectors<has_operator> )" tags="[toString]" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringWhich.tests.cpp" > @@ -19591,7 +20792,7 @@ There is no extra whitespace here "{ operator<<( has_operator ) }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="strlen3" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -19626,7 +20827,7 @@ There is no extra whitespace here 4 == 4 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tables" tags="[generators]" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Generators.tests.cpp" > @@ -19661,7 +20862,7 @@ There is no extra whitespace here 6 == 6 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tags with dots in later positions are not parsed as hidden" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" > @@ -19680,13 +20881,17 @@ There is no extra whitespace here magic.tag == magic.tag </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="tests can be skipped dynamically at runtime" tags="[skipping]" filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" > + <Skip filename="tests/<exe-name>/UsageTests/Skip.tests.cpp" /> + <OverallResult success="true" skips="1"/> </TestCase> <TestCase name="thrown std::strings are translated" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > <Exception filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" > Why would you throw a std::string? </Exception> - <OverallResult success="false"/> + <OverallResult success="false" skips="0"/> </TestCase> <TestCase name="toString on const wchar_t const pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19697,7 +20902,7 @@ There is no extra whitespace here ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on const wchar_t pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19708,7 +20913,7 @@ There is no extra whitespace here ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on wchar_t const pointer returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19719,7 +20924,7 @@ There is no extra whitespace here ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString on wchar_t returns the string contents" tags="[toString]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -19730,7 +20935,7 @@ There is no extra whitespace here ""wide load"" == ""wide load"" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum class w/operator<<)" tags="[enum][enumClass][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19759,7 +20964,7 @@ There is no extra whitespace here "Unknown enum value 10" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum class)" tags="[enum][enumClass][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19778,7 +20983,7 @@ There is no extra whitespace here "1" == "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum w/operator<<)" tags="[enum][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19797,7 +21002,7 @@ There is no extra whitespace here "E2{1}" == "E2{1}" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="toString(enum)" tags="[enum][toString]" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/EnumToString.tests.cpp" > @@ -19816,7 +21021,7 @@ There is no extra whitespace here "1" == "1" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19835,7 +21040,7 @@ There is no extra whitespace here "{ }" == "{ }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<float,int>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19854,7 +21059,7 @@ There is no extra whitespace here "{ 1.2f, 0 }" == "{ 1.2f, 0 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<int>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19865,7 +21070,7 @@ There is no extra whitespace here "{ 0 }" == "{ 0 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<string,string>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19878,7 +21083,7 @@ There is no extra whitespace here "{ "hello", "world" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="tuple<tuple<int>,tuple<>,float>" tags="[toString][tuple]" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/UsageTests/ToStringTuple.tests.cpp" > @@ -19891,7 +21096,7 @@ There is no extra whitespace here "{ { 42 }, { }, 1.2f }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="uniform samples" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -19926,7 +21131,26 @@ There is no extra whitespace here 0.95 == 0.95 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> + </TestCase> + <TestCase name="uniform_integer_distribution can return the bounds" tags="[distribution][rng]" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Original> + dist.a() == -10 + </Original> + <Expanded> + -10 == -10 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" > + <Original> + dist.b() == 10 + </Original> + <Expanded> + 10 == 10 + </Expanded> + </Expression> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="unique_ptr reimplementation: basic functionality" tags="[internals][unique-ptr]" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Section name="Default constructed unique_ptr is empty" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -19946,7 +21170,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take ownership of allocation" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -19990,9 +21214,9 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="5" failures="0" expectedFailures="0"/> + <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Take ownership of allocation" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20044,9 +21268,9 @@ There is no extra whitespace here 2 == 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="6" failures="0" expectedFailures="0"/> + <OverallResults successes="6" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Release releases ownership" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20065,7 +21289,7 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Move constructor" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20092,7 +21316,7 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="Move assignment" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20119,7 +21343,7 @@ There is no extra whitespace here 2 == 2 </Expanded> </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="free swap" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/UniquePtr.tests.cpp" > @@ -20138,9 +21362,9 @@ There is no extra whitespace here 1 == 1 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vec<vec<string,alloc>> -> toString" tags="[toString][vector,allocator]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20161,7 +21385,7 @@ There is no extra whitespace here "{ { "hello" }, { "world" } }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<bool> -> toString" tags="[containers][toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20188,7 +21412,7 @@ There is no extra whitespace here "{ true, false }" == "{ true, false }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<int,allocator> -> toString" tags="[toString][vector,allocator]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20215,7 +21439,7 @@ There is no extra whitespace here "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<int> -> toString" tags="[toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20242,7 +21466,7 @@ There is no extra whitespace here "{ 42, 250 }" == "{ 42, 250 }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vector<string> -> toString" tags="[toString][vector]" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/ToStringVector.tests.cpp" > @@ -20271,7 +21495,7 @@ There is no extra whitespace here "{ "hello", "world" }" </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="vectors can be sized and resized" tags="[vector]" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > @@ -20307,7 +21531,7 @@ There is no extra whitespace here 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20351,9 +21575,9 @@ There is no extra whitespace here 0 == 0 </Expanded> </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResults successes="3" failures="0" expectedFailures="0"/> + <OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20388,7 +21612,7 @@ There is no extra whitespace here 10 >= 10 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Original> @@ -20423,9 +21647,9 @@ There is no extra whitespace here 5 >= 5 </Expanded> </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> + <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="warmup" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -20444,7 +21668,7 @@ There is no extra whitespace here 310016000 ns > 100 ms </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="weighted_average_quantile" tags="[benchmark]" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/InternalBenchmark.tests.cpp" > @@ -20471,17 +21695,17 @@ There is no extra whitespace here 23.0 == 23.0 </Expanded> </Expression> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> <TestCase name="xmlentitycheck" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <Section name="embedded xml: <test>it should be possible to embed xml characters, such as <, " or &, or even whole <xml>documents</xml> within an attribute</test>" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> <Section name="encoded chars: these should all be encoded: &&&"""<<<&"<<&"" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > - <OverallResults successes="1" failures="0" expectedFailures="0"/> + <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/> </Section> - <OverallResult success="true"/> + <OverallResult success="true" skips="0"/> </TestCase> - <OverallResults successes="1989" failures="143" expectedFailures="27"/> - <OverallResultsCases successes="304" failures="83" expectedFailures="7"/> + <OverallResults successes="2079" failures="146" expectedFailures="35" skips="12"/> + <OverallResultsCases successes="312" failures="85" expectedFailures="14" skips="6"/> </Catch2TestRun> diff --git a/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp b/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp new file mode 100644 index 00000000..fa17cf82 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp @@ -0,0 +1,94 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> +#include <catch2/internal/catch_is_permutation.hpp> + +#include <helpers/range_test_helpers.hpp> + +#include <array> + +namespace { + template <typename Range1, typename Range2> + static bool is_permutation(Range1 const& r1, Range2 const& r2) { + using std::begin; using std::end; + return Catch::Detail::is_permutation( + begin( r1 ), end( r1 ), begin( r2 ), end( r2 ), std::equal_to<>{} ); + } +} + +TEST_CASE("is_permutation", "[algorithms][approvals]") { + SECTION( "Handle empty ranges" ) { + std::array<int, 0> empty; + std::array<int, 2> non_empty{ { 2, 3 } }; + REQUIRE( is_permutation( empty, empty ) ); + REQUIRE_FALSE( is_permutation( empty, non_empty ) ); + REQUIRE_FALSE( is_permutation( non_empty, empty ) ); + } + SECTION( "Different length ranges" ) { + std::array<int, 6> arr1{ { 1, 3, 5, 7, 8, 9 } }; + // arr2 is prefix of arr1 + std::array<int, 4> arr2{ { 1, 3, 5, 7 } }; + // arr3 shares prefix with arr1 and arr2, but is not a permutation + std::array<int, 5> arr3{ { 1, 3, 5, 9, 8 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + REQUIRE_FALSE( is_permutation( arr1, arr3 ) ); + REQUIRE_FALSE( is_permutation( arr2, arr3 ) ); + } + SECTION( "Same length ranges" ) { + SECTION( "Shared elements, but different counts" ) { + const std::array<int, 6> + arr1{ { 1, 1, 1, 1, 2, 2 } }, + arr2{ { 1, 1, 2, 2, 2, 2 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Identical ranges" ) { + const std::array<int, 6> + arr1{ { 1, 1, 1, 1, 2, 2 } }, + arr2{ { 1, 1, 2, 2, 2, 2 } }; + REQUIRE( is_permutation( arr1, arr1 ) ); + REQUIRE( is_permutation( arr2, arr2 ) ); + } + SECTION( "Completely distinct elements" ) { + // Completely distinct elements + const std::array<int, 4> + arr1{ { 1, 2, 3, 4 } }, + arr2{ { 10, 20, 30, 40 } }; + REQUIRE_FALSE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Reverse ranges" ) { + const std::array<int, 5> + arr1{ { 1, 2, 3, 4, 5 } }, + arr2{ { 5, 4, 3, 2, 1 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Shared prefix & permuted elements" ) { + const std::array<int, 5> + arr1{ { 1, 1, 2, 3, 4 } }, + arr2{ { 1, 1, 4, 2, 3 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + SECTION( "Permutations with element count > 1" ) { + const std::array<int, 7> + arr1{ { 2, 2, 3, 3, 3, 1, 1 } }, + arr2{ { 3, 2, 1, 3, 2, 1, 3 } }; + REQUIRE( is_permutation( arr1, arr2 ) ); + } + } +} + +TEST_CASE("is_permutation supports iterator + sentinel pairs", + "[algorithms][is-permutation][approvals]") { + const has_different_begin_end_types<int> + range_1{ 1, 2, 3, 4 }, + range_2{ 4, 3, 2, 1 }; + REQUIRE( is_permutation( range_1, range_2 ) ); + + const has_different_begin_end_types<int> range_3{ 3, 3, 2, 1 }; + REQUIRE_FALSE( is_permutation( range_1, range_3 ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp b/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp new file mode 100644 index 00000000..ab096074 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp @@ -0,0 +1,17 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> + +TEST_CASE( "Incomplete AssertionHandler", "[assertion-handler][!shouldfail]" ) { + Catch::AssertionHandler catchAssertionHandler( + "REQUIRE"_catch_sr, + CATCH_INTERNAL_LINEINFO, + "Dummy", + Catch::ResultDisposition::Normal ); +} diff --git a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp index a5a43926..d7175756 100644 --- a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp @@ -89,6 +89,47 @@ TEST_CASE("Optional comparison ops", "[optional][approvals]") { } } +namespace { + struct MoveChecker { + bool has_moved = false; + MoveChecker() = default; + MoveChecker( MoveChecker const& rhs ) = default; + MoveChecker& operator=( MoveChecker const& rhs ) = default; + MoveChecker( MoveChecker&& rhs ) noexcept { rhs.has_moved = true; } + MoveChecker& operator=( MoveChecker&& rhs ) noexcept { + rhs.has_moved = true; + return *this; + } + }; +} + +TEST_CASE( "Optional supports move ops", "[optional][approvals]" ) { + using Catch::Optional; + MoveChecker a; + Optional<MoveChecker> opt_A( a ); + REQUIRE_FALSE( a.has_moved ); + REQUIRE_FALSE( opt_A->has_moved ); + + SECTION( "Move construction from element" ) { + Optional<MoveChecker> opt_B( CATCH_MOVE( a ) ); + REQUIRE( a.has_moved ); + } + SECTION( "Move assignment from element" ) { + opt_A = CATCH_MOVE( a ); + REQUIRE( a.has_moved ); + } + SECTION( "Move construction from optional" ) { + Optional<MoveChecker> opt_B( CATCH_MOVE( opt_A ) ); + REQUIRE( opt_A->has_moved ); + } + SECTION( "Move assignment from optional" ) { + Optional<MoveChecker> opt_B( opt_A ); + REQUIRE_FALSE( opt_A->has_moved ); + opt_B = CATCH_MOVE( opt_A ); + REQUIRE( opt_A->has_moved ); + } +} + TEST_CASE( "Decomposer checks that the argument is 0 when handling " "only-0-comparable types", "[decomposition][approvals]" ) { diff --git a/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp b/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp index 08a579c9..eaf22a44 100644 --- a/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp @@ -9,7 +9,9 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/catch_template_test_macros.hpp> #include <catch2/internal/catch_floating_point_helpers.hpp> +#include <catch2/internal/catch_random_floating_point_helpers.hpp> +#include <limits> TEST_CASE("convertToBits", "[floating-point][conversion]") { using Catch::Detail::convertToBits; @@ -72,3 +74,60 @@ TEST_CASE("UlpDistance", "[floating-point][ulp][approvals]") { CHECK( ulpDistance( 1.f, 2.f ) == 0x80'00'00 ); CHECK( ulpDistance( -2.f, 2.f ) == 0x80'00'00'00 ); } + + + +TEMPLATE_TEST_CASE("gamma", "[approvals][floating-point][ulp][gamma]", float, double) { + using Catch::Detail::gamma; + using Catch::Detail::directCompare; + + // We need to butcher the equal tests with the directCompare helper, + // because the Wfloat-equal triggers in decomposer rather than here, + // so we cannot locally disable it. Goddamn GCC. + CHECK( directCompare( gamma( TestType( -1. ), TestType( 1. ) ), + gamma( TestType( 0.2332 ), TestType( 1.0 ) ) ) ); + CHECK( directCompare( gamma( TestType( -2. ), TestType( 0 ) ), + gamma( TestType( 1. ), TestType( 1.5 ) ) ) ); + CHECK( gamma( TestType( 0. ), TestType( 1.0 ) ) < + gamma( TestType( 1.0 ), TestType( 1.5 ) ) ); + CHECK( gamma( TestType( 0 ), TestType( 1. ) ) < + std::numeric_limits<TestType>::epsilon() ); + CHECK( gamma( TestType( -1. ), TestType( -0. ) ) < + std::numeric_limits<TestType>::epsilon() ); + CHECK( directCompare( gamma( TestType( 1. ), TestType( 2. ) ), + std::numeric_limits<TestType>::epsilon() ) ); + CHECK( directCompare( gamma( TestType( -2. ), TestType( -1. ) ), + std::numeric_limits<TestType>::epsilon() ) ); +} + +TEMPLATE_TEST_CASE("count_equidistant_floats", + "[approvals][floating-point][distance]", + float, + double) { + using Catch::Detail::count_equidistant_floats; + auto count_steps = []( TestType a, TestType b ) { + return count_equidistant_floats( a, b, Catch::Detail::gamma( a, b ) ); + }; + + CHECK( count_steps( TestType( -1. ), TestType( 1. ) ) == + 2 * count_steps( TestType( 0. ), TestType( 1. ) ) ); +} + +TEST_CASE( "count_equidistant_floats", + "[approvals][floating-point][distance]" ) { + using Catch::Detail::count_equidistant_floats; + auto count_floats_with_scaled_ulp = []( auto a, auto b ) { + return count_equidistant_floats( a, b, Catch::Detail::gamma( a, b ) ); + }; + + CHECK( count_floats_with_scaled_ulp( 1., 1.5 ) == 1ull << 51 ); + CHECK( count_floats_with_scaled_ulp( 1.25, 1.5 ) == 1ull << 50 ); + CHECK( count_floats_with_scaled_ulp( 1.f, 1.5f ) == 1 << 22 ); + + STATIC_REQUIRE( std::is_same<std::uint64_t, + decltype( count_floats_with_scaled_ulp( + 0., 1. ) )>::value ); + STATIC_REQUIRE( std::is_same<std::uint32_t, + decltype( count_floats_with_scaled_ulp( + 0.f, 1.f ) )>::value ); +} diff --git a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp index 1c203b6b..acfeebed 100644 --- a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -10,12 +10,15 @@ # pragma GCC diagnostic ignored "-Wfloat-equal" #endif +#include <helpers/range_test_helpers.hpp> + #include <catch2/catch_approx.hpp> #include <catch2/catch_test_macros.hpp> #include <catch2/generators/catch_generator_exception.hpp> #include <catch2/generators/catch_generators_adapters.hpp> #include <catch2/generators/catch_generators_random.hpp> #include <catch2/generators/catch_generators_range.hpp> +#include <catch2/generators/catch_generator_exception.hpp> // Tests of generator implementation details TEST_CASE("Generators internals", "[generators][internals]") { @@ -411,6 +414,7 @@ TEST_CASE("GENERATE handles function (pointers)", "[generators][compilation][app TEST_CASE("GENERATE decays arrays", "[generators][compilation][approvals]") { auto str = GENERATE("abc", "def", "gh"); + (void)str; STATIC_REQUIRE(std::is_same<decltype(str), const char*>::value); } @@ -534,3 +538,39 @@ TEST_CASE( "Random generators can be seeded", "[generators][approvals]" ) { } } } + +TEST_CASE("Filter generator throws exception for empty generator", + "[generators]") { + using namespace Catch::Generators; + + REQUIRE_THROWS_AS( + filter( []( int ) { return false; }, value( 3 ) ), + Catch::GeneratorException ); +} + +TEST_CASE("from_range(container) supports ADL begin/end and arrays", "[generators][from-range][approvals]") { + using namespace Catch::Generators; + + SECTION("C array") { + int arr[3]{ 5, 6, 7 }; + auto gen = from_range( arr ); + REQUIRE( gen.get() == 5 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 6 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 7 ); + REQUIRE_FALSE( gen.next() ); + } + + SECTION( "ADL range" ) { + unrelated::needs_ADL_begin<int> range{ 1, 2, 3 }; + auto gen = from_range( range ); + REQUIRE( gen.get() == 1 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 2 ); + REQUIRE( gen.next() ); + REQUIRE( gen.get() == 3 ); + REQUIRE_FALSE( gen.next() ); + } + +} diff --git a/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp b/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp new file mode 100644 index 00000000..fd620ebb --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Integer.tests.cpp @@ -0,0 +1,150 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> +#include <catch2/internal/catch_random_integer_helpers.hpp> + +namespace { + template <typename Int> + static void + CommutativeMultCheck( Int a, Int b, Int upper_result, Int lower_result ) { + using Catch::Detail::extendedMult; + using Catch::Detail::ExtendedMultResult; + CHECK( extendedMult( a, b ) == + ExtendedMultResult<Int>{ upper_result, lower_result } ); + CHECK( extendedMult( b, a ) == + ExtendedMultResult<Int>{ upper_result, lower_result } ); + } +} // namespace + +TEST_CASE( "extendedMult 64x64", "[Integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck<uint64_t>( 0x1234'5678'9ABC'DEFF, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck<uint64_t>( uint64_t( 1 ) << 63, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck<uint64_t>( 0xcdcd'dcdc'0000'0000, + 0x0000'0000'aeae'aeae, + 0x0000'0000'8c6e'5a77, + 0x7391'a588'0000'0000 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck<uint64_t>( 0xaaaa'aaaa'aaaa'aaaa, + 0xbbbb'bbbb'bbbb'bbbb, + 0x7d27'd27d'27d2'7d26, + 0xd82d'82d8'2d82'd82e ); + + CommutativeMultCheck<uint64_t>( 0x7d27'd27d'27d2'7d26, + 0xd82d'82d8'2d82'd82e, + 0x69af'd991'8256'b953, + 0x8724'8909'fcb6'8cd4 ); + + CommutativeMultCheck<uint64_t>( 0xdead'beef'dead'beef, + 0xfeed'feed'feed'feef, + 0xddbf'680b'2b0c'b558, + 0x7a36'b06f'2ce9'6321 ); + + CommutativeMultCheck<uint64_t>( 0xddbf'680b'2b0c'b558, + 0x7a36'b06f'2ce9'6321, + 0x69dc'96c9'294b'fc7f, + 0xd038'39fa'a3dc'6858 ); + + CommutativeMultCheck<uint64_t>( 0x61c8'8646'80b5'83eb, + 0x61c8'8646'80b5'83eb, + 0x2559'92d3'8220'8bbe, + 0xdf44'2d22'ce48'59b9 ); +} + +TEST_CASE( "SizedUnsignedType helpers", "[integer][approvals]" ) { + using Catch::Detail::SizedUnsignedType_t; + using Catch::Detail::DoubleWidthUnsignedType_t; + + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<1> ) == 1 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<2> ) == 2 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<4> ) == 4 ); + STATIC_REQUIRE( sizeof( SizedUnsignedType_t<8> ) == 8 ); + + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t<std::uint8_t> ) == 2 ); + STATIC_REQUIRE( std::is_unsigned<DoubleWidthUnsignedType_t<std::uint8_t>>::value ); + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t<std::uint16_t> ) == 4 ); + STATIC_REQUIRE( std::is_unsigned<DoubleWidthUnsignedType_t<std::uint16_t>>::value ); + STATIC_REQUIRE( sizeof( DoubleWidthUnsignedType_t<std::uint32_t> ) == 8 ); + STATIC_REQUIRE( std::is_unsigned<DoubleWidthUnsignedType_t<std::uint32_t>>::value ); +} + +TEST_CASE( "extendedMult 32x32", "[integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck<uint32_t>( 0x1234'5678, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck<uint32_t>( uint32_t(1) << 31, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck<uint32_t>( 0xdcdc'0000, 0x0000'aabb, 0x0000'934b, 0x6cb4'0000 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck<uint32_t>( + 0xaaaa'aaaa, 0xbbbb'bbbb, 0x7d27'd27c, 0x2d82'd82e ); + + CommutativeMultCheck<uint32_t>( + 0x7d27'd27c, 0x2d82'd82e, 0x163f'f7e8, 0xc5b8'7248 ); + + CommutativeMultCheck<uint32_t>( + 0xdead'beef, 0xfeed'feed, 0xddbf'6809, 0x6f8d'e543 ); + + CommutativeMultCheck<uint32_t>( + 0xddbf'6809, 0x6f8d'e543, 0x60a0'e71e, 0x751d'475b ); +} + +TEST_CASE( "extendedMult 8x8", "[integer][approvals]" ) { + // a x 0 == 0 + CommutativeMultCheck<uint8_t>( 0xcd, 0, 0, 0 ); + + // bit carried from low half to upper half + CommutativeMultCheck<uint8_t>( uint8_t( 1 ) << 7, 2, 1, 0 ); + + // bits in upper half on one side, bits in lower half on other side + CommutativeMultCheck<uint8_t>( 0x80, 0x03, 0x01, 0x80 ); + + // Some input numbers without interesting patterns + CommutativeMultCheck<uint8_t>( 0xaa, 0xbb, 0x7c, 0x2e ); + CommutativeMultCheck<uint8_t>( 0x7c, 0x2e, 0x16, 0x48 ); + CommutativeMultCheck<uint8_t>( 0xdc, 0xcd, 0xb0, 0x2c ); + CommutativeMultCheck<uint8_t>( 0xb0, 0x2c, 0x1e, 0x40 ); +} + + +TEST_CASE( "negative and positive signed integers keep their order after transposeToNaturalOrder", + "[integer][approvals]") { + using Catch::Detail::transposeToNaturalOrder; + int32_t negative( -1 ); + int32_t positive( 1 ); + uint32_t adjusted_negative = + transposeToNaturalOrder<int32_t>( static_cast<uint32_t>( negative ) ); + uint32_t adjusted_positive = + transposeToNaturalOrder<int32_t>( static_cast<uint32_t>( positive ) ); + REQUIRE( adjusted_negative < adjusted_positive ); + REQUIRE( adjusted_positive - adjusted_negative == 2 ); + + // Conversion has to be reversible + REQUIRE( negative == static_cast<int32_t>( transposeToNaturalOrder<int32_t>( + adjusted_negative ) ) ); + REQUIRE( positive == static_cast<int32_t>( transposeToNaturalOrder<int32_t>( + adjusted_positive ) ) ); +} + +TEST_CASE( "unsigned integers are unchanged by transposeToNaturalOrder", + "[integer][approvals]") { + using Catch::Detail::transposeToNaturalOrder; + uint32_t max = std::numeric_limits<uint32_t>::max(); + uint32_t zero = 0; + REQUIRE( max == transposeToNaturalOrder<uint32_t>( max ) ); + REQUIRE( zero == transposeToNaturalOrder<uint32_t>( zero ) ); +} diff --git a/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp index 96c0977b..bc8d715b 100644 --- a/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp @@ -22,6 +22,8 @@ #include <catch2/benchmark/detail/catch_benchmark_function.hpp> #include <catch2/benchmark/detail/catch_estimate_clock.hpp> +#include <numeric> + namespace { struct manual_clock { public: @@ -154,8 +156,12 @@ TEST_CASE("uniform samples", "[benchmark]") { std::vector<double> samples(100); std::fill(samples.begin(), samples.end(), 23); - using it = std::vector<double>::iterator; - auto e = Catch::Benchmark::Detail::bootstrap(0.95, samples.begin(), samples.end(), samples, [](it a, it b) { + auto e = Catch::Benchmark::Detail::bootstrap( + 0.95, + samples.data(), + samples.data() + samples.size(), + samples, + []( double const* a, double const* b ) { auto sum = std::accumulate(a, b, 0.); return sum / (b - a); }); @@ -196,7 +202,7 @@ TEST_CASE("normal_quantile", "[benchmark]") { TEST_CASE("mean", "[benchmark]") { std::vector<double> x{ 10., 20., 14., 16., 30., 24. }; - auto m = Catch::Benchmark::Detail::mean(x.begin(), x.end()); + auto m = Catch::Benchmark::Detail::mean(x.data(), x.data() + x.size()); REQUIRE(m == 19.); } @@ -204,9 +210,9 @@ TEST_CASE("mean", "[benchmark]") { TEST_CASE("weighted_average_quantile", "[benchmark]") { std::vector<double> x{ 10., 20., 14., 16., 30., 24. }; - auto q1 = Catch::Benchmark::Detail::weighted_average_quantile(1, 4, x.begin(), x.end()); - auto med = Catch::Benchmark::Detail::weighted_average_quantile(1, 2, x.begin(), x.end()); - auto q3 = Catch::Benchmark::Detail::weighted_average_quantile(3, 4, x.begin(), x.end()); + auto q1 = Catch::Benchmark::Detail::weighted_average_quantile(1, 4, x.data(), x.data() + x.size()); + auto med = Catch::Benchmark::Detail::weighted_average_quantile(1, 2, x.data(), x.data() + x.size()); + auto q3 = Catch::Benchmark::Detail::weighted_average_quantile(3, 4, x.data(), x.data() + x.size()); REQUIRE(q1 == 14.5); REQUIRE(med == 18.); @@ -225,7 +231,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("none") { std::vector<double> x{ 10., 20., 14., 16., 30., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 0, 0, 0, 0); @@ -233,7 +240,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("low severe") { std::vector<double> x{ -12., 20., 14., 16., 30., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 1, 0, 0, 0); @@ -241,7 +249,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("low mild") { std::vector<double> x{ 1., 20., 14., 16., 30., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 0, 1, 0, 0); @@ -249,7 +258,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("high mild") { std::vector<double> x{ 10., 20., 14., 16., 36., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 0, 0, 1, 0); @@ -257,7 +267,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("high severe") { std::vector<double> x{ 10., 20., 14., 16., 49., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 0, 0, 0, 1); @@ -265,7 +276,8 @@ TEST_CASE("classify_outliers", "[benchmark]") { SECTION("mixed") { std::vector<double> x{ -20., 20., 14., 16., 39., 24. }; - auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end()); + auto o = Catch::Benchmark::Detail::classify_outliers( + x.data(), x.data() + x.size() ); REQUIRE(o.samples_seen == static_cast<int>(x.size())); require_outliers(o, 1, 0, 1, 0); @@ -280,15 +292,13 @@ TEST_CASE("analyse", "[approvals][benchmark]") { data.benchmarkSamples = 99; Catch::Config config{data}; - using Duration = Catch::Benchmark::FloatDuration<Catch::Benchmark::default_clock>; - - Catch::Benchmark::Environment<Duration> env; - std::vector<Duration> samples(99); + using FDuration = Catch::Benchmark::FDuration; + std::vector<FDuration> samples(99); for (size_t i = 0; i < samples.size(); ++i) { - samples[i] = Duration(23 + (i % 3 - 1)); + samples[i] = FDuration(23 + (i % 3 - 1)); } - auto analysis = Catch::Benchmark::Detail::analyse(config, env, samples.begin(), samples.end()); + auto analysis = Catch::Benchmark::Detail::analyse(config, samples.data(), samples.data() + samples.size()); CHECK( analysis.mean.point.count() == 23 ); CHECK( analysis.mean.lower_bound.count() < 23 ); CHECK(analysis.mean.lower_bound.count() > 22); @@ -321,15 +331,13 @@ TEST_CASE("analyse no analysis", "[benchmark]") { data.benchmarkSamples = 99; Catch::Config config{ data }; - using Duration = Catch::Benchmark::FloatDuration<Catch::Benchmark::default_clock>; - - Catch::Benchmark::Environment<Duration> env; - std::vector<Duration> samples(99); + using FDuration = Catch::Benchmark::FDuration; + std::vector<FDuration> samples(99); for (size_t i = 0; i < samples.size(); ++i) { - samples[i] = Duration(23 + (i % 3 - 1)); + samples[i] = FDuration(23 + (i % 3 - 1)); } - auto analysis = Catch::Benchmark::Detail::analyse(config, env, samples.begin(), samples.end()); + auto analysis = Catch::Benchmark::Detail::analyse(config, samples.data(), samples.data() + samples.size()); CHECK(analysis.mean.point.count() == 23); CHECK(analysis.mean.lower_bound.count() == 23); CHECK(analysis.mean.upper_bound.count() == 23); @@ -442,6 +450,6 @@ TEST_CASE("Failing benchmarks", "[!benchmark][.approvals]") { } TEST_CASE( "Failing benchmark respects should-fail", - "[!shouldfail][!benchmark][.approvals]" ) { + "[!shouldfail][!benchmark][approvals]" ) { BENCHMARK( "Asserting benchmark" ) { REQUIRE( 1 == 2 ); }; } diff --git a/tests/SelfTest/IntrospectiveTests/Json.tests.cpp b/tests/SelfTest/IntrospectiveTests/Json.tests.cpp new file mode 100644 index 00000000..8204e3c4 --- /dev/null +++ b/tests/SelfTest/IntrospectiveTests/Json.tests.cpp @@ -0,0 +1,152 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> +#include <catch2/internal/catch_jsonwriter.hpp> +#include <catch2/matchers/catch_matchers_string.hpp> + +#include <sstream> + +namespace { + struct Custom {}; + static std::ostream& operator<<( std::ostream& os, Custom const& ) { + return os << "custom"; + } +} // namespace + +TEST_CASE( "JsonWriter", "[JSON][JsonWriter]" ) { + + std::stringstream stream; + SECTION( "Newly constructed JsonWriter does nothing" ) { + Catch::JsonValueWriter writer{ stream }; + REQUIRE( stream.str() == "" ); + } + + SECTION( "Calling writeObject will create an empty pair of braces" ) { + { auto writer = Catch::JsonValueWriter{ stream }.writeObject(); } + REQUIRE( stream.str() == "{\n}" ); + } + + SECTION( "Calling writeObject with key will create an object to write the " + "value" ) { + using Catch::Matchers::ContainsSubstring; + { + auto writer = Catch::JsonValueWriter{ stream }.writeObject(); + writer.write( "int" ).write( 1 ); + writer.write( "double" ).write( 1.5 ); + writer.write( "true" ).write( true ); + writer.write( "false" ).write( false ); + writer.write( "string" ).write( "this is a string" ); + writer.write( "array" ).writeArray().write( 1 ).write( 2 ); + } + REQUIRE_THAT( + stream.str(), + ContainsSubstring( "\"int\": 1," ) && + ContainsSubstring( "\"double\": 1.5," ) && + ContainsSubstring( "\"true\": true," ) && + ContainsSubstring( "\"false\": false," ) && + ContainsSubstring( "\"string\": \"this is a string\"," ) && + ContainsSubstring( "\"array\": [\n 1,\n 2\n ]\n}" ) ); + } + + SECTION( "nesting objects" ) { + using Catch::Matchers::ContainsSubstring; + { + auto writer = Catch::JsonValueWriter{ stream }.writeObject(); + writer.write( "empty_object" ).writeObject(); + writer.write( "fully_object" ) + .writeObject() + .write( "key" ) + .write( 1 ); + } + REQUIRE_THAT( stream.str(), + ContainsSubstring( "\"empty_object\": {\n }," ) && + ContainsSubstring( + "\"fully_object\": {\n \"key\": 1\n }" ) ); + } + + SECTION( "Calling writeArray will create an empty pair of braces" ) { + { auto writer = Catch::JsonValueWriter{ stream }.writeArray(); } + REQUIRE( stream.str() == "[\n]" ); + } + + SECTION( "Calling writeArray creates array to write the values to" ) { + { + auto writer = Catch::JsonValueWriter{ stream }.writeArray(); + writer.write( 1 ); + writer.write( 1.5 ); + writer.write( true ); + writer.write( false ); + writer.write( "this is a string" ); + writer.writeObject().write( "object" ).write( 42 ); + writer.writeArray().write( "array" ).write( 42.5 ); + } + REQUIRE( stream.str() == "[\n 1,\n 1.5,\n true,\n false,\n \"this is a string\",\n {\n \"object\": 42\n },\n [\n \"array\",\n 42.5\n ]\n]" ); + } + + SECTION( + "Moved from JsonObjectWriter shall not insert superfluous brace" ) { + { + auto writer = Catch::JsonObjectWriter{ stream }; + auto another_writer = std::move( writer ); + } + REQUIRE( stream.str() == "{\n}" ); + } + SECTION( + "Moved from JsonArrayWriter shall not insert superfluous bracket" ) { + { + auto writer = Catch::JsonArrayWriter{ stream }; + auto another_writer = std::move( writer ); + } + REQUIRE( stream.str() == "[\n]" ); + } + SECTION( "Custom class shall be quoted" ) { + Catch::JsonValueWriter{ stream }.write( Custom{} ); + REQUIRE( stream.str() == "\"custom\"" ); + } +} + +TEST_CASE( "JsonWriter escapes charaters in strings properly", "[JsonWriter]" ) { + std::stringstream sstream; + SECTION( "Quote in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\"" ); + REQUIRE( sstream.str() == "\"\\\"\"" ); + } + SECTION("Backslash in a string is escaped") { + Catch::JsonValueWriter{ sstream }.write( "\\" ); + REQUIRE( sstream.str() == "\"\\\\\"" ); + } + SECTION( "Forward slash in a string is **not** escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "/" ); + REQUIRE( sstream.str() == "\"/\"" ); + } + SECTION( "Backspace in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\b" ); + REQUIRE( sstream.str() == "\"\\b\"" ); + } + SECTION( "Formfeed in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\f" ); + REQUIRE( sstream.str() == "\"\\f\"" ); + } + SECTION( "linefeed in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\n" ); + REQUIRE( sstream.str() == "\"\\n\"" ); + } + SECTION( "carriage return in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\r" ); + REQUIRE( sstream.str() == "\"\\r\"" ); + } + SECTION( "tab in a string is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\t" ); + REQUIRE( sstream.str() == "\"\\t\"" ); + } + SECTION( "combination of characters is escaped" ) { + Catch::JsonValueWriter{ sstream }.write( "\\/\t\r\n" ); + REQUIRE( sstream.str() == "\"\\\\/\\t\\r\\n\"" ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp index ac8be645..c13ec573 100644 --- a/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp @@ -14,8 +14,8 @@ using namespace Catch; namespace { -Catch::TestCaseTracking::NameAndLocation makeNAL( std::string const& name ) { - return Catch::TestCaseTracking::NameAndLocation( name, Catch::SourceLineInfo("",0) ); +Catch::TestCaseTracking::NameAndLocationRef makeNAL( StringRef name ) { + return Catch::TestCaseTracking::NameAndLocationRef( name, Catch::SourceLineInfo("",0) ); } } diff --git a/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp index 8018b7eb..03be6c9c 100644 --- a/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp @@ -7,9 +7,17 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/catch_test_macros.hpp> +#include <catch2/catch_template_test_macros.hpp> +#include <catch2/internal/catch_floating_point_helpers.hpp> +#include <catch2/internal/catch_random_integer_helpers.hpp> #include <catch2/internal/catch_random_number_generator.hpp> #include <catch2/internal/catch_random_seed_generation.hpp> +#include <catch2/internal/catch_uniform_floating_point_distribution.hpp> +#include <catch2/internal/catch_uniform_integer_distribution.hpp> #include <catch2/generators/catch_generators.hpp> +#include <catch2/matchers/catch_matchers_range_equals.hpp> + +#include <random> TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") { Catch::SimplePcg32 rng; @@ -60,3 +68,523 @@ TEST_CASE("Random seed generation accepts known methods", "[rng][seed]") { REQUIRE_NOTHROW(Catch::generateRandomSeed(method)); } + +TEMPLATE_TEST_CASE("uniform_floating_point_distribution never returns infs from finite range", + "[rng][distribution][floating-point][approvals]", float, double) { + std::random_device rd{}; + Catch::SimplePcg32 pcg( rd() ); + Catch::uniform_floating_point_distribution<TestType> dist( + -std::numeric_limits<TestType>::max(), + std::numeric_limits<TestType>::max() ); + + for (size_t i = 0; i < 10'000; ++i) { + auto ret = dist( pcg ); + REQUIRE_FALSE( std::isinf( ret ) ); + REQUIRE_FALSE( std::isnan( ret ) ); + } +} + +TEST_CASE( "fillBitsFrom - shortening and stretching", "[rng][approvals]" ) { + using Catch::Detail::fillBitsFrom; + + // The seed is not important, but the numbers below have to be repeatable. + // They should also exhibit the same general pattern of being prefixes + Catch::SimplePcg32 pcg( 0xaabb'ccdd ); + + SECTION( "Shorten to 8 bits" ) { + // We cast the result to avoid dealing with char-like type in uint8_t + auto shortened = static_cast<uint32_t>( fillBitsFrom<uint8_t>( pcg ) ); + REQUIRE( shortened == 0xcc ); + } + SECTION( "Shorten to 16 bits" ) { + auto shortened = fillBitsFrom<uint16_t>( pcg ); + REQUIRE( shortened == 0xccbe ); + } + SECTION( "Keep at 32 bits" ) { + auto n = fillBitsFrom<uint32_t>( pcg ); + REQUIRE( n == 0xccbe'5f04 ); + } + SECTION( "Stretch to 64 bits" ) { + auto stretched = fillBitsFrom<uint64_t>( pcg ); + REQUIRE( stretched == 0xccbe'5f04'a424'a486 ); + } +} + +TEST_CASE("uniform_integer_distribution can return the bounds", "[rng][distribution]") { + Catch::uniform_integer_distribution<int32_t> dist( -10, 10 ); + REQUIRE( dist.a() == -10 ); + REQUIRE( dist.b() == 10 ); +} + +namespace { + template <typename T> + static void CheckReturnValue(Catch::uniform_integer_distribution<T>& dist, + Catch::SimplePcg32& rng, + T target) { + REQUIRE( dist.a() == dist.b() ); + for (int i = 0; i < 1'000; ++i) { + REQUIRE( dist( rng ) == target ); + } + } +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution can handle unit ranges", + "[rng][distribution][approvals]", + unsigned char, + signed char, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t ) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + // We check unitary ranges of 3 different values, min for type, max for type, + // some value inbetween just to make sure + SECTION("lowest value") { + constexpr auto lowest = std::numeric_limits<TestType>::min(); + Catch::uniform_integer_distribution<TestType> dist( lowest, lowest ); + CheckReturnValue( dist, pcg, lowest ); + } + SECTION( "highest value" ) { + constexpr auto highest = std::numeric_limits<TestType>::max(); + Catch::uniform_integer_distribution<TestType> dist( highest, highest ); + CheckReturnValue( dist, pcg, highest ); + } + SECTION( "some value" ) { + constexpr auto some = TestType( 42 ); + Catch::uniform_integer_distribution<TestType> dist( some, some ); + CheckReturnValue( dist, pcg, some ); + } +} + +// Bool needs its own test because it doesn't have a valid "third" value +TEST_CASE( "uniform_integer_distribution can handle boolean unit ranges", + "[rng][distribution][approvals]" ) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + // We check unitary ranges of 3 different values, min for type, max for + // type, some value inbetween just to make sure + SECTION( "lowest value" ) { + Catch::uniform_integer_distribution<bool> dist( false, false ); + CheckReturnValue( dist, pcg, false ); + } + SECTION( "highest value" ) { + Catch::uniform_integer_distribution<bool> dist( true, true ); + CheckReturnValue( dist, pcg, true ); + } +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution can handle full width ranges", + "[rng][distribution][approvals]", + unsigned char, + signed char, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t ) { + // We want random seed to sample different parts of the rng state, + // the output is predetermined anyway + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + constexpr auto lowest = std::numeric_limits<TestType>::min(); + constexpr auto highest = std::numeric_limits<TestType>::max(); + Catch::uniform_integer_distribution<TestType> dist( lowest, highest ); + STATIC_REQUIRE( std::is_same<TestType, decltype( dist( pcg ) )>::value ); + + // We need to do bit operations on the results, so we will have to + // cast them to unsigned type. + using BitType = std::make_unsigned_t<TestType>; + BitType ORs = 0; + BitType ANDs = BitType(-1); + for (int i = 0; i < 100; ++i) { + auto bits = static_cast<BitType>( dist( pcg ) ); + ORs |= bits; + ANDs &= bits; + } + // Assuming both our RNG and distribution are unbiased, asking for + // the full range should essentially give us random bit generator. + // Over long run, OR of all the generated values should have all + // bits set to 1, while AND should have all bits set to 0. + // The chance of this test failing for unbiased pipeline is + // 1 / 2**iters, which for 100 iterations is astronomical. + REQUIRE( ORs == BitType( -1 ) ); + REQUIRE( ANDs == 0 ); +} + +namespace { + template <typename T> + struct uniform_integer_test_params; + + template <> + struct uniform_integer_test_params<bool> { + static constexpr bool lowest = false; + static constexpr bool highest = true; + // This seems weird, but it is an artifact of the specific seed + static constexpr bool expected[] = { true, + true, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true }; + }; + + template <> + struct uniform_integer_test_params<char> { + static constexpr char lowest = 32; + static constexpr char highest = 126; + static constexpr char expected[] = { 'k', + '\\', + 'Z', + 'X', + '`', + 'Q', + ';', + 'o', + ']', + 'T', + 'v', + 'p', + ':', + 'S', + 't' }; + }; + + template <> + struct uniform_integer_test_params<uint8_t> { + static constexpr uint8_t lowest = 3; + static constexpr uint8_t highest = 123; + static constexpr uint8_t expected[] = { 'c', + 'P', + 'M', + 'J', + 'U', + 'A', + '%', + 'h', + 'Q', + 'F', + 'q', + 'i', + '$', + 'E', + 'o' }; + }; + + template <> + struct uniform_integer_test_params<int8_t> { + static constexpr int8_t lowest = -27; + static constexpr int8_t highest = 73; + static constexpr int8_t expected[] = { '5', + '%', + '#', + ' ', + '*', + 25, + 2, + '9', + '&', + 29, + 'A', + ':', + 1, + 28, + '?' }; + }; + + template <> + struct uniform_integer_test_params<uint16_t> { + static constexpr uint16_t lowest = 123; + static constexpr uint16_t highest = 33333; + static constexpr uint16_t expected[] = { 26684, + 21417, + 20658, + 19791, + 22896, + 17433, + 9806, + 27948, + 21767, + 18588, + 30556, + 28244, + 9439, + 18293, + 29949 }; + }; + + template <> + struct uniform_integer_test_params<int16_t> { + static constexpr int16_t lowest = -17222; + static constexpr int16_t highest = 17222; + static constexpr int16_t expected[] = { 10326, + 4863, + 4076, + 3177, + 6397, + 731, + -7179, + 11637, + 5226, + 1929, + 14342, + 11944, + -7560, + 1623, + 13712 }; + }; + + template <> + struct uniform_integer_test_params<uint32_t> { + static constexpr uint32_t lowest = 17222; + static constexpr uint32_t highest = 234234; + static constexpr uint32_t expected[] = { 190784, + 156367, + 151409, + 145743, + 166032, + 130337, + 80501, + 199046, + 158654, + 137883, + 216091, + 200981, + 78099, + 135954, + 212120 }; + }; + + template <> + struct uniform_integer_test_params<int32_t> { + static constexpr int32_t lowest = -237272; + static constexpr int32_t highest = 234234; + static constexpr int32_t expected[] = { 139829, + 65050, + 54278, + 41969, + 86051, + 8494, + -99785, + 157781, + 70021, + 24890, + 194815, + 161985, + -105004, + 20699, + 186186 }; + }; + + template <> + struct uniform_integer_test_params<uint64_t> { + static constexpr uint64_t lowest = 1234; + static constexpr uint64_t highest = 1234567890; + static constexpr uint64_t expected[] = { 987382749, + 763380386, + 846572137, + 359990258, + 804599765, + 1131353566, + 346324913, + 1108760730, + 1141693933, + 856999148, + 879390623, + 1149485521, + 900556586, + 952385958, + 807916408 }; + }; + + template <> + struct uniform_integer_test_params<int64_t> { + static constexpr int64_t lowest = -1234567890; + static constexpr int64_t highest = 1234567890; + static constexpr int64_t expected[] = { 740197113, + 292191940, + 458575608, + -514589122, + 374630781, + 1028139036, + -541919840, + 982953318, + 1048819790, + 479429651, + 524212647, + 1064402981, + 566544615, + 670203462, + 381264073 }; + }; + + // We need these definitions for C++14 and earlier, but + // GCC will complain about them in newer C++ standards +#if __cplusplus <= 201402L + constexpr bool uniform_integer_test_params<bool>::expected[]; + constexpr char uniform_integer_test_params<char>::expected[]; + constexpr uint8_t uniform_integer_test_params<uint8_t>::expected[]; + constexpr int8_t uniform_integer_test_params<int8_t>::expected[]; + constexpr uint16_t uniform_integer_test_params<uint16_t>::expected[]; + constexpr int16_t uniform_integer_test_params<int16_t>::expected[]; + constexpr uint32_t uniform_integer_test_params<uint32_t>::expected[]; + constexpr int32_t uniform_integer_test_params<int32_t>::expected[]; + constexpr uint64_t uniform_integer_test_params<uint64_t>::expected[]; + constexpr int64_t uniform_integer_test_params<int64_t>::expected[]; +#endif + +} + +TEMPLATE_TEST_CASE( "uniform_integer_distribution is reproducible", + "[rng][distribution][approvals]", + bool, + char, + uint8_t, + int8_t, + uint16_t, + int16_t, + uint32_t, + int32_t, + uint64_t, + int64_t) { + Catch::SimplePcg32 pcg( 0xaabb'ccdd ); + + constexpr auto lowest = uniform_integer_test_params<TestType>::lowest; + constexpr auto highest = uniform_integer_test_params<TestType>::highest; + Catch::uniform_integer_distribution<TestType> dist(lowest, highest); + + constexpr auto iters = 15; + std::array<TestType, iters> generated; + for (int i = 0; i < iters; ++i) { + generated[i] = dist( pcg ); + } + + REQUIRE_THAT(generated, Catch::Matchers::RangeEquals(uniform_integer_test_params<TestType>::expected)); +} + + +namespace { + template <typename T> + struct uniform_fp_test_params; + + template<> + struct uniform_fp_test_params<float> { + // These are exactly representable + static constexpr float lowest = -256.125f; + static constexpr float highest = 385.125f; + // These are just round-trip formatted + static constexpr float expected[] = { 92.56961f, + -23.170044f, + 310.81833f, + -53.023132f, + 105.03287f, + 198.77591f, + -172.72931f, + 51.805176f, + -241.10156f, + 64.66101f, + 212.12509f, + -49.24292f, + -177.1399f, + 245.23679f, + 173.22421f }; + }; + template <> + struct uniform_fp_test_params<double> { + // These are exactly representable + static constexpr double lowest = -234582.9921875; + static constexpr double highest = 261238.015625; + // These are just round-trip formatted + static constexpr double expected[] = { 35031.207052832615, + 203783.3401838024, + 44667.940405848756, + -170100.5877224467, + -222966.7418051684, + 127472.72630072923, + -173510.88209096913, + 97394.16172239158, + 119123.6921592663, + 22595.741022785165, + 8988.68409120926, + 136906.86520606978, + 33369.19104222473, + 60912.7615841752, + -149060.05936760217 }; + }; + +// We need these definitions for C++14 and earlier, but +// GCC will complain about them in newer C++ standards +#if __cplusplus <= 201402L + constexpr float uniform_fp_test_params<float>::expected[]; + constexpr double uniform_fp_test_params<double>::expected[]; +#endif +} // namespace + +TEMPLATE_TEST_CASE( "uniform_floating_point_distribution is reproducible", + "[rng][distribution][floating-point][approvals]", + float, + double ) { + Catch::SimplePcg32 pcg( 0xaabb'aabb ); + + const auto lowest = uniform_fp_test_params<TestType>::lowest; + const auto highest = uniform_fp_test_params<TestType>::highest; + Catch::uniform_floating_point_distribution<TestType> dist( lowest, highest ); + + constexpr auto iters = 15; + std::array<TestType, iters> generated; + for ( int i = 0; i < iters; ++i ) { + generated[i] = dist( pcg ); + } + + REQUIRE_THAT( generated, Catch::Matchers::RangeEquals( uniform_fp_test_params<TestType>::expected ) ); +} + +TEMPLATE_TEST_CASE( "uniform_floating_point_distribution can handle unitary ranges", + "[rng][distribution][floating-point][approvals]", + float, + double ) { + std::random_device rd; + auto seed = rd(); + CAPTURE( seed ); + Catch::SimplePcg32 pcg( seed ); + + const auto highest = uniform_fp_test_params<TestType>::highest; + Catch::uniform_floating_point_distribution<TestType> dist( highest, + highest ); + + constexpr auto iters = 20; + for (int i = 0; i < iters; ++i) { + REQUIRE( Catch::Detail::directCompare( dist( pcg ), highest ) ); + } +} diff --git a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp index 54c26a7a..e5a65bda 100644 --- a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp @@ -12,7 +12,6 @@ #include <catch2/catch_config.hpp> #include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> -#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> #include <catch2/internal/catch_console_colour.hpp> #include <catch2/internal/catch_enforce.hpp> #include <catch2/internal/catch_list.hpp> @@ -110,7 +109,9 @@ TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) { auto sstream = Catch::Detail::make_unique<StringIStream>(); auto& sstreamRef = *sstream.get(); - Catch::Config config( Catch::ConfigData{} ); + Catch::ConfigData cfg_data; + cfg_data.rngSeed = 1234; + Catch::Config config( cfg_data ); auto reporter = factory.second->create( Catch::ReporterConfig{ &config, CATCH_MOVE( sstream ), Catch::ColourMode::None, {} } ); @@ -164,7 +165,7 @@ namespace { std::vector<std::string>& recorder, Catch::IConfig const* config ): EventListenerBase( config ), - m_witness( witness ), + m_witness( CATCH_MOVE(witness) ), m_recorder( recorder ) {} @@ -182,7 +183,7 @@ namespace { std::vector<std::string>& recorder, Catch::ReporterConfig&& config ): StreamingReporterBase( CATCH_MOVE(config) ), - m_witness( witness ), + m_witness( CATCH_MOVE(witness) ), m_recorder( recorder ) {} diff --git a/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/tests/SelfTest/IntrospectiveTests/String.tests.cpp index 7a0b3b4a..43c58b49 100644 --- a/tests/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -177,7 +177,7 @@ TEST_CASE("StringRef at compilation time", "[Strings][StringRef][constexpr]") { STATIC_REQUIRE_FALSE(sr1.empty()); STATIC_REQUIRE(sr1.size() == 3); - using Catch::operator"" _sr; + using Catch::operator""_sr; constexpr auto sr2 = ""_sr; STATIC_REQUIRE(sr2.empty()); STATIC_REQUIRE(sr2.size() == 0); diff --git a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp index ef321b27..43723758 100644 --- a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp @@ -98,7 +98,20 @@ TEST_CASE( "Test case with identical tags keeps just one", "[tags]" ) { REQUIRE( testCase.tags[0] == Tag( "tag1" ) ); } -TEST_CASE( "Empty tag is not allowed" ) { - REQUIRE_THROWS( Catch::TestCaseInfo( - "", { "fake test name", "[]" }, dummySourceLineInfo ) ); +TEST_CASE("Mismatched square brackets in tags are caught and reported", + "[tags][approvals]") { + using Catch::TestCaseInfo; + using Catch::Matchers::ContainsSubstring; + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with unclosed tag", "[abc" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with unclosed tag'") ); + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with nested tags", "[abc[def]]" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with nested tags'") ); + REQUIRE_THROWS_WITH( TestCaseInfo( "", + { "test with superfluous close tags", "[abc][def]]" }, + dummySourceLineInfo ), + ContainsSubstring("registering test case 'test with superfluous close tags'") ); } diff --git a/tests/SelfTest/UsageTests/Exception.tests.cpp b/tests/SelfTest/UsageTests/Exception.tests.cpp index f917932f..4f91a30c 100644 --- a/tests/SelfTest/UsageTests/Exception.tests.cpp +++ b/tests/SelfTest/UsageTests/Exception.tests.cpp @@ -20,7 +20,7 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wweak-vtables" #pragma clang diagnostic ignored "-Wmissing-noreturn" -#pragma clang diagnostic ignored "-Wunreachable-code" +#pragma clang diagnostic ignored "-Wunreachable-code-return" #endif namespace { diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp index 3b691247..f04cf4f0 100644 --- a/tests/SelfTest/UsageTests/Generators.tests.cpp +++ b/tests/SelfTest/UsageTests/Generators.tests.cpp @@ -261,6 +261,10 @@ TEST_CASE("Copy and then generate a range", "[generators]") { } } +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + 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) { @@ -277,6 +281,43 @@ TEST_CASE("#1913 - GENERATEs can share a line", "[regression][generators]") { REQUIRE(i != j); } -#if defined(__clang__) -#pragma clang diagnostic pop -#endif +namespace { + class test_generator : public Catch::Generators::IGenerator<int> { + public: + [[noreturn]] explicit test_generator() { + // removing the following line will cause the program to terminate + // gracefully. + throw Catch::GeneratorException( "failure to init" ); + } + + auto get() const -> int const& override { + static constexpr int value = 1; + return value; + } + + auto next() -> bool override { return false; } + }; + + static auto make_test_generator() + -> Catch::Generators::GeneratorWrapper<int> { + return { new test_generator() }; + } + +} // namespace + +TEST_CASE( "#2615 - Throwing in constructor generator fails test case but does not abort", + "[!shouldfail][regression][generators]" ) { + // this should fail the test case, but not abort the application + auto sample = GENERATE( make_test_generator() ); + // this assertion shouldn't trigger + REQUIRE( sample == 0 ); +} + +TEST_CASE( "GENERATE can combine literals and generators", "[generators]" ) { + auto i = GENERATE( 2, + 4, + take( 2, + filter( []( int val ) { return val % 2 == 0; }, + random( -100, 100 ) ) ) ); + REQUIRE( i % 2 == 0 ); +} diff --git a/tests/SelfTest/UsageTests/Matchers.tests.cpp b/tests/SelfTest/UsageTests/Matchers.tests.cpp index 1ce3158b..74bedf5e 100644 --- a/tests/SelfTest/UsageTests/Matchers.tests.cpp +++ b/tests/SelfTest/UsageTests/Matchers.tests.cpp @@ -406,6 +406,25 @@ TEST_CASE( "Vector matchers that fail", "[matchers][vector][.][failing]" ) { } } +namespace { + struct SomeType { + int i; + friend bool operator==( SomeType lhs, SomeType rhs ) { + return lhs.i == rhs.i; + } + }; +} // end anonymous namespace + +TEST_CASE( "Vector matcher with elements without !=", "[matchers][vector][approvals]" ) { + std::vector<SomeType> lhs, rhs; + lhs.push_back( { 1 } ); + lhs.push_back( { 2 } ); + rhs.push_back( { 1 } ); + rhs.push_back( { 1 } ); + + REQUIRE_THAT( lhs, !Equals(rhs) ); +} + TEST_CASE( "Exception matchers that succeed", "[matchers][exceptions][!throws]" ) { CHECK_THROWS_MATCHES( @@ -497,6 +516,9 @@ TEST_CASE( "Floating point matchers: float", "[matchers][floating-point]" ) { REQUIRE_THROWS_AS( WithinRel( 1.f, -0.2f ), std::domain_error ); REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error ); } + SECTION( "IsNaN" ) { + REQUIRE_THAT( 1., !IsNaN() ); + } } TEST_CASE( "Floating point matchers: double", "[matchers][floating-point]" ) { @@ -552,6 +574,9 @@ TEST_CASE( "Floating point matchers: double", "[matchers][floating-point]" ) { REQUIRE_THROWS_AS( WithinRel( 1., -0.2 ), std::domain_error ); REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error ); } + SECTION("IsNaN") { + REQUIRE_THAT( 1., !IsNaN() ); + } } TEST_CASE( "Floating point matchers that are problematic in approvals", @@ -566,6 +591,8 @@ TEST_CASE( "Floating point matchers that are problematic in approvals", REQUIRE_THAT( NAN, !WithinRel( NAN ) ); REQUIRE_THAT( 1., !WithinRel( NAN ) ); REQUIRE_THAT( NAN, !WithinRel( 1. ) ); + REQUIRE_THAT( NAN, IsNaN() ); + REQUIRE_THAT( static_cast<double>(NAN), IsNaN() ); } TEST_CASE( "Arbitrary predicate matcher", "[matchers][generic]" ) { @@ -660,6 +687,21 @@ TEST_CASE( "Exceptions matchers", "[matchers][exceptions][!throws]" ) { Message( "SpecialException::what" ) ); } +TEST_CASE( "Exception message can be matched", "[matchers][exceptions][!throws]" ) { + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( StartsWith( "Derived" ) ) ); + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( EndsWith( "::what" ) ) ); + REQUIRE_THROWS_MATCHES( throwsDerivedException(), + DerivedException, + MessageMatches( !StartsWith( "::what" ) ) ); + REQUIRE_THROWS_MATCHES( throwsSpecialException( 2 ), + SpecialException, + MessageMatches( StartsWith( "Special" ) ) ); +} + struct CheckedTestingMatcher : Catch::Matchers::MatcherBase<int> { mutable bool matchCalled = false; bool matchSucceeds = false; @@ -848,7 +890,7 @@ struct MatcherA : Catch::Matchers::MatcherGenericBase { return "equals: (int) 1 or (string) \"1\""; } bool match( int i ) const { return i == 1; } - bool match( std::string s ) const { return s == "1"; } + bool match( std::string const& s ) const { return s == "1"; } }; struct MatcherB : Catch::Matchers::MatcherGenericBase { diff --git a/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp index f30af703..cc8c54f8 100644 --- a/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp +++ b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp @@ -9,200 +9,21 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_container_properties.hpp> #include <catch2/matchers/catch_matchers_contains.hpp> +#include <catch2/matchers/catch_matchers_range_equals.hpp> #include <catch2/matchers/catch_matchers_floating_point.hpp> #include <catch2/matchers/catch_matchers_quantifiers.hpp> #include <catch2/matchers/catch_matchers_predicate.hpp> #include <catch2/matchers/catch_matchers_string.hpp> +#include <helpers/range_test_helpers.hpp> + #include <cmath> -#include <initializer_list> #include <list> #include <map> #include <type_traits> #include <vector> #include <memory> -namespace { - -namespace unrelated { - template <typename T> - class needs_ADL_begin { - std::vector<T> m_elements; - public: - using iterator = typename std::vector<T>::iterator; - using const_iterator = typename std::vector<T>::const_iterator; - - needs_ADL_begin(std::initializer_list<T> init) : m_elements(init) {} - - const_iterator Begin() const { return m_elements.begin(); } - const_iterator End() const { return m_elements.end(); } - - friend const_iterator begin(needs_ADL_begin const& lhs) { - return lhs.Begin(); - } - friend const_iterator end(needs_ADL_begin const& rhs) { - return rhs.End(); - } - }; -} // end unrelated namespace - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wunused-function" -#endif - -template <typename T> -class has_different_begin_end_types { - // Using std::vector<T> leads to annoying issues when T is bool - // so we just use list because the perf is not critical and ugh. - std::list<T> m_elements; - - // Different type for the "end" iterator - struct iterator_end {}; - // Fake-ish forward iterator that only compares to a different type - class iterator { - using underlying_iter = typename std::list<T>::const_iterator; - underlying_iter m_start; - underlying_iter m_end; - - public: - iterator( underlying_iter start, underlying_iter end ): - m_start( start ), m_end( end ) {} - - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = T; - using const_reference = T const&; - using pointer = T const*; - - - friend bool operator==( iterator iter, iterator_end ) { - return iter.m_start == iter.m_end; - } - friend bool operator!=( iterator iter, iterator_end ) { - return iter.m_start != iter.m_end; - } - iterator& operator++() { - ++m_start; - return *this; - } - iterator operator++(int) { - auto tmp(*this); - ++m_start; - return tmp; - } - const_reference operator*() const { - return *m_start; - } - pointer operator->() const { - return m_start; - } - }; - - -public: - explicit has_different_begin_end_types( std::initializer_list<T> init ): - m_elements( init ) {} - - iterator begin() const { - return { m_elements.begin(), m_elements.end() }; - } - - iterator_end end() const { - return {}; - } -}; - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif - -template <typename T> struct with_mocked_iterator_access { - std::vector<T> m_elements; - - // use plain arrays to have nicer printouts with CHECK(...) - mutable std::unique_ptr<bool[]> m_derefed; - - // We want to check which elements were dereferenced when iterating, so - // we can check whether iterator-using code traverses range correctly - template <bool is_const> class basic_iterator { - template <typename U> - using constify_t = std::conditional_t<is_const, std::add_const_t<U>, U>; - - constify_t<with_mocked_iterator_access>* m_origin; - size_t m_origin_idx; - - public: - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = constify_t<T>; - using const_reference = typename std::vector<T>::const_reference; - using reference = typename std::vector<T>::reference; - using pointer = typename std::vector<T>::pointer; - - basic_iterator( constify_t<with_mocked_iterator_access>* origin, - std::size_t origin_idx ): - m_origin{ origin }, m_origin_idx{ origin_idx } {} - - friend bool operator==( basic_iterator lhs, basic_iterator rhs ) { - return lhs.m_origin == rhs.m_origin && - lhs.m_origin_idx == rhs.m_origin_idx; - } - friend bool operator!=( basic_iterator lhs, basic_iterator rhs ) { - return !( lhs == rhs ); - } - basic_iterator& operator++() { - ++m_origin_idx; - return *this; - } - basic_iterator operator++( int ) { - auto tmp( *this ); - ++( *this ); - return tmp; - } - const_reference operator*() const { - assert( m_origin_idx < m_origin->m_elements.size() && "Attempted to deref invalid position" ); - m_origin->m_derefed[m_origin_idx] = true; - return m_origin->m_elements[m_origin_idx]; - } - pointer operator->() const { - assert( m_origin_idx < m_origin->m_elements.size() && "Attempted to deref invalid position" ); - return &m_origin->m_elements[m_origin_idx]; - } - }; - - using iterator = basic_iterator<false>; - using const_iterator = basic_iterator<true>; - - with_mocked_iterator_access( std::initializer_list<T> init ): - m_elements( init ), - m_derefed( std::make_unique<bool[]>( m_elements.size() ) ) {} - - const_iterator begin() const { return { this, 0 }; } - const_iterator end() const { return { this, m_elements.size() }; } - iterator begin() { return { this, 0 }; } - iterator end() { return { this, m_elements.size() }; } -}; - -} // end anon namespace - -namespace Catch { - // make sure with_mocked_iterator_access is not considered a range by Catch, - // so that below StringMaker is used instead of the default one for ranges - template <typename T> - struct is_range<with_mocked_iterator_access<T>> : std::false_type {}; - - template <typename T> - struct StringMaker<with_mocked_iterator_access<T>> { - static std::string - convert( with_mocked_iterator_access<T> const& access ) { - // We have to avoid the type's iterators, because we check - // their use in tests - return ::Catch::Detail::stringify( access.m_elements ); - } - }; -} // namespace Catch - struct MoveOnlyTestElement { int num = 0; MoveOnlyTestElement(int n) :num(n) {} @@ -286,16 +107,6 @@ namespace { bool empty() const { return false; } }; -namespace unrelated { - struct ADL_empty { - bool Empty() const { return true; } - - friend bool empty(ADL_empty e) { - return e.Empty(); - } - }; - -} // end namespace unrelated } // end unnamed namespace TEST_CASE("Basic use of the Empty range matcher", "[matchers][templated][empty]") { @@ -345,17 +156,6 @@ namespace { return LessThanMatcher{ sz }; } - namespace unrelated { - struct ADL_size { - size_t sz() const { - return 12; - } - friend size_t size(ADL_size s) { - return s.sz(); - } - }; - } // end namespace unrelated - struct has_size { size_t size() const { return 13; @@ -581,7 +381,7 @@ TEST_CASE("Usage of AllTrue range matcher", "[matchers][templated][quantifiers]" std::array<bool, 0> const data{}; REQUIRE_THAT( data, AllTrue() ); } - SECTION( "One false evalutes to false" ) { + SECTION( "One false evaluates to false" ) { std::array<bool, 5> const data{ { true, true, false, true, true } }; REQUIRE_THAT( data, !AllTrue() ); } @@ -598,7 +398,7 @@ TEST_CASE("Usage of AllTrue range matcher", "[matchers][templated][quantifiers]" { { true }, { true }, { true }, { true }, { true } } }; REQUIRE_THAT( data, AllTrue() ); } - SECTION( "One false evalutes to false" ) { + SECTION( "One false evaluates to false" ) { std::array<ConvertibleToBool, 5> const data{ { { true }, { true }, { false }, { true }, { true } } }; REQUIRE_THAT( data, !AllTrue() ); @@ -646,7 +446,7 @@ TEST_CASE( "Usage of NoneTrue range matcher", "[matchers][templated][quantifiers std::array<bool, 0> const data{}; REQUIRE_THAT( data, NoneTrue() ); } - SECTION( "One true evalutes to false" ) { + SECTION( "One true evaluates to false" ) { std::array<bool, 5> const data{ { false, false, true, false, false } }; REQUIRE_THAT( data, !NoneTrue() ); @@ -664,7 +464,7 @@ TEST_CASE( "Usage of NoneTrue range matcher", "[matchers][templated][quantifiers { { true }, { true }, { true }, { true }, { true } } }; REQUIRE_THAT( data, !NoneTrue() ); } - SECTION( "One true evalutes to false" ) { + SECTION( "One true evaluates to false" ) { std::array<ConvertibleToBool, 5> const data{ { { false }, { false }, { true }, { false }, { false } } }; REQUIRE_THAT( data, !NoneTrue() ); @@ -712,7 +512,7 @@ TEST_CASE( "Usage of AnyTrue range matcher", "[matchers][templated][quantifiers] std::array<bool, 0> const data{}; REQUIRE_THAT( data, !AnyTrue() ); } - SECTION( "One true evalutes to true" ) { + SECTION( "One true evaluates to true" ) { std::array<bool, 5> const data{ { false, false, true, false, false } }; REQUIRE_THAT( data, AnyTrue() ); @@ -730,7 +530,7 @@ TEST_CASE( "Usage of AnyTrue range matcher", "[matchers][templated][quantifiers] { { true }, { true }, { true }, { true }, { true } } }; REQUIRE_THAT( data, AnyTrue() ); } - SECTION( "One true evalutes to true" ) { + SECTION( "One true evaluates to true" ) { std::array<ConvertibleToBool, 5> const data{ { { false }, { false }, { true }, { false }, { false } } }; REQUIRE_THAT( data, AnyTrue() ); @@ -831,4 +631,287 @@ TEST_CASE( "The quantifier range matchers support types with different types ret } } +TEST_CASE( "RangeEquals supports ranges with different types returned from begin and end", + "[matchers][templated][range][approvals] ") { + using Catch::Matchers::RangeEquals; + using Catch::Matchers::UnorderedRangeEquals; + + has_different_begin_end_types<int> diff_types{ 1, 2, 3, 4, 5 }; + std::array<int, 5> arr1{ { 1, 2, 3, 4, 5 } }, arr2{ { 2, 3, 4, 5, 6 } }; + + REQUIRE_THAT( diff_types, RangeEquals( arr1 ) ); + REQUIRE_THAT( diff_types, RangeEquals( arr2, []( int l, int r ) { + return l + 1 == r; + } ) ); + REQUIRE_THAT( diff_types, UnorderedRangeEquals( diff_types ) ); +} + +TEST_CASE( "RangeContains supports ranges with different types returned from " + "begin and end", + "[matchers][templated][range][approvals]" ) { + using Catch::Matchers::Contains; + + has_different_begin_end_types<size_t> diff_types{ 1, 2, 3, 4, 5 }; + REQUIRE_THAT( diff_types, Contains( size_t( 3 ) ) ); + REQUIRE_THAT( diff_types, Contains( LessThanMatcher( size_t( 4 ) ) ) ); +} + #endif + +TEST_CASE( "Usage of RangeEquals range matcher", "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::RangeEquals; + + // In these tests, the types are always the same - type conversion is in the next section + SECTION( "Basic usage" ) { + SECTION( "Empty container matches empty container" ) { + const std::vector<int> empty_vector; + CHECK_THAT( empty_vector, RangeEquals( empty_vector ) ); + } + SECTION( "Empty container does not match non-empty container" ) { + const std::vector<int> empty_vector; + const std::vector<int> non_empty_vector{ 1 }; + CHECK_THAT( empty_vector, !RangeEquals( non_empty_vector ) ); + // ...and in reverse + CHECK_THAT( non_empty_vector, !RangeEquals( empty_vector ) ); + } + SECTION( "Two equal 1-length non-empty containers" ) { + const std::array<int, 1> non_empty_array{ { 1 } }; + CHECK_THAT( non_empty_array, RangeEquals( non_empty_array ) ); + } + SECTION( "Two equal-sized, equal, non-empty containers" ) { + const std::array<int, 3> array_a{ { 1, 2, 3 } }; + CHECK_THAT( array_a, RangeEquals( array_a ) ); + } + SECTION( "Two equal-sized, non-equal, non-empty containers" ) { + const std::array<int, 3> array_a{ { 1, 2, 3 } }; + const std::array<int, 3> array_b{ { 2, 2, 3 } }; + const std::array<int, 3> array_c{ { 1, 2, 2 } }; + CHECK_THAT( array_a, !RangeEquals( array_b ) ); + CHECK_THAT( array_a, !RangeEquals( array_c ) ); + } + SECTION( "Two non-equal-sized, non-empty containers (with same first " + "elements)" ) { + const std::vector<int> vector_a{ 1, 2, 3 }; + const std::vector<int> vector_b{ 1, 2, 3, 4 }; + CHECK_THAT( vector_a, !RangeEquals( vector_b ) ); + } + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector<int> vector_a{ { 1, 2, 3 } }; + const std::vector<int> vector_a_plus_1{ { 2, 3, 4 } }; + CHECK_THAT( vector_a, RangeEquals( vector_a_plus_1, close_enough ) ); + } + SECTION( "Two non-equal non-empty containers (close enough)" ) { + const std::vector<int> vector_a{ { 1, 2, 3 } }; + const std::vector<int> vector_b{ { 3, 3, 4 } }; + CHECK_THAT( vector_a, !RangeEquals( vector_b, close_enough ) ); + } + } + + SECTION( "Ranges that need ADL begin/end" ) { + unrelated::needs_ADL_begin<int> const + needs_adl1{ 1, 2, 3, 4, 5 }, + needs_adl2{ 1, 2, 3, 4, 5 }, + needs_adl3{ 2, 3, 4, 5, 6 }; + + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) ); + REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { + return l + 1 == r; + } ) ); + } + + SECTION("Check short-circuiting behaviour") { + with_mocked_iterator_access<int> const mocked1{ 1, 2, 3, 4 }; + + SECTION( "Check short-circuits on failure" ) { + std::array<int, 4> arr{ { 1, 2, 4, 4 } }; + + REQUIRE_THAT( mocked1, !RangeEquals( arr ) ); + REQUIRE( mocked1.m_derefed[0] ); + REQUIRE( mocked1.m_derefed[1] ); + REQUIRE( mocked1.m_derefed[2] ); + REQUIRE_FALSE( mocked1.m_derefed[3] ); + } + SECTION("All elements are checked on success") { + std::array<int, 4> arr{ { 1, 2, 3, 4 } }; + + REQUIRE_THAT( mocked1, RangeEquals( arr ) ); + REQUIRE( mocked1.m_derefed[0] ); + REQUIRE( mocked1.m_derefed[1] ); + REQUIRE( mocked1.m_derefed[2] ); + REQUIRE( mocked1.m_derefed[3] ); + } + } +} + +TEST_CASE( "Usage of UnorderedRangeEquals range matcher", + "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::UnorderedRangeEquals; + + // In these tests, the types are always the same - type conversion is in the + // next section + SECTION( "Basic usage" ) { + SECTION( "Empty container matches empty container" ) { + const std::vector<int> empty_vector; + CHECK_THAT( empty_vector, UnorderedRangeEquals( empty_vector ) ); + } + SECTION( "Empty container does not match non-empty container" ) { + const std::vector<int> empty_vector; + const std::vector<int> non_empty_vector{ 1 }; + CHECK_THAT( empty_vector, + !UnorderedRangeEquals( non_empty_vector ) ); + // ...and in reverse + CHECK_THAT( non_empty_vector, + !UnorderedRangeEquals( empty_vector ) ); + } + SECTION( "Two equal 1-length non-empty containers" ) { + const std::array<int, 1> non_empty_array{ { 1 } }; + CHECK_THAT( non_empty_array, + UnorderedRangeEquals( non_empty_array ) ); + } + SECTION( "Two equal-sized, equal, non-empty containers" ) { + const std::array<int, 3> array_a{ { 1, 2, 3 } }; + CHECK_THAT( array_a, UnorderedRangeEquals( array_a ) ); + } + SECTION( "Two equal-sized, non-equal, non-empty containers" ) { + const std::array<int, 3> array_a{ { 1, 2, 3 } }; + const std::array<int, 3> array_b{ { 2, 2, 3 } }; + CHECK_THAT( array_a, !UnorderedRangeEquals( array_b ) ); + } + SECTION( "Two non-equal-sized, non-empty containers" ) { + const std::vector<int> vector_a{ 1, 2, 3 }; + const std::vector<int> vector_b{ 1, 2, 3, 4 }; + CHECK_THAT( vector_a, !UnorderedRangeEquals( vector_b ) ); + } + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector<int> vector_a{ { 1, 10, 20 } }; + const std::vector<int> vector_a_plus_1{ { 11, 21, 2 } }; + CHECK_THAT( vector_a, + UnorderedRangeEquals( vector_a_plus_1, close_enough ) ); + } + SECTION( "Two non-equal non-empty containers (close enough)" ) { + const std::vector<int> vector_a{ { 1, 10, 21 } }; + const std::vector<int> vector_b{ { 11, 21, 3 } }; + CHECK_THAT( vector_a, + !UnorderedRangeEquals( vector_b, close_enough ) ); + } + } + + + SECTION( "Ranges that need ADL begin/end" ) { + unrelated::needs_ADL_begin<int> const + needs_adl1{ 1, 2, 3, 4, 5 }, + needs_adl2{ 1, 2, 3, 4, 5 }; + + REQUIRE_THAT( needs_adl1, UnorderedRangeEquals( needs_adl2 ) ); + } +} + +/** + * Return true if the type given has a random access iterator type. + */ +template <typename Container> +static constexpr bool ContainerIsRandomAccess( const Container& ) { + using array_iter_category = typename std::iterator_traits< + typename Container::iterator>::iterator_category; + + return std::is_base_of<std::random_access_iterator_tag, + array_iter_category>::value; +} + +TEST_CASE( "Type conversions of RangeEquals and similar", + "[matchers][templated][quantifiers]" ) { + using Catch::Matchers::RangeEquals; + using Catch::Matchers::UnorderedRangeEquals; + + // In these test, we can always test RangeEquals and + // UnorderedRangeEquals in the same way, since we're mostly + // testing the template type deductions (and RangeEquals + // implies UnorderedRangeEquals) + + SECTION( "Container conversions" ) { + SECTION( "Two equal containers of different container types" ) { + const std::array<int, 3> array_int_a{ { 1, 2, 3 } }; + const int c_array[3] = { 1, 2, 3 }; + CHECK_THAT( array_int_a, RangeEquals( c_array ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( c_array ) ); + } + SECTION( "Two equal containers of different container types " + "(differ in array N)" ) { + const std::array<int, 3> array_int_3{ { 1, 2, 3 } }; + const std::array<int, 4> array_int_4{ { 1, 2, 3, 4 } }; + CHECK_THAT( array_int_3, !RangeEquals( array_int_4 ) ); + CHECK_THAT( array_int_3, !UnorderedRangeEquals( array_int_4 ) ); + } + SECTION( "Two equal containers of different container types and value " + "types" ) { + const std::array<int, 3> array_int_a{ { 1, 2, 3 } }; + const std::vector<int> vector_char_a{ 1, 2, 3 }; + CHECK_THAT( array_int_a, RangeEquals( vector_char_a ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( vector_char_a ) ); + } + SECTION( "Two equal containers, one random access, one not" ) { + const std::array<int, 3> array_int_a{ { 1, 2, 3 } }; + const std::list<int> list_char_a{ 1, 2, 3 }; + + // Verify these types really are different in random access nature + STATIC_REQUIRE( ContainerIsRandomAccess( array_int_a ) != + ContainerIsRandomAccess( list_char_a ) ); + + CHECK_THAT( array_int_a, RangeEquals( list_char_a ) ); + CHECK_THAT( array_int_a, UnorderedRangeEquals( list_char_a ) ); + } + } + + SECTION( "Value type" ) { + SECTION( "Two equal containers of different value types" ) { + const std::vector<int> vector_int_a{ 1, 2, 3 }; + const std::vector<char> vector_char_a{ 1, 2, 3 }; + CHECK_THAT( vector_int_a, RangeEquals( vector_char_a ) ); + CHECK_THAT( vector_int_a, UnorderedRangeEquals( vector_char_a ) ); + } + SECTION( "Two non-equal containers of different value types" ) { + const std::vector<int> vector_int_a{ 1, 2, 3 }; + const std::vector<char> vector_char_b{ 1, 2, 2 }; + CHECK_THAT( vector_int_a, !RangeEquals( vector_char_b ) ); + CHECK_THAT( vector_int_a, !UnorderedRangeEquals( vector_char_b ) ); + } + } + + SECTION( "Ranges with begin that needs ADL" ) { + unrelated::needs_ADL_begin<int> a{ 1, 2, 3 }, b{ 3, 2, 1 }; + REQUIRE_THAT( a, !RangeEquals( b ) ); + REQUIRE_THAT( a, UnorderedRangeEquals( b ) ); + } + + SECTION( "Custom predicate" ) { + + auto close_enough = []( int lhs, int rhs ) { + return std::abs( lhs - rhs ) <= 1; + }; + + SECTION( "Two equal non-empty containers (close enough)" ) { + const std::vector<int> vector_a{ { 1, 2, 3 } }; + const std::array<char, 3> array_a_plus_1{ { 2, 3, 4 } }; + CHECK_THAT( vector_a, + RangeEquals( array_a_plus_1, close_enough ) ); + CHECK_THAT( vector_a, + UnorderedRangeEquals( array_a_plus_1, close_enough ) ); + } + } +}
\ No newline at end of file diff --git a/tests/SelfTest/UsageTests/Message.tests.cpp b/tests/SelfTest/UsageTests/Message.tests.cpp index a5e69582..6367bf59 100644 --- a/tests/SelfTest/UsageTests/Message.tests.cpp +++ b/tests/SelfTest/UsageTests/Message.tests.cpp @@ -255,10 +255,24 @@ std::ostream& operator<<(std::ostream& out, helper_1436<T1, T2> const& helper) { #pragma clang diagnostic ignored "-Wunused-value" #endif +namespace { + template <typename T> + struct custom_index_op { + constexpr custom_index_op( std::initializer_list<T> ) {} + constexpr T operator[]( size_t ) { return T{}; } +#if defined( __cpp_multidimensional_subscript ) && \ + __cpp_multidimensional_subscript >= 202110L + constexpr T operator[]( size_t, size_t, size_t ) const noexcept { + return T{}; + } +#endif + }; +} + TEST_CASE("CAPTURE can deal with complex expressions involving commas", "[messages][capture]") { - CAPTURE(std::vector<int>{1, 2, 3}[0, 1, 2], - std::vector<int>{1, 2, 3}[(0, 1)], - std::vector<int>{1, 2, 3}[0]); + CAPTURE(custom_index_op<int>{1, 2, 3}[0, 1, 2], + custom_index_op<int>{1, 2, 3}[(0, 1)], + custom_index_op<int>{1, 2, 3}[0]); CAPTURE((helper_1436<int, int>{12, -12}), (helper_1436<int, int>(-12, 12))); CAPTURE( (1, 2), (2, 3) ); @@ -285,3 +299,14 @@ TEST_CASE("CAPTURE parses string and character constants", "[messages][capture]" #ifdef _MSC_VER #pragma warning(pop) #endif + +TEST_CASE( "INFO and UNSCOPED_INFO can stream multiple arguments", + "[messages][info][.failing]" ) { + INFO( "This info" + << " has multiple" + << " parts." ); + UNSCOPED_INFO( "This unscoped info" + << " has multiple" + << " parts." ); + FAIL( "Show infos!" ); +} diff --git a/tests/SelfTest/UsageTests/Misc.tests.cpp b/tests/SelfTest/UsageTests/Misc.tests.cpp index 6c1fd68f..7f06704b 100644 --- a/tests/SelfTest/UsageTests/Misc.tests.cpp +++ b/tests/SelfTest/UsageTests/Misc.tests.cpp @@ -217,6 +217,18 @@ TEST_CASE("Testing checked-if 3", "[checked-if][!shouldfail]") { SUCCEED(); } +[[noreturn]] +TEST_CASE("Testing checked-if 4", "[checked-if][!shouldfail]") { + CHECKED_ELSE(true) {} + throw std::runtime_error("Uncaught exception should fail!"); +} + +[[noreturn]] +TEST_CASE("Testing checked-if 5", "[checked-if][!shouldfail]") { + CHECKED_ELSE(false) {} + throw std::runtime_error("Uncaught exception should fail!"); +} + TEST_CASE( "xmlentitycheck" ) { SECTION( "embedded xml: <test>it should be possible to embed xml characters, such as <, \" or &, or even whole <xml>documents</xml> within an attribute</test>" ) { SUCCEED(); // We need this here to stop it failing due to no tests diff --git a/tests/SelfTest/UsageTests/Skip.tests.cpp b/tests/SelfTest/UsageTests/Skip.tests.cpp new file mode 100644 index 00000000..661795e1 --- /dev/null +++ b/tests/SelfTest/UsageTests/Skip.tests.cpp @@ -0,0 +1,100 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> +#include <catch2/generators/catch_generators_range.hpp> + +#include <iostream> + +TEST_CASE( "tests can be skipped dynamically at runtime", "[skipping]" ) { + SKIP(); + FAIL( "this is not reached" ); +} + +TEST_CASE( "skipped tests can optionally provide a reason", "[skipping]" ) { + const int answer = 43; + SKIP( "skipping because answer = " << answer ); + FAIL( "this is not reached" ); +} + +TEST_CASE( "sections can be skipped dynamically at runtime", "[skipping]" ) { + SECTION( "not skipped" ) { SUCCEED(); } + SECTION( "skipped" ) { SKIP(); } + SECTION( "also not skipped" ) { SUCCEED(); } +} + +TEST_CASE( "nested sections can be skipped dynamically at runtime", + "[skipping]" ) { + SECTION( "A" ) { std::cout << "a"; } + SECTION( "B" ) { + SECTION( "B1" ) { std::cout << "b1"; } + SECTION( "B2" ) { SKIP(); } + } + std::cout << "!\n"; +} + +TEST_CASE( "dynamic skipping works with generators", "[skipping]" ) { + const int answer = GENERATE( 41, 42, 43 ); + if ( answer != 42 ) { SKIP( "skipping because answer = " << answer ); } + SUCCEED(); +} + +TEST_CASE( "failed assertions before SKIP cause test case to fail", + "[skipping][!shouldfail]" ) { + CHECK( 3 == 4 ); + SKIP(); +} + +TEST_CASE( "a succeeding test can still be skipped", + "[skipping][!shouldfail]" ) { + SUCCEED(); + SKIP(); +} + +TEST_CASE( "failing in some unskipped sections causes entire test case to fail", + "[skipping][!shouldfail]" ) { + SECTION( "skipped" ) { SKIP(); } + SECTION( "not skipped" ) { FAIL(); } +} + +TEST_CASE( "failing for some generator values causes entire test case to fail", + "[skipping][!shouldfail]" ) { + int i = GENERATE( 1, 2, 3, 4 ); + if ( i % 2 == 0 ) { + SKIP(); + } else { + FAIL(); + } +} + +namespace { + class test_skip_generator : public Catch::Generators::IGenerator<int> { + public: + explicit test_skip_generator() { SKIP( "This generator is empty" ); } + + auto get() const -> int const& override { + static constexpr int value = 1; + return value; + } + + auto next() -> bool override { return false; } + }; + + static auto make_test_skip_generator() + -> Catch::Generators::GeneratorWrapper<int> { + return { new test_skip_generator() }; + } + +} // namespace + +TEST_CASE( "Empty generators can SKIP in constructor", "[skipping]" ) { + // The generator signals emptiness with `SKIP` + auto sample = GENERATE( make_test_skip_generator() ); + // This assertion would fail, but shouldn't trigger + REQUIRE( sample == 0 ); +} diff --git a/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp b/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp index 9fd9d6b4..3671771a 100644 --- a/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp +++ b/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp @@ -28,4 +28,8 @@ TEST_CASE( "std::vector<std::optional<int> > -> toString", "[toString][optional] REQUIRE( "{ 0, { }, 2 }" == ::Catch::Detail::stringify( type{ 0, {}, 2 } ) ); } +TEST_CASE( "std::nullopt -> toString", "[toString][optional][approvals]" ) { + REQUIRE( "{ }" == ::Catch::Detail::stringify( std::nullopt ) ); +} + #endif // CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL diff --git a/tests/SelfTest/helpers/range_test_helpers.hpp b/tests/SelfTest/helpers/range_test_helpers.hpp new file mode 100644 index 00000000..22c2c3cd --- /dev/null +++ b/tests/SelfTest/helpers/range_test_helpers.hpp @@ -0,0 +1,210 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#ifndef CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED +#define CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED + +#include <catch2/catch_tostring.hpp> + +#include <initializer_list> +#include <list> +#include <memory> +#include <vector> + +namespace unrelated { + template <typename T> + class needs_ADL_begin { + std::vector<T> m_elements; + + public: + using iterator = typename std::vector<T>::iterator; + using const_iterator = typename std::vector<T>::const_iterator; + + needs_ADL_begin( std::initializer_list<T> init ): m_elements( init ) {} + + const_iterator Begin() const { return m_elements.begin(); } + const_iterator End() const { return m_elements.end(); } + + friend const_iterator begin( needs_ADL_begin const& lhs ) { + return lhs.Begin(); + } + friend const_iterator end( needs_ADL_begin const& rhs ) { + return rhs.End(); + } + }; + + struct ADL_empty { + bool Empty() const { return true; } + + friend bool empty( ADL_empty e ) { return e.Empty(); } + }; + + struct ADL_size { + size_t sz() const { return 12; } + friend size_t size( ADL_size s ) { return s.sz(); } + }; + +} // namespace unrelated + +#if defined( __clang__ ) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunused-function" +#endif + +template <typename T> +class has_different_begin_end_types { + // Using std::vector<T> leads to annoying issues when T is bool + // so we just use list because the perf is not critical and ugh. + std::list<T> m_elements; + + // Different type for the "end" iterator + struct iterator_end {}; + // Fake-ish forward iterator that only compares to a different type + class iterator { + using underlying_iter = typename std::list<T>::const_iterator; + underlying_iter m_start; + underlying_iter m_end; + + public: + iterator( underlying_iter start, underlying_iter end ): + m_start( start ), m_end( end ) {} + + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = T; + using const_reference = T const&; + using pointer = T const*; + + friend bool operator==( iterator iter, iterator_end ) { + return iter.m_start == iter.m_end; + } + friend bool operator==(iterator lhs, iterator rhs) { + return lhs.m_start == rhs.m_start && lhs.m_end == rhs.m_end; + } + friend bool operator!=( iterator iter, iterator_end ) { + return iter.m_start != iter.m_end; + } + friend bool operator!=( iterator lhs, iterator rhs ) { + return !( lhs == rhs ); + } + iterator& operator++() { + ++m_start; + return *this; + } + iterator operator++( int ) { + auto tmp( *this ); + ++m_start; + return tmp; + } + const_reference operator*() const { return *m_start; } + pointer operator->() const { return m_start; } + }; + +public: + explicit has_different_begin_end_types( std::initializer_list<T> init ): + m_elements( init ) {} + + iterator begin() const { return { m_elements.begin(), m_elements.end() }; } + + iterator_end end() const { return {}; } +}; + +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + +template <typename T> +struct with_mocked_iterator_access { + std::vector<T> m_elements; + + // use plain arrays to have nicer printouts with CHECK(...) + mutable std::unique_ptr<bool[]> m_derefed; + + // We want to check which elements were dereferenced when iterating, so + // we can check whether iterator-using code traverses range correctly + template <bool is_const> + class basic_iterator { + template <typename U> + using constify_t = std::conditional_t<is_const, std::add_const_t<U>, U>; + + constify_t<with_mocked_iterator_access>* m_origin; + size_t m_origin_idx; + + public: + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = constify_t<T>; + using const_reference = typename std::vector<T>::const_reference; + using reference = typename std::vector<T>::reference; + using pointer = typename std::vector<T>::pointer; + + basic_iterator( constify_t<with_mocked_iterator_access>* origin, + std::size_t origin_idx ): + m_origin{ origin }, m_origin_idx{ origin_idx } {} + + friend bool operator==( basic_iterator lhs, basic_iterator rhs ) { + return lhs.m_origin == rhs.m_origin && + lhs.m_origin_idx == rhs.m_origin_idx; + } + friend bool operator!=( basic_iterator lhs, basic_iterator rhs ) { + return !( lhs == rhs ); + } + basic_iterator& operator++() { + ++m_origin_idx; + return *this; + } + basic_iterator operator++( int ) { + auto tmp( *this ); + ++( *this ); + return tmp; + } + const_reference operator*() const { + assert( m_origin_idx < m_origin->m_elements.size() && + "Attempted to deref invalid position" ); + m_origin->m_derefed[m_origin_idx] = true; + return m_origin->m_elements[m_origin_idx]; + } + pointer operator->() const { + assert( m_origin_idx < m_origin->m_elements.size() && + "Attempted to deref invalid position" ); + return &m_origin->m_elements[m_origin_idx]; + } + }; + + using iterator = basic_iterator<false>; + using const_iterator = basic_iterator<true>; + + with_mocked_iterator_access( std::initializer_list<T> init ): + m_elements( init ), + m_derefed( std::make_unique<bool[]>( m_elements.size() ) ) {} + + const_iterator begin() const { return { this, 0 }; } + const_iterator end() const { return { this, m_elements.size() }; } + iterator begin() { return { this, 0 }; } + iterator end() { return { this, m_elements.size() }; } +}; + + +namespace Catch { + // make sure with_mocked_iterator_access is not considered a range by Catch, + // so that below StringMaker is used instead of the default one for ranges + template <typename T> + struct is_range<with_mocked_iterator_access<T>> : std::false_type {}; + + template <typename T> + struct StringMaker<with_mocked_iterator_access<T>> { + static std::string + convert( with_mocked_iterator_access<T> const& access ) { + // We have to avoid the type's iterators, because we check + // their use in tests + return ::Catch::Detail::stringify( access.m_elements ); + } + }; +} // namespace Catch + +#endif // CATCH_TEST_HELPERS_RANGE_TEST_HELPERS_HPP_INCLUDED diff --git a/tests/TestScripts/DiscoverTests/CMakeLists.txt b/tests/TestScripts/DiscoverTests/CMakeLists.txt new file mode 100644 index 00000000..d19f2f88 --- /dev/null +++ b/tests/TestScripts/DiscoverTests/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.10) + +project(discover-tests-test + LANGUAGES CXX +) + +add_executable(tests + register-tests.cpp +) + +add_subdirectory(${CATCH2_PATH} catch2-build) +target_link_libraries(tests PRIVATE Catch2::Catch2WithMain) + +include(CTest) +include(Catch) +catch_discover_tests(tests) diff --git a/tests/TestScripts/DiscoverTests/VerifyRegistration.py b/tests/TestScripts/DiscoverTests/VerifyRegistration.py new file mode 100644 index 00000000..9ec42f24 --- /dev/null +++ b/tests/TestScripts/DiscoverTests/VerifyRegistration.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 + +# Copyright Catch2 Authors +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# SPDX-License-Identifier: BSL-1.0 + +import os +import subprocess +import sys + + +def build_project(sources_dir, output_base_path, catch2_path): + build_dir = os.path.join(output_base_path, 'ctest-registration-test') + config_cmd = ['cmake', + '-B', build_dir, + '-S', sources_dir, + f'-DCATCH2_PATH={catch2_path}', + '-DCMAKE_BUILD_TYPE=Debug'] + + build_cmd = ['cmake', + '--build', build_dir, + '--config', 'Debug'] + + try: + subprocess.run(config_cmd, + capture_output = True, + check = True, + text = True) + subprocess.run(build_cmd, + capture_output = True, + check = True, + text = True) + except subprocess.CalledProcessError as err: + print('Error when building the test project') + print(f'cmd: {err.cmd}') + print(f'stderr: {err.stderr}') + print(f'stdout: {err.stdout}') + exit(3) + + return build_dir + + + +def get_test_names(build_path): + # For now we assume that Windows builds are done using MSBuild under + # Debug configuration. This means that we need to add "Debug" folder + # to the path when constructing it. On Linux, we don't add anything. + config_path = "Debug" if os.name == 'nt' else "" + full_path = os.path.join(build_path, config_path, 'tests') + + + cmd = [full_path, '--reporter', 'xml', '--list-tests'] + result = subprocess.run(cmd, + capture_output = True, + check = True, + text = True) + + import xml.etree.ElementTree as ET + root = ET.fromstring(result.stdout) + return [tc.text for tc in root.findall('TestCase/Name')] + + +def list_ctest_tests(build_path): + old_path = os.getcwd() + os.chdir(build_path) + + cmd = ['ctest', '-C', 'debug', '--show-only=json-v1'] + result = subprocess.run(cmd, + capture_output = True, + check = True, + text = True) + os.chdir(old_path) + + import json + + ctest_response = json.loads(result.stdout) + tests = ctest_response['tests'] + test_names = [] + for test in tests: + test_command = test['command'] + # First part of the command is the binary, second is the filter. + # If there are less, registration has failed. If there are more, + # registration has changed and the script needs updating. + assert len(test_command) == 2 + test_names.append(test_command[1]) + test_name = test_command[1] + + return test_names + +def escape_catch2_test_name(name): + for char in ('\\', ',', '[', ']'): + name = name.replace(char, f"\\{char}") + return name + +if __name__ == '__main__': + if len(sys.argv) != 3: + print(f'Usage: {sys.argv[0]} path-to-catch2-cml output-path') + exit(2) + catch2_path = sys.argv[1] + output_base_path = sys.argv[2] + sources_dir = os.path.dirname(os.path.abspath(sys.argv[0])) + + build_path = build_project(sources_dir, output_base_path, catch2_path) + + catch_test_names = [escape_catch2_test_name(name) for name in get_test_names(build_path)] + ctest_test_names = list_ctest_tests(build_path) + + mismatched = 0 + for catch_test in catch_test_names: + if catch_test not in ctest_test_names: + print(f"Catch2 test '{catch_test}' not found in CTest") + mismatched += 1 + for ctest_test in ctest_test_names: + if ctest_test not in catch_test_names: + print(f"CTest test '{ctest_test}' not found in Catch2") + mismatched += 1 + + if mismatched: + print(f"Found {mismatched} mismatched tests catch test names and ctest test commands!") + exit(1) diff --git a/tests/TestScripts/DiscoverTests/register-tests.cpp b/tests/TestScripts/DiscoverTests/register-tests.cpp new file mode 100644 index 00000000..aa603df1 --- /dev/null +++ b/tests/TestScripts/DiscoverTests/register-tests.cpp @@ -0,0 +1,16 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/catch_test_macros.hpp> + +TEST_CASE("@Script[C:\\EPM1A]=x;\"SCALA_ZERO:\"", "[script regressions]"){} +TEST_CASE("Some test") {} +TEST_CASE( "Let's have a test case with a long name. Longer. No, even longer. " + "Really looooooooooooong. Even longer than that. Multiple lines " + "worth of test name. Yep, like this." ) {} +TEST_CASE( "And now a test case with weird tags.", "[tl;dr][tl;dw][foo,bar]" ) {} diff --git a/tests/meson.build b/tests/meson.build index c8bdfb4b..58302b7a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -9,6 +9,7 @@ # Please keep these ordered alphabetically self_test_sources = files( 'SelfTest/helpers/parse_test_spec.cpp', + 'SelfTest/IntrospectiveTests/Algorithms.tests.cpp', 'SelfTest/IntrospectiveTests/Clara.tests.cpp', 'SelfTest/IntrospectiveTests/CmdLine.tests.cpp', 'SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp', @@ -16,6 +17,7 @@ self_test_sources = files( 'SelfTest/IntrospectiveTests/Details.tests.cpp', 'SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp', 'SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp', + 'SelfTest/IntrospectiveTests/Integer.tests.cpp', 'SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp', 'SelfTest/IntrospectiveTests/Parse.tests.cpp', 'SelfTest/IntrospectiveTests/PartTracker.tests.cpp', diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py index 592be36e..4146b646 100755 --- a/tools/scripts/approvalTests.py +++ b/tools/scripts/approvalTests.py @@ -48,11 +48,11 @@ def get_unapprovedResultsPath(baseName): langFilenameParser = re.compile(r'(.+\.[ch]pp)') filelocParser = re.compile(r''' - .*/ - (.+\.[ch]pp) # filename - (?::|\() # : is starting separator between filename and line number on Linux, ( on Windows - ([0-9]*) # line number - \)? # Windows also has an ending separator, ) + (?P<path_prefix>tests/SelfTest/(?:\w+/)*) # We separate prefix and fname, so that + (?P<filename>\w+\.tests\.[ch]pp) # we can keep only filename + (?::|\() # Linux has : as separator between fname and line number, Windows uses ( + (\d*) # line number + \)? # Windows also uses an ending separator, ) ''', re.VERBOSE) lineNumberParser = re.compile(r' line="[0-9]*"') hexParser = re.compile(r'\b(0[xX][0-9a-fA-F]+)\b') @@ -119,14 +119,11 @@ def filterLine(line, isCompact): line = normalizeFilepath(line) # strip source line numbers - m = filelocParser.match(line) - if m: - # note that this also strips directories, leaving only the filename - filename, lnum = m.groups() - lnum = ":<line number>" if lnum else "" - line = filename + lnum + line[m.end():] - else: - line = lineNumberParser.sub(" ", line) + # Note that this parser assumes an already normalized filepath from above, + # and might break terribly if it is moved around before the normalization. + line = filelocParser.sub('\g<filename>:<line number>', line) + + line = lineNumberParser.sub(" ", line) if isCompact: line = line.replace(': FAILED', ': failed') diff --git a/tools/scripts/buildAndTest.cmd b/tools/scripts/buildAndTest.cmd index e5222a01..7c10e564 100644 --- a/tools/scripts/buildAndTest.cmd +++ b/tools/scripts/buildAndTest.cmd @@ -6,7 +6,7 @@ rem 1. Regenerate the amalgamated distribution python tools\scripts\generateAmalgamatedFiles.py rem 2. Configure the full test build -cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_ENABLE_CONFIGURE_TESTS=ON +cmake -B debug-build -S . -DCMAKE_BUILD_TYPE=Debug --preset all-tests rem 3. Run the actual build cmake --build debug-build diff --git a/tools/scripts/buildAndTest.sh b/tools/scripts/buildAndTest.sh index 4a741598..01a82837 100755 --- a/tools/scripts/buildAndTest.sh +++ b/tools/scripts/buildAndTest.sh @@ -8,7 +8,7 @@ ./tools/scripts/generateAmalgamatedFiles.py # 2. Configure the full test build -cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_ENABLE_CONFIGURE_TESTS=ON +cmake -B debug-build -S . -DCMAKE_BUILD_TYPE=Debug --preset all-tests # 3. Run the actual build cmake --build debug-build diff --git a/tools/scripts/checkLicense.py b/tools/scripts/checkLicense.py index 9a949769..7078d3ec 100755 --- a/tools/scripts/checkLicense.py +++ b/tools/scripts/checkLicense.py @@ -33,7 +33,8 @@ def check_licences_in_path(path: str) -> int: def check_licences(): failed = 0 - roots = ['src/catch2', 'tests'] + # Add 'extras' after the amalgamted files are regenerated with the new script (past 3.4.0) + roots = ['src/catch2', 'tests', 'examples', 'fuzzing'] for root in roots: failed += check_licences_in_path(root) diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index 99fc446b..e3e86aab 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -1,4 +1,9 @@ #!/usr/bin/env python3 +# Copyright Catch2 Authors +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) +# SPDX-License-Identifier: BSL-1.0 import os import re @@ -12,6 +17,8 @@ starting_header = os.path.join(root_path, 'catch2', 'catch_all.hpp') output_header = os.path.join(catchPath, 'extras', 'catch_amalgamated.hpp') output_cpp = os.path.join(catchPath, 'extras', 'catch_amalgamated.cpp') +# REUSE-IgnoreStart + # These are the copyright comments in each file, we want to ignore them copyright_lines = [ '// Copyright Catch2 Authors\n', @@ -24,6 +31,7 @@ copyright_lines = [ # The header of the amalgamated file: copyright information + explanation # what this file is. file_header = '''\ + // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at @@ -39,6 +47,8 @@ file_header = '''\ // ---------------------------------------------------------- ''' +# REUSE-IgnoreEnd + # Returns file header with proper version string and generation time def formatted_file_header(version): return file_header.format(version_string=version.getVersionString(), diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 0d995eaf..1ff4af29 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -114,8 +114,8 @@ def updateVersionDefine(version): def updateVersionPlaceholder(filename, version): with open(filename, 'rb') as file: lines = file.readlines() - placeholderRegex = re.compile(b'in Catch[0-9]? X.Y.Z') - replacement = 'in Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii') + placeholderRegex = re.compile(b'Catch[0-9]? X.Y.Z') + replacement = 'Catch2 {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii') with open(filename, 'wb') as file: for line in lines: file.write(placeholderRegex.sub(replacement, line)) diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py index 7b56cfc7..1840cecc 100755 --- a/tools/scripts/updateDocumentToC.py +++ b/tools/scripts/updateDocumentToC.py @@ -287,7 +287,7 @@ def markdownToclify( Path to the markdown output file. min_toc_len: int (default: 2) - Miniumum number of entries to create a table of contents for. + Minimum number of entries to create a table of contents for. github: bool (default: False) Uses GitHub TOC syntax if True. |