From 8434b9ea791fbe78e28c930fce284868e516468d Mon Sep 17 00:00:00 2001 From: Third Party Date: Fri, 9 Dec 2022 12:48:13 +0100 Subject: [PATCH] Update to Catch2 v3.2.1 --- thirdParty/CMakeLists.txt | 6 +- thirdParty/catch2/.clang-format | 25 +- .../.github/workflows/linux-bazel-builds.yml | 24 + .../.github/workflows/linux-meson-builds.yml | 2 +- .../.github/workflows/linux-other-builds.yml | 1 + .../.github/workflows/linux-simple-builds.yml | 17 + .../catch2/.github/workflows/mac-builds.yml | 7 +- thirdParty/catch2/BUILD.bazel | 2 + .../catch2/CMake/CatchConfigOptions.cmake | 3 +- .../catch2/CMake/CatchMiscFunctions.cmake | 4 +- thirdParty/catch2/CMakeLists.txt | 2 +- thirdParty/catch2/README.md | 69 +- .../catch2-logo-small-with-background.png | Bin 0 -> 25330 bytes thirdParty/catch2/docs/Readme.md | 2 +- thirdParty/catch2/docs/ci-and-misc.md | 33 +- .../docs/comparing-floating-point-numbers.md | 2 +- thirdParty/catch2/docs/configuration.md | 17 +- thirdParty/catch2/docs/contributing.md | 16 +- thirdParty/catch2/docs/faq.md | 20 + thirdParty/catch2/docs/release-notes.md | 47 +- thirdParty/catch2/examples/CMakeLists.txt | 2 - .../catch2/extras/CatchShardTests.cmake | 2 +- .../catch2/extras/CatchShardTestsImpl.cmake | 2 +- .../catch2/extras/catch_amalgamated.cpp | 656 ++++---- .../catch2/extras/catch_amalgamated.hpp | 476 ++++-- thirdParty/catch2/meson.build | 6 +- thirdParty/catch2/src/CMakeLists.txt | 584 ++++---- .../src/catch2/benchmark/catch_benchmark.hpp | 2 +- .../catch2/benchmark/catch_benchmark_all.hpp | 2 +- .../catch2/benchmark/catch_chronometer.cpp | 2 +- .../catch2/benchmark/catch_chronometer.hpp | 2 +- .../src/catch2/benchmark/catch_clock.hpp | 2 +- .../catch2/benchmark/catch_constructor.hpp | 2 +- .../catch2/benchmark/catch_environment.hpp | 2 +- .../src/catch2/benchmark/catch_estimate.hpp | 2 +- .../catch2/benchmark/catch_execution_plan.hpp | 2 +- .../src/catch2/benchmark/catch_optimizer.hpp | 2 +- .../catch_outlier_classification.hpp | 2 +- .../benchmark/catch_sample_analysis.hpp | 2 +- .../catch2/benchmark/detail/catch_analyse.hpp | 2 +- .../detail/catch_benchmark_function.cpp | 2 +- .../detail/catch_benchmark_function.hpp | 2 +- .../detail/catch_complete_invoke.hpp | 2 +- .../benchmark/detail/catch_estimate_clock.hpp | 2 +- .../catch2/benchmark/detail/catch_measure.hpp | 2 +- .../catch2/benchmark/detail/catch_repeat.hpp | 2 +- .../detail/catch_run_for_at_least.cpp | 2 +- .../detail/catch_run_for_at_least.hpp | 2 +- .../catch2/benchmark/detail/catch_stats.cpp | 2 +- .../catch2/benchmark/detail/catch_stats.hpp | 2 +- .../catch2/benchmark/detail/catch_timing.hpp | 2 +- thirdParty/catch2/src/catch2/catch_all.hpp | 6 +- thirdParty/catch2/src/catch2/catch_approx.cpp | 2 +- thirdParty/catch2/src/catch2/catch_approx.hpp | 2 +- .../src/catch2/catch_assertion_info.hpp | 2 +- .../src/catch2/catch_assertion_result.cpp | 2 +- .../src/catch2/catch_assertion_result.hpp | 2 +- thirdParty/catch2/src/catch2/catch_config.cpp | 169 ++- thirdParty/catch2/src/catch2/catch_config.hpp | 5 +- .../src/catch2/catch_get_random_seed.cpp | 2 +- .../src/catch2/catch_get_random_seed.hpp | 2 +- .../catch2/src/catch2/catch_message.cpp | 2 +- .../catch2/src/catch2/catch_message.hpp | 4 +- .../catch2/src/catch2/catch_registry_hub.cpp | 2 +- .../catch2/src/catch2/catch_section_info.hpp | 2 +- .../catch2/src/catch2/catch_session.cpp | 2 +- .../catch2/src/catch2/catch_session.hpp | 2 +- .../catch2/src/catch2/catch_tag_alias.hpp | 2 +- .../catch2/catch_tag_alias_autoregistrar.cpp | 2 +- .../catch2/catch_tag_alias_autoregistrar.hpp | 2 +- .../src/catch2/catch_template_test_macros.hpp | 2 +- .../src/catch2/catch_test_case_info.cpp | 2 +- .../src/catch2/catch_test_case_info.hpp | 2 +- .../catch2/src/catch2/catch_test_macros.hpp | 2 +- .../catch2/src/catch2/catch_test_spec.cpp | 52 +- .../catch2/src/catch2/catch_test_spec.hpp | 35 +- thirdParty/catch2/src/catch2/catch_timer.cpp | 2 +- thirdParty/catch2/src/catch2/catch_timer.hpp | 2 +- .../catch2/src/catch2/catch_tostring.cpp | 2 +- .../catch2/src/catch2/catch_tostring.hpp | 2 +- thirdParty/catch2/src/catch2/catch_totals.cpp | 2 +- thirdParty/catch2/src/catch2/catch_totals.hpp | 2 +- .../src/catch2/catch_translate_exception.hpp | 2 +- .../src/catch2/catch_user_config.hpp.in | 12 +- .../catch2/src/catch2/catch_version.cpp | 4 +- .../catch2/src/catch2/catch_version.hpp | 2 +- .../src/catch2/catch_version_macros.hpp | 4 +- .../generators/catch_generator_exception.cpp | 2 +- .../generators/catch_generator_exception.hpp | 2 +- .../catch2/generators/catch_generators.cpp | 2 +- .../catch2/generators/catch_generators.hpp | 2 +- .../generators/catch_generators_adapters.hpp | 2 +- .../generators/catch_generators_all.hpp | 2 +- .../generators/catch_generators_random.cpp | 2 +- .../generators/catch_generators_random.hpp | 2 +- .../generators/catch_generators_range.hpp | 2 +- .../interfaces/catch_interfaces_all.hpp | 2 +- .../interfaces/catch_interfaces_capture.cpp | 2 +- .../interfaces/catch_interfaces_capture.hpp | 2 +- .../interfaces/catch_interfaces_config.cpp | 2 +- .../interfaces/catch_interfaces_config.hpp | 2 +- .../catch_interfaces_enum_values_registry.hpp | 2 +- .../interfaces/catch_interfaces_exception.cpp | 2 +- .../interfaces/catch_interfaces_exception.hpp | 2 +- .../catch_interfaces_generatortracker.cpp | 2 +- .../catch_interfaces_generatortracker.hpp | 2 +- .../catch_interfaces_registry_hub.cpp | 2 +- .../catch_interfaces_registry_hub.hpp | 2 +- .../interfaces/catch_interfaces_reporter.cpp | 2 +- .../interfaces/catch_interfaces_reporter.hpp | 2 +- .../catch_interfaces_reporter_factory.cpp | 2 +- .../catch_interfaces_reporter_factory.hpp | 2 +- .../catch_interfaces_reporter_registry.cpp | 2 +- .../catch_interfaces_reporter_registry.hpp | 2 +- .../catch_interfaces_tag_alias_registry.hpp | 2 +- .../interfaces/catch_interfaces_testcase.cpp | 2 +- .../interfaces/catch_interfaces_testcase.hpp | 2 +- .../internal/catch_assertion_handler.cpp | 12 +- .../internal/catch_assertion_handler.hpp | 4 +- .../catch_case_insensitive_comparisons.cpp | 2 +- .../catch_case_insensitive_comparisons.hpp | 2 +- .../catch2/internal/catch_case_sensitive.hpp | 2 +- .../src/catch2/internal/catch_clara.cpp | 2 +- .../src/catch2/internal/catch_clara.hpp | 2 +- .../src/catch2/internal/catch_commandline.cpp | 72 +- .../src/catch2/internal/catch_commandline.hpp | 2 +- .../catch2/internal/catch_compare_traits.hpp | 75 + .../internal/catch_compiler_capabilities.hpp | 39 +- .../catch_config_android_logwrite.hpp | 2 +- .../catch2/internal/catch_config_counter.hpp | 2 +- .../catch_config_uncaught_exceptions.hpp | 2 +- .../catch2/internal/catch_config_wchar.hpp | 2 +- .../catch2/internal/catch_console_colour.cpp | 2 +- .../catch2/internal/catch_console_colour.hpp | 2 +- .../catch2/internal/catch_console_width.hpp | 2 +- .../internal/catch_container_nonmembers.hpp | 2 +- .../src/catch2/internal/catch_context.cpp | 2 +- .../src/catch2/internal/catch_context.hpp | 2 +- .../catch2/internal/catch_debug_console.cpp | 2 +- .../catch2/internal/catch_debug_console.hpp | 2 +- .../src/catch2/internal/catch_debugger.cpp | 2 +- .../src/catch2/internal/catch_debugger.hpp | 2 +- .../src/catch2/internal/catch_decomposer.cpp | 2 +- .../src/catch2/internal/catch_decomposer.hpp | 186 ++- .../src/catch2/internal/catch_enforce.cpp | 2 +- .../src/catch2/internal/catch_enforce.hpp | 2 +- .../internal/catch_enum_values_registry.cpp | 2 +- .../internal/catch_enum_values_registry.hpp | 2 +- .../src/catch2/internal/catch_errno_guard.cpp | 2 +- .../src/catch2/internal/catch_errno_guard.hpp | 2 +- .../catch_exception_translator_registry.cpp | 2 +- .../catch_exception_translator_registry.hpp | 2 +- .../catch_fatal_condition_handler.cpp | 2 +- .../catch_fatal_condition_handler.hpp | 2 +- .../internal/catch_floating_point_helpers.cpp | 2 +- .../internal/catch_floating_point_helpers.hpp | 2 +- .../src/catch2/internal/catch_getenv.cpp | 37 + .../src/catch2/internal/catch_getenv.hpp | 20 + .../src/catch2/internal/catch_istream.cpp | 2 +- .../src/catch2/internal/catch_istream.hpp | 2 +- .../src/catch2/internal/catch_lazy_expr.cpp | 2 +- .../src/catch2/internal/catch_lazy_expr.hpp | 2 +- .../catch2/internal/catch_leak_detector.cpp | 2 +- .../catch2/internal/catch_leak_detector.hpp | 2 +- .../catch2/src/catch2/internal/catch_list.cpp | 2 +- .../catch2/src/catch2/internal/catch_list.hpp | 2 +- .../catch2/internal/catch_logical_traits.hpp | 44 + .../catch2/src/catch2/internal/catch_main.cpp | 2 +- .../catch2/internal/catch_message_info.cpp | 2 +- .../catch2/internal/catch_message_info.hpp | 2 +- .../catch2/src/catch2/internal/catch_meta.hpp | 7 +- .../internal/catch_move_and_forward.hpp | 2 +- .../src/catch2/internal/catch_noncopyable.hpp | 2 +- .../src/catch2/internal/catch_optional.hpp | 2 +- .../catch2/internal/catch_output_redirect.cpp | 2 +- .../catch2/internal/catch_output_redirect.hpp | 2 +- .../catch2/internal/catch_parse_numbers.cpp | 49 + .../catch2/internal/catch_parse_numbers.hpp | 26 + .../src/catch2/internal/catch_platform.hpp | 6 +- .../src/catch2/internal/catch_polyfills.cpp | 2 +- .../src/catch2/internal/catch_polyfills.hpp | 2 +- .../catch2/internal/catch_preprocessor.hpp | 2 +- .../catch_preprocessor_remove_parens.hpp | 2 +- .../catch_random_number_generator.cpp | 2 +- .../catch_random_number_generator.hpp | 2 +- .../internal/catch_random_seed_generation.cpp | 2 +- .../internal/catch_random_seed_generation.hpp | 2 +- .../internal/catch_reporter_registry.cpp | 2 +- .../internal/catch_reporter_registry.hpp | 2 +- .../internal/catch_reporter_spec_parser.cpp | 2 +- .../internal/catch_reporter_spec_parser.hpp | 2 +- .../src/catch2/internal/catch_result_type.cpp | 2 +- .../src/catch2/internal/catch_result_type.hpp | 2 +- .../internal/catch_reusable_string_stream.cpp | 2 +- .../internal/catch_reusable_string_stream.hpp | 2 +- .../src/catch2/internal/catch_run_context.cpp | 2 +- .../src/catch2/internal/catch_run_context.hpp | 2 +- .../src/catch2/internal/catch_section.cpp | 2 +- .../src/catch2/internal/catch_section.hpp | 2 +- .../src/catch2/internal/catch_sharding.hpp | 2 +- .../src/catch2/internal/catch_singletons.cpp | 2 +- .../src/catch2/internal/catch_singletons.hpp | 2 +- .../internal/catch_source_line_info.cpp | 2 +- .../internal/catch_source_line_info.hpp | 2 +- .../catch_startup_exception_registry.cpp | 2 +- .../catch_startup_exception_registry.hpp | 2 +- .../src/catch2/internal/catch_stdstreams.cpp | 2 +- .../src/catch2/internal/catch_stdstreams.hpp | 2 +- .../catch2/internal/catch_stream_end_stop.hpp | 2 +- .../catch2/internal/catch_string_manip.cpp | 2 +- .../catch2/internal/catch_string_manip.hpp | 2 +- .../src/catch2/internal/catch_stringref.cpp | 2 +- .../src/catch2/internal/catch_stringref.hpp | 2 +- .../internal/catch_tag_alias_registry.cpp | 2 +- .../internal/catch_tag_alias_registry.hpp | 2 +- .../internal/catch_template_test_registry.hpp | 6 +- .../internal/catch_test_case_info_hasher.cpp | 2 +- .../internal/catch_test_case_info_hasher.hpp | 2 +- .../catch_test_case_registry_impl.cpp | 4 +- .../catch_test_case_registry_impl.hpp | 2 +- .../internal/catch_test_case_tracker.cpp | 2 +- .../internal/catch_test_case_tracker.hpp | 2 +- .../internal/catch_test_failure_exception.cpp | 23 + .../internal/catch_test_failure_exception.hpp | 9 +- .../catch2/internal/catch_test_macro_impl.hpp | 4 +- .../catch2/internal/catch_test_registry.cpp | 2 +- .../catch2/internal/catch_test_registry.hpp | 2 +- .../internal/catch_test_spec_parser.cpp | 6 +- .../internal/catch_test_spec_parser.hpp | 3 +- .../src/catch2/internal/catch_textflow.cpp | 2 +- .../src/catch2/internal/catch_textflow.hpp | 2 +- .../src/catch2/internal/catch_to_string.hpp | 2 +- .../internal/catch_uncaught_exceptions.cpp | 2 +- .../internal/catch_uncaught_exceptions.hpp | 2 +- .../src/catch2/internal/catch_unique_name.hpp | 2 +- .../src/catch2/internal/catch_unique_ptr.hpp | 2 +- .../src/catch2/internal/catch_void_type.hpp | 2 +- .../internal/catch_wildcard_pattern.cpp | 2 +- .../internal/catch_wildcard_pattern.hpp | 2 +- .../catch2/internal/catch_windows_h_proxy.hpp | 2 +- .../src/catch2/internal/catch_xmlwriter.cpp | 2 +- .../src/catch2/internal/catch_xmlwriter.hpp | 2 +- .../src/catch2/matchers/catch_matchers.cpp | 2 +- .../src/catch2/matchers/catch_matchers.hpp | 2 +- .../catch2/matchers/catch_matchers_all.hpp | 2 +- .../catch_matchers_container_properties.cpp | 2 +- .../catch_matchers_container_properties.hpp | 2 +- .../matchers/catch_matchers_contains.hpp | 2 +- .../matchers/catch_matchers_exception.cpp | 2 +- .../matchers/catch_matchers_exception.hpp | 2 +- .../catch_matchers_floating_point.cpp | 2 +- .../catch_matchers_floating_point.hpp | 2 +- .../matchers/catch_matchers_predicate.cpp | 2 +- .../matchers/catch_matchers_predicate.hpp | 2 +- .../matchers/catch_matchers_quantifiers.cpp | 2 +- .../matchers/catch_matchers_quantifiers.hpp | 2 +- .../catch2/matchers/catch_matchers_string.cpp | 2 +- .../catch2/matchers/catch_matchers_string.hpp | 2 +- .../matchers/catch_matchers_templated.cpp | 2 +- .../matchers/catch_matchers_templated.hpp | 21 +- .../catch2/matchers/catch_matchers_vector.hpp | 2 +- .../matchers/internal/catch_matchers_impl.cpp | 6 +- .../matchers/internal/catch_matchers_impl.hpp | 19 +- thirdParty/catch2/src/catch2/meson.build | 9 +- .../reporters/catch_reporter_automake.cpp | 2 +- .../reporters/catch_reporter_automake.hpp | 2 +- .../reporters/catch_reporter_common_base.cpp | 2 +- .../reporters/catch_reporter_common_base.hpp | 2 +- .../reporters/catch_reporter_compact.cpp | 58 +- .../reporters/catch_reporter_compact.hpp | 2 +- .../reporters/catch_reporter_console.cpp | 85 +- .../reporters/catch_reporter_console.hpp | 8 +- .../catch_reporter_cumulative_base.cpp | 2 +- .../catch_reporter_cumulative_base.hpp | 2 +- .../catch_reporter_event_listener.cpp | 2 +- .../catch_reporter_event_listener.hpp | 2 +- .../reporters/catch_reporter_helpers.cpp | 100 +- .../reporters/catch_reporter_helpers.hpp | 12 +- .../catch2/reporters/catch_reporter_junit.cpp | 9 +- .../catch2/reporters/catch_reporter_junit.hpp | 2 +- .../catch2/reporters/catch_reporter_multi.cpp | 2 +- .../catch2/reporters/catch_reporter_multi.hpp | 2 +- .../reporters/catch_reporter_registrars.cpp | 2 +- .../reporters/catch_reporter_registrars.hpp | 2 +- .../reporters/catch_reporter_sonarqube.cpp | 15 +- .../reporters/catch_reporter_sonarqube.hpp | 2 +- .../catch_reporter_streaming_base.cpp | 2 +- .../catch_reporter_streaming_base.hpp | 2 +- .../catch2/reporters/catch_reporter_tap.cpp | 7 +- .../catch2/reporters/catch_reporter_tap.hpp | 2 +- .../reporters/catch_reporter_teamcity.cpp | 2 +- .../reporters/catch_reporter_teamcity.hpp | 2 +- .../catch2/reporters/catch_reporter_xml.cpp | 8 +- .../catch2/reporters/catch_reporter_xml.hpp | 2 +- .../catch2/reporters/catch_reporters_all.hpp | 2 +- thirdParty/catch2/tests/CMakeLists.txt | 59 +- .../catch2/tests/ExtraTests/CMakeLists.txt | 39 +- .../tests/ExtraTests/X01-PrefixedMacros.cpp | 2 +- .../tests/ExtraTests/X02-DisabledMacros.cpp | 2 +- .../X03-DisabledExceptions-DefaultHandler.cpp | 2 +- .../X04-DisabledExceptions-CustomHandler.cpp | 2 +- .../ExtraTests/X05-DeferredStaticChecks.cpp | 2 +- .../ExtraTests/X10-FallbackStringifier.cpp | 2 +- .../ExtraTests/X11-DisableStringification.cpp | 2 +- .../ExtraTests/X12-CustomDebugBreakMacro.cpp | 2 +- .../ExtraTests/X21-PartialTestCaseEvents.cpp | 2 +- .../X22-BenchmarksInCumulativeReporter.cpp | 2 +- .../ExtraTests/X23-CasingInReporterNames.cpp | 2 +- ...4-ListenerStdoutCaptureInMultireporter.cpp | 2 +- .../X25-ListenerCanAskForCapturedStdout.cpp | 2 +- ...erencesForPassingAssertionsIsRespected.cpp | 2 +- .../X27-CapturedStdoutInTestCaseEvents.cpp | 2 +- .../X28-ListenersGetEventsBeforeReporters.cpp | 2 +- .../X29-CustomArgumentsForReporters.cpp | 2 +- .../tests/ExtraTests/X30-BazelReporter.cpp | 2 +- .../ExtraTests/X31-DuplicatedTestCases.cpp | 2 +- .../X32-DuplicatedTestCasesDifferentTags.cpp | 2 +- .../X33-DuplicatedTestCaseMethods.cpp | 2 +- ...icatedTestCaseMethodsDifferentFixtures.cpp | 2 +- .../X35-DuplicatedReporterNames.cpp | 2 +- .../ExtraTests/X90-WindowsHeaderInclusion.cpp | 2 +- .../tests/ExtraTests/X91-AmalgamatedCatch.cpp | 2 +- .../catch2/tests/ExtraTests/X92-NoTests.cpp | 2 +- .../Baselines/automake.sw.approved.txt | 2 +- .../Baselines/automake.sw.multi.approved.txt | 2 +- .../Baselines/compact.sw.approved.txt | 188 +-- .../Baselines/compact.sw.multi.approved.txt | 188 +-- .../Baselines/console.std.approved.txt | 4 +- .../Baselines/console.sw.approved.txt | 1050 +------------ .../Baselines/console.sw.multi.approved.txt | 1050 +------------ .../Baselines/console.swa4.approved.txt | 22 +- .../SelfTest/Baselines/junit.sw.approved.txt | 41 +- .../Baselines/junit.sw.multi.approved.txt | 41 +- .../Baselines/sonarqube.sw.approved.txt | 49 +- .../Baselines/sonarqube.sw.multi.approved.txt | 49 +- .../SelfTest/Baselines/tap.sw.approved.txt | 333 +---- .../Baselines/tap.sw.multi.approved.txt | 333 +---- .../Baselines/teamcity.sw.approved.txt | 4 +- .../Baselines/teamcity.sw.multi.approved.txt | 4 +- .../SelfTest/Baselines/xml.sw.approved.txt | 1331 +---------------- .../Baselines/xml.sw.multi.approved.txt | 1331 +---------------- .../IntrospectiveTests/Clara.tests.cpp | 2 +- .../IntrospectiveTests/CmdLine.tests.cpp | 348 +---- .../CmdLineHelpers.tests.cpp | 2 +- .../IntrospectiveTests/ColourImpl.tests.cpp | 2 +- .../IntrospectiveTests/Details.tests.cpp | 45 +- .../FloatingPoint.tests.cpp | 2 +- .../GeneratorsImpl.tests.cpp | 2 +- .../InternalBenchmark.tests.cpp | 2 +- .../IntrospectiveTests/Parse.tests.cpp | 38 + .../IntrospectiveTests/PartTracker.tests.cpp | 2 +- .../RandomNumberGeneration.tests.cpp | 2 +- .../IntrospectiveTests/Reporters.tests.cpp | 2 +- .../IntrospectiveTests/Sharding.tests.cpp | 2 +- .../IntrospectiveTests/Stream.tests.cpp | 2 +- .../IntrospectiveTests/String.tests.cpp | 2 +- .../IntrospectiveTests/StringManip.tests.cpp | 2 +- .../SelfTest/IntrospectiveTests/Tag.tests.cpp | 2 +- .../TestCaseInfoHasher.tests.cpp | 2 +- .../IntrospectiveTests/TestSpec.tests.cpp | 365 +++++ .../TestSpecParser.tests.cpp | 2 +- .../IntrospectiveTests/TextFlow.tests.cpp | 2 +- .../IntrospectiveTests/ToString.tests.cpp | 2 +- .../IntrospectiveTests/Traits.tests.cpp | 45 + .../IntrospectiveTests/UniquePtr.tests.cpp | 2 +- .../SelfTest/IntrospectiveTests/Xml.tests.cpp | 2 +- .../tests/SelfTest/TestRegistrations.cpp | 2 +- .../SelfTest/TimingTests/Sleep.tests.cpp | 2 +- .../SelfTest/UsageTests/Approx.tests.cpp | 2 +- .../tests/SelfTest/UsageTests/BDD.tests.cpp | 2 +- .../SelfTest/UsageTests/Benchmark.tests.cpp | 14 +- .../tests/SelfTest/UsageTests/Class.tests.cpp | 2 +- .../SelfTest/UsageTests/Compilation.tests.cpp | 45 +- .../SelfTest/UsageTests/Condition.tests.cpp | 2 +- .../UsageTests/Decomposition.tests.cpp | 8 +- .../UsageTests/EnumToString.tests.cpp | 2 +- .../SelfTest/UsageTests/Exception.tests.cpp | 2 +- .../SelfTest/UsageTests/Generators.tests.cpp | 2 +- .../SelfTest/UsageTests/Matchers.tests.cpp | 2 +- .../UsageTests/MatchersRanges.tests.cpp | 2 +- .../SelfTest/UsageTests/Message.tests.cpp | 2 +- .../tests/SelfTest/UsageTests/Misc.tests.cpp | 2 +- .../UsageTests/ToStringByte.tests.cpp | 2 +- .../UsageTests/ToStringChrono.tests.cpp | 2 +- .../UsageTests/ToStringGeneral.tests.cpp | 2 +- .../UsageTests/ToStringOptional.tests.cpp | 2 +- .../UsageTests/ToStringPair.tests.cpp | 2 +- .../UsageTests/ToStringTuple.tests.cpp | 2 +- .../UsageTests/ToStringVariant.tests.cpp | 2 +- .../UsageTests/ToStringVector.tests.cpp | 2 +- .../UsageTests/ToStringWhich.tests.cpp | 2 +- .../SelfTest/UsageTests/Tricky.tests.cpp | 2 +- .../UsageTests/VariadicMacros.tests.cpp | 2 +- .../SelfTest/helpers/parse_test_spec.cpp | 22 + .../SelfTest/helpers/parse_test_spec.hpp | 20 + .../helpers/type_with_lit_0_comparisons.hpp | 44 + .../tests/TestScripts/ConfigureTestsCommon.py | 2 +- .../tests/TestScripts/testBazelReporter.py | 6 +- .../tests/TestScripts/testBazelSharding.py | 75 + .../testConfigureDefaultReporter.py | 13 +- .../tests/TestScripts/testConfigureDisable.py | 2 +- .../testConfigureDisableStringification.py | 2 +- .../testConfigureExperimentalRedirect.py | 2 +- .../TestScripts/testPartialTestCaseEvent.py | 2 +- .../tests/TestScripts/testRandomOrder.py | 2 +- .../catch2/tests/TestScripts/testSharding.py | 2 +- thirdParty/catch2/tests/meson.build | 8 +- .../tools/misc/appveyorMergeCoverageScript.py | 2 +- .../catch2/tools/scripts/approvalTests.py | 83 +- thirdParty/catch2/tools/scripts/approve.py | 2 - .../catch2/tools/scripts/checkLicense.py | 2 +- .../catch2/tools/scripts/developBuild.py | 3 +- .../extractFeaturesFromReleaseNotes.py | 2 - .../catch2/tools/scripts/fixWhitespace.py | 1 - .../tools/scripts/generateAmalgamatedFiles.py | 4 +- .../catch2/tools/scripts/majorRelease.py | 3 +- .../catch2/tools/scripts/minorRelease.py | 3 +- .../catch2/tools/scripts/patchRelease.py | 3 +- .../catch2/tools/scripts/releaseCommon.py | 4 - .../catch2/tools/scripts/scriptCommon.py | 27 - .../catch2/tools/scripts/updateDocumentToC.py | 2 - 421 files changed, 3790 insertions(+), 7480 deletions(-) create mode 100644 thirdParty/catch2/.github/workflows/linux-bazel-builds.yml create mode 100644 thirdParty/catch2/data/artwork/catch2-logo-small-with-background.png create mode 100644 thirdParty/catch2/src/catch2/internal/catch_compare_traits.hpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_getenv.cpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_getenv.hpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_logical_traits.hpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_parse_numbers.cpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_parse_numbers.hpp create mode 100644 thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.cpp create mode 100644 thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp create mode 100644 thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp create mode 100644 thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp create mode 100644 thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.cpp create mode 100644 thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.hpp create mode 100644 thirdParty/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp create mode 100755 thirdParty/catch2/tests/TestScripts/testBazelSharding.py diff --git a/thirdParty/CMakeLists.txt b/thirdParty/CMakeLists.txt index a00f930b4a93..d882940ea7ae 100644 --- a/thirdParty/CMakeLists.txt +++ b/thirdParty/CMakeLists.txt @@ -10,7 +10,7 @@ if(BUILD_TESTING) if(alpaka_USE_INTERNAL_CATCH2) - message(STATUS "Catch2: Using INTERNAL version 3.1.1") + message(STATUS "Catch2: Using INTERNAL version 3.2.1") # Force Catch2's CMake to pick up the variables we set below set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) @@ -27,7 +27,7 @@ if(BUILD_TESTING) add_compile_definitions($<$:__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1>) add_subdirectory(catch2) else() - find_package(Catch2 3.1.1 CONFIG REQUIRED) + find_package(Catch2 3.2.1 CONFIG REQUIRED) message(STATUS "Catch2: Found version ${Catch2_VERSION}") endif() -endif() \ No newline at end of file +endif() diff --git a/thirdParty/catch2/.clang-format b/thirdParty/catch2/.clang-format index 2a82aacfdcf0..f67a5862e40c 100644 --- a/thirdParty/catch2/.clang-format +++ b/thirdParty/catch2/.clang-format @@ -1,4 +1,26 @@ --- +Language: Cpp +Standard: c++14 + +# Note that we cannot use IncludeIsMainRegex functionality, because it +# does not support includes in angle brackets (<>) +SortIncludes: True +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '' + Priority: 1 + - Regex: '<.*/.*\.hpp>' + Priority: 2 + - Regex: '<.*>' + Priority: 3 + + +AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLambdasOnASingleLine: Inline + AccessModifierOffset: '-4' AlignEscapedNewlines: Left AllowAllConstructorInitializersOnNextLine: 'true' @@ -8,17 +30,14 @@ BreakConstructorInitializers: AfterColon ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' DerivePointerAlignment: 'false' FixNamespaceComments: 'true' -IncludeBlocks: Regroup IndentCaseLabels: 'false' IndentPPDirectives: AfterHash IndentWidth: '4' -Language: Cpp NamespaceIndentation: All PointerAlignment: Left SpaceBeforeCtorInitializerColon: 'false' SpaceInEmptyParentheses: 'false' SpacesInParentheses: 'true' -Standard: Cpp11 TabWidth: '4' UseTab: Never diff --git a/thirdParty/catch2/.github/workflows/linux-bazel-builds.yml b/thirdParty/catch2/.github/workflows/linux-bazel-builds.yml new file mode 100644 index 000000000000..9006652e2c28 --- /dev/null +++ b/thirdParty/catch2/.github/workflows/linux-bazel-builds.yml @@ -0,0 +1,24 @@ +name: Bazel build + +on: [push, pull_request] + +jobs: + build_and_test_ubuntu: + name: Linux Ubuntu 22.04 Bazel build + runs-on: ubuntu-22.04 + strategy: + matrix: + compilation_mode: [fastbuild, dbg, opt] + + steps: + - uses: actions/checkout@v3 + + - name: Mount bazel cache + uses: actions/cache@v3 + with: + path: "/home/runner/.cache/bazel" + key: bazel-ubuntu22-gcc11 + + - name: Build Catch2 + run: | + bazelisk build --compilation_mode=${{matrix.compilation_mode}} //... diff --git a/thirdParty/catch2/.github/workflows/linux-meson-builds.yml b/thirdParty/catch2/.github/workflows/linux-meson-builds.yml index 9d9ef77354e5..dec701b61b22 100644 --- a/thirdParty/catch2/.github/workflows/linux-meson-builds.yml +++ b/thirdParty/catch2/.github/workflows/linux-meson-builds.yml @@ -1,4 +1,4 @@ -name: Linux builds (basic) using meson build system +name: Linux builds (meson) on: [push, pull_request] diff --git a/thirdParty/catch2/.github/workflows/linux-other-builds.yml b/thirdParty/catch2/.github/workflows/linux-other-builds.yml index 31dcb92195bd..cf4e2c06b755 100644 --- a/thirdParty/catch2/.github/workflows/linux-other-builds.yml +++ b/thirdParty/catch2/.github/workflows/linux-other-builds.yml @@ -86,6 +86,7 @@ jobs: cmake -Bbuild -H$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ -DCMAKE_CXX_EXTENSIONS=OFF \ -DCATCH_DEVELOPMENT_BUILD=ON \ ${{matrix.cmake_configurations}} \ diff --git a/thirdParty/catch2/.github/workflows/linux-simple-builds.yml b/thirdParty/catch2/.github/workflows/linux-simple-builds.yml index 5017e8fa1fda..989c4942e221 100644 --- a/thirdParty/catch2/.github/workflows/linux-simple-builds.yml +++ b/thirdParty/catch2/.github/workflows/linux-simple-builds.yml @@ -65,6 +65,22 @@ jobs: build_type: Release std: 17 other_pkgs: clang-10 + - cxx: clang++-10 + build_type: Debug + std: 20 + other_pkgs: clang-10 + - cxx: clang++-10 + build_type: Release + std: 20 + other_pkgs: clang-10 + - cxx: g++-10 + build_type: Debug + std: 20 + other_pkgs: g++-10 + - cxx: g++-10 + build_type: Release + std: 20 + other_pkgs: g++-10 steps: - uses: actions/checkout@v2 @@ -89,6 +105,7 @@ jobs: cmake -Bbuild -H$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ -DCMAKE_CXX_EXTENSIONS=OFF \ -DCATCH_DEVELOPMENT_BUILD=ON \ -G Ninja diff --git a/thirdParty/catch2/.github/workflows/mac-builds.yml b/thirdParty/catch2/.github/workflows/mac-builds.yml index 39908f432f4e..955b81fcc6ea 100644 --- a/thirdParty/catch2/.github/workflows/mac-builds.yml +++ b/thirdParty/catch2/.github/workflows/mac-builds.yml @@ -33,8 +33,11 @@ jobs: # This is important run: | cmake -Bbuild -H$GITHUB_WORKSPACE \ - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} \ - -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -DCMAKE_CXX_STANDARD=${{matrix.std}} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCATCH_DEVELOPMENT_BUILD=ON \ + -DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ -DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}} - name: Build tests + lib diff --git a/thirdParty/catch2/BUILD.bazel b/thirdParty/catch2/BUILD.bazel index 5c112ed71823..3125e7c54070 100644 --- a/thirdParty/catch2/BUILD.bazel +++ b/thirdParty/catch2/BUILD.bazel @@ -28,6 +28,7 @@ expand_template( "#cmakedefine CATCH_CONFIG_EXPERIMENTAL_REDIRECT": "", "#cmakedefine CATCH_CONFIG_FALLBACK_STRINGIFIER @CATCH_CONFIG_FALLBACK_STRINGIFIER@": "", "#cmakedefine CATCH_CONFIG_FAST_COMPILE": "", + "#cmakedefine CATCH_CONFIG_GETENV": "", "#cmakedefine CATCH_CONFIG_GLOBAL_NEXTAFTER": "", "#cmakedefine CATCH_CONFIG_NO_ANDROID_LOGWRITE": "", "#cmakedefine CATCH_CONFIG_NO_COLOUR_WIN32": "", @@ -38,6 +39,7 @@ expand_template( "#cmakedefine CATCH_CONFIG_NO_CPP17_STRING_VIEW": "", "#cmakedefine CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS": "", "#cmakedefine CATCH_CONFIG_NO_CPP17_VARIANT": "", + "#cmakedefine CATCH_CONFIG_NO_GETENV": "", "#cmakedefine CATCH_CONFIG_NO_GLOBAL_NEXTAFTER": "", "#cmakedefine CATCH_CONFIG_NO_POSIX_SIGNALS": "", "#cmakedefine CATCH_CONFIG_NO_USE_ASYNC": "", diff --git a/thirdParty/catch2/CMake/CatchConfigOptions.cmake b/thirdParty/catch2/CMake/CatchConfigOptions.cmake index f8114a04a12e..733ec65e2c34 100644 --- a/thirdParty/catch2/CMake/CatchConfigOptions.cmake +++ b/thirdParty/catch2/CMake/CatchConfigOptions.cmake @@ -1,7 +1,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -40,6 +40,7 @@ set(_OverridableOptions "USE_ASYNC" "WCHAR" "WINDOWS_SEH" + "GETENV" ) foreach(OptionName ${_OverridableOptions}) diff --git a/thirdParty/catch2/CMake/CatchMiscFunctions.cmake b/thirdParty/catch2/CMake/CatchMiscFunctions.cmake index be76d8380198..3758d9568f23 100644 --- a/thirdParty/catch2/CMake/CatchMiscFunctions.cmake +++ b/thirdParty/catch2/CMake/CatchMiscFunctions.cmake @@ -1,7 +1,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -13,7 +13,7 @@ function(add_cxx_flag_if_supported_to_targets flagname targets) if (HAVE_FLAG_${flag_identifier}) foreach(target ${targets}) - target_compile_options(${target} PUBLIC ${flagname}) + target_compile_options(${target} PRIVATE ${flagname}) endforeach() endif() endfunction() diff --git a/thirdParty/catch2/CMakeLists.txt b/thirdParty/catch2/CMakeLists.txt index c42a3e2a1964..d5a6b67af79a 100644 --- a/thirdParty/catch2/CMakeLists.txt +++ b/thirdParty/catch2/CMakeLists.txt @@ -31,7 +31,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif() project(Catch2 - VERSION 3.1.1 # CML version placeholder, don't delete + VERSION 3.2.1 # CML version placeholder, don't delete LANGUAGES CXX # HOMEPAGE_URL is not supported until CMake version 3.12, which # we do not target yet. diff --git a/thirdParty/catch2/README.md b/thirdParty/catch2/README.md index 83fdf7b31a13..4bc5b86dd059 100644 --- a/thirdParty/catch2/README.md +++ b/thirdParty/catch2/README.md @@ -1,5 +1,5 @@ -![Catch2 logo](data/artwork/catch2-logo-small.png) +![Catch2 logo](data/artwork/catch2-logo-small-with-background.png) [![Github Releases](https://img.shields.io/github/release/catchorg/catch2.svg)](https://github.com/catchorg/catch2/releases) [![Linux build status](https://github.com/catchorg/Catch2/actions/workflows/linux-simple-builds.yml/badge.svg)](https://github.com/catchorg/Catch2/actions/workflows/linux-simple-builds.yml) @@ -11,31 +11,78 @@ [![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD) -## What's the Catch2? +## What is Catch2? Catch2 is mainly a unit testing framework for C++, but it also provides basic micro-benchmarking features, and simple BDD macros. Catch2's main advantage is that using it is both simple and natural. -Tests autoregister themselves and do not have to be named with valid -identifiers, assertions look like normal C++ code, and sections provide -a nice way to share set-up and tear-down code in tests. +Test names do not have to be valid identifiers, assertions look like +normal C++ boolean expressions, and sections provide a nice and local way +to share set-up and tear-down code in tests. +**Example unit test** +```cpp +#include -## Catch2 v3 is being developed! +#include -You are on the `devel` branch, where the next major version, v3, of -Catch2 is being developed. As it is a significant rework, you will -find that parts of this documentation are likely still stuck on v2. +uint32_t factorial( uint32_t number ) { + return number <= 1 ? number : factorial(number-1) * number; +} -For stable (and documentation-matching) version of Catch2, [go to the -`v2.x` branch](https://github.com/catchorg/Catch2/tree/v2.x). +TEST_CASE( "Factorials are computed", "[factorial]" ) { + REQUIRE( factorial( 1) == 1 ); + REQUIRE( factorial( 2) == 2 ); + REQUIRE( factorial( 3) == 6 ); + REQUIRE( factorial(10) == 3'628'800 ); +} +``` + +**Example microbenchmark** +```cpp +#include +#include + +#include + +uint64_t fibonacci(uint64_t number) { + return number < 2 ? 1 : fibonacci(number - 1) + fibonacci(number - 2); +} + +TEST_CASE("Benchmark Fibonacci", "[!benchmark]") { + REQUIRE(Fibonacci(5) == 5); + + REQUIRE(Fibonacci(20) == 6'765); + BENCHMARK("Fibonacci 20") { + return Fibonacci(20); + }; + + REQUIRE(Fibonacci(25) == 75'025); + BENCHMARK("Fibonacci 25") { + return Fibonacci(25); + }; +} +``` + +## Catch2 v3 has been released! + +You are on the `devel` branch, where the v3 version is being developed. +v3 brings a bunch of significant changes, the big one being that Catch2 +is no longer a single-header library. Catch2 now behaves as a normal +library, with multiple headers and separately compiled implementation. + +The documentation is slowly being updated to take these changes into +account, but this work is currently still ongoing. For migrating from the v2 releases to v3, you should look at [our documentation](docs/migrate-v2-to-v3.md#top). It provides a simple guidelines on getting started, and collects most common migration problems. +For the previous major version of Catch2 [look into the `v2.x` branch +here on GitHub](https://github.com/catchorg/Catch2/tree/v2.x). + ## How to use it This documentation comprises these three parts: diff --git a/thirdParty/catch2/data/artwork/catch2-logo-small-with-background.png b/thirdParty/catch2/data/artwork/catch2-logo-small-with-background.png new file mode 100644 index 0000000000000000000000000000000000000000..963eaf492dcebd18a7fc1c9209f6e93c09d6ef18 GIT binary patch literal 25330 zcmXVXbwFFc`}Ky)aCZtV?hJPw?(WVQMTYBOxQ`o%r#O(ucS2 zr)6TwP!v%0h*4!wNwl@`wZW*CuZlamSz}n(u!>j)$s*XA^ea5@y02;inpU3bju#r| z*B4SN=h(O(j03+vbR8dsJXOE+gwnt5A;0i_S7n=I_JgG5);pxMoe3k19z*sGlE-MW z^HQ>N;AiKhpO)Np4F6pYBg1r3koKWz#m%%4_PSi~Wn^by{qH(`P;|oE6nrWqn{bD^ z86_QgEfg7il)@za727n+?fi3R8VwbgSI;0fIasO+LfiabVK}Y+)k}`I1g9CU` z4E%o&AH*C{mXKC7Q;v)IUoAZ)8soKayMYo^V|fKcVSE)P#?Fc_F=hWNje{|w%)rN$)w&sp!?&p8t#XK@HFe9qfVk-T>gQ}6T7q(1n;$8)pi^WOy;$snV*@*o-+{Fw>{{R_Y!9s^wmQ)Ails|CyK?#Es3 zy*1wr0Zpl=hSt3-=kXEdeDD{MJ@WpfpMEqUk7s*zV_f{IX&k%{*Z;;oRTq%y<45Ef zD0q<{0leXLG=eOQA@{TS<4rCrX@HCk}pooeaPND%xdozMRdNl@ba*>A!r+gCC&@{IV;U-G2R zQ}Q2yy0jMlyQyl*EXXhitq2w}8F?nnyd3Yx0gSNzlzPXhyow*Y-w=IbVAN5)zb%xw zK1gJLlCckeMhuQsiF!8auj$dKkn<5{$6W|t2V)t7pM+L8%Y<|fA~ZV=@+i2DIWyTw zga#`9*9L&p)K>CkJVVGr$YG+QH$FtN?wSe7BKP;D{IWz#DRr=wDr)xI3uo7st*Elk z@4=6Ld}$oU(B!Z=JCtrLmFXxPs__Y-4QhJ>&F1(z^0P+)Vf+8y*zq6V5GX;+@R#O9 z3eRHRm$%b*0o?cVrGy$ZV}kgEqTs5Q?YM&3;Oy$(NmAD^swmaX)d^%O>F^Kq+V3 z_+e<-mYlq&3Zf<;RH0~i+%6@LIiRyHSnu$^fO;?N*x4;qnJ;YwUN1Sm1DSCx#F4Pq zrTxyz9FkWGWF%+h?OwB+OkI0ARx(4A?V;u z5Lcp?XO1I+qa-9k2mb?d2wpf6ruDZXzL_95QZBQMjtiv$ zd3<@LAa{B}z*bSPu=w2P+3nX=@}!t9WttLKFp+-^vqh;O4T&qgi`(Bxj?c*%b|@(< z6wLS>D)PMTQL<*hc0TjWz>6PJ&$VRpECfU{5pYcmOy^@6GU&%6^>8d~{(&Y})_7PM za_JzlSpX>}^96H$5Z?+pIs?vZ`)MC`z1~~~n#OWEK%CvM>TSBYk8#tIVQNglver-- z$`?8*$s>=7?KxXS%lLr9s3e!+Vg7iuiJC-vpX*51?vrotkG`r1>j#8tE0J;-;U_{M z&!Z&|^QLYJ&Ys0@2Byx=$GEdU{vNW=4%Q#RKuH`hF@c=4?&tmGm&0;~sv_1x1PX8T z?~mo3Xs|h~F3ne(#J~o^m6TI4lsO_JpqT%<5VKD3zcmM@E_9PPt?juHe4~*6gMag< z(*WFdykBU|E5*18Y)rcJ;yvqB_zqyh@LuA?*AnyWjOLW{rPDMfOG(*Hswcw)6DM9q zNefvE={@_GU&munxJ$i49>=Zw29pC=1idYzz};Hg9}Z{+!@5bS?-3zJKu7?UdAx$$ z)#dua$4u7sLH2^6{?fI-X*eU5UG z0T2J0`4uYOjqx)uIW6F-o&69nql_uL>M*(8qq@Mc&l-ZNll|p}x)2H-wpS}FALa_? z%;g6jw}OAa=>*7myzfRttmap6AB5T@h|X{G^C;}YZ7aZLCtq6rbf3rENM3#bNPo9E z$~@}o){;i^bn_#&G6ph7U^%O;I}lGu_N1($hAQfU!PY+|?eIg|il06FuSLLNG0QGy zLM1vL?b~k#-}%zbJd_VPyAtK?E)RZ&FfvGhjS^+lG=A@_DBEk7IWs>GCq6TR^!;MADGaJDa__ihT_-b)9VfC*17yx0e1BQ_ zR)>k;b5J2#vZ88&%*_WE1&WSt^i_;ayXszY!``^(3e#74|vd6uVVm4-A zk$H2v(&S=VvJ7in^0d5_)b7+OK3zEVzdqS;LtyXk1Zth_?d^PCWTN4r>fZ|&f$Z{n z_Z2y_@VFg2;Pu?10gA$od<0zYZ((*xjEaZweM{oAsu$6{3ak9~R?;yTRd5FI+rct8)5apj%1-I^x%8aHB816V9WnUV~3!uf>`TT(W`t$7> zMa#Zvv#S7i$EmEKk^2l>*F(H!irsV0(>>$ePOkUe43dtb9 zYl`4*)tJ$pkre(^Z12d*bm)k(CSeMxot>eA;M?SsECQ$*z+R%F-tFJ-BCHXj3*BJ& zGXP{SH7wpzhO=N9(s{Et$rR&@^2-VV9om8)ELwset}}no26C9RfyMGMvM(briRvb# zyvryyh(hR!NnrRT6xBwx3>VX8?!BnSd#dAsp>cIyhcg^`-8&-#64s%dd?Uq&I~VK@IvH!3+@ ze%0vv>QjxfL7Dt)b3_dpCT5qYEZ2ohIW@jtet)wms;n&bF@h!+i9dov{it~A^Fp5Qv?nV4skpf>=gM{K&(&1CL%X8`ho|Dh z6qx67eb+O+<%&6Uz4@*rUmh=%M~u0_P!g`6N&@8~0PF9eK~_y}SCfcLVCiRc4w{wz zcU_Ay=a+v{Iyy~B5$G_WHtdyU66!O-P9OR18x?7o^MA0E8fEj1fl)DGSc4k&PA8X( zG8W^Uor0HK<4#;ZesEt_WVzl^Q~$$!>XpP?r99&=cvJ)mDD|phr5C#OwQMn!+VX6@ zYTGWtd4t(r{HSvc*X+7~JbWDa57iem03hD>#}^uH49t84=;azy2PedKfp7g3FofE7 z(@e*g8=X_i8NdgRL9jM0`CG|b5#@sK3E?%yI-)c;fgt4ZqTcS4dr$?WeVS=o$Y3iqz>yjAuUffQ|bb+rtC)1FJYA@ZABox$FgfbS9Q%o3u!f_d@ zkMCun5AP5h%VrY6GB-aF@QJ+7d|EsCl%7hj<2AjrOVQ?lq5t(cUZ@0%mcURadI4?Q zC}pB*(9pvbeb)GS1(=uVWdlQd_m9-o&!}6fe`8z zB}Gi+k@9w6N&fo^Rw^TN>o`+9#mSwZdKvD=lcM&5SZF97m{+-f_L`Z0t)Er@1!DpQ~ZQB2gwO(eT-|xkX<39uc=$qR{Y0 zD6UMpZ$?$$T&{3*QsoJHJX(=}g=MgDVom1jpP_Q~$A3Ns<^X790J@Z@d$v#fkpH3_#gxD3NZs zIK|vz;7R8~DaDTt*`cSH&#bM(X5mVFq zpGBK^e4|J%E#1#o)#2bgeCAQ9TXP%7gq=?W<6Za#7OX$r>5TshN1pL-^=I-sYNR=s z#_K5+YV5!pn*NDGlc~$7?c`d0K<66om_bcTjCWV-RTXQ;c|cHcstdVp$PXG{KZUw_ zncBmsYy6tRlsA8}Q=#c3Rxb$lmcXSdtLRsFc;hJgQAy5~!u+i`)osFi)e=SZ_$@@z zRliCs+K5Xl&SEbgqo4t8bh*)?5;6}j>#aJGIPq)nKCg~m?O=S&i>M#q$eUe1Pk|XX z6~a#u#51tCKqsn)SfN=(=_-m03B9HIN2IPq2pXJq{#B0y-#G#!9d1yNUDk*pibzNl zI|K3&5*w&X0&ggQ%srbszc zz?i0v!&215QZq*%Qxt#=UYIS=6YU)_my&RLv*Svl~((qTvt03 zLS2_jgTs=_IvlDOL{65H8)hzn``Cre-NEyo6f-{_C{wa}UnT@@8DQhbj@C#w%4Qq* zLY5vFnx&=BH=`zvNaVyluYMUi7K8YV|CcPj{%jN*dWn9U=kIm~-a_8acdq=@+Te2I z#qL|W6{t{kI9rPDWF)+^te^67G0zze-|P9@JHLT7xN$?x`d4E?ZS=hB1yl=I~kC&h^ijQ*T zX^0ogo~#_dewLB}9Tm(u4MzX>5$hdgguGrPq=vVCSQci(S!P!ZxgIT=c*2%=Rl{<& zeHm_uMuH+WjYz<<%T*(4wV_`hiwP5^vC3=}?1D#2mBZ^J3T_b;xih+arkI=|Is58K znoXx~P=3qnAaN#!>mY_C%u4dWN@}4A-5ceiT6*tr7y=4PtKVC3%K9FEcOzI2cZs ziP}~YIC~`G=lehq(_s+v6*H)0pbiI`H)TepaR{t{suEPZm32h7$2Zhv&lXrGZwrx4 zcV0Y5=EjulANa$MH=K6+5n6nKA(G3x?Zxm@2ATId7U<^7J( z&y$0Sh=nn>(y=X&LL9Uyb)ZaU--RB5CGa{NJhJnyBX=e)jX&I-mpV1-$wXb>nj<4g z?ClZxbEcEfTVX&=3=w9MCZiyMbtp})*g(VAd-_^iS$RwXOaj?g{NG&sz1G^ibyPoK z6wwB46W?|Mex07=U3by^g?|?AX!r;zo8}VV8@1V+XCT{KzAfv{AAspKjo9vt6u7&* z3@VM(bZL1z2%0?7f%~}DK=`Ooi}0(TLQ1QTnGkLj0Z3$qe1tlZ07|L&P53P4pJa_v zS*6o1ULXO<m z^Zt9x%_3tQh&aM{K*c6iD*py}zrRa=*ru^%iXFU(9TuFQ(M=p%s`;C>T!@ub6;ucg zZ=GmF`OGH6z!q;3Gb?6K@aF4&en{7BP_Fh@MfO%&sgNrmCK@ku%7SjQg#k4<^)npcag|yKn-L#Y(XVUUBOr7&9 zJ0DayR`3~*O_~bpBhO`H%B)ER=U(fPnSzjHWtAh>A0U4)p2;;Jg}(?)qIgli#ue!N z>^)V#DoT!&e9df;u8xIA`R`t~Q+h8&JzbwYGGWe<)s9BnGUXd$YSjnbdF)$w3mVkP z$)dmu-%O8q9DQ##aSW1Hq76FjEuazX0DCo_?nhmIk$zV4Q}|gJY#60qh*c2ZXMezS z(ydl?_1G2M#!(C*k^QbJR9psx0Z%PkYV1GZX*?m=Im@skz;7Hx7pb1N(H!#fOrOs< zMFSv?3H;4ZR&-_|lfzSGgSOrk+}^<;Tl`9<$)$b2bx5sh*5gUK3OaQgUnm!yw&BmH zGh@nzxl1bOIm*q22Z|CFJjQp>QRGcRAh?c8Rcl3A!OjInNYMf@7s#_hJ*L+L`#M~;v@9&jIwUi;N7;6jkr;vLPrS{{$DkK*CGItxKqWM3 zLehbt!1d=}wWJ^$JN)*!JxYzAedQ&dfcE9U3^rpev&8I%KZJ}YrkXo9jEoka?sg48 zKvGSIBX^aHr#JqsQ7OnNp1~89t)Ej_2i!WZ3|Q^tnGJi<@E-tjQAScn|0zgdl^J!9)ChHG4da3cA3l-_CqT!Pw`tvDjMJd=yzH&l{&X=>81YY$o~hra zRa>3_$BPT_TARR#4bEM`&VX{d2X(2zc$XLbR_&IfoXu|c7=)=IJU%~SKX*RZJK+~z zCDr($2Mwi4CilQSyADGtFpzwtw+Ft{b_aE=bDW|*nHA1vnGB}FBp~@cqsl!oM`D?l z=ew|}d`3|e-PeCoDgbSjA@{KjPYnHnK8z0di1K|c_-4%kp-n7BShbb2&=fx6Ln8FX z7?6_ZWEtM}4{FM`l5nT%wcdY5CelW!q5usr4(}}6!Utf)u%W2Ke#l*L1O9^pR2l=! zxU=-gO7)ZK#FTLBX7)9|&tIczdAVbB8UeNaVjyW?|9)3t)ag>DknE)N&nZnEjx8ey zk@B(ZZ?wTct9F?+1YeP%eBMsSA?J`1Z}zQoewNx30cf+ zbYT^`RiWHtp!^8A$nlk{2sgzMC`gsqX`14SuQdxg{vF0v)w)NypP1oFsPy@Sm1?U0 zU-O1*@jU*&W3hkfI2q@tx<2NPk2_a$Tm8|FtWCA503Fu?~8i7nf`pQ36w8*D8TL=cook~#RI}y2<#d28=`QuyYihYTI2@(!BDhP8!3}7WG0ZqI?OBh zZaM&$>b=nzYx@@yo6PtQEfyJn^ffZEOYHkk9}B+feHZxpPAQgkWK|{hGiA}#NERs% z-3YFY^xfxknV;Qc-6)>^K{F-*yy4Wj9`o>RqlRjPuu`cCh@=aDP;(5g-Y*`GB^zXx zXHM0U(jttoT5Rf-J0{_@v@9TP$0hAN8=`8oxFly)u7YZvpHj5^i1h9Aou>I4@OXO` ziR1k!YV$XkkWrh8$7en0VnSojLdDz*9buyd%kXK(;VTgXRP?JZV!+&U`S^R*g`XA? z{>Syxia0lZ#zeLd``4l&_e`|!;4E4o=)butYMx^1DTN*nnJO6^$tO&huo6osi%4qa z`t&GCT=cEFYq|U?aU+~HLsubgPKB6e)D}s{?B z6^Y*7xVaBxsHCzgXek&@ClKfk8>S?d9@4@mFRr51;8A7{iza(2LT!Lw*odIw^?EV_6ph_9Dw(tV&z}Ui@Oa^s zgHKyU<1$Aa&Pw_Tg+a8qAGk(-;m>H&sw5Ma( zil6*trRzYS_f53dQDLbSfxtN!m^57Yyh^fhkr5NGDV~;{t8w^}7q9wyqUzwf)7{{= z9dhExW~*e+&4#3Qf@ERW;Cv#OTx0n2m^Bh%-&PWCtNmD-J%8^37yMG(x-VjUOtA$} z!R>6abV8PYg>dL#`9Rt~KXJ{XRAjMvKK`xZ>;dQzT1aCk{ygkv5uGhj_q?u_R?;%U zF!nr4n$Emfv`qpzr|v#aTST+{7V~5t@J3jTj#7c$t~~x`Qd>HH1@8kR%L>~%|4VAw zK`(ict;ahP#U$i2<4*@SK3ZLYF#Kaweme}_za@&Ei$&qdj^%2_PB+JElgStZ7{i(~ zB)_=VV1>}rnZ>5{CY?7ydQfp-qLCjJ9cK8m8L5QiK0*@7edOn0d6Yyd)Zru#dM7`y zg3FlTFEe_p_EeO1no~PWn3-rYsGMGl>;*62sY`zQNvL%yMqX7V&>N>f?sZ>>iz%CY z@TCa+vhM=PDbh&mgEw#d%$Z`g)RY;;6mI?+$R<=S#ewDu_rDPTyWGgW@;6A3Wn4=V z8{)En*ZpO{IQ@1z2hsx6-KMk7!{c^lGtMHTiiE2~0K47yZUWFy;nqm zVJ;V8Wt9VM?OIRgI@1N@sn#Jda$h}5fzp353TV~l$+~ijPbf%Qa?dbZD*F2Lrhs0* z*lsrHBORczGh-f;;1G?AApW03~Z&Dk9}7L#tvj zkg=)0Ec$TI31wvpHcajpL~7niY7SS<_c0^=>X_$WQq!7>T`IcM&9E%x(Ne zCymtz-^h%&{SMwxR8=FRbq{!mjLg=+5>z0@oe?~fxGm%9LffyP&!>s7jNppFA6056 zq-T?*(a{+B`VnxJu?HYdv!SKU<3 z>dpHwUsU~QLaGw~yfNZ|hC46kR!FVr*T!bJ}Z zIfZ6@oy-H=E#ePqDhSfHIG4N^)YmMW$}_)yHSnXzF?)3s?LGfT*hG{rId|Q}SgP;h zrnho%QRJ(SCYQ<|>=}E{recd%%HteA%Q#one|rBUuUPGTDW0EghM^(=P>WR{;n>57 zR)^)TSO^@kg9TJ9>Nyh?>ZZ*B&=((x5MdyddiH3Bce zJzgTG6a-O6(a=LHyaQX!sB>)a9r9>!^{edG_ls61?kVc!kysn`L;NhXhDPHsH_bl; zk+BTwkeYP``Ik5pW?Up(Y_RKCRM7r6>8&pc9FA;!3*QCMz!1fO29J!g0>` zQl@@?OPjun`VpN1n)3dXRsVF%GB~q@oV=N9!vjA`RpC_e9^^5XRl<;E4~M+fu>4Y< zR%y|>{2_R9fo^_nj!N=KVuKfC#5705-7E9;*RtjazCiSp@oVp9C>+?T5~lrO7y_{1 zM)9->((w0MO`s8*{{vL~UN=lH{47R`^?3K#D4#p>JY6m; zr8fL+K1XzKT|jF-%&7g>p0QSNr*&tL_GrUdfj9C8($@i1aW+-A=MUO|mY}wy#TZ*~ z1wPFj+R8pwUD~K-pD&h-JjLh5_Kqn(hYUGA8#eD5ozx=bh})#!9cK| zc)Hiosm5uyQa}CxzDr?-T03V3#MpGO){<*jU`?n{bYHl#17SdCG92FL6}e9DO}$1! zMVBH%zVq8R>ynFFA3Wgla6;d^u=Ufd?Y;2b#MwGM{N__f3m?y~5M>oPK8RL9ve2;P z#*F7=4e26WtI+?3)m(U9GnFOq?VICg^i-*Zrs5QwsQa3el4BE<&^N7iGCQRoI#49H zyd|*=J`u=S*z5GwfBv{sJXkA|j=tRsbXKv4nXs^WyqrZzGtm2x7t68m=7@`RI>W|! z#^WM_UIJxZw%aig*#9Wa08Vka5J-_Dj3dpJo;La*dPxhE#uDVs=74Bh7)2<*-8^*x?RMB$Ar@X@vQ z&odkQ!#js5ZrJp%r}As<6A&N0jYuwgmiM5JIdwW&msJPa;6;Sk3uKp$s>4#+=%zdRMxrLyKijs6U!<_3hHBRn13t%2JxNeu60} zGIUOH)N#|^BSj~X9VYe6P-GbAS-6!M!qSX%v`?=2%a?+kqk$_%nE14`zSBvJ{x?rL$1e{oXmmQyp~Tm?$hIr*}ypZY_jT#EHc zDM&B*_8_O3$~ui_zuu+@d$8(Vx57isEs(ND;l3com5_5h%P6TpP4j_EVBH#0sF zVPnCKtdRzh?lsmIZ{%+2DZ!yE)T?eP;Ie2x?u>T1Z=&c#LGM{`S-M!r$`Z-|t90w( zlxvXnUx8SX zi%|#^&W6cBDF<=O;V&JWrozLc!p3Dbwm>3f%Wz*;wb%g^27NXjx!&&$B;@~BJF7ZW zq%vCh?K7U676+m9zt#EQvN3vp40>FlVjyA_ZLVS*L6T)E5#IZ<_rsflw!~T03>Iv8 z$fM$2#YNLhy2pSM4-HW*0Tz4u3%REE;X~>D)bz*vaY)(1@}We|u`~oB7hEk3&pLI5 z@e}sp;qFUp#N@eh=w!>!t1QL}XgqC|sb!lPpKWnOz(50-KarI0ZVHr74~m}>>Q5hs zmfo84{>*C=>?nw)DDwzVc;Q;!1`}x+3kR9L4~`*6nYsdn_h`Q)D3pMObOh-I)A&Tw zmpSe14tQFA4uY|G9SC+LZ`W;)F+b!V`6eP6?NIE}ltv6G*Cl9BKWhl`>H+3(hv}L9 z*6m@`#O%k+DA;}4S0c)-uh-_=U%ig%2^+LE*1e~ zzID>!>r?k<`G{Fc2nUv{$WCO=DQzshxr;YYs5xCqqw;Y4^ka?P@{7>vwrd?1rF_!Z0NMDwZWDX!DRsy z=Nx@=Qo7lu{y)hd_bN=zB=FzE`jGn_j0S=&8_dN>v`8GL^8U&9Ex~y`qPgO~n>J65 z^bFf1C@&~#C}zqigx`8BM+WIK+12l$e94k6kG>Z#mBk?15MX05$MMo$avcy)x1SWl z#1RC&8EPu^j4Azh^9!r#>=-s6TR{v7Sc$O0RRQ4K1fh#}m&?5d90J-Y*fmvj(p}B= z#u{w5gS7P}?xsn!=kj}HH9H#;)Ck4NB)KUSIf4jT#d*qX7Ayi?7I5Mm*#~5)ksxYJ zO>JdbFfhUl4i#A)wENzgy zt_&C)Q$!u$qtn1hvwh4|z5|}j#61Of-RJd0ClI=0MjGqy^k3Rdi2X^hBjZCj(CHA3 zf`nqSbZGnphaioVh($POzMZ1p&;Qf|Mi4!T9e*=uPwe-+Br+0p+~kC=fyJUl{zWVo z!pj(41!`ZnBnx-_^(j>H{PCoZ@i0dtEzGUDX)n8@Xb!PMoi-3Ul0%` zCU-Y$oO#qmf&*_b;B$-sIubv*65y^jjds#Fk%G_9F z9W)W;nBY}4G{7LeR^(;#&{@j%OP~U!OrdFSb9yG&So&XYf%DO~!XQF65kV>Z#f-0V zZbk8A+)ZpDQ49*=A#dOfSLlMYP^10Upgxqt9IUm8Ipqw|QS9fceSJbwekg6Qt)DJ; zf@Hyfygv#9sz@PIf@bJTl0S!D-&gDh=8PZS4rm}k6Vx%I+hh-bCx^~m{G^Sta+0q7 z2$3LvfqM(e{+X-Q<`;9hC|C;+XOfIC2Ca$ zWAT+OtV+w`;60m;DCQFDPds zfl8jg7AdDIA_XzfW7bO9Zf-)l3`aa)x^huWB4?>K6fiuUNmPK39OO*j7=C%S73uc+ zykaDy(yCm|b#O;&$Q2o6#Y6TTtz!l8m?}h*?zBB93zO)YH0q}U8s(>dusqa`{Qh;Q z*EbUVH7Y2|#ZyPilSTbu75Vt(_U!lfu_$VJE$`*bO5@Ul0Z-oXd&2Lc2;gz)fivDK zjv992v~V%=7+%;P`_h+)7e`o@24Wl6^P&jmRUOPIljJlzOi(&+4@5=3u!79;^p&i0 zpMVg_1y`!Bg$yY%Ea%ews1r7LI>_)nIPVui2@LS&E3%TK29G&F0Hca)*UTL@eq+H{RU!EDY9Hve}l#()w1PqK_~FqgwCsWCQNjHF8CNnS9=E z?_o~$(7=l?b>U-S{$aExT`0+X(*+-?=zUe|t-XwK6}Of=teo4}q3;B}l8EYE^uf#Z(_Wy#Tk0is`AlKUJCiErb_joQ9ha z);h-owyu4RQTtBvshQlR&V2k`Wk#h7Xh&>c}Ke^>JzJ(3O|b>x={hOy0x}GJN&t~-CMm(e&5FF zCn@995yX+9PvLF|s>x`5bFd9F9(tvyG1t`V#F1C7)*`~vzvxg7tZGL`rTX%%RluP{ zow?@jhu-b&1!g+Oy=(I4T@P+Q2e2wzM|W8?*R$x#mm=|e_N|*7u5Satw=H`vJ^Oiq zRb+sz&uVLNi}6&BCRllP?CZJZ2U zza{?Prjpb*+_;->@7C5&BH`}iZ0bvUh~zKou3bf2gU9uZ&Or2# zkR2k_n_u?f`wOKx6muAcvv&xsJEcMt!aNQWM5o+26>X}hujQp!Y7$EhBw}oBRI$RV z&3v$3dFt<7x)%9;F-@=&xN+9CNcr2gIfxkqDv5CF@fvHHeDl8YE3bIv7bsZ22BGkB zlq~9lthZE4pwhr=nx)6R34!RB1#UFVA5tV89!2NbmUwI|Wz5MIR)U127%MYCVD^%P zJ*-a)pI(luzEmg4C-fD;PnQb{Uh4VUfw8I4tqB8=wcWdFU&iwH14YwWk) zO`a|XM%cTi3_Ftsoh44dEq>Zu7*JoCXQ!s@Rtoe?a97&_90@lNiMHL>S_;ARZ!WP!lB%y=hSr$A?~^fo%08!YxrKq^kF_Cr2rrO3 zgA%>4fph6f4-sEr_hO5^tmvOCnl{pZ^ob0ytP&_CgIel)g&n?a+=MdQ?MV#fcoc~N zoS2y7^99;{{tk<3EW+e≈A;CKj7oFT`gJObuc`tFP$uetqJ%|HiqePQ}lKroBNK zLb2InPgIy^`6lr16;yBo#Q8%(m3_h7*L*9muO6I@9=?^tW@#oB3p;+6UL#nEj=8Uhc?bXJwtZ)Q z({6aqDqnlqfqBrS|GjKJ1!CDnzChJ2qQWY94w1sn-i6tLG z@NcW{2=7QJm-=~>)RwEY0MsgcONTa2BSp?**~CcqayDFY>4r95XDgOM_=!s;4&snd z^2W8lIW)WLV9qwZyb)ZbhO3@2blXY9+~`i03Qv#;V$mLWwV0OvM=%1fv0rcl?aCkF zbp$7aU1t4}Ykx2Ju5fGVXfen6jLVqO57(}nuYf6!-)$FkoWchXgV^J0{nCYIxZD8S z{PPYMbH7$#T7a?w>RP19J-!@Zn*3$r#pjft=KVXB=Z`%(J>Zy-0}YjPFgj_LalM26 z4TeJ5@L{;R+hmT&{0(fD7GC-$Y+^f7_P2^gD^F!97`#dP6(q{(9>JU_wO`!r zHsre;`f}Re3!OlIhcSZll319uFNo1df+)dp*!&4OmsA9{pC1kah;~`jmtYp_ft(Jwf-z~-EY8#{N+5Lsl*$# zj=$)Ph8*<&TJHmd6@UUQxbq4Lncn##K{MSDXzokZ#s2E)R~c{kT1fYAy5$r?hskOE zfj&d8&p)W&F^9S=U|HMSQ}6)f%4EBW_0&F<3kD0CYjg_cCpk*&Mwo@*ei{xSry?sE z7JbT*tjYC99yx-)FHl+pKkr~}xx|?>ZJj#uZ^XuYO-W_(S zsq~glw75!RifZcGb4tRIvwmjAB5fO;AmE@dy7KGT*d)u=8l9+D*{}VtT$ZI*VY9U^ zP-f=GofG@mo^j(jv{#46dNT!;;aLVSl%h*rCe`GmUBUvzHjnLa4RReD!gN=NFSAC@ zfq0}~_boqk()duO#VclK0pXxqOg>pQ_GMV+|4N2Y|J`I|RZ-!I<5i8FMLR6X(GgDW ze0hFw89^SBUBMiCT&~k26s*EuuL|nb6mjSge9L*ZGe=KfvfAV&r`(voO#tp7rMA=N zGwtjaCo5x7(6`O=o$t|8kr*XY^vG_Ew9LOX#`w+78>=cr&gevQY5eNW#t8N&O-M_i z=iEF9r2|r&O0^!iknv5ii5c|L#?LC!`HFSx?gOwBhE-;2i*da3u!uM<+Q>?vV-%Gh z(Tx|T5S{F{#5DC@Ng$J$Pr)}Ov913`r<6k_NC?L3 zAokl}utp-sfxVik4{CO-OQ0aH1XMNF)-w> zchdymak;2f<@J_f-+wPDM>w|oN+NTs;5eQ3F(aFBR?b|;|I&D01(xuT`Cui4Ud4r+naMAZ-Jl?;D63c`2*8h_PqSOdX(Lb_Z zN2^tB1?K7FN536^G^w$YX*Jgb2RR#L_XFFb=$T%AI}U+Yt-5ai*8gqw(B8ywuM+@4 z^Rfc!1XR#YlANjhn6K(mHkg2BMW+-5TBWPFf?B2*ADbtk7UD*QA4ny3ngYtz+%e?xmL+6D$I>OwMV!3+gfZf^K)-{Z@lR~1 zG`cp{qC>?T=SXS_=WMXcBQU4n$YJLS71)AUir6gjZhDz;(xkqQH+kd*uH2%vu@gC7 zv^=P&ZO`D~LB5+jxo~ntVn1 z7*tH&p6agFH-jUD;`CE6x#}0O&YzG`rZePH)*;_^J6+f@vlFTYlBp$cG+jVXhITsD zMaY!k-d{@!&!O`0g%`<*49_G;8haEK|AmFEVC4^GVRBPT=${A~ygLyRmS*dLD}l`B z_F*k085Ky8ONyDc;Sq5i#$mHL`$*PddQStj9TG`!p1&lOGF4oxx(Le3D|o?pXLM)v z!Dg?bcl1WO5y*=PG@>Fj_YX`4_0b`&)I3FwC*!PYQcf;@vswR|o0jV7_-1^|u-QQ} zIU$tCIKyB&JRk2~8;QvE&x;_xkxqJ#-%AFOZQy8KtMF1O%QufU8Zn>B)VQ8y-O}4v z=|ms5mCjUNX&U@=C2nh^RPSlnB9l-$t>oox0Tb1#w^p3>&E>VMx}N-R6>0$84UIC^ z5-`ERP@Z!hT#s}v7RC2BDgE8UQJUWhaeDiS<9-T9!bcVDk9w^N_v`#6b^KM#-YoxX zcCucH;3p$if3S|65-U9T2Aq z*8fHOQP_NmI%cM?Uun|Y8#paax6s+wMK&|}tQ@1B95uGB`hyC28LUUGL@M)9Fq1t; zR5zlhHG;d!thLU74JjF2u*7M8s7+n!`v28*-ce0#O#oMVq=g_IB!tdGs)Qmn^lGRI zBE3tKCP;_STj(966WT-C6I2ug3?&8-kRl*mdQ*xZej7dCUpagBX7}DZcV>3)%>0&g zKTSWCG8ozIIi}zXq$1sfYggPciJb7c<|B@2J#8^CoxN`d$?>#t$=kNnAx-%Vl(%R8 zcke`~*4%!!5`hKHD z_OD0qQ#P0}6DR9_jz`8n(Vz?57B zb!tG=p%rs@KC{ENDBk7oemBu2C3SQDYnbnHYv*Dy-}`DPcZkz!xRZLB)zZe+>R>O* zv(W4z;;H&*aNos%>G$HVvNeSRKr;MbR&ss08k_Iq8HWyrz*x&)`Tv+TXzey`S^aS? z&Bhj_p*3kjW{Sd=D_63PCL$Gm_QV^02}GKjbp9dmgp*!?XBT8WmhxXPc| z5m0D*h!^voy~VsG!y*&@J8&;>QK0@ngz;QfW@jA7V%OzAiEG3`YsUs&E(DG>W=XJN z1O&A$y2`GGS9MCsNdzSwj~tb*h0|Pt=l1P@6t;GJ!cwQhi=GkfLTDIzy`LI}6U5AI z7En8k7@$+<9ToFCPa z7;rtya*927i+Bh!aEZE=kErA^-z3w}2ygS+j4cSY3;29&BW9{3#QQoqBn*CUId{&( z^YQ}Lh(|ldE9Y0DaPcu;PFAu1_SeU-e{lo$gqub>5@i*#spsGyIjf}B^qAq64o9AY zg}YtT(5{ZtHzK$3AsPlh&s1j5sgg+M%ZfhSAmS-?240A=_oiArSiD{%qv!+N{P_rW zCN?w5YqL6WZ^P=^O2Z=_Ww;Gvc2^y@`$CabQXnMJ5Bpqfy2C6^cu~0k*gHF7WqrI3 z{x?90+sS24DYtSmuQD4bIHu>5mL1sZUShF-Au2J?gqRljSxDctizU)gGZk4>rr=_2 zt7_r*GdgCrAH!L?v57eQru!AkxQwuN6l>xtlYGp}7218t4S;B`HC#6>kVCqsZe=ak zI$*0i5orz4oGjo|eWGqU>|0T^DqDejD%` zT?+a=oFQW$7!i6x{VOT-D8}+2c^-I7jfKMN_rZ&7 zpgMI6^H+kr@((-KeF{&@X$D_5^a#9ZQraL?H`G0;^d(Qln14>;Bf5XDf0<<3VDH~L zImE^78qq@a1{cb%;Q`#nf#L55V(DjtbWaW+kA=P)?3#1E>09gJdgHg+NWNl|4yf_t z3q|@u5gz*NS{G#=y#1>K`EI7U0MDt}y7s2^EebdGeXaD;IBOtT{3tc<`js9{eFvsm z{c4ZDB(R*ZaWX`sgzNLK>^IpEdlbLP}2}qHLK$(Z1ajrh9zu>L!a$iCWdAd~TXnJ=NIF!lQb?j4i->GdQvXCK&g0*wSKys)}2OF^tZFjmsbAH&I%ZSLuwGWH;%p;;H z_tR4fdho-?^ZH|m^Y6tKQ#x-NjLGShi;o4Dyy-~6pYj$`vUrX&n+3(ZN1UgqMa_3k zdc(*T>1sTf&S`0h9g~D6AK6}LrN6Ef{sz~s#0|KGu&SF<-A^O_7}WK!t9YUF!zF8$ zrsXjll%oh_3DyKMxKqcti@flO3G@WvT0%WLy|{?Bk20W(^MV)H0*8thj(mVD9Ee14d3S$tx7xlqnq=md84C^XHecNMRO`eyL{oU8Kdm)th) zT?$^B`D)cwG;uznu0RRw+82^cPjB|=%*147(oKbsRd=;vS}@BWTyy8fsi;~-7Q^|| zOkWw))QHk;;?^$rP^v{{!r-{$8*U3O}u(`)VqTi8BPYhSKpfyouBC+erj6Lb1s z8<&3e-K7Tq&d%Jg^~LpW;#|0k$fc5dr8}Y+%m17DC@N9?Kb9GWroPPmD0g-?Adg2i z(w9rwZ|^`dcCP{JtY)|#q1Kvy&V0MGv;$9};hZZF9l*5BNz(i=+G;bv*HE(XZBo3s z;%#kh2_+D}0{lj{XC3XTKhr0hm44R}i%`8m8P4hcb)7;HRCa*VqJ`Vu?pG3BiTdsJ z!RobgzP>J~xqG*OdG{hE+rzP)6f>r)TNDmjc2N_1zHbE&%WkPakjiH)o%bv+C4Z-; z+`!X1O!CtbBccYUc-I&Bp~>=Gav=huh$c(vM{rEY174t9pG^CQ0>$%d%jqqqe1=^i zre^~w%;Q%4zK`z`>1MP%?tL6qHmzZlY>|=S5C$nV)>{GTRu!JvR5+g`;a%gB#zDka z53Z@w4Hm^8WGI&$ST*;&fX1-)_T!7a3KaQy4N~){RM9+(l; zd)c`d@nC+V67nqa#f@vcAW~GvlQ0dDWjrY7#$nN+yiHWK@CIV&rL)K}rr;P!pf03H zDgTJ{djUFjSC;YNr2jqAA3mJGa>YW!&ipp0`;adt@KoT(sL%egcC^d+Sv~7yAPu)8 zOSEdV6xG^nO|q)1gi(e^P$f$JLrr&yH8Z1Wmp1X%RY&^Nt^voNg6chCCp4(ga8(vG zc+U~rrq$;T$*WeamNpWywdG!tQoGAuS{%a`u4V4P^E)4!|K%0h=MEdauYZUl=MW<~ z^HxlF$-;IjO*P!-&BD1P+z0I?tRZT(8)4cz6T5 zThaR*TQ}53`P-6yyqhdq3{l!be{pL+_F62-uCP>H%L}+A7_t8f*xvk}35|T!rYR)W zD6b5aVTqMUeG#9+EDqcDi#TW&$Q-;jxEfhQl4*Szex>l6!!<7^11WCsFBUJJMb4

UNyc{+AdV*K&zO%{8@B}IK8toX2HV_{U54z`*k*R_3iGR-6*=P{hc z7cy)HCbeGcq)%U)S-MfB7+~=^NGYV8|LGwKUjvg!cUXVx_W_5-0N*2 zX#{HwUAo}gHT-v?q0rC9SGgnAf2f8p6%yTs)lQ*ju2F)^^4J1hEVgEngLj#7uo0aQ z$SFbRwf6uv*tzy3T^I6YF4wSBhH(*_r`x`>uMWo5ICSg(FC|{aM&gjJ67D>r<8j9+KNl-S}_q9 z86@YC#N&k>EJN9MI*Z2M%-&7ujsiMWj-HwbBGxD|RUUV82Do)#OdaDTGcj}fpmc9$ zpT*eg4qsZq&f_a|G5r(j^Q)|{CY2<|EJ-gitajPYV5mqdk+d^wwhv#VqV&tsuVp zSd#WTKUp42-qwX{bbg&c+kBf?j8KXlH=$6qS{e9&S3Rc;>PU`Z z=#BZlTVHFqOd;i3z$!Oy?O023SzK!e(9nXbo%-ZMk3;eKk{@I%g(vTRm~bmGOl~dP zC!d$AjTTvy!V5dDgqbcG?l-F+6lHwqdjk~B9{n2E2kKU7HD~%yV+7^$P2($DcW1MM zo^4qU*!I|cQf*(kV`XN)QSzGXUFnT}IN1(=F)-Anf*r25H?)#0lp*IoDh7wf% ztPTNj_`vI*jipZ`-`+K?frh8yEo<`D45z{*(!`)2o@tynxvsQJbsbrvi~H}IZ=l=c zJOvwdq_yR|Y)YHn&$GUQp{Fm@E$W5NXk17e3L=|bFl6niqk_q3M^WY1OxS*{DsYu2 zP~Fd8qwjWD3)9Q2T1fg`E_D6gnN$2)zzlOx^|w3_M>5uVXyaCYn5SU_v_Ors&rEYx z!MIKJm}TfB@1S8kHq{H|30Hi$^E7ov5v~Z^qrxnrbj%7^1cZB9O^A<|3~nfjJ^iBm!c#n{Jnu|J9#e)l1EeAvUnpNLXq zKn|WRl4M`mb|Mahs5jCe zVuL!evaiZNHJuaq3ChAE{gHt(od}|7_Mp<4o5;v%=5Mp0nV2!^KvDGhF<5aVS6(ti zQOk%sVY&4DX^5wyWR+x=un7e`WHvQ)9oA3Q7m@Lgt;cKnKs17#=OyPC$=RY#rZ2i$ ze(}mLkryPCvSgN7J0?O>I-yH-q$i2P$PD@v zV{ynIkKu}NWjQwimZ5MHMS)ZC3ex2sUqnJ84F{Z*hBfQiP~BR^P_sDQmWtqL; z)q$1h)A*zo@kik!@ha5jZ7zn@mSe6aH7Xup-v!Y6nT-r@9|X~JS2dryH=BOoa{0IF zgpb5PZ0gU5$XumpPfi*>aC%)Gb!}RM;r3MH@Xg?I>S^7|R1+kxwz^IrbBM8}`G|}^ zXp)5go`E*AXu7v?wx7=@{sA~#F2niI*`)^~q7o_aQ?DxJ*Ey2$K>7I>Z$k+u3iEmX zet11UTD%MYjixtGFCi1cx|)`zJQ`HqZlCLDU4GfSz&a(cOIeF&w+y9x@@4*=m$tqP z#*!;CxJ_Y)vtqpmEBc@p6+@%y+%SNHiDYXNodZOaM};}OC`!es#N9B0jC1b`l$|8k zUB^6c%(2!ZY3->W-Ri*2`bPSSoRfv{PIbPzCrk~Sj0@P6xOwtpLu7vWgf^B^KczN3( z_AV1qqFErlDKPC3bDrGr4tvy0-lj?o-3)`@EsQY$9PLR*SLTJjj}J&rYN|x-BmhjH z&20vq>pa8~i0N_rG=&`A`yInJw#%Zi?sP6H0E3O4LOW5ghnW$yP}cq_CTlcQ1)UD9 zBgrn}BLJ$YLQ`Uq zkI5*7riM}eqw5vjEWdHgJ20yZ7D*>9Ub^z@ixgyA?TWch!JP@l;Oe&r_Kxrcx_=j?QAN%0!_dwH|t$1JV+16SasizCubL-z`jy6Q4QhB?z%t&jsW1zr93(aF-y` z4m@AW#Q|6=31T-biHzVL?nfc!~j|fJW{&1Y%w?sAeSd^qR!cFg8m!Kgwbl-%aR$;V&%PZs4I zqvIncv~Jrre{`dx=Yk9LC@UhBpq%bkoZ**Gs&#<+ub#`jr*9>nE(AH}yw=G{!M!9Z z6}!`-m-qHNfIpa=ylccG&9%lLG=WLHKXW>Dauv%Xrq~DT52ZguvS@-W>N#bvtNeO? z8O4NxP_0h@Xkiex`ohW?nGVJ`rW?TctkmHygsp2@P27n0g;*wjGiJSx(EiL4Q_ zs`3iSIhE#7`Od`%qly}mL0FLT@Ix<7_wnP;q&>gnIR<|TyV!O5HdYhjV9i@z# zN_u{InJho)()BMk9)Jzs(_0m#0}X0XNG2&>9=snRKO!)VW}wccp#g%o(APgOT2p)i zHUdlhC!cQ}9490LOyY^SJgoJ&vy1SDQR-s?ONR&b?Zo7fm^hZ=cK0RwrJhv&);|(} zy?icV5MIZXC61&$xQ|TDmk(-@J^kYQSQA0Un(^SC?AlG=8OPjwLT%jT5^Z>`angQS z#eNZ?Us3Ve`}B0l#ht7O?e#HDPMm~For?~K!1NS=Ocg~)9H$;w_QQ+XIF^3CPZu(_QZ$1g5fP*3f%S=XBUB#|xwN^1fT z6nC;a*V-u~b>nWP956Frb16D;%!8nH0M&<;xeRh6TIV7LL32;+NGk%;DwD)R+kC{Dn3Vt$JllKvhAeb8ox?H)Cc z8=$!Bn>D3y05Le6RdNf)CG;5>C=ZP9C_hVC;~){dZBTguP(h4b-wO#*)Zy*{K;?#; zs$n1`$0G!|5eBO8AQ9kQ1O1(>{Eem9B06>w2+z`2K0-^Futp6X zNl-~TBE7{bA*Q0(5urcL;)d>2HWHu^Rp|8BY7JpfkbEdrnV7^w1g zJcovw#2R*L0KUCW`}eg9eim*48nvn#p--!dU@R>NbEd43%I>=N`q-cq;9@nns~K$( zSkiRhY#`YeTv_m4V)~n4(5U|L!FyWgK4{F1C|Z=?1VHX^+U-kIx(due|Gc``FN`Lq zJ$WXbJV98F7(N&uu8LJcmO#P9c_&Qj18WTZbJ+T7+!8=ruJ66t|Hwy_nc4*)L&BuW z|IF4m-$}K;Rp32FiL5()yXlpPv4|a-?nnixhLs39=pk=48i^z(-@2o4e~X|e;OxBb z{<3jef%2^4x>9XmQE1lyI_>eQ)d?p706TJ85GHki zK*4Hy-HYb$N99c@eH0P++A_Up2_hETSgI;6l`2+X+$w#m!E3Crsr-;&Akay|%gt;L zlB&>CZA!?Z`=h5SeU%=a>i`)KON2%6wJfXlu-|nZuWaxoXV3t%{Jn+6zIz-^{(bAv z$z)b3p}hR;B07kbX4)-}sisGT{iBpHf-)d1?RjqZBQMzuioX%rYUHo`1I8Xdb+$ z9PyftY*n0+d`;arC>lbCfdPGtk`%|Zy+!#9eJs9<1JYIB9BYd88J(zj*jhB}NWlnA z5bg2Wj=y-(WPCfZ-G$C({@S2srZH6cSPJu!)*M) zAI#N=@%sGU*11Puy>Jp<^Tvh~QlrUGJe8Z6fB9zsnGkT2@W3@BFXQI)Xkqu@sXZvMY7KDs9x zF5V?tgd0KI`vjR&QUT)nfK0xHp(cS9?Jib28={T?{!D`5{rG&u2Oz&WtlGURYh4F; z>mT{fPhQBuAOywMx(zbyuw75q^^@lzn06_^Gww_KtML%Jhqi#Q_I=3YlK2W{NDD`q zS*L^3!Gsm%mLUDD!xr)HZ9xKo+{tBk%)#vM8Lh?~_nDS{0-h6yAC`pxLDO&Tep3OF zjxa95>`!FebOSw-=GIIV*3)7hl76~pc|7A>D%h+CTozoJgL40Rzi;{OpSFH0HN#M?s+|{%~kf}DZWI(zsUAe-5u^fLn1VAp|oms z(q|N1WG@-`t#rPci38&IxP>>t+iF^OCJYGo+N#Y_)&mf148HHFrSl~5@{+^137}_O ztzpH;Fd%|A-i>2IZ@w+5WpcNx1m=s;K{e z0L;)I#|g|YMvTk+Ho^ZwDc0(Ff4M#LFwr!C{8`c@boAM71R<%M(TH!7hbQPr5#|U< zY&Sl91^Iib%*jn#H0Q}5_Xs%Rgg>SXc!bZ*!(s_07w|wrlZ4->(ZxQszY712-mYcm zTXneB-$U>a58sDd^WW<$3u;XO{{ejZKwrmH|F87`y!3u8pWvXjfm%oX-?Ipo)yf%3 zpTDjjN}-M&47e9HUK{^c$w+$gi`YM_A>IGgP* -# CI and other odd pieces +# Tooling integration (CI, test runners and so on) + +**Contents**
+[Continuous Integration systems](#continuous-integration-systems)
+[Bazel test runner integration](#bazel-test-runner-integration)
+[Low-level tools](#low-level-tools)
+[CMake](#cmake)
+ +This page talks about Catch2's integration with other related tooling, +like Continuous Integration and 3rd party test runners. -This page talks about how Catch integrates with Continuous Integration -Build Systems may refer to low-level tools, like CMake, or larger systems that run on servers, like Jenkins or TeamCity. This page will talk about both. ## Continuous Integration systems @@ -51,6 +58,26 @@ Because of the incremental nature of Catch's test suites and ability to run spec [SonarQube Generic Test Data](https://docs.sonarqube.org/latest/analysis/generic-test/) XML format for tests metrics. +## Bazel test runner integration + +Catch2 understands some of the environment variables Bazel uses to control +test execution. Specifically it understands + + * JUnit output path via `XML_OUTPUT_FILE` + * Test filtering via `TESTBRIDGE_TEST_ONLY` + * Test sharding via `TEST_SHARD_INDEX`, `TEST_TOTAL_SHARDS`, and `TEST_SHARD_STATUS_FILE` + +> Support for `XML_OUTPUT_FILE` was [introduced](https://github.com/catchorg/Catch2/pull/2399) in Catch2 3.0.1 + +> Support for `TESTBRIDGE_TEST_ONLY` and sharding was introduced in Catch2 3.2.0 + +This integration is enabled via either a [compile time configuration +option](configuration.md#bazel-support), or via `BAZEL_TEST` environment +variable set to "1". + +> Support for `BAZEL_TEST` was [introduced](https://github.com/catchorg/Catch2/pull/2459) in Catch2 3.1.0 + + ## Low-level tools ### CodeCoverage module (GCOV, LCOV...) diff --git a/thirdParty/catch2/docs/comparing-floating-point-numbers.md b/thirdParty/catch2/docs/comparing-floating-point-numbers.md index f93c0ebbcc0d..ab5ba6df6cbc 100644 --- a/thirdParty/catch2/docs/comparing-floating-point-numbers.md +++ b/thirdParty/catch2/docs/comparing-floating-point-numbers.md @@ -16,7 +16,7 @@ this blog post](https://codingnest.com/the-little-things-comparing-floating-poin ## Floating point matchers ``` -#include ``` [Matchers](matchers.md#top) are the preferred way of comparing floating diff --git a/thirdParty/catch2/docs/configuration.md b/thirdParty/catch2/docs/configuration.md index 59861b4af8f5..d4421f3c0137 100644 --- a/thirdParty/catch2/docs/configuration.md +++ b/thirdParty/catch2/docs/configuration.md @@ -98,13 +98,19 @@ is equivalent with the out-of-the-box experience. ## Bazel support -When `CATCH_CONFIG_BAZEL_SUPPORT` is defined or when `BAZEL_TEST=1` (which is set by the Bazel inside of a test environment), -Catch2 will register a `JUnit` reporter writing to a path pointed by `XML_OUTPUT_FILE` provided by Bazel. + +Compiling Catch2 with `CATCH_CONFIG_BAZEL_SUPPORT` force-enables Catch2's +support for Bazel's environment variables (normally Catch2 looks for +`BAZEL_TEST=1` env var first). + +This can be useful if you are using older versions of Bazel, that do not +yet have `BAZEL_TEST` env var support. > `CATCH_CONFIG_BAZEL_SUPPORT` was [introduced](https://github.com/catchorg/Catch2/pull/2399) in Catch2 3.0.1. > `CATCH_CONFIG_BAZEL_SUPPORT` was [deprecated](https://github.com/catchorg/Catch2/pull/2459) in Catch2 3.1.0. + ## C++11 toggles CATCH_CONFIG_CPP11_TO_STRING // Use `std::to_string` @@ -149,13 +155,20 @@ by using `_NO_` in the macro, e.g. `CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS`. CATCH_CONFIG_USE_ASYNC // Force parallel statistical processing of samples during benchmarking CATCH_CONFIG_ANDROID_LOGWRITE // Use android's logging system for debug output CATCH_CONFIG_GLOBAL_NEXTAFTER // Use nextafter{,f,l} instead of std::nextafter + CATCH_CONFIG_GETENV // System has a working `getenv` > [`CATCH_CONFIG_ANDROID_LOGWRITE`](https://github.com/catchorg/Catch2/issues/1743) and [`CATCH_CONFIG_GLOBAL_NEXTAFTER`](https://github.com/catchorg/Catch2/pull/1739) were introduced in Catch2 2.10.0 +> `CATCH_CONFIG_GETENV` was [introduced](https://github.com/catchorg/Catch2/pull/2562) in Catch2 3.2.0 + Currently Catch enables `CATCH_CONFIG_WINDOWS_SEH` only when compiled with MSVC, because some versions of MinGW do not have the necessary Win32 API support. `CATCH_CONFIG_POSIX_SIGNALS` is on by default, except when Catch is compiled under `Cygwin`, where it is disabled by default (but can be force-enabled by defining `CATCH_CONFIG_POSIX_SIGNALS`). +`CATCH_CONFIG_GETENV` is on by default, except when Catch2 is compiled for +platforms that lacks working `std::getenv` (currently Windows UWP and +Playstation). + `CATCH_CONFIG_WINDOWS_CRTDBG` is off by default. If enabled, Windows's CRT is used to check for memory leaks, and displays them after the tests finish running. This option only works when linking against the default diff --git a/thirdParty/catch2/docs/contributing.md b/thirdParty/catch2/docs/contributing.md index a0121da55cd7..a4c9220ba439 100644 --- a/thirdParty/catch2/docs/contributing.md +++ b/thirdParty/catch2/docs/contributing.md @@ -291,7 +291,7 @@ Specifically, every source file should start with the licence header: // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. - // (See accompanying file LICENSE_1_0.txt or copy at + // (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -303,6 +303,20 @@ be `CATCH_MATCHERS_FOO_HPP_INCLUDED`, for `catch_generators_bar.hpp`, the includ guard should be `CATCH_GENERATORS_BAR_HPP_INCLUDED`, and so on. +### Adding new `CATCH_CONFIG` option + +When adding new `CATCH_CONFIG` option, there are multiple places to edit: + * `CMake/CatchConfigOptions.cmake` - this is used to generate the + configuration options in CMake, so that CMake frontends know about them. + * `docs/configuration.md` - this is where the options are documented + * `src/catch2/catch_user_config.hpp.in` - this is template for generating + `catch_user_config.hpp` which contains the materialized configuration + * `BUILD.bazel` - Bazel does not have configuration support like CMake, + and all expansions need to be done manually + * other files as needed, e.g. `catch2/internal/catch_config_foo.hpp` + for the logic that guards the configuration + + ## CoC This project has a [CoC](../CODE_OF_CONDUCT.md). Please adhere to it diff --git a/thirdParty/catch2/docs/faq.md b/thirdParty/catch2/docs/faq.md index c48944b7f1b4..0f303ee50942 100644 --- a/thirdParty/catch2/docs/faq.md +++ b/thirdParty/catch2/docs/faq.md @@ -9,6 +9,8 @@ [What is Catch2's API stability policy?](#what-is-catch2s-api-stability-policy)
[Does Catch2 support running tests in parallel?](#does-catch2-support-running-tests-in-parallel)
[Can I compile Catch2 into a dynamic library?](#can-i-compile-catch2-into-a-dynamic-library)
+[What repeatability guarantees does Catch2 provide?](#what-repeatability-guarantees-does-catch2-provide)
+ ## How do I run global setup/teardown only if tests will be run? @@ -69,6 +71,24 @@ library on platforms that default to public visibility, or with tooling support to force export Catch2's API. +## What repeatability guarantees does Catch2 provide? + +There are two places where it is meaningful to talk about Catch2's +repeatability guarantees without taking into account user-provided +code. First one is in the test case shuffling, and the second one is +the output from random generators. + +Test case shuffling is repeatable across different platforms since v2.12.0, +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 ``. We thus provide no extra guarantee +above what your platform does. **Important: ``'s distributions +are not specified to be repeatable across different platforms.** + + --- [Home](Readme.md#top) diff --git a/thirdParty/catch2/docs/release-notes.md b/thirdParty/catch2/docs/release-notes.md index 0b52941ca29b..7659404b834e 100644 --- a/thirdParty/catch2/docs/release-notes.md +++ b/thirdParty/catch2/docs/release-notes.md @@ -2,6 +2,8 @@ # Release notes **Contents**
+[3.2.1](#321)
+[3.2.0](#320)
[3.1.1](#311)
[3.1.0](#310)
[3.0.1](#301)
@@ -52,6 +54,49 @@ +## 3.2.1 + +### Improvements +* Fix the reworked decomposer to work with older (pre 9) GCC versions (#2571) + * **This required more significant changes to properly support C++20, there might be bugs.** + + +## 3.2.0 + +### Improvements +* Catch2 now compiles on PlayStation (#2562) +* Added `CATCH_CONFIG_GETENV` compile-time toggle (#2562) + * This toggle guards whether Catch2 calls `std::getenv` when reading env variables +* Added support for more Bazel test environment variables + * `TESTBRIDGE_TEST_ONLY` is now supported (#2490) + * Sharding variables, `TEST_SHARD_INDEX`, `TEST_TOTAL_SHARDS`, `TEST_SHARD_STATUS_FILE`, are now all supported (#2491) +* Bunch of small tweaks and improvements in reporters + * The TAP and SonarQube reporters output the used test filters + * The XML reporter now also reports the version of its output format + * The compact reporter now uses the same summary output as the console reporter (#878, #2554) +* Added support for asserting on types that can only be compared with literal 0 (#2555) + * A canonical example is C++20's `std::*_ordering` types, which cannot be compared with an `int` variable, only `0` + * The support extends to any type with this property, not just the ones in stdlib + * This change imposes 2-3% slowdown on compiling files that are heavy on `REQUIRE` and friends + * **This required significant rewrite of decomposition, there might be bugs** +* Simplified internals of matcher related macros + * This provides about ~2% speed up compiling files that are heavy on `REQUIRE_THAT` and friends + + +### Fixes +* Cleaned out some warnings and static analysis issues + * Suppressed `-Wcomma` warning rarely occuring 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 + * This means that e.g. `./tests/SelfTest "aaa bbb", [approx]` outputs `Filters: "aaa bbb",[approx]` + + +### Miscellaneous +* Catch2's build no longer leaks `-ffile-prefix-map` setting to dependees (#2533) + + + ## 3.1.1 ### Improvements @@ -449,7 +494,7 @@ v3 releases. ### Improvements * `std::result_of` is not used if `std::invoke_result` is available (#1934) * JUnit reporter writes out `status` attribute for tests (#1899) -* Suppresed clang-tidy's `hicpp-vararg` warning (#1921) +* Suppressed clang-tidy's `hicpp-vararg` warning (#1921) * Catch2 was already suppressing the `cppcoreguidelines-pro-type-vararg` alias of the warning diff --git a/thirdParty/catch2/examples/CMakeLists.txt b/thirdParty/catch2/examples/CMakeLists.txt index 7118482eaff8..f99333418045 100644 --- a/thirdParty/catch2/examples/CMakeLists.txt +++ b/thirdParty/catch2/examples/CMakeLists.txt @@ -54,8 +54,6 @@ set(ALL_EXAMPLE_TARGETS foreach( name ${ALL_EXAMPLE_TARGETS} ) target_link_libraries( ${name} Catch2 Catch2WithMain ) - set_property(TARGET ${name} PROPERTY CXX_STANDARD 14) - set_property(TARGET ${name} PROPERTY CXX_EXTENSIONS OFF) endforeach() diff --git a/thirdParty/catch2/extras/CatchShardTests.cmake b/thirdParty/catch2/extras/CatchShardTests.cmake index d3b5e6fcf876..5e043cf06537 100644 --- a/thirdParty/catch2/extras/CatchShardTests.cmake +++ b/thirdParty/catch2/extras/CatchShardTests.cmake @@ -1,7 +1,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/extras/CatchShardTestsImpl.cmake b/thirdParty/catch2/extras/CatchShardTestsImpl.cmake index d18dddef1642..bb2fc3ef60dc 100644 --- a/thirdParty/catch2/extras/CatchShardTestsImpl.cmake +++ b/thirdParty/catch2/extras/CatchShardTestsImpl.cmake @@ -1,7 +1,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/extras/catch_amalgamated.cpp b/thirdParty/catch2/extras/catch_amalgamated.cpp index 1f5527a43788..b27c4ec8b435 100644 --- a/thirdParty/catch2/extras/catch_amalgamated.cpp +++ b/thirdParty/catch2/extras/catch_amalgamated.cpp @@ -1,12 +1,12 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 -// Catch v3.1.1 -// Generated: 2022-10-17 18:47:22.400176 +// Catch v3.2.1 +// Generated: 2022-12-09 23:01:15.713081 // ---------------------------------------------------------- // This file is an amalgamation of multiple different files. // You probably shouldn't edit it directly. @@ -508,32 +508,73 @@ namespace Catch { -namespace { - bool provideBazelReporterOutput() { -#if defined(CATCH_CONFIG_BAZEL_SUPPORT) - return true; -#elif defined(CATCH_PLATFORM_WINDOWS_UWP) - // UWP does not support environment variables - return false; +#include + +namespace Catch { + + namespace { + static bool enableBazelEnvSupport() { +#if defined( CATCH_CONFIG_BAZEL_SUPPORT ) + return true; #else + return Detail::getEnv( "BAZEL_TEST" ) != nullptr; +#endif + } -# if defined( _MSC_VER ) - // On Windows getenv throws a warning as there is no input validation, - // since the switch is hardcoded, this should not be an issue. -# pragma warning( push ) -# pragma warning( disable : 4996 ) -# endif + struct bazelShardingOptions { + unsigned int shardIndex, shardCount; + std::string shardFilePath; + }; - return std::getenv( "BAZEL_TEST" ) != nullptr; + static Optional readBazelShardingOptions() { + const auto bazelShardIndex = Detail::getEnv( "TEST_SHARD_INDEX" ); + const auto bazelShardTotal = Detail::getEnv( "TEST_TOTAL_SHARDS" ); + const auto bazelShardInfoFile = Detail::getEnv( "TEST_SHARD_STATUS_FILE" ); + + + const bool has_all = + bazelShardIndex && bazelShardTotal && bazelShardInfoFile; + if ( !has_all ) { + // We provide nice warning message if the input is + // misconfigured. + auto warn = []( const char* env_var ) { + Catch::cerr() + << "Warning: Bazel shard configuration is missing '" + << env_var << "'. Shard configuration is skipped.\n"; + }; + if ( !bazelShardIndex ) { + warn( "TEST_SHARD_INDEX" ); + } + if ( !bazelShardTotal ) { + warn( "TEST_TOTAL_SHARDS" ); + } + if ( !bazelShardInfoFile ) { + warn( "TEST_SHARD_STATUS_FILE" ); + } + return {}; + } -# if defined( _MSC_VER ) -# pragma warning( pop ) -# endif -#endif - } -} + auto shardIndex = parseUInt( bazelShardIndex ); + if ( !shardIndex ) { + Catch::cerr() + << "Warning: could not parse 'TEST_SHARD_INDEX' ('" << bazelShardIndex + << "') as unsigned int.\n"; + return {}; + } + auto shardTotal = parseUInt( bazelShardTotal ); + if ( !shardTotal ) { + Catch::cerr() + << "Warning: could not parse 'TEST_TOTAL_SHARD' ('" + << bazelShardTotal << "') as unsigned int.\n"; + return {}; + } + + return bazelShardingOptions{ + *shardIndex, *shardTotal, bazelShardInfoFile }; + + } + } // end namespace -namespace Catch { bool operator==( ProcessedReporterSpec const& lhs, ProcessedReporterSpec const& rhs ) { @@ -556,17 +597,6 @@ namespace Catch { elem = trim(elem); } - - TestSpecParser parser(ITagAliasRegistry::get()); - if (!m_data.testsOrTags.empty()) { - m_hasTestFilters = true; - for (auto const& testOrTags : m_data.testsOrTags) { - parser.parse(testOrTags); - } - } - m_testSpec = parser.testSpec(); - - // Insert the default reporter if user hasn't asked for a specfic one if ( m_data.reporterSpecifications.empty() ) { m_data.reporterSpecifications.push_back( { @@ -579,29 +609,21 @@ namespace Catch { } ); } -#if !defined(CATCH_PLATFORM_WINDOWS_UWP) - if(provideBazelReporterOutput()){ - // Register a JUnit reporter for Bazel. Bazel sets an environment - // variable with the path to XML output. If this file is written to - // during test, Bazel will not generate a default XML output. - // This allows the XML output file to contain higher level of detail - // than what is possible otherwise. -# if defined( _MSC_VER ) - // On Windows getenv throws a warning as there is no input validation, - // since the key is hardcoded, this should not be an issue. -# pragma warning( push ) -# pragma warning( disable : 4996 ) -# endif - const auto bazelOutputFilePtr = std::getenv( "XML_OUTPUT_FILE" ); -# if defined( _MSC_VER ) -# pragma warning( pop ) -# endif - if ( bazelOutputFilePtr != nullptr ) { - m_data.reporterSpecifications.push_back( - { "junit", std::string( bazelOutputFilePtr ), {}, {} } ); + if ( enableBazelEnvSupport() ) { + readBazelEnvVars(); + } + + // Bazel support can modify the test specs, so parsing has to happen + // after reading Bazel env vars. + TestSpecParser parser( ITagAliasRegistry::get() ); + if ( !m_data.testsOrTags.empty() ) { + m_hasTestFilters = true; + for ( auto const& testOrTags : m_data.testsOrTags ) { + parser.parse( testOrTags ); } - } -#endif + } + m_testSpec = parser.testSpec(); + // We now fixup the reporter specs to handle default output spec, // default colour spec, etc @@ -681,6 +703,39 @@ namespace Catch { unsigned int Config::benchmarkResamples() const { return m_data.benchmarkResamples; } std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); } + void Config::readBazelEnvVars() { + // Register a JUnit reporter for Bazel. Bazel sets an environment + // variable with the path to XML output. If this file is written to + // during test, Bazel will not generate a default XML output. + // This allows the XML output file to contain higher level of detail + // than what is possible otherwise. + const auto bazelOutputFile = Detail::getEnv( "XML_OUTPUT_FILE" ); + + if ( bazelOutputFile ) { + m_data.reporterSpecifications.push_back( + { "junit", std::string( bazelOutputFile ), {}, {} } ); + } + + const auto bazelTestSpec = Detail::getEnv( "TESTBRIDGE_TEST_ONLY" ); + if ( bazelTestSpec ) { + // Presumably the test spec from environment should overwrite + // the one we got from CLI (if we got any) + m_data.testsOrTags.clear(); + m_data.testsOrTags.push_back( bazelTestSpec ); + } + + const auto bazelShardOptions = readBazelShardingOptions(); + if ( bazelShardOptions ) { + std::ofstream f( bazelShardOptions->shardFilePath, + std::ios_base::out | std::ios_base::trunc ); + if ( f.is_open() ) { + f << ""; + m_data.shardIndex = bazelShardOptions->shardIndex; + m_data.shardCount = bazelShardOptions->shardCount; + } + } + } + } // end namespace Catch @@ -1472,6 +1527,7 @@ namespace Catch { #include #include #include +#include namespace Catch { @@ -1495,6 +1551,10 @@ namespace Catch { return m_wildcardPattern.matches( testCase.name ); } + void TestSpec::NamePattern::serializeTo( std::ostream& out ) const { + out << '"' << name() << '"'; + } + TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString ) : Pattern( filterString ) @@ -1507,6 +1567,10 @@ namespace Catch { Tag( m_tag ) ) != end( testCase.tags ); } + void TestSpec::TagPattern::serializeTo( std::ostream& out ) const { + out << name(); + } + bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const { bool should_use = !testCase.isHidden(); for (auto const& pattern : m_required) { @@ -1523,18 +1587,31 @@ namespace Catch { return should_use; } - std::string TestSpec::Filter::name() const { - std::string name; - for (auto const& p : m_required) { - name += p->name(); + void TestSpec::Filter::serializeTo( std::ostream& out ) const { + bool first = true; + for ( auto const& pattern : m_required ) { + if ( !first ) { + out << ' '; + } + out << *pattern; + first = false; } - for (auto const& p : m_forbidden) { - name += p->name(); + for ( auto const& pattern : m_forbidden ) { + if ( !first ) { + out << ' '; + } + out << *pattern; + first = false; } - return name; } + std::string TestSpec::extractFilterName( Filter const& filter ) { + Catch::ReusableStringStream sstr; + sstr << filter; + return sstr.str(); + } + bool TestSpec::hasFilters() const { return !m_filters.empty(); } @@ -1551,7 +1628,7 @@ namespace Catch { for( auto const& test : testCases ) if( isThrowSafe( test, config ) && filter.matches( test.getTestCaseInfo() ) ) currentMatches.emplace_back( &test ); - return FilterMatch{ filter.name(), currentMatches }; + return FilterMatch{ extractFilterName(filter), currentMatches }; } ); return matches; } @@ -1560,6 +1637,17 @@ namespace Catch { return m_invalidSpecs; } + void TestSpec::serializeTo( std::ostream& out ) const { + bool first = true; + for ( auto const& filter : m_filters ) { + if ( !first ) { + out << ','; + } + out << filter; + first = false; + } + } + } @@ -1924,7 +2012,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 3, 1, 1, "", 0 ); + static Version version( 3, 2, 1, "", 0 ); return version; } @@ -2175,11 +2263,7 @@ namespace Catch { CATCH_BREAK_INTO_DEBUGGER(); } if (m_reaction.shouldThrow) { -#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) - throw Catch::TestFailureException(); -#else - CATCH_ERROR( "Test failure requires aborting test!" ); -#endif + throw_test_failure_exception(); } } void AssertionHandler::setCompleted() { @@ -2207,8 +2291,8 @@ namespace Catch { // This is the overload that takes a string and infers the Equals matcher from it // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) { - handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str ) { + handleExceptionMatchExpr( handler, Matchers::Equals( str ) ); } } // namespace Catch @@ -2744,23 +2828,14 @@ namespace Catch { return ParserResult::ok(ParseResultType::Matched); } - CATCH_TRY { - std::size_t parsedTo = 0; - unsigned long parsedSeed = std::stoul(seed, &parsedTo, 0); - if (parsedTo != seed.size()) { - return ParserResult::runtimeError("Could not parse '" + seed + "' as seed"); - } - - // TODO: Ideally we could parse unsigned int directly, - // but the stdlib doesn't provide helper for that - // type. After this is refactored to use fixed size - // type, we should check the parsed value is in range - // of the underlying type. - config.rngSeed = static_cast(parsedSeed); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + seed + "' as seed"); + // TODO: ideally we should be parsing uint32_t directly + // fix this later when we add new parse overload + auto parsedSeed = parseUInt( seed, 0 ); + if ( !parsedSeed ) { + return ParserResult::runtimeError( "Could not parse '" + seed + "' as seed" ); } + config.rngSeed = *parsedSeed; + return ParserResult::ok( ParseResultType::Matched ); }; auto const setDefaultColourMode = [&]( std::string const& colourMode ) { Optional maybeMode = Catch::Detail::stringToColourMode(toLower( colourMode )); @@ -2852,42 +2927,29 @@ namespace Catch { return ParserResult::ok( ParseResultType::Matched ); }; auto const setShardCount = [&]( std::string const& shardCount ) { - CATCH_TRY{ - std::size_t parsedTo = 0; - int64_t parsedCount = std::stoll(shardCount, &parsedTo, 0); - if (parsedTo != shardCount.size()) { - return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); - } - if (parsedCount <= 0) { - return ParserResult::runtimeError("Shard count must be a positive number"); - } - - config.shardCount = static_cast(parsedCount); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); + auto parsedCount = parseUInt( shardCount ); + if ( !parsedCount ) { + return ParserResult::runtimeError( + "Could not parse '" + shardCount + "' as shard count" ); + } + if ( *parsedCount == 0 ) { + return ParserResult::runtimeError( + "Shard count must be positive" ); } + config.shardCount = *parsedCount; + return ParserResult::ok( ParseResultType::Matched ); }; auto const setShardIndex = [&](std::string const& shardIndex) { - CATCH_TRY{ - std::size_t parsedTo = 0; - int64_t parsedIndex = std::stoll(shardIndex, &parsedTo, 0); - if (parsedTo != shardIndex.size()) { - return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); - } - if (parsedIndex < 0) { - return ParserResult::runtimeError("Shard index must be a non-negative number"); - } - - config.shardIndex = static_cast(parsedIndex); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); + auto parsedIndex = parseUInt( shardIndex ); + if ( !parsedIndex ) { + return ParserResult::runtimeError( + "Could not parse '" + shardIndex + "' as shard index" ); } + config.shardIndex = *parsedIndex; + return ParserResult::ok( ParseResultType::Matched ); }; - auto cli = ExeName( config.processName ) | Help( config.showHelp ) @@ -3925,6 +3987,35 @@ namespace Catch { + +#include + +namespace Catch { + namespace Detail { + +#if !defined (CATCH_CONFIG_GETENV) + char const* getEnv( char const* ) { return nullptr; } +#else + + char const* getEnv( char const* varName ) { +# if defined( _MSC_VER ) +# pragma warning( push ) +# pragma warning( disable : 4996 ) // use getenv_s instead of getenv +# endif + + return std::getenv( varName ); + +# if defined( _MSC_VER ) +# pragma warning( pop ) +# endif + } +#endif +} // namespace Detail +} // namespace Catch + + + + #include #include #include @@ -4418,6 +4509,47 @@ namespace Catch { + +#include + +namespace Catch { + + Optional parseUInt(std::string const& input, int base) { + auto trimmed = trim( input ); + // std::stoull is annoying and accepts numbers starting with '-', + // it just negates them into unsigned int + if ( trimmed.empty() || trimmed[0] == '-' ) { + return {}; + } + + CATCH_TRY { + size_t pos = 0; + const auto ret = std::stoull( trimmed, &pos, base ); + + // We did not consume the whole input, so there is an issue + // This can be bunch of different stuff, like multiple numbers + // in the input, or invalid digits/characters and so on. Either + // way, we do not want to return the partially parsed result. + if ( pos != trimmed.size() ) { + return {}; + } + // Too large + if ( ret > std::numeric_limits::max() ) { + return {}; + } + return static_cast(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 {}; + } + } + +} // namespace Catch + + + + #include namespace Catch { @@ -5885,7 +6017,7 @@ namespace Catch { TestCaseInfo const* rhs ) { return *lhs < *rhs; }; - std::set seenTests(testInfoCmp); + std::set seenTests(testInfoCmp); for ( auto const& test : tests ) { const auto infoPtr = &test.getTestCaseInfo(); const auto prev = seenTests.insert( infoPtr ); @@ -6190,6 +6322,21 @@ namespace TestCaseTracking { + +namespace Catch { + + void throw_test_failure_exception() { +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + throw TestFailureException{}; +#else + CATCH_ERROR( "Test failure requires aborting test!" ); +#endif + } + +} // namespace Catch + + + #include #include @@ -6476,10 +6623,6 @@ namespace Catch { m_mode = None; } - TestSpec parseTestSpec( std::string const& arg ) { - return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec(); - } - } // namespace Catch @@ -7588,9 +7731,9 @@ namespace Catch { // This is the general overload that takes a any string matcher // There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers // the Equals matcher (so the header does not mention matchers) - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) { + void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher ) { std::string exceptionMessage = Catch::translateActiveException(); - MatchExpr expr( CATCH_MOVE(exceptionMessage), matcher, matcherString ); + MatchExpr expr( CATCH_MOVE(exceptionMessage), matcher ); handler.handleExpr( expr ); } @@ -7669,22 +7812,6 @@ namespace Catch { #include -namespace { - - constexpr Catch::StringRef bothOrAll( std::uint64_t count ) { - switch (count) { - case 1: - return Catch::StringRef{}; - case 2: - return "both "_catch_sr; - default: - return "all "_catch_sr; - } - } - -} // anon namespace - - namespace Catch { namespace { @@ -7699,42 +7826,6 @@ namespace { static constexpr Catch::StringRef compactPassedString = "passed"_sr; #endif -// Colour, message variants: -// - white: No tests ran. -// - red: Failed [both/all] N test cases, failed [both/all] M assertions. -// - white: Passed [both/all] N test cases (no assertions). -// - red: Failed N tests cases, failed M assertions. -// - green: Passed [both/all] N tests cases with M assertions. -void printTotals(std::ostream& out, const Totals& totals, ColourImpl* colourImpl) { - if (totals.testCases.total() == 0) { - out << "No tests ran."; - } else if (totals.testCases.failed == totals.testCases.total()) { - auto guard = colourImpl->guardColour( Colour::ResultError ).engage( out ); - const StringRef qualify_assertions_failed = - totals.assertions.failed == totals.assertions.total() ? - bothOrAll(totals.assertions.failed) : StringRef{}; - out << - "Failed " << bothOrAll(totals.testCases.failed) - << pluralise(totals.testCases.failed, "test case"_sr) << ", " - "failed " << qualify_assertions_failed << - pluralise(totals.assertions.failed, "assertion"_sr) << '.'; - } else if (totals.assertions.total() == 0) { - out << - "Passed " << bothOrAll(totals.testCases.total()) - << pluralise(totals.testCases.total(), "test case"_sr) - << " (no assertions)."; - } else if (totals.assertions.failed) { - out << colourImpl->guardColour( Colour::ResultError ) << - "Failed " << pluralise(totals.testCases.failed, "test case"_sr) << ", " - "failed " << pluralise(totals.assertions.failed, "assertion"_sr) << '.'; - } else { - out << colourImpl->guardColour( Colour::ResultSuccess ) << - "Passed " << bothOrAll(totals.testCases.passed) - << pluralise(totals.testCases.passed, "test case"_sr) << - " with " << pluralise(totals.assertions.passed, "assertion"_sr) << '.'; - } -} - // Implementation of CompactReporter formatting class AssertionPrinter { public: @@ -7910,7 +8001,7 @@ class AssertionPrinter { if ( m_config->testSpec().hasFilters() ) { m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: " - << serializeFilters( m_config->getTestsOrTags() ) + << m_config->testSpec() << '\n'; } m_stream << "RNG seed: " << getSeed() << '\n'; @@ -7942,7 +8033,7 @@ class AssertionPrinter { } void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) { - printTotals( m_stream, _testRunStats.totals, m_colour.get() ); + printTestRunTotals( m_stream, *m_colour, _testRunStats.totals ); m_stream << "\n\n" << std::flush; StreamingReporterBase::testRunEnded( _testRunStats ); } @@ -8424,7 +8515,7 @@ void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { } void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) { printTotalsDivider(_testRunStats.totals); - printTotals(_testRunStats.totals); + printTestRunTotals( m_stream, *m_colour, _testRunStats.totals ); m_stream << '\n' << std::flush; StreamingReporterBase::testRunEnded(_testRunStats); } @@ -8432,7 +8523,7 @@ void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) { StreamingReporterBase::testRunStarting(_testInfo); if ( m_config->testSpec().hasFilters() ) { m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: " - << serializeFilters( m_config->getTestsOrTags() ) << '\n'; + << m_config->testSpec() << '\n'; } m_stream << "Randomness seeded to: " << getSeed() << '\n'; } @@ -8531,82 +8622,6 @@ void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t << '\n'; } -struct SummaryColumn { - - SummaryColumn( std::string _label, Colour::Code _colour ) - : label( CATCH_MOVE( _label ) ), - colour( _colour ) {} - SummaryColumn addRow( std::uint64_t count ) { - ReusableStringStream rss; - rss << count; - std::string row = rss.str(); - for (auto& oldRow : rows) { - while (oldRow.size() < row.size()) - oldRow = ' ' + oldRow; - while (oldRow.size() > row.size()) - row = ' ' + row; - } - rows.push_back(row); - return *this; - } - - std::string label; - Colour::Code colour; - std::vector rows; - -}; - -void ConsoleReporter::printTotals( Totals const& totals ) { - if (totals.testCases.total() == 0) { - m_stream << m_colour->guardColour( Colour::Warning ) - << "No tests ran\n"; - } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) { - m_stream << m_colour->guardColour( Colour::ResultSuccess ) - << "All tests passed"; - m_stream << " (" - << pluralise(totals.assertions.passed, "assertion"_sr) << " in " - << pluralise(totals.testCases.passed, "test case"_sr) << ')' - << '\n'; - } else { - - std::vector columns; - columns.push_back(SummaryColumn("", Colour::None) - .addRow(totals.testCases.total()) - .addRow(totals.assertions.total())); - 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("failed as expected", Colour::ResultExpectedFailure) - .addRow(totals.testCases.failedButOk) - .addRow(totals.assertions.failedButOk)); - - printSummaryRow("test cases"_sr, columns, 0); - printSummaryRow("assertions"_sr, columns, 1); - } -} -void ConsoleReporter::printSummaryRow(StringRef label, std::vector const& cols, std::size_t row) { - for (auto col : cols) { - std::string const& value = col.rows[row]; - if (col.label.empty()) { - m_stream << label << ": "; - if ( value != "0" ) { - m_stream << value; - } else { - m_stream << m_colour->guardColour( Colour::Warning ) - << "- none -"; - } - } else if (value != "0") { - m_stream << m_colour->guardColour( Colour::LightGrey ) << " | " - << m_colour->guardColour( col.colour ) << value << ' ' - << col.label; - } - } - m_stream << '\n'; -} - void ConsoleReporter::printTotalsDivider(Totals const& totals) { if (totals.testCases.total() > 0) { std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); @@ -8634,9 +8649,6 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { } m_stream << '\n'; } -void ConsoleReporter::printSummaryDivider() { - m_stream << lineOfChars('-') << '\n'; -} } // end namespace Catch @@ -9054,6 +9066,104 @@ namespace Catch { out << "\n\n" << std::flush; } + namespace { + class SummaryColumn { + public: + SummaryColumn( std::string suffix, Colour::Code colour ): + m_suffix( CATCH_MOVE( suffix ) ), m_colour( colour ) {} + + SummaryColumn&& addRow( std::uint64_t count ) && { + std::string row = std::to_string(count); + auto const new_width = std::max( m_width, row.size() ); + if ( new_width > m_width ) { + for ( auto& oldRow : m_rows ) { + oldRow.insert( 0, new_width - m_width, ' ' ); + } + } else { + row.insert( 0, m_width - row.size(), ' ' ); + } + m_width = new_width; + m_rows.push_back( row ); + return std::move( *this ); + } + + std::string const& getSuffix() const { return m_suffix; } + Colour::Code getColour() const { return m_colour; } + std::string const& getRow( std::size_t index ) const { + return m_rows[index]; + } + + private: + std::string m_suffix; + Colour::Code m_colour; + std::size_t m_width = 0; + std::vector m_rows; + }; + + void printSummaryRow( std::ostream& stream, + ColourImpl& colour, + StringRef label, + std::vector const& cols, + std::size_t row ) { + for ( auto const& col : cols ) { + auto const& value = col.getRow( row ); + auto const& suffix = col.getSuffix(); + if ( suffix.empty() ) { + stream << label << ": "; + if ( value != "0" ) { + stream << value; + } else { + stream << colour.guardColour( Colour::Warning ) + << "- none -"; + } + } else if ( value != "0" ) { + stream << colour.guardColour( Colour::LightGrey ) << " | " + << colour.guardColour( col.getColour() ) << value + << ' ' << suffix; + } + } + stream << '\n'; + } + } // namespace + + void printTestRunTotals( std::ostream& stream, + ColourImpl& streamColour, + Totals const& totals ) { + if ( totals.testCases.total() == 0 ) { + stream << streamColour.guardColour( Colour::Warning ) + << "No tests ran\n"; + return; + } + + if ( totals.assertions.total() > 0 && totals.testCases.allPassed() ) { + stream << streamColour.guardColour( Colour::ResultSuccess ) + << "All tests passed"; + stream << " (" + << pluralise( totals.assertions.passed, "assertion"_sr ) + << " in " + << pluralise( totals.testCases.passed, "test case"_sr ) + << ')' << '\n'; + return; + } + + std::vector columns; + columns.push_back( SummaryColumn( "", Colour::None ) + .addRow( totals.testCases.total() ) + .addRow( totals.assertions.total() ) ); + 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( "failed as expected", Colour::ResultExpectedFailure ) + .addRow( totals.testCases.failedButOk ) + .addRow( totals.assertions.failedButOk ) ); + printSummaryRow( stream, streamColour, "test cases"_sr, columns, 0 ); + printSummaryRow( stream, streamColour, "assertions"_sr, columns, 1 ); + } + } // namespace Catch @@ -9074,6 +9184,8 @@ namespace Catch { std::tm timeInfo = {}; #if defined (_MSC_VER) || defined (__MINGW32__) gmtime_s(&timeInfo, &rawtime); +#elif defined (CATCH_PLATFORM_PLAYSTATION) + gmtime_s(&rawtime, &timeInfo); #else gmtime_r(&rawtime, &timeInfo); #endif @@ -9187,10 +9299,10 @@ namespace Catch { xml.scopedElement("property") .writeAttribute("name"_sr, "random-seed"_sr) .writeAttribute("value"_sr, m_config->rngSeed()); - if (m_config->hasTestFilters()) { + if (m_config->testSpec().hasFilters()) { xml.scopedElement("property") .writeAttribute("name"_sr, "filters"_sr) - .writeAttribute("value"_sr, serializeFilters(m_config->getTestsOrTags())); + .writeAttribute("value"_sr, m_config->testSpec()); } } @@ -9563,9 +9675,14 @@ namespace Catch { namespace Catch { namespace { - std::string createRngSeedString(uint32_t seed) { + std::string createMetadataString(IConfig const& config) { ReusableStringStream sstr; - sstr << "rng-seed=" << seed; + if ( config.testSpec().hasFilters() ) { + sstr << "filters='" + << config.testSpec() + << "' "; + } + sstr << "rng-seed=" << config.rngSeed(); return sstr.str(); } } @@ -9573,7 +9690,7 @@ namespace Catch { void SonarQubeReporter::testRunStarting(TestRunInfo const& testRunInfo) { CumulativeReporterBase::testRunStarting(testRunInfo); - xml.writeComment( createRngSeedString( m_config->rngSeed() ) ); + xml.writeComment( createMetadataString( *m_config ) ); xml.startElement("testExecutions"); xml.writeAttribute("version"_sr, '1'); } @@ -9893,6 +10010,9 @@ namespace Catch { } // End anonymous namespace void TAPReporter::testRunStarting( TestRunInfo const& ) { + if ( m_config->testSpec().hasFilters() ) { + m_stream << "# filters: " << m_config->testSpec() << '\n'; + } m_stream << "# rng-seed: " << m_config->rngSeed() << '\n'; } @@ -10131,9 +10251,11 @@ 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("catch2-version"_sr, libraryVersion()); - if (m_config->testSpec().hasFilters()) - m_xml.writeAttribute( "filters"_sr, serializeFilters( m_config->getTestsOrTags() ) ); + if ( m_config->testSpec().hasFilters() ) { + m_xml.writeAttribute( "filters"_sr, m_config->testSpec() ); + } } void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { diff --git a/thirdParty/catch2/extras/catch_amalgamated.hpp b/thirdParty/catch2/extras/catch_amalgamated.hpp index cff2cedfaae0..e91734a45127 100644 --- a/thirdParty/catch2/extras/catch_amalgamated.hpp +++ b/thirdParty/catch2/extras/catch_amalgamated.hpp @@ -1,12 +1,12 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 -// Catch v3.1.1 -// Generated: 2022-10-17 18:47:20.510385 +// Catch v3.2.1 +// Generated: 2022-12-09 23:01:14.526666 // ---------------------------------------------------------- // This file is an amalgamation of multiple different files. // You probably shouldn't edit it directly. @@ -330,6 +330,10 @@ namespace Catch { # if defined( WINAPI_FAMILY ) && ( WINAPI_FAMILY == WINAPI_FAMILY_APP ) # define CATCH_PLATFORM_WINDOWS_UWP # endif + +#elif defined(__ORBIS__) || defined(__PROSPERO__) +# define CATCH_PLATFORM_PLAYSTATION + #endif #endif // CATCH_PLATFORM_HPP_INCLUDED @@ -421,23 +425,32 @@ namespace Catch { # define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wcomma\"" ) + #endif // __clang__ -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif - //////////////////////////////////////////////////////////////////////////////// // We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#if defined( CATCH_PLATFORM_WINDOWS ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( __CYGWIN__ ) || \ + defined( __QNX__ ) || \ + defined( __EMSCRIPTEN__ ) || \ + defined( __DJGPP__ ) || \ + defined( __OS400__ ) +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#else +# define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS #endif -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +//////////////////////////////////////////////////////////////////////////////// +// Assume that some platforms do not support getenv. +#if defined(CATCH_PLATFORM_WINDOWS_UWP) || defined(CATCH_PLATFORM_PLAYSTATION) +# define CATCH_INTERNAL_CONFIG_NO_GETENV +#else +# define CATCH_INTERNAL_CONFIG_GETENV #endif //////////////////////////////////////////////////////////////////////////////// @@ -580,6 +593,10 @@ namespace Catch { # define CATCH_CONFIG_POSIX_SIGNALS #endif +#if defined(CATCH_INTERNAL_CONFIG_GETENV) && !defined(CATCH_INTERNAL_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_GETENV) +# define CATCH_CONFIG_GETENV +#endif + #if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) # define CATCH_CONFIG_CPP11_TO_STRING #endif @@ -668,6 +685,10 @@ namespace Catch { # 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)) #define CATCH_CATCH_ALL if ((false)) @@ -1720,6 +1741,13 @@ 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 @@ -1731,10 +1759,9 @@ namespace Catch { #include namespace Catch { - template - struct always_false : std::false_type {}; + template + struct true_given : std::true_type {}; - template struct true_given : std::true_type {}; struct is_callable_tester { template static true_given()(std::declval()...))> test(int); @@ -3766,6 +3793,7 @@ namespace Catch #endif // CATCH_WILDCARD_PATTERN_HPP_INCLUDED +#include #include #include @@ -3784,6 +3812,14 @@ namespace Catch { virtual bool matches( TestCaseInfo const& testCase ) const = 0; std::string const& name() const; private: + virtual void serializeTo( std::ostream& out ) const = 0; + // Writes string that would be reparsed into the pattern + friend std::ostream& operator<<(std::ostream& out, + Pattern const& pattern) { + pattern.serializeTo( out ); + return out; + } + std::string const m_name; }; @@ -3792,6 +3828,8 @@ namespace Catch { explicit NamePattern( std::string const& name, std::string const& filterString ); bool matches( TestCaseInfo const& testCase ) const override; private: + void serializeTo( std::ostream& out ) const override; + WildcardPattern m_wildcardPattern; }; @@ -3800,6 +3838,8 @@ namespace Catch { explicit TagPattern( std::string const& tag, std::string const& filterString ); bool matches( TestCaseInfo const& testCase ) const override; private: + void serializeTo( std::ostream& out ) const override; + std::string m_tag; }; @@ -3807,10 +3847,19 @@ namespace Catch { std::vector> m_required; std::vector> m_forbidden; + //! Serializes this filter into a string that would be parsed into + //! an equivalent filter + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, Filter const& f) { + f.serializeTo( out ); + return out; + } + bool matches( TestCaseInfo const& testCase ) const; - std::string name() const; }; + static std::string extractFilterName( Filter const& filter ); + public: struct FilterMatch { std::string name; @@ -3827,7 +3876,16 @@ namespace Catch { private: std::vector m_filters; std::vector m_invalidSpecs; + friend class TestSpecParser; + //! Serializes this test spec into a string that would be parsed into + //! equivalent test spec + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, + TestSpec const& spec) { + spec.serializeTo( out ); + return out; + } }; } @@ -4288,6 +4346,9 @@ namespace Catch { std::chrono::milliseconds benchmarkWarmupTime() const override; private: + // Reads Bazel env vars and applies them to the config + void readBazelEnvVars(); + ConfigData m_data; std::vector m_processedReporterSpecs; TestSpec m_testSpec; @@ -4427,7 +4488,7 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_INFO( macroName, log ) \ - Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + const Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \ @@ -5308,6 +5369,115 @@ namespace Catch { #define CATCH_DECOMPOSER_HPP_INCLUDED + +#ifndef CATCH_COMPARE_TRAITS_HPP_INCLUDED +#define CATCH_COMPARE_TRAITS_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Detail { + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic push + // GCC likes to complain about comparing bool with 0, in the decltype() + // that defines the comparable traits below. +# pragma GCC diagnostic ignored "-Wbool-compare" + // "ordered comparison of pointer with integer zero" same as above, + // but it does not have a separate warning flag to suppress +# pragma GCC diagnostic ignored "-Wextra" + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +#if defined( __clang__ ) +# pragma clang diagnostic push + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma clang diagnostic ignored "-Wfloat-equal" +#endif + +#define CATCH_DEFINE_COMPARABLE_TRAIT( id, op ) \ + template \ + struct is_##id##_comparable : std::false_type {}; \ + template \ + struct is_##id##_comparable< \ + T, \ + U, \ + void_t() op std::declval() )>> \ + : std::true_type {}; \ + template \ + struct is_##id##_0_comparable : std::false_type {}; \ + template \ + struct is_##id##_0_comparable() op 0 )>> \ + : std::true_type {}; + + // We need all 6 pre-spaceship comparison ops: <, <=, >, >=, ==, != + CATCH_DEFINE_COMPARABLE_TRAIT( lt, < ) + CATCH_DEFINE_COMPARABLE_TRAIT( le, <= ) + CATCH_DEFINE_COMPARABLE_TRAIT( gt, > ) + CATCH_DEFINE_COMPARABLE_TRAIT( ge, >= ) + CATCH_DEFINE_COMPARABLE_TRAIT( eq, == ) + CATCH_DEFINE_COMPARABLE_TRAIT( ne, != ) + +#undef CATCH_DEFINE_COMPARABLE_TRAIT + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic pop +#endif +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_COMPARE_TRAITS_HPP_INCLUDED + + +#ifndef CATCH_LOGICAL_TRAITS_HPP_INCLUDED +#define CATCH_LOGICAL_TRAITS_HPP_INCLUDED + +#include + +namespace Catch { +namespace Detail { + +#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510 + + using std::conjunction; + using std::disjunction; + using std::negation; + +#else + + template struct conjunction : std::true_type {}; + template struct conjunction : B1 {}; + template + struct conjunction + : std::conditional_t, B1> {}; + + template struct disjunction : std::false_type {}; + template struct disjunction : B1 {}; + template + struct disjunction + : std::conditional_t> {}; + + template + struct negation : std::integral_constant {}; + +#endif + +} // namespace Detail +} // namespace Catch + +#endif // CATCH_LOGICAL_TRAITS_HPP_INCLUDED + +#include #include #ifdef _MSC_VER @@ -5329,6 +5499,9 @@ namespace Catch { namespace Catch { + template + struct always_false : std::false_type {}; + class ITransientExpression { bool m_isBinaryExpression; bool m_result; @@ -5451,68 +5624,134 @@ namespace Catch { }; - // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int) - template - auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast(lhs == rhs); } - template - auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - template - auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - - template - auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast(lhs != rhs); } - template - auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - template - auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - - template class ExprLhs { LhsT m_lhs; public: explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {} - template>::value, int> = 0> - friend auto operator == ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { - return { compareEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "=="_sr, rhs }; - } - template::value, int> = 0> - friend auto operator == ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { - return { compareEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "=="_sr, rhs }; - } +#define CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } - template>::value, int> = 0> - friend auto operator != ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { - return { compareNotEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "!="_sr, rhs }; - } - template::value, int> = 0> - friend auto operator != ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { - return { compareNotEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "!="_sr, rhs }; - } + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( eq, == ) + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( ne, != ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } - #define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(op) \ - template>::value, int> = 0> \ - friend auto operator op ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { \ - return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \ - } \ - template::value, int> = 0> \ - friend auto operator op ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { \ - return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \ - } + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( lt, < ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( le, <= ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( gt, > ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( ge, >= ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR + + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR( op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + !std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(<) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(>) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(<=) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(>=) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(|) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(&) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(^) @@ -5614,7 +5853,7 @@ namespace Catch { auto allowThrows() const -> bool; }; - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str ); } // namespace Catch @@ -5753,7 +5992,7 @@ namespace Catch { catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ } \ catch( ... ) { \ - Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \ + Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher ); \ } \ else \ catchAssertionHandler.handleThrowingCallSkipped(); \ @@ -6489,6 +6728,7 @@ struct AutoReg : Detail::NonCopyable { CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\ @@ -6535,6 +6775,7 @@ struct AutoReg : Detail::NonCopyable { CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template static void TestFuncName(); \ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) { \ @@ -6584,6 +6825,7 @@ struct AutoReg : Detail::NonCopyable { CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template static void TestFunc(); \ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\ @@ -6715,6 +6957,7 @@ struct AutoReg : Detail::NonCopyable { CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template \ struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName ) { \ void test();\ @@ -7114,7 +7357,7 @@ namespace Catch { #define CATCH_VERSION_MACROS_HPP_INCLUDED #define CATCH_VERSION_MAJOR 3 -#define CATCH_VERSION_MINOR 1 +#define CATCH_VERSION_MINOR 2 #define CATCH_VERSION_PATCH 1 #endif // CATCH_VERSION_MACROS_HPP_INCLUDED @@ -8607,6 +8850,21 @@ namespace Catch { #endif // CATCH_FLOATING_POINT_HELPERS_HPP_INCLUDED +#ifndef CATCH_GETENV_HPP_INCLUDED +#define CATCH_GETENV_HPP_INCLUDED + +namespace Catch { +namespace Detail { + + //! Wrapper over `std::getenv` that compiles on UWP (and always returns nullptr there) + char const* getEnv(char const* varName); + +} +} + +#endif // CATCH_GETENV_HPP_INCLUDED + + #ifndef CATCH_ISTREAM_HPP_INCLUDED #define CATCH_ISTREAM_HPP_INCLUDED @@ -8815,6 +9073,26 @@ namespace Catch { #endif // CATCH_OUTPUT_REDIRECT_HPP_INCLUDED +#ifndef CATCH_PARSE_NUMBERS_HPP_INCLUDED +#define CATCH_PARSE_NUMBERS_HPP_INCLUDED + + +#include + +namespace Catch { + + /** + * Parses unsigned int from the input, using provided base + * + * Effectively a wrapper around std::stoul but with better error checking + * e.g. "-1" is rejected, instead of being parsed as UINT_MAX. + */ + Optional parseUInt(std::string const& input, int base = 10); +} + +#endif // CATCH_PARSE_NUMBERS_HPP_INCLUDED + + #ifndef CATCH_REPORTER_REGISTRY_HPP_INCLUDED #define CATCH_REPORTER_REGISTRY_HPP_INCLUDED @@ -9520,7 +9798,6 @@ namespace Catch { } }; - TestSpec parseTestSpec( std::string const& arg ); } // namespace Catch @@ -9903,13 +10180,11 @@ namespace Catch { class MatchExpr : public ITransientExpression { ArgT && m_arg; MatcherT const& m_matcher; - StringRef m_matcherString; public: - MatchExpr( ArgT && arg, MatcherT const& matcher, StringRef matcherString ) + MatchExpr( ArgT && arg, MatcherT const& matcher ) : ITransientExpression{ true, matcher.match( arg ) }, // not forwarding arg here on purpose m_arg( CATCH_FORWARD(arg) ), - m_matcher( matcher ), - m_matcherString( matcherString ) + m_matcher( matcher ) {} void streamReconstructedExpression( std::ostream& os ) const override { @@ -9926,11 +10201,11 @@ namespace Catch { using StringMatcher = Matchers::MatcherBase; - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher ); template - auto makeMatchExpr( ArgT && arg, MatcherT const& matcher, StringRef matcherString ) -> MatchExpr { - return MatchExpr( CATCH_FORWARD(arg), matcher, matcherString ); + auto makeMatchExpr( ArgT && arg, MatcherT const& matcher ) -> MatchExpr { + return MatchExpr( CATCH_FORWARD(arg), matcher ); } } // namespace Catch @@ -9941,7 +10216,7 @@ namespace Catch { do { \ Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ INTERNAL_CATCH_TRY { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher ) ); \ } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ INTERNAL_CATCH_REACT( catchAssertionHandler ) \ } while( false ) @@ -9957,7 +10232,7 @@ namespace Catch { catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ } \ catch( exceptionType const& ex ) { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher ) ); \ } \ catch( ... ) { \ catchAssertionHandler.handleUnexpectedInflightException(); \ @@ -10217,7 +10492,7 @@ namespace Matchers { MatcherGenericBase() = default; ~MatcherGenericBase() override; // = default; - MatcherGenericBase(MatcherGenericBase&) = default; + MatcherGenericBase(MatcherGenericBase const&) = default; MatcherGenericBase(MatcherGenericBase&&) = default; MatcherGenericBase& operator=(MatcherGenericBase const&) = delete; @@ -10249,20 +10524,6 @@ namespace Matchers { return arr; } -#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510 - - using std::conjunction; - -#else // __cpp_lib_logical_traits - - template - struct conjunction : std::true_type {}; - - template - struct conjunction : std::integral_constant::value> {}; - -#endif // __cpp_lib_logical_traits - template using is_generic_matcher = std::is_base_of< Catch::Matchers::MatcherGenericBase, @@ -10270,7 +10531,7 @@ namespace Matchers { >; template - using are_generic_matchers = conjunction...>; + using are_generic_matchers = Catch::Detail::conjunction...>; template using is_matcher = std::is_base_of< @@ -11480,7 +11741,6 @@ namespace Catch { namespace Catch { // Fwd decls - struct SummaryColumn; class TablePrinter; class ConsoleReporter final : public StreamingReporterBase { @@ -11524,12 +11784,7 @@ namespace Catch { // subsequent lines void printHeaderString(std::string const& _string, std::size_t indent = 0); - - void printTotals(Totals const& totals); - void printSummaryRow(StringRef label, std::vector const& cols, std::size_t row); - void printTotalsDivider(Totals const& totals); - void printSummaryDivider(); bool m_headerPrinted = false; bool m_testRunInfoPrinted = false; @@ -11809,6 +12064,15 @@ namespace Catch { bool isFiltered, Verbosity verbosity ); + /** + * Prints test run totals to the provided stream in user-friendly format + * + * Used by the console and compact reporters. + */ + void printTestRunTotals( std::ostream& stream, + ColourImpl& streamColour, + Totals const& totals ); + } // end namespace Catch #endif // CATCH_REPORTER_HELPERS_HPP_INCLUDED diff --git a/thirdParty/catch2/meson.build b/thirdParty/catch2/meson.build index 9655616fd0f7..0cab573e277e 100644 --- a/thirdParty/catch2/meson.build +++ b/thirdParty/catch2/meson.build @@ -1,6 +1,6 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -8,9 +8,9 @@ project( 'catch2', 'cpp', - version: '3.1.1', # CML version placeholder, don't delete + version: '3.2.1', # CML version placeholder, don't delete license: 'BSL-1.0', - meson_version: '>=0.49.0', + meson_version: '>=0.50.0', ) subdir('src/catch2') diff --git a/thirdParty/catch2/src/CMakeLists.txt b/thirdParty/catch2/src/CMakeLists.txt index ae51bf8aef88..b54c6274254e 100644 --- a/thirdParty/catch2/src/CMakeLists.txt +++ b/thirdParty/catch2/src/CMakeLists.txt @@ -7,293 +7,332 @@ include(CatchMiscFunctions) set(Catch2_GUID_CMAKE "8d538cbe-01bf-4a2e-a98a-6c368fdf13d7" CACHE INTERNAL "Project GUID") set(Catch2WithMain_GUID_CMAKE "8bd3552a-2cfb-4a59-ab15-2031b97ada1e" CACHE INTERNAL "Project GUID") -# Please keep these ordered alphabetically set(BENCHMARK_HEADERS - ${SOURCES_DIR}/benchmark/catch_benchmark.hpp - ${SOURCES_DIR}/benchmark/catch_benchmark_all.hpp - ${SOURCES_DIR}/benchmark/catch_chronometer.hpp - ${SOURCES_DIR}/benchmark/catch_clock.hpp - ${SOURCES_DIR}/benchmark/catch_constructor.hpp - ${SOURCES_DIR}/benchmark/catch_environment.hpp - ${SOURCES_DIR}/benchmark/catch_estimate.hpp - ${SOURCES_DIR}/benchmark/catch_execution_plan.hpp - ${SOURCES_DIR}/benchmark/catch_optimizer.hpp - ${SOURCES_DIR}/benchmark/catch_outlier_classification.hpp - ${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_complete_invoke.hpp - ${SOURCES_DIR}/benchmark/detail/catch_estimate_clock.hpp - ${SOURCES_DIR}/benchmark/detail/catch_measure.hpp - ${SOURCES_DIR}/benchmark/detail/catch_repeat.hpp - ${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.hpp - ${SOURCES_DIR}/benchmark/detail/catch_stats.hpp - ${SOURCES_DIR}/benchmark/detail/catch_timing.hpp + ${SOURCES_DIR}/benchmark/catch_benchmark.hpp + ${SOURCES_DIR}/benchmark/catch_benchmark_all.hpp + ${SOURCES_DIR}/benchmark/catch_chronometer.hpp + ${SOURCES_DIR}/benchmark/catch_clock.hpp + ${SOURCES_DIR}/benchmark/catch_constructor.hpp + ${SOURCES_DIR}/benchmark/catch_environment.hpp + ${SOURCES_DIR}/benchmark/catch_estimate.hpp + ${SOURCES_DIR}/benchmark/catch_execution_plan.hpp + ${SOURCES_DIR}/benchmark/catch_optimizer.hpp + ${SOURCES_DIR}/benchmark/catch_outlier_classification.hpp + ${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_complete_invoke.hpp + ${SOURCES_DIR}/benchmark/detail/catch_estimate_clock.hpp + ${SOURCES_DIR}/benchmark/detail/catch_measure.hpp + ${SOURCES_DIR}/benchmark/detail/catch_repeat.hpp + ${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.hpp + ${SOURCES_DIR}/benchmark/detail/catch_stats.hpp + ${SOURCES_DIR}/benchmark/detail/catch_timing.hpp ) set(BENCHMARK_SOURCES - ${SOURCES_DIR}/benchmark/catch_chronometer.cpp - ${SOURCES_DIR}/benchmark/detail/catch_benchmark_function.cpp - ${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.cpp - ${SOURCES_DIR}/benchmark/detail/catch_stats.cpp + ${SOURCES_DIR}/benchmark/catch_chronometer.cpp + ${SOURCES_DIR}/benchmark/detail/catch_benchmark_function.cpp + ${SOURCES_DIR}/benchmark/detail/catch_run_for_at_least.cpp + ${SOURCES_DIR}/benchmark/detail/catch_stats.cpp ) +set(BENCHMARK_FILES ${BENCHMARK_HEADERS} ${BENCHMARK_SOURCES}) -SOURCE_GROUP("benchmark" FILES ${BENCHMARK_HEADERS} ${BENCHMARK_SOURCES}) -set(INTERNAL_HEADERS - "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" - "${SOURCES_DIR}/catch_user_config.hpp.in" - ${SOURCES_DIR}/catch_all.hpp - ${SOURCES_DIR}/matchers/catch_matchers_all.hpp - ${SOURCES_DIR}/generators/catch_generators_all.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_all.hpp - ${SOURCES_DIR}/matchers/internal/catch_matchers_impl.hpp - ${SOURCES_DIR}/internal/catch_case_insensitive_comparisons.hpp - ${SOURCES_DIR}/internal/catch_console_width.hpp - ${SOURCES_DIR}/internal/catch_container_nonmembers.hpp - ${SOURCES_DIR}/internal/catch_noncopyable.hpp - ${SOURCES_DIR}/catch_approx.hpp - ${SOURCES_DIR}/internal/catch_assertion_handler.hpp - ${SOURCES_DIR}/catch_assertion_info.hpp - ${SOURCES_DIR}/catch_assertion_result.hpp - ${SOURCES_DIR}/internal/catch_test_macro_impl.hpp - ${SOURCES_DIR}/internal/catch_test_failure_exception.hpp - ${SOURCES_DIR}/internal/catch_case_sensitive.hpp - ${SOURCES_DIR}/internal/catch_clara.hpp - ${SOURCES_DIR}/internal/catch_commandline.hpp - ${SOURCES_DIR}/internal/catch_source_line_info.hpp - ${SOURCES_DIR}/internal/catch_compiler_capabilities.hpp - ${SOURCES_DIR}/catch_config.hpp - ${SOURCES_DIR}/internal/catch_config_android_logwrite.hpp - ${SOURCES_DIR}/internal/catch_config_counter.hpp - ${SOURCES_DIR}/internal/catch_config_uncaught_exceptions.hpp - ${SOURCES_DIR}/internal/catch_config_wchar.hpp - ${SOURCES_DIR}/internal/catch_console_colour.hpp - ${SOURCES_DIR}/internal/catch_context.hpp - ${SOURCES_DIR}/internal/catch_debug_console.hpp - ${SOURCES_DIR}/internal/catch_debugger.hpp - ${SOURCES_DIR}/internal/catch_decomposer.hpp - ${SOURCES_DIR}/internal/catch_enforce.hpp - ${SOURCES_DIR}/internal/catch_enum_values_registry.hpp - ${SOURCES_DIR}/internal/catch_errno_guard.hpp - ${SOURCES_DIR}/internal/catch_exception_translator_registry.hpp - ${SOURCES_DIR}/internal/catch_fatal_condition_handler.hpp - ${SOURCES_DIR}/internal/catch_floating_point_helpers.hpp - ${SOURCES_DIR}/internal/catch_istream.hpp - ${SOURCES_DIR}/internal/catch_unique_name.hpp - ${SOURCES_DIR}/internal/catch_sharding.hpp - ${SOURCES_DIR}/generators/catch_generator_exception.hpp - ${SOURCES_DIR}/generators/catch_generators.hpp - ${SOURCES_DIR}/generators/catch_generators_adapters.hpp - ${SOURCES_DIR}/generators/catch_generators_random.hpp - ${SOURCES_DIR}/generators/catch_generators_range.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_capture.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_config.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_enum_values_registry.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_exception.hpp - ${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.hpp - ${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_testcase.hpp - ${SOURCES_DIR}/internal/catch_lazy_expr.hpp - ${SOURCES_DIR}/internal/catch_leak_detector.hpp - ${SOURCES_DIR}/internal/catch_list.hpp - ${SOURCES_DIR}/matchers/catch_matchers.hpp - ${SOURCES_DIR}/matchers/catch_matchers_container_properties.hpp - ${SOURCES_DIR}/matchers/catch_matchers_contains.hpp - ${SOURCES_DIR}/matchers/catch_matchers_exception.hpp - ${SOURCES_DIR}/matchers/catch_matchers_floating_point.hpp - ${SOURCES_DIR}/matchers/catch_matchers_predicate.hpp - ${SOURCES_DIR}/matchers/catch_matchers_quantifiers.hpp - ${SOURCES_DIR}/matchers/catch_matchers_string.hpp - ${SOURCES_DIR}/matchers/catch_matchers_templated.hpp - ${SOURCES_DIR}/matchers/catch_matchers_vector.hpp - ${SOURCES_DIR}/catch_message.hpp - ${SOURCES_DIR}/internal/catch_message_info.hpp - ${SOURCES_DIR}/internal/catch_meta.hpp - ${SOURCES_DIR}/internal/catch_move_and_forward.hpp - ${SOURCES_DIR}/internal/catch_optional.hpp - ${SOURCES_DIR}/internal/catch_output_redirect.hpp - ${SOURCES_DIR}/internal/catch_platform.hpp - ${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_number_generator.hpp - ${SOURCES_DIR}/internal/catch_random_seed_generation.hpp - ${SOURCES_DIR}/internal/catch_reporter_registry.hpp - ${SOURCES_DIR}/internal/catch_reporter_spec_parser.hpp - ${SOURCES_DIR}/internal/catch_result_type.hpp - ${SOURCES_DIR}/internal/catch_run_context.hpp - ${SOURCES_DIR}/internal/catch_section.hpp - ${SOURCES_DIR}/internal/catch_stdstreams.hpp - ${SOURCES_DIR}/catch_section_info.hpp - ${SOURCES_DIR}/catch_session.hpp - ${SOURCES_DIR}/internal/catch_singletons.hpp - ${SOURCES_DIR}/internal/catch_startup_exception_registry.hpp - ${SOURCES_DIR}/internal/catch_reusable_string_stream.hpp - ${SOURCES_DIR}/internal/catch_stream_end_stop.hpp - ${SOURCES_DIR}/internal/catch_string_manip.hpp - ${SOURCES_DIR}/internal/catch_stringref.hpp - ${SOURCES_DIR}/catch_tag_alias.hpp - ${SOURCES_DIR}/catch_get_random_seed.hpp - ${SOURCES_DIR}/catch_tag_alias_autoregistrar.hpp - ${SOURCES_DIR}/internal/catch_tag_alias_registry.hpp - ${SOURCES_DIR}/catch_test_case_info.hpp - ${SOURCES_DIR}/internal/catch_test_case_registry_impl.hpp - ${SOURCES_DIR}/internal/catch_test_case_tracker.hpp - ${SOURCES_DIR}/catch_template_test_macros.hpp - ${SOURCES_DIR}/catch_test_macros.hpp - ${SOURCES_DIR}/internal/catch_template_test_registry.hpp - ${SOURCES_DIR}/internal/catch_test_registry.hpp - ${SOURCES_DIR}/catch_test_spec.hpp - ${SOURCES_DIR}/internal/catch_test_spec_parser.hpp - ${SOURCES_DIR}/internal/catch_textflow.hpp - ${SOURCES_DIR}/catch_timer.hpp - ${SOURCES_DIR}/internal/catch_to_string.hpp - ${SOURCES_DIR}/catch_tostring.hpp - ${SOURCES_DIR}/catch_totals.hpp - ${SOURCES_DIR}/catch_translate_exception.hpp - ${SOURCES_DIR}/internal/catch_uncaught_exceptions.hpp - ${SOURCES_DIR}/internal/catch_unique_ptr.hpp - ${SOURCES_DIR}/internal/catch_void_type.hpp - ${SOURCES_DIR}/catch_version.hpp - ${SOURCES_DIR}/catch_version_macros.hpp - ${SOURCES_DIR}/internal/catch_wildcard_pattern.hpp - ${SOURCES_DIR}/internal/catch_windows_h_proxy.hpp - ${SOURCES_DIR}/internal/catch_xmlwriter.hpp - ${SOURCES_DIR}/internal/catch_test_case_info_hasher.hpp +set(IMPL_HEADERS + "${CMAKE_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 + ${SOURCES_DIR}/catch_assertion_info.hpp + ${SOURCES_DIR}/catch_assertion_result.hpp + ${SOURCES_DIR}/catch_config.hpp + ${SOURCES_DIR}/catch_get_random_seed.hpp + ${SOURCES_DIR}/catch_message.hpp + ${SOURCES_DIR}/catch_section_info.hpp + ${SOURCES_DIR}/catch_session.hpp + ${SOURCES_DIR}/catch_tag_alias.hpp + ${SOURCES_DIR}/catch_tag_alias_autoregistrar.hpp + ${SOURCES_DIR}/catch_template_test_macros.hpp + ${SOURCES_DIR}/catch_test_case_info.hpp + ${SOURCES_DIR}/catch_test_macros.hpp + ${SOURCES_DIR}/catch_test_spec.hpp + ${SOURCES_DIR}/catch_timer.hpp + ${SOURCES_DIR}/catch_tostring.hpp + ${SOURCES_DIR}/catch_totals.hpp + ${SOURCES_DIR}/catch_translate_exception.hpp + ${SOURCES_DIR}/catch_version.hpp + ${SOURCES_DIR}/catch_version_macros.hpp + ${SOURCES_DIR}/internal/catch_assertion_handler.hpp + ${SOURCES_DIR}/internal/catch_case_insensitive_comparisons.hpp + ${SOURCES_DIR}/internal/catch_case_sensitive.hpp + ${SOURCES_DIR}/internal/catch_clara.hpp + ${SOURCES_DIR}/internal/catch_commandline.hpp + ${SOURCES_DIR}/internal/catch_compare_traits.hpp + ${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_uncaught_exceptions.hpp + ${SOURCES_DIR}/internal/catch_config_wchar.hpp + ${SOURCES_DIR}/internal/catch_console_colour.hpp + ${SOURCES_DIR}/internal/catch_console_width.hpp + ${SOURCES_DIR}/internal/catch_container_nonmembers.hpp + ${SOURCES_DIR}/internal/catch_context.hpp + ${SOURCES_DIR}/internal/catch_debug_console.hpp + ${SOURCES_DIR}/internal/catch_debugger.hpp + ${SOURCES_DIR}/internal/catch_decomposer.hpp + ${SOURCES_DIR}/internal/catch_enforce.hpp + ${SOURCES_DIR}/internal/catch_enum_values_registry.hpp + ${SOURCES_DIR}/internal/catch_errno_guard.hpp + ${SOURCES_DIR}/internal/catch_exception_translator_registry.hpp + ${SOURCES_DIR}/internal/catch_fatal_condition_handler.hpp + ${SOURCES_DIR}/internal/catch_floating_point_helpers.hpp + ${SOURCES_DIR}/internal/catch_getenv.hpp + ${SOURCES_DIR}/internal/catch_istream.hpp + ${SOURCES_DIR}/internal/catch_lazy_expr.hpp + ${SOURCES_DIR}/internal/catch_leak_detector.hpp + ${SOURCES_DIR}/internal/catch_list.hpp + ${SOURCES_DIR}/internal/catch_logical_traits.hpp + ${SOURCES_DIR}/internal/catch_message_info.hpp + ${SOURCES_DIR}/internal/catch_meta.hpp + ${SOURCES_DIR}/internal/catch_move_and_forward.hpp + ${SOURCES_DIR}/internal/catch_noncopyable.hpp + ${SOURCES_DIR}/internal/catch_optional.hpp + ${SOURCES_DIR}/internal/catch_output_redirect.hpp + ${SOURCES_DIR}/internal/catch_parse_numbers.hpp + ${SOURCES_DIR}/internal/catch_platform.hpp + ${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_number_generator.hpp + ${SOURCES_DIR}/internal/catch_random_seed_generation.hpp + ${SOURCES_DIR}/internal/catch_reporter_registry.hpp + ${SOURCES_DIR}/internal/catch_reporter_spec_parser.hpp + ${SOURCES_DIR}/internal/catch_result_type.hpp + ${SOURCES_DIR}/internal/catch_reusable_string_stream.hpp + ${SOURCES_DIR}/internal/catch_run_context.hpp + ${SOURCES_DIR}/internal/catch_section.hpp + ${SOURCES_DIR}/internal/catch_sharding.hpp + ${SOURCES_DIR}/internal/catch_singletons.hpp + ${SOURCES_DIR}/internal/catch_source_line_info.hpp + ${SOURCES_DIR}/internal/catch_startup_exception_registry.hpp + ${SOURCES_DIR}/internal/catch_stdstreams.hpp + ${SOURCES_DIR}/internal/catch_stream_end_stop.hpp + ${SOURCES_DIR}/internal/catch_string_manip.hpp + ${SOURCES_DIR}/internal/catch_stringref.hpp + ${SOURCES_DIR}/internal/catch_tag_alias_registry.hpp + ${SOURCES_DIR}/internal/catch_template_test_registry.hpp + ${SOURCES_DIR}/internal/catch_test_case_info_hasher.hpp + ${SOURCES_DIR}/internal/catch_test_case_registry_impl.hpp + ${SOURCES_DIR}/internal/catch_test_case_tracker.hpp + ${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_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_unique_name.hpp + ${SOURCES_DIR}/internal/catch_unique_ptr.hpp + ${SOURCES_DIR}/internal/catch_void_type.hpp + ${SOURCES_DIR}/internal/catch_wildcard_pattern.hpp + ${SOURCES_DIR}/internal/catch_windows_h_proxy.hpp + ${SOURCES_DIR}/internal/catch_xmlwriter.hpp ) set(IMPL_SOURCES - ${SOURCES_DIR}/catch_approx.cpp - ${SOURCES_DIR}/internal/catch_assertion_handler.cpp - ${SOURCES_DIR}/catch_assertion_result.cpp - ${SOURCES_DIR}/internal/catch_clara.cpp - ${SOURCES_DIR}/internal/catch_commandline.cpp - ${SOURCES_DIR}/internal/catch_source_line_info.cpp - ${SOURCES_DIR}/catch_config.cpp - ${SOURCES_DIR}/internal/catch_case_insensitive_comparisons.cpp - ${SOURCES_DIR}/internal/catch_console_colour.cpp - ${SOURCES_DIR}/internal/catch_context.cpp - ${SOURCES_DIR}/internal/catch_debug_console.cpp - ${SOURCES_DIR}/internal/catch_debugger.cpp - ${SOURCES_DIR}/internal/catch_enforce.cpp - ${SOURCES_DIR}/internal/catch_enum_values_registry.cpp - ${SOURCES_DIR}/internal/catch_exception_translator_registry.cpp - ${SOURCES_DIR}/internal/catch_fatal_condition_handler.cpp - ${SOURCES_DIR}/internal/catch_floating_point_helpers.cpp - ${SOURCES_DIR}/internal/catch_istream.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_reporter.cpp - ${SOURCES_DIR}/internal/catch_list.cpp - ${SOURCES_DIR}/matchers/catch_matchers_floating_point.cpp - ${SOURCES_DIR}/matchers/catch_matchers_quantifiers.cpp - ${SOURCES_DIR}/matchers/catch_matchers_string.cpp - ${SOURCES_DIR}/matchers/catch_matchers_templated.cpp - ${SOURCES_DIR}/catch_message.cpp - ${SOURCES_DIR}/internal/catch_output_redirect.cpp - ${SOURCES_DIR}/catch_registry_hub.cpp - ${SOURCES_DIR}/internal/catch_random_number_generator.cpp - ${SOURCES_DIR}/internal/catch_random_seed_generation.cpp - ${SOURCES_DIR}/internal/catch_reporter_registry.cpp - ${SOURCES_DIR}/internal/catch_reporter_spec_parser.cpp - ${SOURCES_DIR}/internal/catch_result_type.cpp - ${SOURCES_DIR}/internal/catch_run_context.cpp - ${SOURCES_DIR}/internal/catch_section.cpp - ${SOURCES_DIR}/internal/catch_stdstreams.cpp - ${SOURCES_DIR}/catch_session.cpp - ${SOURCES_DIR}/internal/catch_singletons.cpp - ${SOURCES_DIR}/internal/catch_reusable_string_stream.cpp - ${SOURCES_DIR}/internal/catch_stringref.cpp - ${SOURCES_DIR}/internal/catch_string_manip.cpp - ${SOURCES_DIR}/internal/catch_tag_alias_registry.cpp - ${SOURCES_DIR}/catch_test_case_info.cpp - ${SOURCES_DIR}/internal/catch_test_case_registry_impl.cpp - ${SOURCES_DIR}/internal/catch_test_case_tracker.cpp - ${SOURCES_DIR}/internal/catch_test_registry.cpp - ${SOURCES_DIR}/internal/catch_textflow.cpp - ${SOURCES_DIR}/catch_test_spec.cpp - ${SOURCES_DIR}/internal/catch_test_spec_parser.cpp - ${SOURCES_DIR}/catch_timer.cpp - ${SOURCES_DIR}/catch_tostring.cpp - ${SOURCES_DIR}/catch_totals.cpp - ${SOURCES_DIR}/catch_version.cpp - ${SOURCES_DIR}/internal/catch_wildcard_pattern.cpp - ${SOURCES_DIR}/internal/catch_xmlwriter.cpp - ${SOURCES_DIR}/internal/catch_test_case_info_hasher.cpp - ${SOURCES_DIR}/generators/catch_generators_random.cpp - ${SOURCES_DIR}/generators/catch_generator_exception.cpp - ${SOURCES_DIR}/generators/catch_generators.cpp - ${SOURCES_DIR}/matchers/catch_matchers.cpp - ${SOURCES_DIR}/matchers/catch_matchers_container_properties.cpp - ${SOURCES_DIR}/matchers/catch_matchers_exception.cpp - ${SOURCES_DIR}/matchers/catch_matchers_predicate.cpp - ${SOURCES_DIR}/matchers/internal/catch_matchers_impl.cpp - ${SOURCES_DIR}/catch_tag_alias_autoregistrar.cpp - ${SOURCES_DIR}/catch_get_random_seed.cpp - ${SOURCES_DIR}/internal/catch_decomposer.cpp - ${SOURCES_DIR}/internal/catch_errno_guard.cpp - ${SOURCES_DIR}/internal/catch_lazy_expr.cpp - ${SOURCES_DIR}/internal/catch_leak_detector.cpp - ${SOURCES_DIR}/internal/catch_message_info.cpp - ${SOURCES_DIR}/internal/catch_polyfills.cpp - ${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp - ${SOURCES_DIR}/internal/catch_uncaught_exceptions.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_capture.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_config.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_exception.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_factory.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_reporter_registry.cpp - ${SOURCES_DIR}/interfaces/catch_interfaces_testcase.cpp + ${SOURCES_DIR}/catch_approx.cpp + ${SOURCES_DIR}/catch_assertion_result.cpp + ${SOURCES_DIR}/catch_config.cpp + ${SOURCES_DIR}/catch_get_random_seed.cpp + ${SOURCES_DIR}/catch_message.cpp + ${SOURCES_DIR}/catch_registry_hub.cpp + ${SOURCES_DIR}/catch_session.cpp + ${SOURCES_DIR}/catch_tag_alias_autoregistrar.cpp + ${SOURCES_DIR}/catch_test_case_info.cpp + ${SOURCES_DIR}/catch_test_spec.cpp + ${SOURCES_DIR}/catch_timer.cpp + ${SOURCES_DIR}/catch_tostring.cpp + ${SOURCES_DIR}/catch_totals.cpp + ${SOURCES_DIR}/catch_version.cpp + ${SOURCES_DIR}/internal/catch_assertion_handler.cpp + ${SOURCES_DIR}/internal/catch_case_insensitive_comparisons.cpp + ${SOURCES_DIR}/internal/catch_clara.cpp + ${SOURCES_DIR}/internal/catch_commandline.cpp + ${SOURCES_DIR}/internal/catch_console_colour.cpp + ${SOURCES_DIR}/internal/catch_context.cpp + ${SOURCES_DIR}/internal/catch_debug_console.cpp + ${SOURCES_DIR}/internal/catch_debugger.cpp + ${SOURCES_DIR}/internal/catch_decomposer.cpp + ${SOURCES_DIR}/internal/catch_enforce.cpp + ${SOURCES_DIR}/internal/catch_enum_values_registry.cpp + ${SOURCES_DIR}/internal/catch_errno_guard.cpp + ${SOURCES_DIR}/internal/catch_exception_translator_registry.cpp + ${SOURCES_DIR}/internal/catch_fatal_condition_handler.cpp + ${SOURCES_DIR}/internal/catch_floating_point_helpers.cpp + ${SOURCES_DIR}/internal/catch_getenv.cpp + ${SOURCES_DIR}/internal/catch_istream.cpp + ${SOURCES_DIR}/internal/catch_lazy_expr.cpp + ${SOURCES_DIR}/internal/catch_leak_detector.cpp + ${SOURCES_DIR}/internal/catch_list.cpp + ${SOURCES_DIR}/internal/catch_message_info.cpp + ${SOURCES_DIR}/internal/catch_output_redirect.cpp + ${SOURCES_DIR}/internal/catch_parse_numbers.cpp + ${SOURCES_DIR}/internal/catch_polyfills.cpp + ${SOURCES_DIR}/internal/catch_random_number_generator.cpp + ${SOURCES_DIR}/internal/catch_random_seed_generation.cpp + ${SOURCES_DIR}/internal/catch_reporter_registry.cpp + ${SOURCES_DIR}/internal/catch_reporter_spec_parser.cpp + ${SOURCES_DIR}/internal/catch_result_type.cpp + ${SOURCES_DIR}/internal/catch_reusable_string_stream.cpp + ${SOURCES_DIR}/internal/catch_run_context.cpp + ${SOURCES_DIR}/internal/catch_section.cpp + ${SOURCES_DIR}/internal/catch_singletons.cpp + ${SOURCES_DIR}/internal/catch_source_line_info.cpp + ${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp + ${SOURCES_DIR}/internal/catch_stdstreams.cpp + ${SOURCES_DIR}/internal/catch_string_manip.cpp + ${SOURCES_DIR}/internal/catch_stringref.cpp + ${SOURCES_DIR}/internal/catch_tag_alias_registry.cpp + ${SOURCES_DIR}/internal/catch_test_case_info_hasher.cpp + ${SOURCES_DIR}/internal/catch_test_case_registry_impl.cpp + ${SOURCES_DIR}/internal/catch_test_case_tracker.cpp + ${SOURCES_DIR}/internal/catch_test_failure_exception.cpp + ${SOURCES_DIR}/internal/catch_test_registry.cpp + ${SOURCES_DIR}/internal/catch_test_spec_parser.cpp + ${SOURCES_DIR}/internal/catch_textflow.cpp + ${SOURCES_DIR}/internal/catch_uncaught_exceptions.cpp + ${SOURCES_DIR}/internal/catch_wildcard_pattern.cpp + ${SOURCES_DIR}/internal/catch_xmlwriter.cpp ) -set(INTERNAL_FILES ${IMPL_SOURCES} ${INTERNAL_HEADERS}) +set(INTERNAL_FILES ${IMPL_SOURCES} ${IMPL_HEADERS}) + +set(INTERFACE_HEADERS + ${SOURCES_DIR}/interfaces/catch_interfaces_all.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_capture.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_config.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_enum_values_registry.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_exception.hpp + ${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.hpp + ${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_testcase.hpp +) +set(INTERFACE_SOURCES + ${SOURCES_DIR}/interfaces/catch_interfaces_capture.cpp + ${SOURCES_DIR}/interfaces/catch_interfaces_config.cpp + ${SOURCES_DIR}/interfaces/catch_interfaces_exception.cpp + ${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.cpp + ${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}) + +set(GENERATOR_HEADERS + ${SOURCES_DIR}/generators/catch_generator_exception.hpp + ${SOURCES_DIR}/generators/catch_generators.hpp + ${SOURCES_DIR}/generators/catch_generators_adapters.hpp + ${SOURCES_DIR}/generators/catch_generators_all.hpp + ${SOURCES_DIR}/generators/catch_generators_random.hpp + ${SOURCES_DIR}/generators/catch_generators_range.hpp +) +set(GENERATOR_SOURCES + ${SOURCES_DIR}/generators/catch_generator_exception.cpp + ${SOURCES_DIR}/generators/catch_generators.cpp + ${SOURCES_DIR}/generators/catch_generators_random.cpp +) +set(GENERATOR_FILES ${GENERATOR_HEADERS} ${GENERATOR_SOURCES}) + +set(MATCHER_HEADERS + ${SOURCES_DIR}/matchers/catch_matchers.hpp + ${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_exception.hpp + ${SOURCES_DIR}/matchers/catch_matchers_floating_point.hpp + ${SOURCES_DIR}/matchers/catch_matchers_predicate.hpp + ${SOURCES_DIR}/matchers/catch_matchers_quantifiers.hpp + ${SOURCES_DIR}/matchers/catch_matchers_string.hpp + ${SOURCES_DIR}/matchers/catch_matchers_templated.hpp + ${SOURCES_DIR}/matchers/catch_matchers_vector.hpp + ${SOURCES_DIR}/matchers/internal/catch_matchers_impl.hpp +) +set(MATCHER_SOURCES + ${SOURCES_DIR}/matchers/catch_matchers.cpp + ${SOURCES_DIR}/matchers/catch_matchers_container_properties.cpp + ${SOURCES_DIR}/matchers/catch_matchers_exception.cpp + ${SOURCES_DIR}/matchers/catch_matchers_floating_point.cpp + ${SOURCES_DIR}/matchers/catch_matchers_predicate.cpp + ${SOURCES_DIR}/matchers/catch_matchers_quantifiers.cpp + ${SOURCES_DIR}/matchers/catch_matchers_string.cpp + ${SOURCES_DIR}/matchers/catch_matchers_templated.cpp + ${SOURCES_DIR}/matchers/internal/catch_matchers_impl.cpp +) +set(MATCHER_FILES ${MATCHER_HEADERS} ${MATCHER_SOURCES}) -# Please keep these ordered alphabetically set(REPORTER_HEADERS - ${SOURCES_DIR}/reporters/catch_reporters_all.hpp - ${SOURCES_DIR}/reporters/catch_reporter_automake.hpp - ${SOURCES_DIR}/reporters/catch_reporter_common_base.hpp - ${SOURCES_DIR}/reporters/catch_reporter_compact.hpp - ${SOURCES_DIR}/reporters/catch_reporter_console.hpp - ${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_junit.hpp - ${SOURCES_DIR}/reporters/catch_reporter_multi.hpp - ${SOURCES_DIR}/reporters/catch_reporter_registrars.hpp - ${SOURCES_DIR}/reporters/catch_reporter_sonarqube.hpp - ${SOURCES_DIR}/reporters/catch_reporter_streaming_base.hpp - ${SOURCES_DIR}/reporters/catch_reporter_tap.hpp - ${SOURCES_DIR}/reporters/catch_reporter_teamcity.hpp - ${SOURCES_DIR}/reporters/catch_reporter_xml.hpp + ${SOURCES_DIR}/reporters/catch_reporter_automake.hpp + ${SOURCES_DIR}/reporters/catch_reporter_common_base.hpp + ${SOURCES_DIR}/reporters/catch_reporter_compact.hpp + ${SOURCES_DIR}/reporters/catch_reporter_console.hpp + ${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_junit.hpp + ${SOURCES_DIR}/reporters/catch_reporter_multi.hpp + ${SOURCES_DIR}/reporters/catch_reporter_registrars.hpp + ${SOURCES_DIR}/reporters/catch_reporter_sonarqube.hpp + ${SOURCES_DIR}/reporters/catch_reporter_streaming_base.hpp + ${SOURCES_DIR}/reporters/catch_reporter_tap.hpp + ${SOURCES_DIR}/reporters/catch_reporter_teamcity.hpp + ${SOURCES_DIR}/reporters/catch_reporter_xml.hpp + ${SOURCES_DIR}/reporters/catch_reporters_all.hpp ) set(REPORTER_SOURCES - ${SOURCES_DIR}/reporters/catch_reporter_automake.cpp - ${SOURCES_DIR}/reporters/catch_reporter_common_base.cpp - ${SOURCES_DIR}/reporters/catch_reporter_compact.cpp - ${SOURCES_DIR}/reporters/catch_reporter_console.cpp - ${SOURCES_DIR}/reporters/catch_reporter_cumulative_base.cpp - ${SOURCES_DIR}/reporters/catch_reporter_event_listener.cpp - ${SOURCES_DIR}/reporters/catch_reporter_helpers.cpp - ${SOURCES_DIR}/reporters/catch_reporter_junit.cpp - ${SOURCES_DIR}/reporters/catch_reporter_multi.cpp - ${SOURCES_DIR}/reporters/catch_reporter_registrars.cpp - ${SOURCES_DIR}/reporters/catch_reporter_sonarqube.cpp - ${SOURCES_DIR}/reporters/catch_reporter_streaming_base.cpp - ${SOURCES_DIR}/reporters/catch_reporter_tap.cpp - ${SOURCES_DIR}/reporters/catch_reporter_teamcity.cpp - ${SOURCES_DIR}/reporters/catch_reporter_xml.cpp + ${SOURCES_DIR}/reporters/catch_reporter_automake.cpp + ${SOURCES_DIR}/reporters/catch_reporter_common_base.cpp + ${SOURCES_DIR}/reporters/catch_reporter_compact.cpp + ${SOURCES_DIR}/reporters/catch_reporter_console.cpp + ${SOURCES_DIR}/reporters/catch_reporter_cumulative_base.cpp + ${SOURCES_DIR}/reporters/catch_reporter_event_listener.cpp + ${SOURCES_DIR}/reporters/catch_reporter_helpers.cpp + ${SOURCES_DIR}/reporters/catch_reporter_junit.cpp + ${SOURCES_DIR}/reporters/catch_reporter_multi.cpp + ${SOURCES_DIR}/reporters/catch_reporter_registrars.cpp + ${SOURCES_DIR}/reporters/catch_reporter_sonarqube.cpp + ${SOURCES_DIR}/reporters/catch_reporter_streaming_base.cpp + ${SOURCES_DIR}/reporters/catch_reporter_tap.cpp + ${SOURCES_DIR}/reporters/catch_reporter_teamcity.cpp + ${SOURCES_DIR}/reporters/catch_reporter_xml.cpp ) set(REPORTER_FILES ${REPORTER_HEADERS} ${REPORTER_SOURCES}) -add_library(Catch2 +set(ALL_FILES + ${BENCHMARK_FILES} + ${GENERATOR_FILES} ${REPORTER_FILES} + ${INTERFACE_FILES} ${INTERNAL_FILES} - ${BENCHMARK_HEADERS} - ${BENCHMARK_SOURCES} + ${MATCHER_FILES} +) + +set(FILTERED_FILES ${ALL_FILES}) +list(REMOVE_ITEM FILTERED_FILES "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp") +source_group( + TREE ${SOURCES_DIR} + PREFIX sources + FILES ${FILTERED_FILES} +) +source_group("generated headers" + FILES + "${CMAKE_BINARY_DIR}/generated-includes/catch2/catch_user_config.hpp" ) + +add_library(Catch2 ${ALL_FILES}) add_build_reproducibility_settings(Catch2) add_library(Catch2::Catch2 ALIAS Catch2) @@ -301,7 +340,7 @@ if (ANDROID) target_link_libraries(Catch2 INTERFACE log) endif() -set_target_properties(Catch2 PROPERTIES +set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "d" VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION}) @@ -366,7 +405,7 @@ if (NOT_SUBPROJECT) Catch2WithMain EXPORT Catch2Targets - LIBRARY DESTINATION + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -401,10 +440,7 @@ endif() if (CATCH_BUILD_EXAMPLES OR CATCH_BUILD_EXTRA_TESTS) add_library(Catch2_buildall_interface INTERFACE) target_sources(Catch2_buildall_interface INTERFACE - ${REPORTER_FILES} - ${INTERNAL_FILES} - ${BENCHMARK_HEADERS} - ${BENCHMARK_SOURCES} + ${ALL_FILES} # Also include main entry point ${SOURCES_DIR}/internal/catch_main.cpp ) diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_benchmark.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_benchmark.hpp index 66e3670f602a..a2d5c3ea58da 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_benchmark.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_benchmark.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_benchmark_all.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_benchmark_all.hpp index 913942b395d9..eb81f2386b91 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_benchmark_all.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_benchmark_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.cpp b/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.cpp index 459a26c7e4fe..92f03c9f65fd 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.cpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.hpp index 7ef08cef0d5a..bce2406b872c 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_chronometer.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_clock.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_clock.hpp index e0cf4aaeb4a4..cee46097d0b6 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_clock.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_clock.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_constructor.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_constructor.hpp index f2a743ab6de9..853bd6c1935d 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_constructor.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_constructor.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_environment.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_environment.hpp index cadd7bc39235..de4d77df4f07 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_environment.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_environment.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_estimate.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_estimate.hpp index 884a4614eaaa..be594a189b48 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_estimate.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_estimate.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_execution_plan.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_execution_plan.hpp index bcb366ce6ab5..039de7ee5efd 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_execution_plan.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_execution_plan.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_optimizer.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_optimizer.hpp index b9af3ea1de55..0dbfc1450c37 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_optimizer.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_optimizer.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_outlier_classification.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_outlier_classification.hpp index 933f045997ae..e31d65d4a24d 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_outlier_classification.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_outlier_classification.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/catch_sample_analysis.hpp b/thirdParty/catch2/src/catch2/benchmark/catch_sample_analysis.hpp index 6204aaf14174..d849d2464446 100644 --- a/thirdParty/catch2/src/catch2/benchmark/catch_sample_analysis.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/catch_sample_analysis.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_analyse.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_analyse.hpp index 6652f5f4d85f..77b0a9d3864b 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_analyse.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_analyse.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp index 9562d29e7c9b..b437d04929f9 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp index 655c863508fc..152982587714 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp index 747b37a9968b..49db413ec592 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp index c392ca4f7e9e..907773f24d30 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_measure.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_measure.hpp index 739e91e58947..388814c1cb2f 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_measure.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_measure.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_repeat.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_repeat.hpp index 360af09b6fa8..08c03373bd72 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_repeat.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_repeat.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp index 6c246d6a5c53..35778b27f9d0 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp index 6b2f56e77bc0..976a4b243051 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.cpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.cpp index 023508064ab5..514ed1f73cd8 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.cpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.hpp index bfeace2c127d..4c54ec52e329 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_stats.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/benchmark/detail/catch_timing.hpp b/thirdParty/catch2/src/catch2/benchmark/detail/catch_timing.hpp index 40a9512b7d54..f5c25571c477 100644 --- a/thirdParty/catch2/src/catch2/benchmark/detail/catch_timing.hpp +++ b/thirdParty/catch2/src/catch2/benchmark/detail/catch_timing.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_all.hpp b/thirdParty/catch2/src/catch2/catch_all.hpp index bd83f5a7c5c9..a0bf76052d63 100644 --- a/thirdParty/catch2/src/catch2/catch_all.hpp +++ b/thirdParty/catch2/src/catch2/catch_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -68,16 +69,19 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/thirdParty/catch2/src/catch2/catch_approx.cpp b/thirdParty/catch2/src/catch2/catch_approx.cpp index b477d6ed985a..407586d1d5db 100644 --- a/thirdParty/catch2/src/catch2/catch_approx.cpp +++ b/thirdParty/catch2/src/catch2/catch_approx.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_approx.hpp b/thirdParty/catch2/src/catch2/catch_approx.hpp index a46caeb53b49..de4d2ab4ca0a 100644 --- a/thirdParty/catch2/src/catch2/catch_approx.hpp +++ b/thirdParty/catch2/src/catch2/catch_approx.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_assertion_info.hpp b/thirdParty/catch2/src/catch2/catch_assertion_info.hpp index 516c324c5c97..9d2f91fad01f 100644 --- a/thirdParty/catch2/src/catch2/catch_assertion_info.hpp +++ b/thirdParty/catch2/src/catch2/catch_assertion_info.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_assertion_result.cpp b/thirdParty/catch2/src/catch2/catch_assertion_result.cpp index 2912c8d305e0..5b5d3290a176 100644 --- a/thirdParty/catch2/src/catch2/catch_assertion_result.cpp +++ b/thirdParty/catch2/src/catch2/catch_assertion_result.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_assertion_result.hpp b/thirdParty/catch2/src/catch2/catch_assertion_result.hpp index 3008664c212b..6829e2f7fe81 100644 --- a/thirdParty/catch2/src/catch2/catch_assertion_result.hpp +++ b/thirdParty/catch2/src/catch2/catch_assertion_result.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_config.cpp b/thirdParty/catch2/src/catch2/catch_config.cpp index 4cb3627db542..eb4f5ad36250 100644 --- a/thirdParty/catch2/src/catch2/catch_config.cpp +++ b/thirdParty/catch2/src/catch2/catch_config.cpp @@ -1,45 +1,88 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 #include #include #include -#include +#include +#include #include #include #include #include +#include -namespace { - bool provideBazelReporterOutput() { -#if defined(CATCH_CONFIG_BAZEL_SUPPORT) - return true; -#elif defined(CATCH_PLATFORM_WINDOWS_UWP) - // UWP does not support environment variables - return false; +#include + +namespace Catch { + + namespace { + static bool enableBazelEnvSupport() { +#if defined( CATCH_CONFIG_BAZEL_SUPPORT ) + return true; #else + return Detail::getEnv( "BAZEL_TEST" ) != nullptr; +#endif + } -# if defined( _MSC_VER ) - // On Windows getenv throws a warning as there is no input validation, - // since the switch is hardcoded, this should not be an issue. -# pragma warning( push ) -# pragma warning( disable : 4996 ) -# endif + struct bazelShardingOptions { + unsigned int shardIndex, shardCount; + std::string shardFilePath; + }; + + static Optional readBazelShardingOptions() { + const auto bazelShardIndex = Detail::getEnv( "TEST_SHARD_INDEX" ); + const auto bazelShardTotal = Detail::getEnv( "TEST_TOTAL_SHARDS" ); + const auto bazelShardInfoFile = Detail::getEnv( "TEST_SHARD_STATUS_FILE" ); + + + const bool has_all = + bazelShardIndex && bazelShardTotal && bazelShardInfoFile; + if ( !has_all ) { + // We provide nice warning message if the input is + // misconfigured. + auto warn = []( const char* env_var ) { + Catch::cerr() + << "Warning: Bazel shard configuration is missing '" + << env_var << "'. Shard configuration is skipped.\n"; + }; + if ( !bazelShardIndex ) { + warn( "TEST_SHARD_INDEX" ); + } + if ( !bazelShardTotal ) { + warn( "TEST_TOTAL_SHARDS" ); + } + if ( !bazelShardInfoFile ) { + warn( "TEST_SHARD_STATUS_FILE" ); + } + return {}; + } - return std::getenv( "BAZEL_TEST" ) != nullptr; + auto shardIndex = parseUInt( bazelShardIndex ); + if ( !shardIndex ) { + Catch::cerr() + << "Warning: could not parse 'TEST_SHARD_INDEX' ('" << bazelShardIndex + << "') as unsigned int.\n"; + return {}; + } + auto shardTotal = parseUInt( bazelShardTotal ); + if ( !shardTotal ) { + Catch::cerr() + << "Warning: could not parse 'TEST_TOTAL_SHARD' ('" + << bazelShardTotal << "') as unsigned int.\n"; + return {}; + } -# if defined( _MSC_VER ) -# pragma warning( pop ) -# endif -#endif - } -} + return bazelShardingOptions{ + *shardIndex, *shardTotal, bazelShardInfoFile }; + + } + } // end namespace -namespace Catch { bool operator==( ProcessedReporterSpec const& lhs, ProcessedReporterSpec const& rhs ) { @@ -62,17 +105,6 @@ namespace Catch { elem = trim(elem); } - - TestSpecParser parser(ITagAliasRegistry::get()); - if (!m_data.testsOrTags.empty()) { - m_hasTestFilters = true; - for (auto const& testOrTags : m_data.testsOrTags) { - parser.parse(testOrTags); - } - } - m_testSpec = parser.testSpec(); - - // Insert the default reporter if user hasn't asked for a specfic one if ( m_data.reporterSpecifications.empty() ) { m_data.reporterSpecifications.push_back( { @@ -85,29 +117,21 @@ namespace Catch { } ); } -#if !defined(CATCH_PLATFORM_WINDOWS_UWP) - if(provideBazelReporterOutput()){ - // Register a JUnit reporter for Bazel. Bazel sets an environment - // variable with the path to XML output. If this file is written to - // during test, Bazel will not generate a default XML output. - // This allows the XML output file to contain higher level of detail - // than what is possible otherwise. -# if defined( _MSC_VER ) - // On Windows getenv throws a warning as there is no input validation, - // since the key is hardcoded, this should not be an issue. -# pragma warning( push ) -# pragma warning( disable : 4996 ) -# endif - const auto bazelOutputFilePtr = std::getenv( "XML_OUTPUT_FILE" ); -# if defined( _MSC_VER ) -# pragma warning( pop ) -# endif - if ( bazelOutputFilePtr != nullptr ) { - m_data.reporterSpecifications.push_back( - { "junit", std::string( bazelOutputFilePtr ), {}, {} } ); + if ( enableBazelEnvSupport() ) { + readBazelEnvVars(); + } + + // Bazel support can modify the test specs, so parsing has to happen + // after reading Bazel env vars. + TestSpecParser parser( ITagAliasRegistry::get() ); + if ( !m_data.testsOrTags.empty() ) { + m_hasTestFilters = true; + for ( auto const& testOrTags : m_data.testsOrTags ) { + parser.parse( testOrTags ); } - } -#endif + } + m_testSpec = parser.testSpec(); + // We now fixup the reporter specs to handle default output spec, // default colour spec, etc @@ -187,4 +211,37 @@ namespace Catch { unsigned int Config::benchmarkResamples() const { return m_data.benchmarkResamples; } std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); } + void Config::readBazelEnvVars() { + // Register a JUnit reporter for Bazel. Bazel sets an environment + // variable with the path to XML output. If this file is written to + // during test, Bazel will not generate a default XML output. + // This allows the XML output file to contain higher level of detail + // than what is possible otherwise. + const auto bazelOutputFile = Detail::getEnv( "XML_OUTPUT_FILE" ); + + if ( bazelOutputFile ) { + m_data.reporterSpecifications.push_back( + { "junit", std::string( bazelOutputFile ), {}, {} } ); + } + + const auto bazelTestSpec = Detail::getEnv( "TESTBRIDGE_TEST_ONLY" ); + if ( bazelTestSpec ) { + // Presumably the test spec from environment should overwrite + // the one we got from CLI (if we got any) + m_data.testsOrTags.clear(); + m_data.testsOrTags.push_back( bazelTestSpec ); + } + + const auto bazelShardOptions = readBazelShardingOptions(); + if ( bazelShardOptions ) { + std::ofstream f( bazelShardOptions->shardFilePath, + std::ios_base::out | std::ios_base::trunc ); + if ( f.is_open() ) { + f << ""; + m_data.shardIndex = bazelShardOptions->shardIndex; + m_data.shardCount = bazelShardOptions->shardCount; + } + } + } + } // end namespace Catch diff --git a/thirdParty/catch2/src/catch2/catch_config.hpp b/thirdParty/catch2/src/catch2/catch_config.hpp index 10df4d64ad5c..784de4aa5bbc 100644 --- a/thirdParty/catch2/src/catch2/catch_config.hpp +++ b/thirdParty/catch2/src/catch2/catch_config.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -140,6 +140,9 @@ namespace Catch { std::chrono::milliseconds benchmarkWarmupTime() const override; private: + // Reads Bazel env vars and applies them to the config + void readBazelEnvVars(); + ConfigData m_data; std::vector m_processedReporterSpecs; TestSpec m_testSpec; diff --git a/thirdParty/catch2/src/catch2/catch_get_random_seed.cpp b/thirdParty/catch2/src/catch2/catch_get_random_seed.cpp index 12a5b6d8c20c..b12251684095 100644 --- a/thirdParty/catch2/src/catch2/catch_get_random_seed.cpp +++ b/thirdParty/catch2/src/catch2/catch_get_random_seed.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_get_random_seed.hpp b/thirdParty/catch2/src/catch2/catch_get_random_seed.hpp index 6df3c3a006b5..3ab2a4a1c268 100644 --- a/thirdParty/catch2/src/catch2/catch_get_random_seed.hpp +++ b/thirdParty/catch2/src/catch2/catch_get_random_seed.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_message.cpp b/thirdParty/catch2/src/catch2/catch_message.cpp index 2ad4aea37ba0..4ab6ecf58bf1 100644 --- a/thirdParty/catch2/src/catch2/catch_message.cpp +++ b/thirdParty/catch2/src/catch2/catch_message.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_message.hpp b/thirdParty/catch2/src/catch2/catch_message.hpp index dac7a21d08cf..4f71f227ba69 100644 --- a/thirdParty/catch2/src/catch2/catch_message.hpp +++ b/thirdParty/catch2/src/catch2/catch_message.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -103,7 +103,7 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_INFO( macroName, log ) \ - Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + const Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \ diff --git a/thirdParty/catch2/src/catch2/catch_registry_hub.cpp b/thirdParty/catch2/src/catch2/catch_registry_hub.cpp index 1fca78fb7fa1..243dd2b0c3d9 100644 --- a/thirdParty/catch2/src/catch2/catch_registry_hub.cpp +++ b/thirdParty/catch2/src/catch2/catch_registry_hub.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_section_info.hpp b/thirdParty/catch2/src/catch2/catch_section_info.hpp index 1d206891d0d2..7de8441c5ff9 100644 --- a/thirdParty/catch2/src/catch2/catch_section_info.hpp +++ b/thirdParty/catch2/src/catch2/catch_section_info.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_session.cpp b/thirdParty/catch2/src/catch2/catch_session.cpp index d6c4c19bb3d7..128f21d9aca8 100644 --- a/thirdParty/catch2/src/catch2/catch_session.cpp +++ b/thirdParty/catch2/src/catch2/catch_session.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_session.hpp b/thirdParty/catch2/src/catch2/catch_session.hpp index b2d3eb0bce28..c1de6d5747f2 100644 --- a/thirdParty/catch2/src/catch2/catch_session.hpp +++ b/thirdParty/catch2/src/catch2/catch_session.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_tag_alias.hpp b/thirdParty/catch2/src/catch2/catch_tag_alias.hpp index d566d70cb702..dc91f21a7686 100644 --- a/thirdParty/catch2/src/catch2/catch_tag_alias.hpp +++ b/thirdParty/catch2/src/catch2/catch_tag_alias.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp b/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp index d3e10cb06df8..9b6633a2f9f2 100644 --- a/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp +++ b/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp b/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp index c742bcd3bc0f..9f80f72fd628 100644 --- a/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp +++ b/thirdParty/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_template_test_macros.hpp b/thirdParty/catch2/src/catch2/catch_template_test_macros.hpp index 66b1bc4de2d5..3baee5175371 100644 --- a/thirdParty/catch2/src/catch2/catch_template_test_macros.hpp +++ b/thirdParty/catch2/src/catch2/catch_template_test_macros.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_test_case_info.cpp b/thirdParty/catch2/src/catch2/catch_test_case_info.cpp index c1a0a4310aa4..a6adce0aec52 100644 --- a/thirdParty/catch2/src/catch2/catch_test_case_info.cpp +++ b/thirdParty/catch2/src/catch2/catch_test_case_info.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_test_case_info.hpp b/thirdParty/catch2/src/catch2/catch_test_case_info.hpp index 6cfc2aaf99b8..ab5ae8b9cf6f 100644 --- a/thirdParty/catch2/src/catch2/catch_test_case_info.hpp +++ b/thirdParty/catch2/src/catch2/catch_test_case_info.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_test_macros.hpp b/thirdParty/catch2/src/catch2/catch_test_macros.hpp index e92a45f0fa9d..cce2852f8396 100644 --- a/thirdParty/catch2/src/catch2/catch_test_macros.hpp +++ b/thirdParty/catch2/src/catch2/catch_test_macros.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_test_spec.cpp b/thirdParty/catch2/src/catch2/catch_test_spec.cpp index a3235d432ff6..f27ce99c352e 100644 --- a/thirdParty/catch2/src/catch2/catch_test_spec.cpp +++ b/thirdParty/catch2/src/catch2/catch_test_spec.cpp @@ -1,17 +1,19 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 #include +#include #include #include #include #include #include +#include namespace Catch { @@ -35,6 +37,10 @@ namespace Catch { return m_wildcardPattern.matches( testCase.name ); } + void TestSpec::NamePattern::serializeTo( std::ostream& out ) const { + out << '"' << name() << '"'; + } + TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString ) : Pattern( filterString ) @@ -47,6 +53,10 @@ namespace Catch { Tag( m_tag ) ) != end( testCase.tags ); } + void TestSpec::TagPattern::serializeTo( std::ostream& out ) const { + out << name(); + } + bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const { bool should_use = !testCase.isHidden(); for (auto const& pattern : m_required) { @@ -63,18 +73,31 @@ namespace Catch { return should_use; } - std::string TestSpec::Filter::name() const { - std::string name; - for (auto const& p : m_required) { - name += p->name(); + void TestSpec::Filter::serializeTo( std::ostream& out ) const { + bool first = true; + for ( auto const& pattern : m_required ) { + if ( !first ) { + out << ' '; + } + out << *pattern; + first = false; } - for (auto const& p : m_forbidden) { - name += p->name(); + for ( auto const& pattern : m_forbidden ) { + if ( !first ) { + out << ' '; + } + out << *pattern; + first = false; } - return name; } + std::string TestSpec::extractFilterName( Filter const& filter ) { + Catch::ReusableStringStream sstr; + sstr << filter; + return sstr.str(); + } + bool TestSpec::hasFilters() const { return !m_filters.empty(); } @@ -91,7 +114,7 @@ namespace Catch { for( auto const& test : testCases ) if( isThrowSafe( test, config ) && filter.matches( test.getTestCaseInfo() ) ) currentMatches.emplace_back( &test ); - return FilterMatch{ filter.name(), currentMatches }; + return FilterMatch{ extractFilterName(filter), currentMatches }; } ); return matches; } @@ -100,4 +123,15 @@ namespace Catch { return m_invalidSpecs; } + void TestSpec::serializeTo( std::ostream& out ) const { + bool first = true; + for ( auto const& filter : m_filters ) { + if ( !first ) { + out << ','; + } + out << filter; + first = false; + } + } + } diff --git a/thirdParty/catch2/src/catch2/catch_test_spec.hpp b/thirdParty/catch2/src/catch2/catch_test_spec.hpp index 499bfaa56c80..f12baa636eda 100644 --- a/thirdParty/catch2/src/catch2/catch_test_spec.hpp +++ b/thirdParty/catch2/src/catch2/catch_test_spec.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -34,6 +35,14 @@ namespace Catch { virtual bool matches( TestCaseInfo const& testCase ) const = 0; std::string const& name() const; private: + virtual void serializeTo( std::ostream& out ) const = 0; + // Writes string that would be reparsed into the pattern + friend std::ostream& operator<<(std::ostream& out, + Pattern const& pattern) { + pattern.serializeTo( out ); + return out; + } + std::string const m_name; }; @@ -42,6 +51,8 @@ namespace Catch { explicit NamePattern( std::string const& name, std::string const& filterString ); bool matches( TestCaseInfo const& testCase ) const override; private: + void serializeTo( std::ostream& out ) const override; + WildcardPattern m_wildcardPattern; }; @@ -50,6 +61,8 @@ namespace Catch { explicit TagPattern( std::string const& tag, std::string const& filterString ); bool matches( TestCaseInfo const& testCase ) const override; private: + void serializeTo( std::ostream& out ) const override; + std::string m_tag; }; @@ -57,10 +70,19 @@ namespace Catch { std::vector> m_required; std::vector> m_forbidden; + //! Serializes this filter into a string that would be parsed into + //! an equivalent filter + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, Filter const& f) { + f.serializeTo( out ); + return out; + } + bool matches( TestCaseInfo const& testCase ) const; - std::string name() const; }; + static std::string extractFilterName( Filter const& filter ); + public: struct FilterMatch { std::string name; @@ -77,7 +99,16 @@ namespace Catch { private: std::vector m_filters; std::vector m_invalidSpecs; + friend class TestSpecParser; + //! Serializes this test spec into a string that would be parsed into + //! equivalent test spec + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, + TestSpec const& spec) { + spec.serializeTo( out ); + return out; + } }; } diff --git a/thirdParty/catch2/src/catch2/catch_timer.cpp b/thirdParty/catch2/src/catch2/catch_timer.cpp index d67d94ca6800..d75ea70c8b48 100644 --- a/thirdParty/catch2/src/catch2/catch_timer.cpp +++ b/thirdParty/catch2/src/catch2/catch_timer.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_timer.hpp b/thirdParty/catch2/src/catch2/catch_timer.hpp index 30e814150335..f42589ff1b06 100644 --- a/thirdParty/catch2/src/catch2/catch_timer.hpp +++ b/thirdParty/catch2/src/catch2/catch_timer.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_tostring.cpp b/thirdParty/catch2/src/catch2/catch_tostring.cpp index 4c24234eef9f..b97cf560dc0e 100644 --- a/thirdParty/catch2/src/catch2/catch_tostring.cpp +++ b/thirdParty/catch2/src/catch2/catch_tostring.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_tostring.hpp b/thirdParty/catch2/src/catch2/catch_tostring.hpp index 8ff236e4e894..904caa7e728f 100644 --- a/thirdParty/catch2/src/catch2/catch_tostring.hpp +++ b/thirdParty/catch2/src/catch2/catch_tostring.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_totals.cpp b/thirdParty/catch2/src/catch2/catch_totals.cpp index 14a23869dfd1..a3e2b384f1c2 100644 --- a/thirdParty/catch2/src/catch2/catch_totals.cpp +++ b/thirdParty/catch2/src/catch2/catch_totals.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_totals.hpp b/thirdParty/catch2/src/catch2/catch_totals.hpp index 6bc444fc2f54..8dd360c6d1fd 100644 --- a/thirdParty/catch2/src/catch2/catch_totals.hpp +++ b/thirdParty/catch2/src/catch2/catch_totals.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_translate_exception.hpp b/thirdParty/catch2/src/catch2/catch_translate_exception.hpp index 4a0be629da9e..2dbeb17e8ac4 100644 --- a/thirdParty/catch2/src/catch2/catch_translate_exception.hpp +++ b/thirdParty/catch2/src/catch2/catch_translate_exception.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_user_config.hpp.in b/thirdParty/catch2/src/catch2/catch_user_config.hpp.in index f8e03735cb3c..3f6b10e89d51 100644 --- a/thirdParty/catch2/src/catch2/catch_user_config.hpp.in +++ b/thirdParty/catch2/src/catch2/catch_user_config.hpp.in @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -130,6 +130,16 @@ +#cmakedefine CATCH_CONFIG_GETENV +#cmakedefine CATCH_CONFIG_NO_GETENV + +#if defined( CATCH_CONFIG_GETENV ) && \ + defined( CATCH_CONFIG_NO_GETENV ) +# error Cannot force GETENV to both ON and OFF +#endif + + + #cmakedefine CATCH_CONFIG_USE_ASYNC #cmakedefine CATCH_CONFIG_NO_USE_ASYNC diff --git a/thirdParty/catch2/src/catch2/catch_version.cpp b/thirdParty/catch2/src/catch2/catch_version.cpp index 371dc9f68c6b..b6b818a01b6b 100644 --- a/thirdParty/catch2/src/catch2/catch_version.cpp +++ b/thirdParty/catch2/src/catch2/catch_version.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -36,7 +36,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 3, 1, 1, "", 0 ); + static Version version( 3, 2, 1, "", 0 ); return version; } diff --git a/thirdParty/catch2/src/catch2/catch_version.hpp b/thirdParty/catch2/src/catch2/catch_version.hpp index 1f64d163760e..af698fad5fe5 100644 --- a/thirdParty/catch2/src/catch2/catch_version.hpp +++ b/thirdParty/catch2/src/catch2/catch_version.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/catch_version_macros.hpp b/thirdParty/catch2/src/catch2/catch_version_macros.hpp index 55984975846c..f61d999dc42b 100644 --- a/thirdParty/catch2/src/catch2/catch_version_macros.hpp +++ b/thirdParty/catch2/src/catch2/catch_version_macros.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -9,7 +9,7 @@ #define CATCH_VERSION_MACROS_HPP_INCLUDED #define CATCH_VERSION_MAJOR 3 -#define CATCH_VERSION_MINOR 1 +#define CATCH_VERSION_MINOR 2 #define CATCH_VERSION_PATCH 1 #endif // CATCH_VERSION_MACROS_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/generators/catch_generator_exception.cpp b/thirdParty/catch2/src/catch2/generators/catch_generator_exception.cpp index 70a991e3c8c4..643240392674 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generator_exception.cpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generator_exception.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generator_exception.hpp b/thirdParty/catch2/src/catch2/generators/catch_generator_exception.hpp index a049452cd2c7..f353042eb562 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generator_exception.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generator_exception.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators.cpp b/thirdParty/catch2/src/catch2/generators/catch_generators.cpp index 3e09bfd9ebe7..7cc5aa8ab247 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators.cpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators.hpp b/thirdParty/catch2/src/catch2/generators/catch_generators.hpp index 1de04e3bddad..8fc7e58cebe2 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators_adapters.hpp b/thirdParty/catch2/src/catch2/generators/catch_generators_adapters.hpp index c55a3962538b..d5fc1e12ad3e 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators_adapters.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators_adapters.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators_all.hpp b/thirdParty/catch2/src/catch2/generators/catch_generators_all.hpp index 845e6516d728..c12d314e8384 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators_all.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators_random.cpp b/thirdParty/catch2/src/catch2/generators/catch_generators_random.cpp index 57ad17455369..2e3390fdfca6 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators_random.cpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators_random.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators_random.hpp b/thirdParty/catch2/src/catch2/generators/catch_generators_random.hpp index e9ff92084d2d..bcd4888dc3d3 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators_random.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators_random.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/generators/catch_generators_range.hpp b/thirdParty/catch2/src/catch2/generators/catch_generators_range.hpp index 054af15d5468..495acb9509b1 100644 --- a/thirdParty/catch2/src/catch2/generators/catch_generators_range.hpp +++ b/thirdParty/catch2/src/catch2/generators/catch_generators_range.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_all.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_all.hpp index 2960bf6763b1..87b746d8cdaf 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_all.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp index fb98a75d8bae..9b40ee5d696a 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp index 6981e724bcdf..ac25a8c0c937 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.cpp index 13d761dfbf54..655bc1b425e3 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.hpp index 5e358650a4dc..eb054805e0c8 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_config.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp index cf25d896eadb..38b052d906da 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp index f0de7450e1ee..44c272d2c6e6 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp index b72b49a105f8..9177666ae296 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp index e8c67b543a9e..e9fa5ddac256 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp index 83e3d783a923..d70cb593beb2 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp index 557f7303731d..cd688a444847 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp index 22e62b7967a4..8813b538d886 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp index b1ad584c1480..0bcf66df3e4e 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp index 421924385046..5f28636332ae 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp index 8732ed89a1ef..4fe992fa86bc 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp index 323edde26cdc..83ddd7bc387b 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp index bd38ac2886aa..f620cbc8d668 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp index d2f2a1596bec..277d1761b226 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_reporter_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp index 141560a1fd1c..5da0f8d1e0b6 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp index ec32d667bf08..5e632ba89c8b 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp index 9701d34218ab..78ee20216bbf 100644 --- a/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp +++ b/thirdParty/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.cpp b/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.cpp index 828aa7cdff56..f051314cceb2 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -48,11 +48,7 @@ namespace Catch { CATCH_BREAK_INTO_DEBUGGER(); } if (m_reaction.shouldThrow) { -#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) - throw Catch::TestFailureException(); -#else - CATCH_ERROR( "Test failure requires aborting test!" ); -#endif + throw_test_failure_exception(); } } void AssertionHandler::setCompleted() { @@ -80,8 +76,8 @@ namespace Catch { // This is the overload that takes a string and infers the Equals matcher from it // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) { - handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str ) { + handleExceptionMatchExpr( handler, Matchers::Equals( str ) ); } } // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.hpp b/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.hpp index 5faa5e4ba6cf..36b55243bf41 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_assertion_handler.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -64,7 +64,7 @@ namespace Catch { auto allowThrows() const -> bool; }; - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str ); } // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp b/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp index 904c2289b8b8..b3e7b53ab030 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp b/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp index a97b7b4b9a62..33b778269e9b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_case_sensitive.hpp b/thirdParty/catch2/src/catch2/internal/catch_case_sensitive.hpp index f941d1f2f153..cc89110494b2 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_case_sensitive.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_case_sensitive.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_clara.cpp b/thirdParty/catch2/src/catch2/internal/catch_clara.cpp index b34ce9176793..c9bc76959d0b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_clara.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_clara.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_clara.hpp b/thirdParty/catch2/src/catch2/internal/catch_clara.hpp index 512b0526c097..9117b65e84d5 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_clara.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_clara.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_commandline.cpp b/thirdParty/catch2/src/catch2/internal/catch_commandline.cpp index fda4b2bd55bb..81aa073c8257 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_commandline.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_commandline.cpp @@ -1,18 +1,18 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 #include -#include #include #include #include #include #include +#include #include #include @@ -77,23 +77,14 @@ namespace Catch { return ParserResult::ok(ParseResultType::Matched); } - CATCH_TRY { - std::size_t parsedTo = 0; - unsigned long parsedSeed = std::stoul(seed, &parsedTo, 0); - if (parsedTo != seed.size()) { - return ParserResult::runtimeError("Could not parse '" + seed + "' as seed"); - } - - // TODO: Ideally we could parse unsigned int directly, - // but the stdlib doesn't provide helper for that - // type. After this is refactored to use fixed size - // type, we should check the parsed value is in range - // of the underlying type. - config.rngSeed = static_cast(parsedSeed); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + seed + "' as seed"); + // TODO: ideally we should be parsing uint32_t directly + // fix this later when we add new parse overload + auto parsedSeed = parseUInt( seed, 0 ); + if ( !parsedSeed ) { + return ParserResult::runtimeError( "Could not parse '" + seed + "' as seed" ); } + config.rngSeed = *parsedSeed; + return ParserResult::ok( ParseResultType::Matched ); }; auto const setDefaultColourMode = [&]( std::string const& colourMode ) { Optional maybeMode = Catch::Detail::stringToColourMode(toLower( colourMode )); @@ -185,42 +176,29 @@ namespace Catch { return ParserResult::ok( ParseResultType::Matched ); }; auto const setShardCount = [&]( std::string const& shardCount ) { - CATCH_TRY{ - std::size_t parsedTo = 0; - int64_t parsedCount = std::stoll(shardCount, &parsedTo, 0); - if (parsedTo != shardCount.size()) { - return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); - } - if (parsedCount <= 0) { - return ParserResult::runtimeError("Shard count must be a positive number"); - } - - config.shardCount = static_cast(parsedCount); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); + auto parsedCount = parseUInt( shardCount ); + if ( !parsedCount ) { + return ParserResult::runtimeError( + "Could not parse '" + shardCount + "' as shard count" ); } + if ( *parsedCount == 0 ) { + return ParserResult::runtimeError( + "Shard count must be positive" ); + } + config.shardCount = *parsedCount; + return ParserResult::ok( ParseResultType::Matched ); }; auto const setShardIndex = [&](std::string const& shardIndex) { - CATCH_TRY{ - std::size_t parsedTo = 0; - int64_t parsedIndex = std::stoll(shardIndex, &parsedTo, 0); - if (parsedTo != shardIndex.size()) { - return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); - } - if (parsedIndex < 0) { - return ParserResult::runtimeError("Shard index must be a non-negative number"); - } - - config.shardIndex = static_cast(parsedIndex); - return ParserResult::ok(ParseResultType::Matched); - } CATCH_CATCH_ANON(std::exception const&) { - return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); + auto parsedIndex = parseUInt( shardIndex ); + if ( !parsedIndex ) { + return ParserResult::runtimeError( + "Could not parse '" + shardIndex + "' as shard index" ); } + config.shardIndex = *parsedIndex; + return ParserResult::ok( ParseResultType::Matched ); }; - auto cli = ExeName( config.processName ) | Help( config.showHelp ) diff --git a/thirdParty/catch2/src/catch2/internal/catch_commandline.hpp b/thirdParty/catch2/src/catch2/internal/catch_commandline.hpp index 1e03085644ba..8cc2254764f3 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_commandline.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_commandline.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_compare_traits.hpp b/thirdParty/catch2/src/catch2/internal/catch_compare_traits.hpp new file mode 100644 index 000000000000..6304b1ffeee4 --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_compare_traits.hpp @@ -0,0 +1,75 @@ + +// 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_COMPARE_TRAITS_HPP_INCLUDED +#define CATCH_COMPARE_TRAITS_HPP_INCLUDED + +#include + +#include + +namespace Catch { + namespace Detail { + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic push + // GCC likes to complain about comparing bool with 0, in the decltype() + // that defines the comparable traits below. +# pragma GCC diagnostic ignored "-Wbool-compare" + // "ordered comparison of pointer with integer zero" same as above, + // but it does not have a separate warning flag to suppress +# pragma GCC diagnostic ignored "-Wextra" + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +#if defined( __clang__ ) +# pragma clang diagnostic push + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma clang diagnostic ignored "-Wfloat-equal" +#endif + +#define CATCH_DEFINE_COMPARABLE_TRAIT( id, op ) \ + template \ + struct is_##id##_comparable : std::false_type {}; \ + template \ + struct is_##id##_comparable< \ + T, \ + U, \ + void_t() op std::declval() )>> \ + : std::true_type {}; \ + template \ + struct is_##id##_0_comparable : std::false_type {}; \ + template \ + struct is_##id##_0_comparable() op 0 )>> \ + : std::true_type {}; + + // We need all 6 pre-spaceship comparison ops: <, <=, >, >=, ==, != + CATCH_DEFINE_COMPARABLE_TRAIT( lt, < ) + CATCH_DEFINE_COMPARABLE_TRAIT( le, <= ) + CATCH_DEFINE_COMPARABLE_TRAIT( gt, > ) + CATCH_DEFINE_COMPARABLE_TRAIT( ge, >= ) + CATCH_DEFINE_COMPARABLE_TRAIT( eq, == ) + CATCH_DEFINE_COMPARABLE_TRAIT( ne, != ) + +#undef CATCH_DEFINE_COMPARABLE_TRAIT + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic pop +#endif +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_COMPARE_TRAITS_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/internal/catch_compiler_capabilities.hpp b/thirdParty/catch2/src/catch2/internal/catch_compiler_capabilities.hpp index f2320e63e492..d457a4b4b44a 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_compiler_capabilities.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -114,23 +114,32 @@ # define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) -#endif // __clang__ +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wcomma\"" ) +#endif // __clang__ -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif //////////////////////////////////////////////////////////////////////////////// // We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#if defined( CATCH_PLATFORM_WINDOWS ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( __CYGWIN__ ) || \ + defined( __QNX__ ) || \ + defined( __EMSCRIPTEN__ ) || \ + defined( __DJGPP__ ) || \ + defined( __OS400__ ) +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#else +# define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS #endif -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +//////////////////////////////////////////////////////////////////////////////// +// Assume that some platforms do not support getenv. +#if defined(CATCH_PLATFORM_WINDOWS_UWP) || defined(CATCH_PLATFORM_PLAYSTATION) +# define CATCH_INTERNAL_CONFIG_NO_GETENV +#else +# define CATCH_INTERNAL_CONFIG_GETENV #endif //////////////////////////////////////////////////////////////////////////////// @@ -273,6 +282,10 @@ # define CATCH_CONFIG_POSIX_SIGNALS #endif +#if defined(CATCH_INTERNAL_CONFIG_GETENV) && !defined(CATCH_INTERNAL_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_GETENV) +# define CATCH_CONFIG_GETENV +#endif + #if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) # define CATCH_CONFIG_CPP11_TO_STRING #endif @@ -361,6 +374,10 @@ # 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)) #define CATCH_CATCH_ALL if ((false)) diff --git a/thirdParty/catch2/src/catch2/internal/catch_config_android_logwrite.hpp b/thirdParty/catch2/src/catch2/internal/catch_config_android_logwrite.hpp index 670af2d55c44..490ee372acde 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_config_android_logwrite.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_config_android_logwrite.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_config_counter.hpp b/thirdParty/catch2/src/catch2/internal/catch_config_counter.hpp index febb3eeef4ff..23b223245b5a 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_config_counter.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_config_counter.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp b/thirdParty/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp index c853e673c5d3..5c4cb930154b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_config_wchar.hpp b/thirdParty/catch2/src/catch2/internal/catch_config_wchar.hpp index fb64daf280b4..8c758ec43065 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_config_wchar.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_config_wchar.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_console_colour.cpp b/thirdParty/catch2/src/catch2/internal/catch_console_colour.cpp index c77e8295182e..099a6c59bd0d 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_console_colour.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_console_colour.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_console_colour.hpp b/thirdParty/catch2/src/catch2/internal/catch_console_colour.hpp index aa3d83a28e8f..9aa6a163b392 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_console_colour.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_console_colour.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_console_width.hpp b/thirdParty/catch2/src/catch2/internal/catch_console_width.hpp index 7156ec4eea84..165536174afa 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_console_width.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_console_width.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_container_nonmembers.hpp b/thirdParty/catch2/src/catch2/internal/catch_container_nonmembers.hpp index d6f10eb5ed0a..33b28a9eb835 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_container_nonmembers.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_container_nonmembers.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_context.cpp b/thirdParty/catch2/src/catch2/internal/catch_context.cpp index 6811b092f172..17f285097021 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_context.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_context.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_context.hpp b/thirdParty/catch2/src/catch2/internal/catch_context.hpp index 53dc29a5163f..a9d1b39411ad 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_context.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_context.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_debug_console.cpp b/thirdParty/catch2/src/catch2/internal/catch_debug_console.cpp index 5564c6a8847c..40dd0a60480c 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_debug_console.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_debug_console.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_debug_console.hpp b/thirdParty/catch2/src/catch2/internal/catch_debug_console.hpp index a4b80f09b9e5..8784f7850ebe 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_debug_console.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_debug_console.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_debugger.cpp b/thirdParty/catch2/src/catch2/internal/catch_debugger.cpp index 349cf4ab3541..bd3be17289de 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_debugger.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_debugger.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_debugger.hpp b/thirdParty/catch2/src/catch2/internal/catch_debugger.hpp index ede291d7fae9..30063d1fc3f2 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_debugger.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_debugger.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_decomposer.cpp b/thirdParty/catch2/src/catch2/internal/catch_decomposer.cpp index a85695389593..3f398fcc2bde 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_decomposer.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_decomposer.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_decomposer.hpp b/thirdParty/catch2/src/catch2/internal/catch_decomposer.hpp index e7dd1e9a4292..e0e46c1de80c 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_decomposer.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_decomposer.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -10,8 +10,11 @@ #include #include -#include +#include +#include +#include +#include #include #ifdef _MSC_VER @@ -33,6 +36,9 @@ namespace Catch { + template + struct always_false : std::false_type {}; + class ITransientExpression { bool m_isBinaryExpression; bool m_result; @@ -155,68 +161,134 @@ namespace Catch { }; - // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int) - template - auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast(lhs == rhs); } - template - auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - template - auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - - template - auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast(lhs != rhs); } - template - auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - template - auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - - template class ExprLhs { LhsT m_lhs; public: explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {} - template>::value, int> = 0> - friend auto operator == ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { - return { compareEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "=="_sr, rhs }; - } - template::value, int> = 0> - friend auto operator == ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { - return { compareEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "=="_sr, rhs }; - } - - template>::value, int> = 0> - friend auto operator != ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { - return { compareNotEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "!="_sr, rhs }; - } - template::value, int> = 0> - friend auto operator != ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { - return { compareNotEqual( lhs.m_lhs, rhs ), lhs.m_lhs, "!="_sr, rhs }; - } - - #define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(op) \ - template>::value, int> = 0> \ - friend auto operator op ( ExprLhs && lhs, RhsT && rhs ) -> BinaryExpr { \ - return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \ - } \ - template::value, int> = 0> \ - friend auto operator op ( ExprLhs && lhs, RhsT rhs ) -> BinaryExpr { \ - return { static_cast(lhs.m_lhs op rhs), lhs.m_lhs, #op##_sr, rhs }; \ - } +#define CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } + + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( eq, == ) + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( ne, != ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } + + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( lt, < ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( le, <= ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( gt, > ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( ge, >= ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR + + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR( op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + !std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(<) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(>) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(<=) - CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(>=) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(|) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(&) CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(^) diff --git a/thirdParty/catch2/src/catch2/internal/catch_enforce.cpp b/thirdParty/catch2/src/catch2/internal/catch_enforce.cpp index 4bc47ce3d3d9..3f696406772f 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_enforce.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_enforce.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_enforce.hpp b/thirdParty/catch2/src/catch2/internal/catch_enforce.hpp index db52a0e2d294..076cea3c9e0f 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_enforce.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_enforce.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.cpp index 32d0a16d96eb..7e8bf5e5e3eb 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.hpp index 0c16a4c15d59..999059ae8fa8 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_enum_values_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_errno_guard.cpp b/thirdParty/catch2/src/catch2/internal/catch_errno_guard.cpp index 95c192df0120..3bbf8b4c8303 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_errno_guard.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_errno_guard.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_errno_guard.hpp b/thirdParty/catch2/src/catch2/internal/catch_errno_guard.hpp index 9082c508559f..df1237d53d33 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_errno_guard.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_errno_guard.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.cpp index acddea6ec99d..2a240a9b6edd 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.hpp index 465796d35b8a..2aafa684fe97 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_exception_translator_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp b/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp index 3afd46f59fe0..f9702b1847aa 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp b/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp index 389dab5d4c13..ce07f9b6a7bd 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.cpp b/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.cpp index 55a95a284674..e30ee43422ab 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.hpp b/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.hpp index f121281390c7..ca883c613c1b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_floating_point_helpers.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_getenv.cpp b/thirdParty/catch2/src/catch2/internal/catch_getenv.cpp new file mode 100644 index 000000000000..a9a592c7d9d1 --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_getenv.cpp @@ -0,0 +1,37 @@ + +// 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 + +#include +#include + +#include + +namespace Catch { + namespace Detail { + +#if !defined (CATCH_CONFIG_GETENV) + char const* getEnv( char const* ) { return nullptr; } +#else + + char const* getEnv( char const* varName ) { +# if defined( _MSC_VER ) +# pragma warning( push ) +# pragma warning( disable : 4996 ) // use getenv_s instead of getenv +# endif + + return std::getenv( varName ); + +# if defined( _MSC_VER ) +# pragma warning( pop ) +# endif + } +#endif +} // namespace Detail +} // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_getenv.hpp b/thirdParty/catch2/src/catch2/internal/catch_getenv.hpp new file mode 100644 index 000000000000..31ef797446ea --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_getenv.hpp @@ -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 +#ifndef CATCH_GETENV_HPP_INCLUDED +#define CATCH_GETENV_HPP_INCLUDED + +namespace Catch { +namespace Detail { + + //! Wrapper over `std::getenv` that compiles on UWP (and always returns nullptr there) + char const* getEnv(char const* varName); + +} +} + +#endif // CATCH_GETENV_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/internal/catch_istream.cpp b/thirdParty/catch2/src/catch2/internal/catch_istream.cpp index 6d1fa94b75a0..489396ec7ae2 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_istream.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_istream.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_istream.hpp b/thirdParty/catch2/src/catch2/internal/catch_istream.hpp index 629816c806cb..e6b9a2d32404 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_istream.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_istream.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.cpp b/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.cpp index 96ecf5c33347..56a5ae5e4451 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.hpp b/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.hpp index d4aa79d7be38..36e0ac500206 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_lazy_expr.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_leak_detector.cpp b/thirdParty/catch2/src/catch2/internal/catch_leak_detector.cpp index c9abbdfcdd1b..7389eaf7787d 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_leak_detector.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_leak_detector.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_leak_detector.hpp b/thirdParty/catch2/src/catch2/internal/catch_leak_detector.hpp index eecdfca70d8d..94c8f3259911 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_leak_detector.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_leak_detector.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_list.cpp b/thirdParty/catch2/src/catch2/internal/catch_list.cpp index 2c22745cefbc..263781d609cb 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_list.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_list.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_list.hpp b/thirdParty/catch2/src/catch2/internal/catch_list.hpp index 6fd759ea2f84..9b4abd8249ac 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_list.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_list.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_logical_traits.hpp b/thirdParty/catch2/src/catch2/internal/catch_logical_traits.hpp new file mode 100644 index 000000000000..bd8756595db1 --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_logical_traits.hpp @@ -0,0 +1,44 @@ + +// 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_LOGICAL_TRAITS_HPP_INCLUDED +#define CATCH_LOGICAL_TRAITS_HPP_INCLUDED + +#include + +namespace Catch { +namespace Detail { + +#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510 + + using std::conjunction; + using std::disjunction; + using std::negation; + +#else + + template struct conjunction : std::true_type {}; + template struct conjunction : B1 {}; + template + struct conjunction + : std::conditional_t, B1> {}; + + template struct disjunction : std::false_type {}; + template struct disjunction : B1 {}; + template + struct disjunction + : std::conditional_t> {}; + + template + struct negation : std::integral_constant {}; + +#endif + +} // namespace Detail +} // namespace Catch + +#endif // CATCH_LOGICAL_TRAITS_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/internal/catch_main.cpp b/thirdParty/catch2/src/catch2/internal/catch_main.cpp index a0126c231a00..503b540f77ed 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_main.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_main.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_message_info.cpp b/thirdParty/catch2/src/catch2/internal/catch_message_info.cpp index 11127e3f6900..e0e9dc7e5325 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_message_info.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_message_info.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_message_info.hpp b/thirdParty/catch2/src/catch2/internal/catch_message_info.hpp index ecd78cabf8b9..d2658429e471 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_message_info.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_message_info.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_meta.hpp b/thirdParty/catch2/src/catch2/internal/catch_meta.hpp index abb86ab5084e..6fbc13a5d697 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_meta.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_meta.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -11,10 +11,9 @@ #include namespace Catch { - template - struct always_false : std::false_type {}; + template + struct true_given : std::true_type {}; - template struct true_given : std::true_type {}; struct is_callable_tester { template static true_given()(std::declval()...))> test(int); diff --git a/thirdParty/catch2/src/catch2/internal/catch_move_and_forward.hpp b/thirdParty/catch2/src/catch2/internal/catch_move_and_forward.hpp index 01b7adae5dec..383d85cfeeee 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_move_and_forward.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_move_and_forward.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_noncopyable.hpp b/thirdParty/catch2/src/catch2/internal/catch_noncopyable.hpp index f08b1578002b..eb0823e8fe40 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_noncopyable.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_noncopyable.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_optional.hpp b/thirdParty/catch2/src/catch2/internal/catch_optional.hpp index 86eca344ce33..ac3714ee863b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_optional.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_optional.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_output_redirect.cpp b/thirdParty/catch2/src/catch2/internal/catch_output_redirect.cpp index ae0601412762..02f7c9826890 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_output_redirect.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_output_redirect.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_output_redirect.hpp b/thirdParty/catch2/src/catch2/internal/catch_output_redirect.hpp index d3463d992c0b..dc89223b9228 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_output_redirect.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_output_redirect.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.cpp b/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.cpp new file mode 100644 index 000000000000..390b8c872a7e --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.cpp @@ -0,0 +1,49 @@ + +// 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 + +#include +#include + +#include + +namespace Catch { + + Optional parseUInt(std::string const& input, int base) { + auto trimmed = trim( input ); + // std::stoull is annoying and accepts numbers starting with '-', + // it just negates them into unsigned int + if ( trimmed.empty() || trimmed[0] == '-' ) { + return {}; + } + + CATCH_TRY { + size_t pos = 0; + const auto ret = std::stoull( trimmed, &pos, base ); + + // We did not consume the whole input, so there is an issue + // This can be bunch of different stuff, like multiple numbers + // in the input, or invalid digits/characters and so on. Either + // way, we do not want to return the partially parsed result. + if ( pos != trimmed.size() ) { + return {}; + } + // Too large + if ( ret > std::numeric_limits::max() ) { + return {}; + } + return static_cast(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 {}; + } + } + +} // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.hpp b/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.hpp new file mode 100644 index 000000000000..3dabf95f18a2 --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_parse_numbers.hpp @@ -0,0 +1,26 @@ + +// 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_PARSE_NUMBERS_HPP_INCLUDED +#define CATCH_PARSE_NUMBERS_HPP_INCLUDED + +#include + +#include + +namespace Catch { + + /** + * Parses unsigned int from the input, using provided base + * + * Effectively a wrapper around std::stoul but with better error checking + * e.g. "-1" is rejected, instead of being parsed as UINT_MAX. + */ + Optional parseUInt(std::string const& input, int base = 10); +} + +#endif // CATCH_PARSE_NUMBERS_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/internal/catch_platform.hpp b/thirdParty/catch2/src/catch2/internal/catch_platform.hpp index 01ee6cd9d39a..b11d9ccde75c 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_platform.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_platform.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -28,6 +28,10 @@ # if defined( WINAPI_FAMILY ) && ( WINAPI_FAMILY == WINAPI_FAMILY_APP ) # define CATCH_PLATFORM_WINDOWS_UWP # endif + +#elif defined(__ORBIS__) || defined(__PROSPERO__) +# define CATCH_PLATFORM_PLAYSTATION + #endif #endif // CATCH_PLATFORM_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/internal/catch_polyfills.cpp b/thirdParty/catch2/src/catch2/internal/catch_polyfills.cpp index 13e60f4a4d31..96efad5dded8 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_polyfills.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_polyfills.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_polyfills.hpp b/thirdParty/catch2/src/catch2/internal/catch_polyfills.hpp index e8444836a727..23a9332bc75d 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_polyfills.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_polyfills.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_preprocessor.hpp b/thirdParty/catch2/src/catch2/internal/catch_preprocessor.hpp index 4292d0df592a..08e844d2053d 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_preprocessor.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_preprocessor.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp b/thirdParty/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp index 803378908341..dee11cd6a417 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.cpp b/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.cpp index f71c2323a6e5..6a79dff39a0f 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.hpp b/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.hpp index 6c4b028b2396..e4129becf059 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_random_number_generator.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.cpp b/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.cpp index 7fc1b90d4bfe..40c468cb4ba3 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.hpp b/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.hpp index 42ca93db7d83..d0d6fb245cb6 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_random_seed_generation.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.cpp index 01b6b3a0ac9c..4c0c44f422f0 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.hpp index b0864265c285..5577b9ef6f99 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reporter_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp b/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp index 30ee191c59ae..f6591d9acbb7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp b/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp index 242e10222335..d446ce98b461 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_result_type.cpp b/thirdParty/catch2/src/catch2/internal/catch_result_type.cpp index 7dea5b4738f4..6cedce716920 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_result_type.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_result_type.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_result_type.hpp b/thirdParty/catch2/src/catch2/internal/catch_result_type.hpp index f0906fcd303d..faf0683db0af 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_result_type.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_result_type.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.cpp b/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.cpp index 9b0824236a0f..33eafde4ad96 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.hpp b/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.hpp index 55cff727ecd5..5b864f35ca4a 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_reusable_string_stream.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_run_context.cpp b/thirdParty/catch2/src/catch2/internal/catch_run_context.cpp index c8b0b30e3994..d2e8fb8c5b3b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_run_context.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_run_context.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_run_context.hpp b/thirdParty/catch2/src/catch2/internal/catch_run_context.hpp index cf8941766a04..ab20db57f4f0 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_run_context.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_run_context.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_section.cpp b/thirdParty/catch2/src/catch2/internal/catch_section.cpp index 8f37e2749154..ca2e5d8c70f9 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_section.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_section.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_section.hpp b/thirdParty/catch2/src/catch2/internal/catch_section.hpp index 2e72923c3a1a..abd12192044a 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_section.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_section.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_sharding.hpp b/thirdParty/catch2/src/catch2/internal/catch_sharding.hpp index 5bff4b856d46..d0e4cfa13fa6 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_sharding.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_sharding.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_singletons.cpp b/thirdParty/catch2/src/catch2/internal/catch_singletons.cpp index 116fce469863..4e856def35a7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_singletons.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_singletons.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_singletons.hpp b/thirdParty/catch2/src/catch2/internal/catch_singletons.hpp index d06d224487ef..a28a13daa519 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_singletons.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_singletons.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_source_line_info.cpp b/thirdParty/catch2/src/catch2/internal/catch_source_line_info.cpp index 9a4fe74e511b..f55f1c9f4eb4 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_source_line_info.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_source_line_info.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_source_line_info.hpp b/thirdParty/catch2/src/catch2/internal/catch_source_line_info.hpp index c6b98195e1e4..c59805277a0a 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_source_line_info.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_source_line_info.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.cpp index 7681f442acbf..160766373925 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.hpp index 943772b8ddd6..aef4667d015b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_startup_exception_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_stdstreams.cpp b/thirdParty/catch2/src/catch2/internal/catch_stdstreams.cpp index 21a0e4e61b3c..a4502b2b8532 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_stdstreams.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_stdstreams.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_stdstreams.hpp b/thirdParty/catch2/src/catch2/internal/catch_stdstreams.hpp index 39d8bd750bb6..02aec6358146 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_stdstreams.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_stdstreams.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_stream_end_stop.hpp b/thirdParty/catch2/src/catch2/internal/catch_stream_end_stop.hpp index 452ca1e97357..61379f20d3a4 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_stream_end_stop.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_stream_end_stop.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_string_manip.cpp b/thirdParty/catch2/src/catch2/internal/catch_string_manip.cpp index e61bfd434628..cb96dd4fb78c 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_string_manip.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_string_manip.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_string_manip.hpp b/thirdParty/catch2/src/catch2/internal/catch_string_manip.hpp index dc58a33601e7..8630b56af7b7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_string_manip.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_string_manip.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_stringref.cpp b/thirdParty/catch2/src/catch2/internal/catch_stringref.cpp index 46bbfafdba59..668ff29796f7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_stringref.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_stringref.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_stringref.hpp b/thirdParty/catch2/src/catch2/internal/catch_stringref.hpp index e7f1ab70c14c..bd8971bcb3ad 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_stringref.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_stringref.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.cpp index 8c3e339f6761..b7c6b9ec7431 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.hpp index 3dbe05281c1b..64c0f8f3cdd5 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_tag_alias_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_template_test_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_template_test_registry.hpp index dfc80726111d..88599f32e2b2 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_template_test_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_template_test_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -74,6 +74,7 @@ CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\ @@ -120,6 +121,7 @@ CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template static void TestFuncName(); \ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) { \ @@ -169,6 +171,7 @@ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template static void TestFunc(); \ namespace {\ namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\ @@ -300,6 +303,7 @@ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ template \ struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName ) { \ void test();\ diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp index 692d066c4352..e1731ebe8bf9 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp index afe233553171..b0422dccd712 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp index 6c491a959f27..4b3d2e4716d5 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -89,7 +89,7 @@ namespace Catch { TestCaseInfo const* rhs ) { return *lhs < *rhs; }; - std::set seenTests(testInfoCmp); + std::set seenTests(testInfoCmp); for ( auto const& test : tests ) { const auto infoPtr = &test.getTestCaseInfo(); const auto prev = seenTests.insert( infoPtr ); diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp index b0064cbbdf8a..228dbb799c09 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.cpp index ce76dcba8928..e230fac175f8 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.hpp index 0355f195cd00..005b1d8e72cc 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_case_tracker.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.cpp new file mode 100644 index 000000000000..c1edff3cc6b0 --- /dev/null +++ b/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.cpp @@ -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 + +#include +#include +#include + +namespace Catch { + + void throw_test_failure_exception() { +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + throw TestFailureException{}; +#else + CATCH_ERROR( "Test failure requires aborting test!" ); +#endif + } + +} // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.hpp index bb6803bae3c7..810a81c9a3d3 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_failure_exception.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -13,6 +13,13 @@ 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 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_macro_impl.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_macro_impl.hpp index 8f419b48a423..1b4ea8e79123 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_macro_impl.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_macro_impl.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -147,7 +147,7 @@ catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ } \ catch( ... ) { \ - Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \ + Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher ); \ } \ else \ catchAssertionHandler.handleThrowingCallSkipped(); \ diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_registry.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_registry.cpp index faadb101b663..9769ed032e75 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_registry.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_registry.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_registry.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_registry.hpp index 6e064e083141..5329a1e91149 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_registry.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_registry.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.cpp b/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.cpp index 4dd1ea2a17d3..bae25475933e 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -238,8 +238,4 @@ namespace Catch { m_mode = None; } - TestSpec parseTestSpec( std::string const& arg ) { - return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec(); - } - } // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.hpp b/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.hpp index 75f2fd760c4c..aa2917dbb2e7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_test_spec_parser.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -71,7 +71,6 @@ namespace Catch { } }; - TestSpec parseTestSpec( std::string const& arg ); } // namespace Catch diff --git a/thirdParty/catch2/src/catch2/internal/catch_textflow.cpp b/thirdParty/catch2/src/catch2/internal/catch_textflow.cpp index 993e16229910..7eac973258e8 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_textflow.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_textflow.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_textflow.hpp b/thirdParty/catch2/src/catch2/internal/catch_textflow.hpp index e2cdff58b7f9..ceac675d5d62 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_textflow.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_textflow.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_to_string.hpp b/thirdParty/catch2/src/catch2/internal/catch_to_string.hpp index 15b24e195342..c74621619c3b 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_to_string.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_to_string.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp b/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp index c6251a3f7cff..704d6e1ca92c 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp b/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp index a287bacd87eb..8520864cb1c7 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_unique_name.hpp b/thirdParty/catch2/src/catch2/internal/catch_unique_name.hpp index 31ab91268416..c6e1c2caac76 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_unique_name.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_unique_name.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_unique_ptr.hpp b/thirdParty/catch2/src/catch2/internal/catch_unique_ptr.hpp index c453cde623e0..49cbc7856d04 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_unique_ptr.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_unique_ptr.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_void_type.hpp b/thirdParty/catch2/src/catch2/internal/catch_void_type.hpp index 23875c352471..dacc83dd1e47 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_void_type.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_void_type.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.cpp b/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.cpp index d71ca37ac69e..09c5a40597e6 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.hpp b/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.hpp index 6e9f6d57a755..72479ba87844 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_wildcard_pattern.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_windows_h_proxy.hpp b/thirdParty/catch2/src/catch2/internal/catch_windows_h_proxy.hpp index 0d2603020626..e3b914955d8f 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_windows_h_proxy.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_windows_h_proxy.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.cpp b/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.cpp index 93758cba766c..d3bc6303a96e 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.cpp +++ b/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.hpp b/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.hpp index 556339376d17..ec55f3c46844 100644 --- a/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.hpp +++ b/thirdParty/catch2/src/catch2/internal/catch_xmlwriter.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers.cpp index 6b604e4a18e3..123b30413d30 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers.hpp index 373e2a6739ef..3d996c39f229 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_all.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_all.hpp index 3c0bb9f51c76..eadf708232c0 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_all.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp index 5344abcd6c65..f0c535bcbf88 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp index f0688a57af50..5f3fc7fbf715 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_contains.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_contains.hpp index 239aa80b96f7..e298cab7636e 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_contains.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_contains.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.cpp index af3ea15a6dd0..8147390bff69 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.hpp index eca9327d3b43..27e1b93224bb 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_exception.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp index 4d40140fea2b..719fb51fc190 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp index 99572e4332ca..abdaf159332b 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.cpp index a9ecffc9fb0e..f5445375cd2a 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.hpp index 5f5cea590137..2d1cc33a47d8 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_predicate.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp index 1f2e48d8758c..5a7524672bd0 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp index 8833440f28f8..977b0c762c7e 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.cpp index 2fc3a5563829..55002848b4cd 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.hpp index 7f961c45ed50..718022e31c83 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_string.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.cpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.cpp index a336d8989666..2fc529d2b90e 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.cpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.hpp index 8c7804ce9182..ba0661ae5caa 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_templated.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -24,7 +25,7 @@ namespace Matchers { MatcherGenericBase() = default; ~MatcherGenericBase() override; // = default; - MatcherGenericBase(MatcherGenericBase&) = default; + MatcherGenericBase(MatcherGenericBase const&) = default; MatcherGenericBase(MatcherGenericBase&&) = default; MatcherGenericBase& operator=(MatcherGenericBase const&) = delete; @@ -56,20 +57,6 @@ namespace Matchers { return arr; } -#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510 - - using std::conjunction; - -#else // __cpp_lib_logical_traits - - template - struct conjunction : std::true_type {}; - - template - struct conjunction : std::integral_constant::value> {}; - -#endif // __cpp_lib_logical_traits - template using is_generic_matcher = std::is_base_of< Catch::Matchers::MatcherGenericBase, @@ -77,7 +64,7 @@ namespace Matchers { >; template - using are_generic_matchers = conjunction...>; + using are_generic_matchers = Catch::Detail::conjunction...>; template using is_matcher = std::is_base_of< diff --git a/thirdParty/catch2/src/catch2/matchers/catch_matchers_vector.hpp b/thirdParty/catch2/src/catch2/matchers/catch_matchers_vector.hpp index b9a02f579cc5..9a4b024f6bfb 100644 --- a/thirdParty/catch2/src/catch2/matchers/catch_matchers_vector.hpp +++ b/thirdParty/catch2/src/catch2/matchers/catch_matchers_vector.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp b/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp index 2c2a61179a24..41b462e51557 100644 --- a/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp +++ b/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -16,9 +16,9 @@ namespace Catch { // This is the general overload that takes a any string matcher // There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers // the Equals matcher (so the header does not mention matchers) - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) { + void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher ) { std::string exceptionMessage = Catch::translateActiveException(); - MatchExpr expr( CATCH_MOVE(exceptionMessage), matcher, matcherString ); + MatchExpr expr( CATCH_MOVE(exceptionMessage), matcher ); handler.handleExpr( expr ); } diff --git a/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp b/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp index 5d00ad7d54ce..12455bfe7496 100644 --- a/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp +++ b/thirdParty/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -9,7 +9,6 @@ #define CATCH_MATCHERS_IMPL_HPP_INCLUDED #include -#include #include namespace Catch { @@ -18,13 +17,11 @@ namespace Catch { class MatchExpr : public ITransientExpression { ArgT && m_arg; MatcherT const& m_matcher; - StringRef m_matcherString; public: - MatchExpr( ArgT && arg, MatcherT const& matcher, StringRef matcherString ) + MatchExpr( ArgT && arg, MatcherT const& matcher ) : ITransientExpression{ true, matcher.match( arg ) }, // not forwarding arg here on purpose m_arg( CATCH_FORWARD(arg) ), - m_matcher( matcher ), - m_matcherString( matcherString ) + m_matcher( matcher ) {} void streamReconstructedExpression( std::ostream& os ) const override { @@ -41,11 +38,11 @@ namespace Catch { using StringMatcher = Matchers::MatcherBase; - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ); + void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher ); template - auto makeMatchExpr( ArgT && arg, MatcherT const& matcher, StringRef matcherString ) -> MatchExpr { - return MatchExpr( CATCH_FORWARD(arg), matcher, matcherString ); + auto makeMatchExpr( ArgT && arg, MatcherT const& matcher ) -> MatchExpr { + return MatchExpr( CATCH_FORWARD(arg), matcher ); } } // namespace Catch @@ -56,7 +53,7 @@ namespace Catch { do { \ Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ INTERNAL_CATCH_TRY { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher ) ); \ } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ INTERNAL_CATCH_REACT( catchAssertionHandler ) \ } while( false ) @@ -72,7 +69,7 @@ namespace Catch { catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ } \ catch( exceptionType const& ex ) { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher ) ); \ } \ catch( ... ) { \ catchAssertionHandler.handleUnexpectedInflightException(); \ diff --git a/thirdParty/catch2/src/catch2/meson.build b/thirdParty/catch2/src/catch2/meson.build index 8f1e4331ad8a..b32f72d2e5d9 100644 --- a/thirdParty/catch2/src/catch2/meson.build +++ b/thirdParty/catch2/src/catch2/meson.build @@ -1,6 +1,6 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -72,6 +72,7 @@ internal_headers = [ 'internal/catch_case_sensitive.hpp', 'internal/catch_clara.hpp', 'internal/catch_commandline.hpp', + 'internal/catch_compare_traits.hpp', 'internal/catch_compiler_capabilities.hpp', 'internal/catch_config_android_logwrite.hpp', 'internal/catch_config_counter.hpp', @@ -90,16 +91,19 @@ internal_headers = [ 'internal/catch_exception_translator_registry.hpp', 'internal/catch_fatal_condition_handler.hpp', 'internal/catch_floating_point_helpers.hpp', + 'internal/catch_getenv.hpp', 'internal/catch_istream.hpp', 'internal/catch_lazy_expr.hpp', 'internal/catch_leak_detector.hpp', 'internal/catch_list.hpp', + 'internal/catch_logical_traits.hpp', 'internal/catch_message_info.hpp', 'internal/catch_meta.hpp', 'internal/catch_move_and_forward.hpp', 'internal/catch_noncopyable.hpp', 'internal/catch_optional.hpp', 'internal/catch_output_redirect.hpp', + 'internal/catch_parse_numbers.hpp', 'internal/catch_platform.hpp', 'internal/catch_polyfills.hpp', 'internal/catch_preprocessor.hpp', @@ -201,12 +205,14 @@ internal_sources = files( 'internal/catch_exception_translator_registry.cpp', 'internal/catch_fatal_condition_handler.cpp', 'internal/catch_floating_point_helpers.cpp', + 'internal/catch_getenv.cpp', 'internal/catch_istream.cpp', 'internal/catch_lazy_expr.cpp', 'internal/catch_leak_detector.cpp', 'internal/catch_list.cpp', 'internal/catch_message_info.cpp', 'internal/catch_output_redirect.cpp', + 'internal/catch_parse_numbers.cpp', 'internal/catch_polyfills.cpp', 'internal/catch_random_number_generator.cpp', 'internal/catch_random_seed_generation.cpp', @@ -226,6 +232,7 @@ internal_sources = files( 'internal/catch_test_case_info_hasher.cpp', 'internal/catch_test_case_registry_impl.cpp', 'internal/catch_test_case_tracker.cpp', + 'internal/catch_test_failure_exception.cpp', 'internal/catch_test_registry.cpp', 'internal/catch_test_spec_parser.cpp', 'internal/catch_textflow.cpp', diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.cpp index 90b12928df80..0660d092fce6 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.hpp index bf18fddf7d0b..3475a1fd4b5b 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_automake.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.cpp index 698435d044c4..a1ca76a0f8aa 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.hpp index e6888be1664f..b4f0a9ff55c4 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_common_base.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.cpp index a09f0483d53e..d8088457b1c5 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -18,22 +18,6 @@ #include -namespace { - - constexpr Catch::StringRef bothOrAll( std::uint64_t count ) { - switch (count) { - case 1: - return Catch::StringRef{}; - case 2: - return "both "_catch_sr; - default: - return "all "_catch_sr; - } - } - -} // anon namespace - - namespace Catch { namespace { @@ -48,42 +32,6 @@ namespace { static constexpr Catch::StringRef compactPassedString = "passed"_sr; #endif -// Colour, message variants: -// - white: No tests ran. -// - red: Failed [both/all] N test cases, failed [both/all] M assertions. -// - white: Passed [both/all] N test cases (no assertions). -// - red: Failed N tests cases, failed M assertions. -// - green: Passed [both/all] N tests cases with M assertions. -void printTotals(std::ostream& out, const Totals& totals, ColourImpl* colourImpl) { - if (totals.testCases.total() == 0) { - out << "No tests ran."; - } else if (totals.testCases.failed == totals.testCases.total()) { - auto guard = colourImpl->guardColour( Colour::ResultError ).engage( out ); - const StringRef qualify_assertions_failed = - totals.assertions.failed == totals.assertions.total() ? - bothOrAll(totals.assertions.failed) : StringRef{}; - out << - "Failed " << bothOrAll(totals.testCases.failed) - << pluralise(totals.testCases.failed, "test case"_sr) << ", " - "failed " << qualify_assertions_failed << - pluralise(totals.assertions.failed, "assertion"_sr) << '.'; - } else if (totals.assertions.total() == 0) { - out << - "Passed " << bothOrAll(totals.testCases.total()) - << pluralise(totals.testCases.total(), "test case"_sr) - << " (no assertions)."; - } else if (totals.assertions.failed) { - out << colourImpl->guardColour( Colour::ResultError ) << - "Failed " << pluralise(totals.testCases.failed, "test case"_sr) << ", " - "failed " << pluralise(totals.assertions.failed, "assertion"_sr) << '.'; - } else { - out << colourImpl->guardColour( Colour::ResultSuccess ) << - "Passed " << bothOrAll(totals.testCases.passed) - << pluralise(totals.testCases.passed, "test case"_sr) << - " with " << pluralise(totals.assertions.passed, "assertion"_sr) << '.'; - } -} - // Implementation of CompactReporter formatting class AssertionPrinter { public: @@ -259,7 +207,7 @@ class AssertionPrinter { if ( m_config->testSpec().hasFilters() ) { m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: " - << serializeFilters( m_config->getTestsOrTags() ) + << m_config->testSpec() << '\n'; } m_stream << "RNG seed: " << getSeed() << '\n'; @@ -291,7 +239,7 @@ class AssertionPrinter { } void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) { - printTotals( m_stream, _testRunStats.totals, m_colour.get() ); + printTestRunTotals( m_stream, *m_colour, _testRunStats.totals ); m_stream << "\n\n" << std::flush; StreamingReporterBase::testRunEnded( _testRunStats ); } diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.hpp index 6362fc2977ca..d95bbff11978 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_compact.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.cpp index 88d43b531fd4..0edb121e6140 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -491,7 +491,7 @@ void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { } void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) { printTotalsDivider(_testRunStats.totals); - printTotals(_testRunStats.totals); + printTestRunTotals( m_stream, *m_colour, _testRunStats.totals ); m_stream << '\n' << std::flush; StreamingReporterBase::testRunEnded(_testRunStats); } @@ -499,7 +499,7 @@ void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) { StreamingReporterBase::testRunStarting(_testInfo); if ( m_config->testSpec().hasFilters() ) { m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: " - << serializeFilters( m_config->getTestsOrTags() ) << '\n'; + << m_config->testSpec() << '\n'; } m_stream << "Randomness seeded to: " << getSeed() << '\n'; } @@ -598,82 +598,6 @@ void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t << '\n'; } -struct SummaryColumn { - - SummaryColumn( std::string _label, Colour::Code _colour ) - : label( CATCH_MOVE( _label ) ), - colour( _colour ) {} - SummaryColumn addRow( std::uint64_t count ) { - ReusableStringStream rss; - rss << count; - std::string row = rss.str(); - for (auto& oldRow : rows) { - while (oldRow.size() < row.size()) - oldRow = ' ' + oldRow; - while (oldRow.size() > row.size()) - row = ' ' + row; - } - rows.push_back(row); - return *this; - } - - std::string label; - Colour::Code colour; - std::vector rows; - -}; - -void ConsoleReporter::printTotals( Totals const& totals ) { - if (totals.testCases.total() == 0) { - m_stream << m_colour->guardColour( Colour::Warning ) - << "No tests ran\n"; - } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) { - m_stream << m_colour->guardColour( Colour::ResultSuccess ) - << "All tests passed"; - m_stream << " (" - << pluralise(totals.assertions.passed, "assertion"_sr) << " in " - << pluralise(totals.testCases.passed, "test case"_sr) << ')' - << '\n'; - } else { - - std::vector columns; - columns.push_back(SummaryColumn("", Colour::None) - .addRow(totals.testCases.total()) - .addRow(totals.assertions.total())); - 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("failed as expected", Colour::ResultExpectedFailure) - .addRow(totals.testCases.failedButOk) - .addRow(totals.assertions.failedButOk)); - - printSummaryRow("test cases"_sr, columns, 0); - printSummaryRow("assertions"_sr, columns, 1); - } -} -void ConsoleReporter::printSummaryRow(StringRef label, std::vector const& cols, std::size_t row) { - for (auto col : cols) { - std::string const& value = col.rows[row]; - if (col.label.empty()) { - m_stream << label << ": "; - if ( value != "0" ) { - m_stream << value; - } else { - m_stream << m_colour->guardColour( Colour::Warning ) - << "- none -"; - } - } else if (value != "0") { - m_stream << m_colour->guardColour( Colour::LightGrey ) << " | " - << m_colour->guardColour( col.colour ) << value << ' ' - << col.label; - } - } - m_stream << '\n'; -} - void ConsoleReporter::printTotalsDivider(Totals const& totals) { if (totals.testCases.total() > 0) { std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); @@ -701,9 +625,6 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) { } m_stream << '\n'; } -void ConsoleReporter::printSummaryDivider() { - m_stream << lineOfChars('-') << '\n'; -} } // end namespace Catch diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.hpp index 719dcc449f73..243772622bdf 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_console.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -13,7 +13,6 @@ namespace Catch { // Fwd decls - struct SummaryColumn; class TablePrinter; class ConsoleReporter final : public StreamingReporterBase { @@ -57,12 +56,7 @@ namespace Catch { // subsequent lines void printHeaderString(std::string const& _string, std::size_t indent = 0); - - void printTotals(Totals const& totals); - void printSummaryRow(StringRef label, std::vector const& cols, std::size_t row); - void printTotalsDivider(Totals const& totals); - void printSummaryDivider(); bool m_headerPrinted = false; bool m_testRunInfoPrinted = false; diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp index 957880d09ddf..effd98b7c09e 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp index c4dcdae0365c..cdff99913bc2 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp index a997a315d667..e94063bafb23 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp index 3a6d822cc343..346263e21412 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.cpp index 31df851a834b..f6aa6fc57bd6 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -235,4 +235,102 @@ namespace Catch { out << "\n\n" << std::flush; } + namespace { + class SummaryColumn { + public: + SummaryColumn( std::string suffix, Colour::Code colour ): + m_suffix( CATCH_MOVE( suffix ) ), m_colour( colour ) {} + + SummaryColumn&& addRow( std::uint64_t count ) && { + std::string row = std::to_string(count); + auto const new_width = std::max( m_width, row.size() ); + if ( new_width > m_width ) { + for ( auto& oldRow : m_rows ) { + oldRow.insert( 0, new_width - m_width, ' ' ); + } + } else { + row.insert( 0, m_width - row.size(), ' ' ); + } + m_width = new_width; + m_rows.push_back( row ); + return std::move( *this ); + } + + std::string const& getSuffix() const { return m_suffix; } + Colour::Code getColour() const { return m_colour; } + std::string const& getRow( std::size_t index ) const { + return m_rows[index]; + } + + private: + std::string m_suffix; + Colour::Code m_colour; + std::size_t m_width = 0; + std::vector m_rows; + }; + + void printSummaryRow( std::ostream& stream, + ColourImpl& colour, + StringRef label, + std::vector const& cols, + std::size_t row ) { + for ( auto const& col : cols ) { + auto const& value = col.getRow( row ); + auto const& suffix = col.getSuffix(); + if ( suffix.empty() ) { + stream << label << ": "; + if ( value != "0" ) { + stream << value; + } else { + stream << colour.guardColour( Colour::Warning ) + << "- none -"; + } + } else if ( value != "0" ) { + stream << colour.guardColour( Colour::LightGrey ) << " | " + << colour.guardColour( col.getColour() ) << value + << ' ' << suffix; + } + } + stream << '\n'; + } + } // namespace + + void printTestRunTotals( std::ostream& stream, + ColourImpl& streamColour, + Totals const& totals ) { + if ( totals.testCases.total() == 0 ) { + stream << streamColour.guardColour( Colour::Warning ) + << "No tests ran\n"; + return; + } + + if ( totals.assertions.total() > 0 && totals.testCases.allPassed() ) { + stream << streamColour.guardColour( Colour::ResultSuccess ) + << "All tests passed"; + stream << " (" + << pluralise( totals.assertions.passed, "assertion"_sr ) + << " in " + << pluralise( totals.testCases.passed, "test case"_sr ) + << ')' << '\n'; + return; + } + + std::vector columns; + columns.push_back( SummaryColumn( "", Colour::None ) + .addRow( totals.testCases.total() ) + .addRow( totals.assertions.total() ) ); + 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( "failed as expected", Colour::ResultExpectedFailure ) + .addRow( totals.testCases.failedButOk ) + .addRow( totals.assertions.failedButOk ) ); + printSummaryRow( stream, streamColour, "test cases"_sr, columns, 0 ); + printSummaryRow( stream, streamColour, "assertions"_sr, columns, 1 ); + } + } // namespace Catch diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.hpp index ef43534cba82..316cb4048a16 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_helpers.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -14,6 +14,7 @@ #include #include +#include namespace Catch { @@ -80,6 +81,15 @@ namespace Catch { bool isFiltered, Verbosity verbosity ); + /** + * Prints test run totals to the provided stream in user-friendly format + * + * Used by the console and compact reporters. + */ + void printTestRunTotals( std::ostream& stream, + ColourImpl& streamColour, + Totals const& totals ); + } // end namespace Catch #endif // CATCH_REPORTER_HELPERS_HPP_INCLUDED diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.cpp index c24d1efa253d..837d0489863e 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,8 @@ namespace Catch { std::tm timeInfo = {}; #if defined (_MSC_VER) || defined (__MINGW32__) gmtime_s(&timeInfo, &rawtime); +#elif defined (CATCH_PLATFORM_PLAYSTATION) + gmtime_s(&rawtime, &timeInfo); #else gmtime_r(&rawtime, &timeInfo); #endif @@ -143,10 +146,10 @@ namespace Catch { xml.scopedElement("property") .writeAttribute("name"_sr, "random-seed"_sr) .writeAttribute("value"_sr, m_config->rngSeed()); - if (m_config->hasTestFilters()) { + if (m_config->testSpec().hasFilters()) { xml.scopedElement("property") .writeAttribute("name"_sr, "filters"_sr) - .writeAttribute("value"_sr, serializeFilters(m_config->getTestsOrTags())); + .writeAttribute("value"_sr, m_config->testSpec()); } } diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.hpp index a45344de6f81..87c7c5679e4f 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_junit.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.cpp index cf18cb81b037..ebf28b64ff71 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.hpp index e35ea5041e8f..c43f511f8d38 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_multi.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.cpp index fd1bc76cad82..a9787ce584e9 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.hpp index e33ecf8b62dc..fe8cf1ec9c69 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_registrars.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp index 8119c3b8f79f..365979f48d77 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -11,15 +11,22 @@ #include #include #include +#include +#include #include namespace Catch { namespace { - std::string createRngSeedString(uint32_t seed) { + std::string createMetadataString(IConfig const& config) { ReusableStringStream sstr; - sstr << "rng-seed=" << seed; + if ( config.testSpec().hasFilters() ) { + sstr << "filters='" + << config.testSpec() + << "' "; + } + sstr << "rng-seed=" << config.rngSeed(); return sstr.str(); } } @@ -27,7 +34,7 @@ namespace Catch { void SonarQubeReporter::testRunStarting(TestRunInfo const& testRunInfo) { CumulativeReporterBase::testRunStarting(testRunInfo); - xml.writeComment( createRngSeedString( m_config->rngSeed() ) ); + xml.writeComment( createMetadataString( *m_config ) ); xml.startElement("testExecutions"); xml.writeAttribute("version"_sr, '1'); } diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp index 32756b488f43..bc8f03325fb3 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp index a9c898ed8faf..f1cc425ab49f 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp index 76788d8d5c6c..13672a2857be 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.cpp index 6058f2422ad7..59f8fb8b44fa 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include #include @@ -186,6 +188,9 @@ namespace Catch { } // End anonymous namespace void TAPReporter::testRunStarting( TestRunInfo const& ) { + if ( m_config->testSpec().hasFilters() ) { + m_stream << "# filters: " << m_config->testSpec() << '\n'; + } m_stream << "# rng-seed: " << m_config->rngSeed() << '\n'; } diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.hpp index 0c4b14b4777c..fe45df63e8ac 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_tap.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp index 142dffbb1d56..1d002c27e983 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp index 5007193bbe87..04feb2e6dc03 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.cpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.cpp index 1e5def4176cc..57fa1cabe21d 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.cpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -56,9 +56,11 @@ 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("catch2-version"_sr, libraryVersion()); - if (m_config->testSpec().hasFilters()) - m_xml.writeAttribute( "filters"_sr, serializeFilters( m_config->getTestsOrTags() ) ); + if ( m_config->testSpec().hasFilters() ) { + m_xml.writeAttribute( "filters"_sr, m_config->testSpec() ); + } } void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.hpp index 573f9321a3da..bead7a871613 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporter_xml.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/src/catch2/reporters/catch_reporters_all.hpp b/thirdParty/catch2/src/catch2/reporters/catch_reporters_all.hpp index d3a59eb7dc29..16f7bd70cdca 100644 --- a/thirdParty/catch2/src/catch2/reporters/catch_reporters_all.hpp +++ b/thirdParty/catch2/src/catch2/reporters/catch_reporters_all.hpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/CMakeLists.txt b/thirdParty/catch2/tests/CMakeLists.txt index 7f5af9949a82..b40fbcebd6cd 100644 --- a/thirdParty/catch2/tests/CMakeLists.txt +++ b/thirdParty/catch2/tests/CMakeLists.txt @@ -85,11 +85,13 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/IntrospectiveTests/FloatingPoint.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/GeneratorsImpl.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/InternalBenchmark.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/Parse.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/PartTracker.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/RandomNumberGeneration.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Reporters.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Tag.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/TestCaseInfoHasher.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/TestSpec.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/TestSpecParser.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/TextFlow.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Sharding.tests.cpp @@ -97,8 +99,10 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/IntrospectiveTests/String.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/StringManip.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/Xml.tests.cpp + ${SELF_TEST_DIR}/IntrospectiveTests/Traits.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/ToString.tests.cpp ${SELF_TEST_DIR}/IntrospectiveTests/UniquePtr.tests.cpp + ${SELF_TEST_DIR}/helpers/parse_test_spec.cpp ${SELF_TEST_DIR}/TimingTests/Sleep.tests.cpp ${SELF_TEST_DIR}/UsageTests/Approx.tests.cpp ${SELF_TEST_DIR}/UsageTests/BDD.tests.cpp @@ -127,6 +131,11 @@ set(TEST_SOURCES ${SELF_TEST_DIR}/UsageTests/Matchers.tests.cpp ) +set(TEST_HEADERS + ${SELF_TEST_DIR}/helpers/parse_test_spec.hpp + ${SELF_TEST_DIR}/helpers/type_with_lit_0_comparisons.hpp +) + # Specify the headers, too, so CLion recognises them as project files set(HEADERS @@ -144,7 +153,8 @@ set(HEADERS include(CTest) -add_executable(SelfTest ${TEST_SOURCES}) +add_executable(SelfTest ${TEST_SOURCES} ${TEST_HEADERS}) +target_include_directories(SelfTest PRIVATE ${SELF_TEST_DIR}) target_link_libraries(SelfTest PRIVATE Catch2WithMain) if (BUILD_SHARED_LIBS AND WIN32) add_custom_command(TARGET SelfTest PRE_LINK @@ -165,7 +175,7 @@ endif() add_test(NAME RunTests COMMAND $ --order rand --rng-seed time) set_tests_properties(RunTests PROPERTIES FAIL_REGULAR_EXPRESSION "Filters:" - COST 60 + COST 15 ) # Because CTest does not allow us to check both return code _and_ expected @@ -247,7 +257,7 @@ add_test(NAME TestSpecs::CombiningMatchingAndNonMatchingIsOk-1 COMMAND $ Tracker, "___nonexistent_test___") set_tests_properties(TestSpecs::CombiningMatchingAndNonMatchingIsOk-2 PROPERTIES - PASS_REGULAR_EXPRESSION "No test cases matched '___nonexistent_test___'" + PASS_REGULAR_EXPRESSION "No test cases matched '\"___nonexistent_test___\"'" FAIL_REGULAR_EXPRESSION "No tests ran" ) @@ -262,6 +272,14 @@ add_test(NAME TestSpecs::OverrideFailureWithNoMatchedTests COMMAND $ "___nonexistent_test___" --allow-running-no-tests ) +add_test(NAME TestSpecs::NonMatchingTestSpecIsRoundTrippable + COMMAND $ Tracker, "this test does not exist" "[nor does this tag]" +) +set_tests_properties(TestSpecs::NonMatchingTestSpecIsRoundTrippable + PROPERTIES + PASS_REGULAR_EXPRESSION "No test cases matched '\"this test does not exist\" \\[nor does this tag\\]'" +) + add_test(NAME Warnings::UnmatchedTestSpecIsAccepted COMMAND $ Tracker --warn UnmatchedTestSpec ) @@ -325,17 +343,27 @@ set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2 ) # AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable -add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/tools/scripts/approvalTests.py $) +add_test(NAME ApprovalTests + COMMAND + ${PYTHON_EXECUTABLE} + ${CATCH_DIR}/tools/scripts/approvalTests.py + $ + "${CMAKE_CURRENT_BINARY_DIR}" +) + set_tests_properties(ApprovalTests PROPERTIES FAIL_REGULAR_EXPRESSION "Results differed" - COST 120 # We know that this is either the most, or second most, - # expensive test in the test suite, so we give it high estimate for CI runs + + # This is the most expensive test in the basic test suite, so we give + # it high cost estimate so that CI runs it as one of the first ones, + # for better parallelization. + COST 30 LABELS "uses-python" ) add_test(NAME RegressionCheck-1670 COMMAND $ "#1670 regression check" -c A -r compact) -set_tests_properties(RegressionCheck-1670 PROPERTIES PASS_REGULAR_EXPRESSION "Passed 1 test case with 2 assertions.") +set_tests_properties(RegressionCheck-1670 PROPERTIES PASS_REGULAR_EXPRESSION "All tests passed \\(2 assertions in 1 test case\\)") add_test(NAME VersionCheck COMMAND $ -h) set_tests_properties(VersionCheck PROPERTIES PASS_REGULAR_EXPRESSION "Catch2 v${PROJECT_VERSION}") @@ -595,6 +623,23 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any "TAP" # "TeamCity" - does not seem to support test suite-level metadata/comments "XML") + + add_test(NAME "Reporters:Filters:${reporterName}" + COMMAND + $ [comparisons][string-case] "CaseInsensitiveLess is case insensitive" + --reporter ${reporterName} + ) + # Different regex for these two reporters, because the commas end up xml-escaped + if (reporterName MATCHES "JUnit|XML") + set(testCaseNameFormat ""CaseInsensitiveLess is case insensitive"") + else() + set(testCaseNameFormat "\"CaseInsensitiveLess is case insensitive\"") + endif() + set_tests_properties("Reporters:Filters:${reporterName}" + PROPERTIES + PASS_REGULAR_EXPRESSION "[fF]ilters.+\\[comparisons\\] \\[string-case\\] ${testCaseNameFormat}" + ) + add_test(NAME "Reporters:RngSeed:${reporterName}" COMMAND $ "Factorials are computed" diff --git a/thirdParty/catch2/tests/ExtraTests/CMakeLists.txt b/thirdParty/catch2/tests/ExtraTests/CMakeLists.txt index 0943a9c37005..d5b27fbaeacb 100644 --- a/thirdParty/catch2/tests/ExtraTests/CMakeLists.txt +++ b/thirdParty/catch2/tests/ExtraTests/CMakeLists.txt @@ -150,6 +150,29 @@ set_tests_properties(NO_CATCH_CONFIG_BAZEL_REPORTER-1 ENVIRONMENT "BAZEL_TEST=1" ) +add_test(NAME BazelEnv::TESTBRIDGE_TEST_ONLY + COMMAND + $ +) +set_tests_properties(BazelEnv::TESTBRIDGE_TEST_ONLY + PROPERTIES + ENVIRONMENT "BAZEL_TEST=1;TESTBRIDGE_TEST_ONLY=Passing test case" + PASS_REGULAR_EXPRESSION "All tests passed \\(1 assertion in 1 test case\\)" +) + + +add_test(NAME BazelEnv::Sharding + COMMAND + "${PYTHON_EXECUTABLE}" "${CATCH_DIR}/tests/TestScripts/testBazelSharding.py" + $ + "${CMAKE_CURRENT_BINARY_DIR}" +) +set_tests_properties(BazelEnv::Sharding + PROPERTIES + LABELS "uses-python" +) + + # The default handler on Windows leads to the just-in-time debugger firing, # which makes this test unsuitable for CI and headless runs, as it opens # up an interactive dialog. @@ -187,7 +210,7 @@ add_test(NAME DeferredStaticChecks COMMAND DeferredStaticChecks -r compact) set_tests_properties( DeferredStaticChecks PROPERTIES - PASS_REGULAR_EXPRESSION "Failed 1 test case, failed all 3 assertions." + PASS_REGULAR_EXPRESSION "test cases: 1 \\| 1 failed\nassertions: 3 \\| 3 failed" ) @@ -219,9 +242,6 @@ set_tests_properties( if (MSVC) # This test fails if it does not compile and succeeds otherwise add_executable(WindowsHeader ${TESTS_DIR}/X90-WindowsHeaderInclusion.cpp) - set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD 14 ) - set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD_REQUIRED ON ) - set_property( TARGET WindowsHeader PROPERTY CXX_EXTENSIONS OFF ) target_link_libraries( WindowsHeader Catch2WithMain ) add_test(NAME WindowsHeader COMMAND WindowsHeader -r compact) list(APPEND CATCH_WARNING_TARGETS ${EXTRA_TEST_BINARIES} WindowsHeader) @@ -249,6 +269,7 @@ set_tests_properties( BenchmarksInCumulativeReporter PROPERTIES PASS_REGULAR_EXPRESSION "1\n2\n3\n4\n5\n" + COST 30 ) @@ -491,13 +512,6 @@ set( EXTRA_TEST_BINARIES # DebugBreakMacros ) -# Shared config -foreach( test ${EXTRA_TEST_BINARIES} ) - set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 ) - set_property( TARGET ${test} PROPERTY CXX_STANDARD_REQUIRED ON ) - set_property( TARGET ${test} PROPERTY CXX_EXTENSIONS OFF ) -endforeach() - # Notice that we are modifying EXTRA_TEST_BINARIES destructively, do not # use it after this point! list(FILTER EXTRA_TEST_BINARIES EXCLUDE REGEX "DisabledExceptions.*") @@ -514,9 +528,6 @@ add_executable(AmalgamatedTestCompilation ${CATCH_DIR}/extras/catch_amalgamated.cpp ) target_include_directories(AmalgamatedTestCompilation PRIVATE ${CATCH_DIR}/extras) -set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_STANDARD 14 ) -set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_STANDARD_REQUIRED ON ) -set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_EXTENSIONS OFF ) add_test(NAME AmalgamatedFileTest COMMAND AmalgamatedTestCompilation) set_tests_properties( diff --git a/thirdParty/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp b/thirdParty/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp index 65235194c3cc..d1c246ecb48f 100644 --- a/thirdParty/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X02-DisabledMacros.cpp b/thirdParty/catch2/tests/ExtraTests/X02-DisabledMacros.cpp index 37d35e11cc10..68bc2add6028 100644 --- a/thirdParty/catch2/tests/ExtraTests/X02-DisabledMacros.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X02-DisabledMacros.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp b/thirdParty/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp index 74b651c7504a..5b6d4b126f10 100644 --- a/thirdParty/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp b/thirdParty/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp index 725440ec34d7..e1f1e703a629 100644 --- a/thirdParty/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp b/thirdParty/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp index 62ceb4a770cf..8005dbcfa136 100644 --- a/thirdParty/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp b/thirdParty/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp index 61ad62ea10a7..8525a81369c1 100644 --- a/thirdParty/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X11-DisableStringification.cpp b/thirdParty/catch2/tests/ExtraTests/X11-DisableStringification.cpp index 97dcea7b68e7..f89962771bb3 100644 --- a/thirdParty/catch2/tests/ExtraTests/X11-DisableStringification.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X11-DisableStringification.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp b/thirdParty/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp index e52c1c2b6d8d..e6d3e38b0023 100644 --- a/thirdParty/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp b/thirdParty/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp index 686b50b1d68a..aa5204c95c8d 100644 --- a/thirdParty/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp b/thirdParty/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp index c75d891e5e15..af03ce30ae97 100644 --- a/thirdParty/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp b/thirdParty/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp index 0e13f205b22d..30523739506c 100644 --- a/thirdParty/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp b/thirdParty/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp index 605458515604..ffb706e9c19f 100644 --- a/thirdParty/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp b/thirdParty/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp index a4a55ad75dbe..de75ef4e74e5 100644 --- a/thirdParty/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp b/thirdParty/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp index 01aca7c0c8f2..90a5885e9229 100644 --- a/thirdParty/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp b/thirdParty/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp index cb29be0c1ed2..61aaa02a8ac0 100644 --- a/thirdParty/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp b/thirdParty/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp index c8102edb23d6..4098c8b89f35 100644 --- a/thirdParty/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp b/thirdParty/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp index d3af7dc75bf3..9bd816efcbdd 100644 --- a/thirdParty/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X30-BazelReporter.cpp b/thirdParty/catch2/tests/ExtraTests/X30-BazelReporter.cpp index 6a6168dbe4c8..2a259416a006 100644 --- a/thirdParty/catch2/tests/ExtraTests/X30-BazelReporter.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X30-BazelReporter.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp b/thirdParty/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp index 2235ca8396d5..0d091752f2eb 100644 --- a/thirdParty/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp b/thirdParty/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp index 6a4246be51be..b0aa4171a82f 100644 --- a/thirdParty/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp b/thirdParty/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp index ff6660a8a1c4..d3c3449ac751 100644 --- a/thirdParty/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp b/thirdParty/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp index b2021f5fbff8..397cf15d2f68 100644 --- a/thirdParty/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp b/thirdParty/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp index cc0dd0b97f5d..a978448a39c0 100644 --- a/thirdParty/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp b/thirdParty/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp index 739b34d40933..dff542ae1f93 100644 --- a/thirdParty/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp b/thirdParty/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp index d77f55d5ba93..c00462be7444 100644 --- a/thirdParty/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/ExtraTests/X92-NoTests.cpp b/thirdParty/catch2/tests/ExtraTests/X92-NoTests.cpp index fc6bf597ac5a..9591e540b807 100644 --- a/thirdParty/catch2/tests/ExtraTests/X92-NoTests.cpp +++ b/thirdParty/catch2/tests/ExtraTests/X92-NoTests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt index b8b5956601f0..e29de92bfb48 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -188,7 +188,7 @@ Nor would this :test-result: PASS Our PCG implementation provides expected results for known seeds :test-result: FAIL Output from all sections is reported :test-result: PASS Overloaded comma or address-of operators are not used -:test-result: PASS Parse test names and tags +:test-result: PASS Parse uints :test-result: PASS Parsed tags are matched case insensitive :test-result: PASS Parsing sharding-related cli flags :test-result: PASS Parsing tags with non-alphabetical characters is pass-through diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt index 2afd308bc4a7..3ac539205c42 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt @@ -186,7 +186,7 @@ :test-result: PASS Our PCG implementation provides expected results for known seeds :test-result: FAIL Output from all sections is reported :test-result: PASS Overloaded comma or address-of operators are not used -:test-result: PASS Parse test names and tags +:test-result: PASS Parse uints :test-result: PASS Parsed tags are matched case insensitive :test-result: PASS Parsing sharding-related cli flags :test-result: PASS Parsing tags with non-alphabetical characters is pass-through diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt index 6d23d01de2d5..5073c080fd02 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] RNG seed: 1 Misc.tests.cpp:: passed: with 1 message: 'yay' Compilation.tests.cpp:: passed: y.v == 0 for: 0 == 0 @@ -22,13 +22,13 @@ This would not be caught previously Nor would this Tricky.tests.cpp:: failed: explicitly with 1 message: '1514' Compilation.tests.cpp:: passed: std::is_same, TypeList>::value for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true Generators.tests.cpp:: passed: counter < 7 for: 3 < 7 Generators.tests.cpp:: passed: counter < 7 for: 6 < 7 Generators.tests.cpp:: passed: i != j for: 1 != 3 @@ -1119,170 +1119,30 @@ Matchers.tests.cpp:: passed: ( EvilMatcher(), EvilMatcher() ), Evil Matchers.tests.cpp:: passed: &EvilMatcher(), EvilAddressOfOperatorUsed Matchers.tests.cpp:: passed: EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) Matchers.tests.cpp:: passed: ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: parseTestSpec( "*a" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: parseTestSpec( "a*" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: parseTestSpec( "*a*" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +Parse.tests.cpp:: passed: parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +Parse.tests.cpp:: passed: !(parseUInt( "" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "-1" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "4294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "2 4" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "0x", 10 )) for: !{?} TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8" }) for: {?} CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2" }) for: {?} CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=0" }) for: {?} CmdLine.tests.cpp:: passed: config.shardIndex == 0 for: 0 == 0 TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' @@ -2599,5 +2459,7 @@ InternalBenchmark.tests.cpp:: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:: passed: Misc.tests.cpp:: passed: -Failed 83 test cases, failed 143 assertions. +test cases: 394 | 304 passed | 83 failed | 7 failed as expected +assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt index a3500a352d5d..af348ddab6bf 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] RNG seed: 1 Misc.tests.cpp:: passed: with 1 message: 'yay' Compilation.tests.cpp:: passed: y.v == 0 for: 0 == 0 @@ -20,13 +20,13 @@ This info message starts with a linebreak' with 1 message: ' This warning message starts with a linebreak' Tricky.tests.cpp:: failed: explicitly with 1 message: '1514' Compilation.tests.cpp:: passed: std::is_same, TypeList>::value for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec . char")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase("spec , char")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase(R"(spec \, char)"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec {a} char)")) for: true +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec [a] char)")) for: true +TestSpec.tests.cpp:: passed: !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) for: !false +TestSpec.tests.cpp:: passed: spec.matches(*fakeTestCase(R"(spec \ char)")) for: true Generators.tests.cpp:: passed: counter < 7 for: 3 < 7 Generators.tests.cpp:: passed: counter < 7 for: 6 < 7 Generators.tests.cpp:: passed: i != j for: 1 != 3 @@ -1117,170 +1117,30 @@ Matchers.tests.cpp:: passed: ( EvilMatcher(), EvilMatcher() ), Evil Matchers.tests.cpp:: passed: &EvilMatcher(), EvilAddressOfOperatorUsed Matchers.tests.cpp:: passed: EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) Matchers.tests.cpp:: passed: ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: parseTestSpec( "*a" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: parseTestSpec( "a*" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: parseTestSpec( "*a*" ).matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.hasFilters() == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *tcA ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcB ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcC ) == false for: false == false -CmdLine.tests.cpp:: passed: spec.matches( *tcD ) == true for: true == true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( " aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark " ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches( *fakeTestCase( "aardvark" ) ) for: true -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) for: true -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false -CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +Parse.tests.cpp:: passed: parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +Parse.tests.cpp:: passed: parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +Parse.tests.cpp:: passed: !(parseUInt( "" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "!!KJHF*#" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "-1" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "4294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "2 4" )) for: !{?} +Parse.tests.cpp:: passed: !(parseUInt( "0x", 10 )) for: !{?} TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true TestSpecParser.tests.cpp:: passed: spec.getInvalidSpecs().empty() for: true TestSpecParser.tests.cpp:: passed: spec.matches( testCase ) for: true CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8" }) for: {?} CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2" }) for: {?} CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 CmdLine.tests.cpp:: passed: !(result) for: !{?} -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=0" }) for: {?} CmdLine.tests.cpp:: passed: config.shardIndex == 0 for: 0 == 0 TestSpecParser.tests.cpp:: passed: spec.hasFilters() for: true with 1 message: 'tagString := "[tag with spaces]"' @@ -2591,5 +2451,7 @@ InternalBenchmark.tests.cpp:: passed: med == 18. for: 18.0 == 18.0 InternalBenchmark.tests.cpp:: passed: q3 == 23. for: 23.0 == 23.0 Misc.tests.cpp:: passed: Misc.tests.cpp:: passed: -Failed 83 test cases, failed 143 assertions. +test cases: 394 | 304 passed | 83 failed | 7 failed as expected +assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/console.std.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/console.std.approved.txt index 6962e5082610..5ad8447a156a 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/console.std.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/console.std.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] Randomness seeded to: 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1395,5 +1395,5 @@ due to unexpected exception with message: =============================================================================== test cases: 394 | 318 passed | 69 failed | 7 failed as expected -assertions: 2284 | 2129 passed | 128 failed | 27 failed as expected +assertions: 2144 | 1989 passed | 128 failed | 27 failed as expected diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.approved.txt index 63dd231e8938..1ef94ee56273 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] Randomness seeded to: 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -166,20 +166,20 @@ with expansion: ------------------------------------------------------------------------------- #1905 -- test spec parser properly clears internal state between compound tests ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) with expansion: !false @@ -188,20 +188,20 @@ with expansion: #1912 -- test spec parser handles escaping Various parentheses ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) with expansion: !false @@ -210,10 +210,10 @@ with expansion: #1912 -- test spec parser handles escaping backslash in test name ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) with expansion: true @@ -8056,1004 +8056,73 @@ Matchers.tests.cpp:: PASSED: REQUIRE_NOTHROW( ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() ) ------------------------------------------------------------------------------- -Parse test names and tags - Empty test spec should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from empty string should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from just a comma should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from quoted name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at the start -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "*a" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at the end -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "a*" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at both ends -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "*a*" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at the start +Parse uints + proper inputs ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +Parse.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ) with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at the end -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ) with expansion: - true == true + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "4294967295" ) == Optional{ 4294967295 } ) with expansion: - true == true + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0x", 16 ) == Optional{ 255 } ) with expansion: - false == false + {?} == {?} ------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at both ends +Parse uints + Bad inputs ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +Parse.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "-1" ) ) with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at both ends, redundant at start -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "4294967296" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) with expansion: - false == false + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "2 4" ) ) with expansion: - false == false + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "0x", 10 ) ) with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Just wildcard -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag, two matches -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Two tags -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Two tags, spare separated -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcarded name and tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion and one tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion and one wldcarded name inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion, using exclude:, and one wldcarded name inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - name exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion with tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion, using exclude:, with tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - two wildcarded names -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - empty tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - empty quoted name -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - quoted string followed by tag exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Leading and trailing spaces in test spec -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Parse test names and tags - Leading and trailing spaces in test name -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Parse test names and tags - Shortened hide tags are split apart when parsing -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only foo", "[foo]")) ) -with expansion: - !false - -------------------------------------------------------------------------------- -Parse test names and tags - Shortened hide tags also properly handle exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only foo", "[foo]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only hidden", "[.]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) ) -with expansion: - true + !{?} ------------------------------------------------------------------------------- Parsed tags are matched case insensitive @@ -9106,10 +8175,10 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) ) with expansion: - "Shard count must be a positive number" contains: "Shard count must be a - positive number" + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as + shard count" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -9124,10 +8193,9 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) ) with expansion: - "Shard count must be a positive number" contains: "Shard count must be a - positive number" + "Shard count must be positive" contains: "Shard count must be positive" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -9159,10 +8227,10 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) ) with expansion: - "Shard index must be a non-negative number" contains: "Shard index must be a - non-negative number" + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as + shard index" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -18451,5 +17519,5 @@ Misc.tests.cpp:: PASSED: =============================================================================== test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected +assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt index 9cba323d9b0a..c281374ffd95 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] Randomness seeded to: 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -164,20 +164,20 @@ with expansion: ------------------------------------------------------------------------------- #1905 -- test spec parser properly clears internal state between compound tests ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) with expansion: !false @@ -186,20 +186,20 @@ with expansion: #1912 -- test spec parser handles escaping Various parentheses ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) with expansion: !false @@ -208,10 +208,10 @@ with expansion: #1912 -- test spec parser handles escaping backslash in test name ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) with expansion: true @@ -8054,1004 +8054,73 @@ Matchers.tests.cpp:: PASSED: REQUIRE_NOTHROW( ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() ) ------------------------------------------------------------------------------- -Parse test names and tags - Empty test spec should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from empty string should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from just a comma should have no filters -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from quoted name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Test spec from name should have one filter -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at the start -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "*a" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at the end -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "a*" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at both ends -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( parseTestSpec( "*a*" ).matches( *tcA ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at the start +Parse uints + proper inputs ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +Parse.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ) with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at the end -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ) with expansion: - true == true + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "4294967295" ) == Optional{ 4294967295 } ) with expansion: - true == true + {?} == {?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE( parseUInt( "0x", 16 ) == Optional{ 255 } ) with expansion: - false == false + {?} == {?} ------------------------------------------------------------------------------- -Parse test names and tags - Redundant wildcard at both ends +Parse uints + Bad inputs ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +Parse.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "-1" ) ) with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcard at both ends, redundant at start -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "4294967296" ) ) with expansion: - true == true + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ) with expansion: - false == false + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "2 4" ) ) with expansion: - false == false + !{?} -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) +Parse.tests.cpp:: PASSED: + REQUIRE_FALSE( parseUInt( "0x", 10 ) ) with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Just wildcard -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag, two matches -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Two tags -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Two tags, spare separated -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Wildcarded name and tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - Single tag exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion and one tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion and one wldcarded name inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - One tag exclusion, using exclude:, and one wldcarded name inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - name exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion with tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - wildcarded name exclusion, using exclude:, with tag inclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - two wildcarded names -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - empty tag -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - empty quoted name -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Parse test names and tags - quoted string followed by tag exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.hasFilters() == true ) -with expansion: - true == true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcA ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcB ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcC ) == false ) -with expansion: - false == false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *tcD ) == true ) -with expansion: - true == true - -------------------------------------------------------------------------------- -Parse test names and tags - Leading and trailing spaces in test spec -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Parse test names and tags - Leading and trailing spaces in test name -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Parse test names and tags - Shortened hide tags are split apart when parsing -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only foo", "[foo]")) ) -with expansion: - !false - -------------------------------------------------------------------------------- -Parse test names and tags - Shortened hide tags also properly handle exclusion -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only foo", "[foo]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK_FALSE( spec.matches(*fakeTestCase("only hidden", "[.]")) ) -with expansion: - !false - -CmdLine.tests.cpp:: PASSED: - CHECK( spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) ) -with expansion: - true + !{?} ------------------------------------------------------------------------------- Parsed tags are matched case insensitive @@ -9104,10 +8173,10 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) ) with expansion: - "Shard count must be a positive number" contains: "Shard count must be a - positive number" + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as + shard count" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -9122,10 +8191,9 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) ) with expansion: - "Shard count must be a positive number" contains: "Shard count must be a - positive number" + "Shard count must be positive" contains: "Shard count must be positive" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -9157,10 +8225,10 @@ with expansion: !{?} CmdLine.tests.cpp:: PASSED: - REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") ) + REQUIRE_THAT( result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) ) with expansion: - "Shard index must be a non-negative number" contains: "Shard index must be a - non-negative number" + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as + shard index" ------------------------------------------------------------------------------- Parsing sharding-related cli flags @@ -18443,5 +17511,5 @@ Misc.tests.cpp:: PASSED: =============================================================================== test cases: 394 | 304 passed | 83 failed | 7 failed as expected -assertions: 2299 | 2129 passed | 143 failed | 27 failed as expected +assertions: 2159 | 1989 passed | 143 failed | 27 failed as expected diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt index ede2d59ccf17..6051750440cd 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt @@ -1,4 +1,4 @@ -Filters: ~[!nonportable]~[!benchmark]~[approvals] * +Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] Randomness seeded to: 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -166,20 +166,20 @@ with expansion: ------------------------------------------------------------------------------- #1905 -- test spec parser properly clears internal state between compound tests ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec . char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase("spec , char")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase(R"(spec \, char)")) ) with expansion: !false @@ -188,20 +188,20 @@ with expansion: #1912 -- test spec parser handles escaping Various parentheses ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) ) with expansion: true -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) ) with expansion: !false @@ -210,10 +210,10 @@ with expansion: #1912 -- test spec parser handles escaping backslash in test name ------------------------------------------------------------------------------- -CmdLine.tests.cpp: +TestSpec.tests.cpp: ............................................................................... -CmdLine.tests.cpp:: PASSED: +TestSpec.tests.cpp:: PASSED: REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) ) with expansion: true diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt index f7411501da43..bd9830512381 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,10 +1,10 @@ - + - + @@ -1048,41 +1048,8 @@ Message.tests.cpp: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index aa0860a3c9ac..3231c3e8f023 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -1,9 +1,9 @@ - + - + @@ -1047,41 +1047,8 @@ Message.tests.cpp: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index a9319a62800b..122e3dda4567 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -1,5 +1,5 @@ - + @@ -9,44 +9,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -157,6 +119,10 @@ + + + + @@ -283,6 +249,11 @@ + + + + + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt index 97b2d988175f..8025e455df11 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt @@ -1,5 +1,5 @@ - + @@ -8,44 +8,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -156,6 +118,10 @@ + + + + @@ -282,6 +248,11 @@ + + + + + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt index 2c7adae54de1..1832282ae9aa 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -1,3 +1,4 @@ +# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] # rng-seed: 1 # # A test name that starts with a # ok {test-number} - with 1 message: 'yay' @@ -2081,308 +2082,28 @@ ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed ok {test-number} - EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) # Overloaded comma or address-of operators are not used ok {test-number} - ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - parseTestSpec( "*a" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - parseTestSpec( "a*" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - parseTestSpec( "*a*" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) for: true -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false -# Parse test names and tags -ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +# Parse uints +ok {test-number} - parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +# Parse uints +ok {test-number} - !(parseUInt( "" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "-1" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "2 4" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "0x", 10 )) for: !{?} # Parsed tags are matched case insensitive ok {test-number} - spec.hasFilters() for: true # Parsed tags are matched case insensitive @@ -2396,11 +2117,11 @@ ok {test-number} - config.shardCount == 8 for: 8 == 8 # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" # Parsing sharding-related cli flags ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?} # Parsing sharding-related cli flags @@ -2408,7 +2129,7 @@ ok {test-number} - config.shardIndex == 2 for: 2 == 2 # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" # Parsing sharding-related cli flags ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?} # Parsing sharding-related cli flags @@ -4601,5 +4322,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2299 +1..2159 diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index d13b493c9047..4446141d1903 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -1,3 +1,4 @@ +# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals] # rng-seed: 1 # # A test name that starts with a # ok {test-number} - with 1 message: 'yay' @@ -2079,308 +2080,28 @@ ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed ok {test-number} - EvilMatcher() || ( EvilMatcher() && !EvilMatcher() ) # Overloaded comma or address-of operators are not used ok {test-number} - ( EvilMatcher() && EvilMatcher() ) || !EvilMatcher() -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - parseTestSpec( "*a" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - parseTestSpec( "a*" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - parseTestSpec( "*a*" ).matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.hasFilters() == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *tcA ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcB ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcC ) == false for: false == false -# Parse test names and tags -ok {test-number} - spec.matches( *tcD ) == true for: true == true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( " aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark " ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches( *fakeTestCase( "aardvark" ) ) for: true -# Parse test names and tags -ok {test-number} - spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) for: true -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false -# Parse test names and tags -ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false -# Parse test names and tags -ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +# Parse uints +ok {test-number} - parseUInt( "0" ) == Optional{ 0 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "100" ) == Optional{ 100 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "4294967295" ) == Optional{ 4294967295 } for: {?} == {?} +# Parse uints +ok {test-number} - parseUInt( "0x", 16 ) == Optional{ 255 } for: {?} == {?} +# Parse uints +ok {test-number} - !(parseUInt( "" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "!!KJHF*#" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "-1" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "4294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "42949672964294967296429496729642949672964294967296" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "2 4" )) for: !{?} +# Parse uints +ok {test-number} - !(parseUInt( "0x", 10 )) for: !{?} # Parsed tags are matched case insensitive ok {test-number} - spec.hasFilters() for: true # Parsed tags are matched case insensitive @@ -2394,11 +2115,11 @@ ok {test-number} - config.shardCount == 8 for: 8 == 8 # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) for: "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) for: "Shard count must be positive" contains: "Shard count must be positive" # Parsing sharding-related cli flags ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?} # Parsing sharding-related cli flags @@ -2406,7 +2127,7 @@ ok {test-number} - config.shardIndex == 2 for: 2 == 2 # Parsing sharding-related cli flags ok {test-number} - !(result) for: !{?} # Parsing sharding-related cli flags -ok {test-number} - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +ok {test-number} - result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) for: "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" # Parsing sharding-related cli flags ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?} # Parsing sharding-related cli flags @@ -4593,5 +4314,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2299 +1..2159 diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 526f00a90f1b..7049f2b6d13f 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -481,8 +481,8 @@ Message.tests.cpp:|nexplicit failure with message:|n "Message from ##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}"] -##teamcity[testStarted name='Parse test names and tags'] -##teamcity[testFinished name='Parse test names and tags' duration="{duration}"] +##teamcity[testStarted name='Parse uints'] +##teamcity[testFinished name='Parse uints' duration="{duration}"] ##teamcity[testStarted name='Parsed tags are matched case insensitive'] ##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] ##teamcity[testStarted name='Parsing sharding-related cli flags'] diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt index 2b7914464be1..96de7dd84230 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt @@ -481,8 +481,8 @@ Message.tests.cpp:|nexplicit failure with message:|n "Message from ##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}"] -##teamcity[testStarted name='Parse test names and tags'] -##teamcity[testFinished name='Parse test names and tags' duration="{duration}"] +##teamcity[testStarted name='Parse uints'] +##teamcity[testFinished name='Parse uints' duration="{duration}"] ##teamcity[testStarted name='Parsed tags are matched case insensitive'] ##teamcity[testFinished name='Parsed tags are matched case insensitive' duration="{duration}"] ##teamcity[testStarted name='Parsing sharding-related cli flags'] diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt index 0167e59cf285..4ff2e4f2e2ed 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -1,5 +1,5 @@ - + @@ -162,8 +162,8 @@ Nor would this - - + + spec.matches(*fakeTestCase("spec . char")) @@ -171,7 +171,7 @@ Nor would this true - + spec.matches(*fakeTestCase("spec , char")) @@ -179,7 +179,7 @@ Nor would this true - + !(spec.matches(*fakeTestCase(R"(spec \, char)"))) @@ -189,9 +189,9 @@ Nor would this - -

- + +
+ spec.matches(*fakeTestCase(R"(spec {a} char)")) @@ -199,7 +199,7 @@ Nor would this true - + spec.matches(*fakeTestCase(R"(spec [a] char)")) @@ -207,7 +207,7 @@ Nor would this true - + !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) @@ -217,8 +217,8 @@ Nor would this
-
- +
+ spec.matches(*fakeTestCase(R"(spec \ char)")) @@ -9689,1319 +9689,100 @@ C - -
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - -
-
- + +
+ - spec.hasFilters() == true + parseUInt( "0" ) == Optional<unsigned int>{ 0 } - true == true + {?} == {?} - + - spec.matches( *tcA ) == false + parseUInt( "100" ) == Optional<unsigned int>{ 100 } - false == false + {?} == {?} - + - spec.matches( *tcB ) == true + parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } - true == true + {?} == {?} - + - spec.matches( *tcC ) == false + parseUInt( "0x", 16 ) == Optional<unsigned int>{ 255 } - false == false + {?} == {?}
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - - - parseTestSpec( "*a" ).matches( *tcA ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - - - parseTestSpec( "a*" ).matches( *tcA ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - +
+ - spec.matches( *tcB ) == false + !(parseUInt( "" )) - false == false + !{?} - + - spec.matches( *tcC ) == true + !(parseUInt( "!!KJHF*#" )) - true == true + !{?} - + - spec.matches( *tcD ) == true + !(parseUInt( "-1" )) - true == true + !{?} - + - parseTestSpec( "*a*" ).matches( *tcA ) == true + !(parseUInt( "4294967296" )) - true == true + !{?} - -
-
- + - spec.hasFilters() == true + !(parseUInt( "42949672964294967296429496729642949672964294967296" )) - true == true + !{?} - + - spec.matches( *tcA ) == true + !(parseUInt( "2 4" )) - true == true + !{?} - + - spec.matches( *tcB ) == false + !(parseUInt( "0x", 10 )) - false == false + !{?} - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark" ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark" ) ) - - - true - - - -
-
- - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark" ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark" ) ) - - - true - - - -
-
- - - spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) - - - true - - - - - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) - - - !false - - - -
-
- - - !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) - - - !false - - - - - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) - - - !false - - - - - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) - - - !false - - - - - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) - - - true - - - +
@@ -11063,10 +9844,10 @@ C
- result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) - "Shard count must be a positive number" contains: "Shard count must be a positive number" + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" @@ -11082,10 +9863,10 @@ C - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) - "Shard count must be a positive number" contains: "Shard count must be a positive number" + "Shard count must be positive" contains: "Shard count must be positive" @@ -11120,10 +9901,10 @@ C - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") + result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) - "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" @@ -21702,6 +20483,6 @@ loose text artifact
- + diff --git a/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index 7a88f7de7f81..a0096170c746 100644 --- a/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/thirdParty/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -1,5 +1,5 @@ - + @@ -162,8 +162,8 @@ Nor would this
- - + + spec.matches(*fakeTestCase("spec . char")) @@ -171,7 +171,7 @@ Nor would this true - + spec.matches(*fakeTestCase("spec , char")) @@ -179,7 +179,7 @@ Nor would this true - + !(spec.matches(*fakeTestCase(R"(spec \, char)"))) @@ -189,9 +189,9 @@ Nor would this - -
- + +
+ spec.matches(*fakeTestCase(R"(spec {a} char)")) @@ -199,7 +199,7 @@ Nor would this true - + spec.matches(*fakeTestCase(R"(spec [a] char)")) @@ -207,7 +207,7 @@ Nor would this true - + !(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))) @@ -217,8 +217,8 @@ Nor would this
-
- +
+ spec.matches(*fakeTestCase(R"(spec \ char)")) @@ -9689,1319 +9689,100 @@ C - -
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - -
-
- + +
+ - spec.hasFilters() == true + parseUInt( "0" ) == Optional<unsigned int>{ 0 } - true == true + {?} == {?} - + - spec.matches( *tcA ) == false + parseUInt( "100" ) == Optional<unsigned int>{ 100 } - false == false + {?} == {?} - + - spec.matches( *tcB ) == true + parseUInt( "4294967295" ) == Optional<unsigned int>{ 4294967295 } - true == true + {?} == {?} - + - spec.matches( *tcC ) == false + parseUInt( "0x", 16 ) == Optional<unsigned int>{ 255 } - false == false + {?} == {?}
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - - - parseTestSpec( "*a" ).matches( *tcA ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - - - parseTestSpec( "a*" ).matches( *tcA ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - +
+ - spec.matches( *tcB ) == false + !(parseUInt( "" )) - false == false + !{?} - + - spec.matches( *tcC ) == true + !(parseUInt( "!!KJHF*#" )) - true == true + !{?} - + - spec.matches( *tcD ) == true + !(parseUInt( "-1" )) - true == true + !{?} - + - parseTestSpec( "*a*" ).matches( *tcA ) == true + !(parseUInt( "4294967296" )) - true == true + !{?} - -
-
- + - spec.hasFilters() == true + !(parseUInt( "42949672964294967296429496729642949672964294967296" )) - true == true + !{?} - + - spec.matches( *tcA ) == true + !(parseUInt( "2 4" )) - true == true + !{?} - + - spec.matches( *tcB ) == false + !(parseUInt( "0x", 10 )) - false == false + !{?} - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == true - - - true == true - - - - - spec.matches( *tcB ) == true - - - true == true - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == true - - - true == true - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == false - - - false == false - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == false - - - false == false - - - -
-
- - - spec.hasFilters() == true - - - true == true - - - - - spec.matches( *tcA ) == false - - - false == false - - - - - spec.matches( *tcB ) == false - - - false == false - - - - - spec.matches( *tcC ) == false - - - false == false - - - - - spec.matches( *tcD ) == true - - - true == true - - - -
-
- - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark" ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark" ) ) - - - true - - - -
-
- - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark" ) ) - - - true - - - - - spec.matches( *fakeTestCase( " aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark " ) ) - - - true - - - - - spec.matches( *fakeTestCase( "aardvark" ) ) - - - true - - - -
-
- - - spec.matches(*fakeTestCase("hidden and foo", "[.][foo]")) - - - true - - - - - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) - - - !false - - - -
-
- - - !(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))) - - - !false - - - - - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) - - - !false - - - - - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) - - - !false - - - - - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) - - - true - - - +
@@ -11063,10 +9844,10 @@ C
- result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + result.errorMessage(), ContainsSubstring( "Could not parse '-1' as shard count" ) - "Shard count must be a positive number" contains: "Shard count must be a positive number" + "Could not parse '-1' as shard count" contains: "Could not parse '-1' as shard count" @@ -11082,10 +9863,10 @@ C - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + result.errorMessage(), ContainsSubstring( "Shard count must be positive" ) - "Shard count must be a positive number" contains: "Shard count must be a positive number" + "Shard count must be positive" contains: "Shard count must be positive" @@ -11120,10 +9901,10 @@ C - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") + result.errorMessage(), ContainsSubstring( "Could not parse '-12' as shard index" ) - "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" + "Could not parse '-12' as shard index" contains: "Could not parse '-12' as shard index" @@ -21701,6 +20482,6 @@ There is no extra whitespace here
- + diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp index 2cbf05b8ea30..14ba433dad17 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index e7b0c9c1634f..404bad278c5e 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -22,311 +22,6 @@ namespace { auto fakeTestCase(const char* name, const char* desc = "") { return Catch::makeTestCaseInfo("", { name, desc }, CATCH_INTERNAL_LINEINFO); } } -TEST_CASE( "Parse test names and tags", "[command-line][test-spec]" ) { - - using Catch::parseTestSpec; - using Catch::TestSpec; - - auto tcA = fakeTestCase( "a" ); - auto tcB = fakeTestCase( "b", "[one][x]" ); - auto tcC = fakeTestCase( "longer name with spaces", "[two][three][.][x]" ); - auto tcD = fakeTestCase( "zlonger name with spacesz" ); - - SECTION( "Empty test spec should have no filters" ) { - TestSpec spec; - CHECK( spec.hasFilters() == false ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - } - - SECTION( "Test spec from empty string should have no filters" ) { - TestSpec spec = parseTestSpec( "" ); - CHECK( spec.hasFilters() == false ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - } - - SECTION( "Test spec from just a comma should have no filters" ) { - TestSpec spec = parseTestSpec( "," ); - CHECK( spec.hasFilters() == false ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - } - - SECTION( "Test spec from name should have one filter" ) { - TestSpec spec = parseTestSpec( "b" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - } - - SECTION( "Test spec from quoted name should have one filter" ) { - TestSpec spec = parseTestSpec( "\"b\"" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - } - - SECTION( "Test spec from name should have one filter" ) { - TestSpec spec = parseTestSpec( "b" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == false ); - } - - SECTION( "Wildcard at the start" ) { - TestSpec spec = parseTestSpec( "*spaces" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - CHECK( parseTestSpec( "*a" ).matches( *tcA ) == true ); - } - SECTION( "Wildcard at the end" ) { - TestSpec spec = parseTestSpec( "long*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - CHECK( parseTestSpec( "a*" ).matches( *tcA ) == true ); - } - SECTION( "Wildcard at both ends" ) { - TestSpec spec = parseTestSpec( "*name*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == true ); - CHECK( parseTestSpec( "*a*" ).matches( *tcA ) == true ); - } - SECTION( "Redundant wildcard at the start" ) { - TestSpec spec = parseTestSpec( "*a" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == false ); - } - SECTION( "Redundant wildcard at the end" ) { - TestSpec spec = parseTestSpec( "a*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == false ); - } - SECTION( "Redundant wildcard at both ends" ) { - TestSpec spec = parseTestSpec( "*a*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == false ); - } - SECTION( "Wildcard at both ends, redundant at start" ) { - TestSpec spec = parseTestSpec( "*longer*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == true ); - } - SECTION( "Just wildcard" ) { - TestSpec spec = parseTestSpec( "*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == true ); - } - - SECTION( "Single tag" ) { - TestSpec spec = parseTestSpec( "[one]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == false ); - } - SECTION( "Single tag, two matches" ) { - TestSpec spec = parseTestSpec( "[x]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == true ); - } - SECTION( "Two tags" ) { - TestSpec spec = parseTestSpec( "[two][x]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - } - SECTION( "Two tags, spare separated" ) { - TestSpec spec = parseTestSpec( "[two] [x]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - } - SECTION( "Wildcarded name and tag" ) { - TestSpec spec = parseTestSpec( "*name*[x]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "Single tag exclusion" ) { - TestSpec spec = parseTestSpec( "~[one]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - } - SECTION( "One tag exclusion and one tag inclusion" ) { - TestSpec spec = parseTestSpec( "~[two][x]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == false ); - } - SECTION( "One tag exclusion and one wldcarded name inclusion" ) { - TestSpec spec = parseTestSpec( "~[two]*name*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == true ); - } - SECTION( "One tag exclusion, using exclude:, and one wldcarded name inclusion" ) { - TestSpec spec = parseTestSpec( "exclude:[two]*name*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == true ); - } - SECTION( "name exclusion" ) { - TestSpec spec = parseTestSpec( "~b" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == true ); - } - SECTION( "wildcarded name exclusion" ) { - TestSpec spec = parseTestSpec( "~*name*" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "wildcarded name exclusion with tag inclusion" ) { - TestSpec spec = parseTestSpec( "~*name*,[three]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "wildcarded name exclusion, using exclude:, with tag inclusion" ) { - TestSpec spec = parseTestSpec( "exclude:*name*,[three]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == true ); - CHECK( spec.matches( *tcB ) == true ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "two wildcarded names" ) { - TestSpec spec = parseTestSpec( "\"longer*\"\"*spaces\"" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == true ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "empty tag" ) { - TestSpec spec = parseTestSpec( "[]" ); - CHECK( spec.hasFilters() == false ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "empty quoted name" ) { - TestSpec spec = parseTestSpec( "\"\"" ); - CHECK( spec.hasFilters() == false ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == false ); - } - SECTION( "quoted string followed by tag exclusion" ) { - TestSpec spec = parseTestSpec( "\"*name*\"~[.]" ); - CHECK( spec.hasFilters() == true ); - CHECK( spec.matches( *tcA ) == false ); - CHECK( spec.matches( *tcB ) == false ); - CHECK( spec.matches( *tcC ) == false ); - CHECK( spec.matches( *tcD ) == true ); - } - SECTION( "Leading and trailing spaces in test spec" ) { - TestSpec spec = parseTestSpec( "\" aardvark \"" ); - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); - - } - SECTION( "Leading and trailing spaces in test name" ) { - TestSpec spec = parseTestSpec( "aardvark" ); - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); - CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); - CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); - } - SECTION("Shortened hide tags are split apart when parsing") { - TestSpec spec = parseTestSpec("[.foo]"); - CHECK(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); - CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); - } - SECTION("Shortened hide tags also properly handle exclusion") { - TestSpec spec = parseTestSpec("~[.foo]"); - CHECK_FALSE(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); - CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); - CHECK_FALSE(spec.matches(*fakeTestCase("only hidden", "[.]"))); - CHECK(spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]"))); - } -} - -TEST_CASE("#1905 -- test spec parser properly clears internal state between compound tests", "[command-line][test-spec]") { - using Catch::parseTestSpec; - using Catch::TestSpec; - // We ask for one of 2 different tests and the latter one of them has a , in name that needs escaping - TestSpec spec = parseTestSpec(R"("spec . char","spec \, char")"); - - REQUIRE(spec.matches(*fakeTestCase("spec . char"))); - REQUIRE(spec.matches(*fakeTestCase("spec , char"))); - REQUIRE_FALSE(spec.matches(*fakeTestCase(R"(spec \, char)"))); -} - -TEST_CASE("#1912 -- test spec parser handles escaping", "[command-line][test-spec]") { - using Catch::parseTestSpec; - using Catch::TestSpec; - - SECTION("Various parentheses") { - TestSpec spec = parseTestSpec(R"(spec {a} char,spec \[a] char)"); - - REQUIRE(spec.matches(*fakeTestCase(R"(spec {a} char)"))); - REQUIRE(spec.matches(*fakeTestCase(R"(spec [a] char)"))); - REQUIRE_FALSE(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))); - } - SECTION("backslash in test name") { - TestSpec spec = parseTestSpec(R"(spec \\ char)"); - - REQUIRE(spec.matches(*fakeTestCase(R"(spec \ char)"))); - } -} - TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) { using namespace Catch::Matchers; @@ -649,14 +344,18 @@ TEST_CASE("Parsing sharding-related cli flags", "[sharding]") { auto result = cli.parse({ "test", "--shard-count=-1" }); CHECK_FALSE(result); - REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard count must be a positive number")); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Could not parse '-1' as shard count" ) ); } SECTION("Zero shard count reports error") { auto result = cli.parse({ "test", "--shard-count=0" }); CHECK_FALSE(result); - REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard count must be a positive number")); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Shard count must be positive" ) ); } SECTION("shard-index") { @@ -669,7 +368,9 @@ TEST_CASE("Parsing sharding-related cli flags", "[sharding]") { auto result = cli.parse({ "test", "--shard-index=-12" }); CHECK_FALSE(result); - REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number")); + REQUIRE_THAT( + result.errorMessage(), + ContainsSubstring( "Could not parse '-12' as shard index" ) ); } SECTION("Shard index 0 is accepted") { @@ -677,7 +378,6 @@ TEST_CASE("Parsing sharding-related cli flags", "[sharding]") { REQUIRE(config.shardIndex == 0); } - } TEST_CASE( "Parsing warnings", "[cli][warnings]" ) { @@ -737,3 +437,31 @@ TEST_CASE("Win32 colour implementation is compile-time optional", REQUIRE_FALSE( result ); #endif } + +TEST_CASE( "Parse rng seed in different formats", "[approvals][cli][rng-seed]" ) { + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser( config ); + + SECTION("well formed cases") { + char const* seed_string; + uint32_t seed_value; + // GCC-5 workaround + using gen_type = std::tuple; + std::tie( seed_string, seed_value ) = GENERATE( table({ + gen_type{ "0xBEEF", 0xBEEF }, + gen_type{ "12345678", 12345678 } + } ) ); + CAPTURE( seed_string ); + + auto result = cli.parse( { "tests", "--rng-seed", seed_string } ); + + REQUIRE( result ); + REQUIRE( config.rngSeed == seed_value ); + } + SECTION( "Error cases" ) { + auto seed_string = + GENERATE( "0xSEED", "999999999999", "08888", "BEEF", "123 456" ); + CAPTURE( seed_string ); + REQUIRE_FALSE( cli.parse( { "tests", "--rng-seed", seed_string } ) ); + } +} diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp index b8a543903748..4df8ecf9e8d7 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp index 83501cae51f1..615fda1d910f 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp index 987910a948ab..a5a43926cfeb 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -11,6 +11,8 @@ #include #include +#include + #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4702) // unreachable code in the macro expansions @@ -86,3 +88,44 @@ TEST_CASE("Optional comparison ops", "[optional][approvals]") { REQUIRE_FALSE( a != b ); } } + +TEST_CASE( "Decomposer checks that the argument is 0 when handling " + "only-0-comparable types", + "[decomposition][approvals]" ) { + TypeWithLit0Comparisons t{}; + + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS + + REQUIRE_THROWS( Catch::Decomposer{} <= t == 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 == t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t == 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 == t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t != 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 != t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t != 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 != t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t < 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 < t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t < 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 < t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t <= 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 <= t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t <= 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 <= t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t > 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 > t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t > 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 > t ); + + REQUIRE_THROWS( Catch::Decomposer{} <= t >= 42 ); + REQUIRE_THROWS( Catch::Decomposer{} <= 42 >= t ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= t >= 0 ); + REQUIRE_NOTHROW( Catch::Decomposer{} <= 0 >= t ); + + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +} diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp index 242a89670d21..08a579c9dc5c 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp index 3ad20453c59c..1c203b6bdbe6 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp index f51f7bd9d4dd..96c0977b7a10 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp new file mode 100644 index 000000000000..7791355f58b3 --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp @@ -0,0 +1,38 @@ + +// 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 + +#include + +TEST_CASE("Parse uints", "[parse-numbers]") { + using Catch::parseUInt; + using Catch::Optional; + + SECTION("proper inputs") { + REQUIRE( parseUInt( "0" ) == Optional{ 0 } ); + REQUIRE( parseUInt( "100" ) == Optional{ 100 } ); + REQUIRE( parseUInt( "4294967295" ) == + Optional{ 4294967295 } ); + REQUIRE( parseUInt( "0xFF", 16 ) == Optional{ 255 } ); + } + SECTION( "Bad inputs" ) { + // empty + REQUIRE_FALSE( parseUInt( "" ) ); + // random noise + REQUIRE_FALSE( parseUInt( "!!KJHF*#" ) ); + // negative + REQUIRE_FALSE( parseUInt( "-1" ) ); + // too large + REQUIRE_FALSE( parseUInt( "4294967296" ) ); + REQUIRE_FALSE( parseUInt( "42949672964294967296429496729642949672964294967296" ) ); + REQUIRE_FALSE( parseUInt( "2 4" ) ); + // hex with base 10 + REQUIRE_FALSE( parseUInt( "0xFF", 10 ) ); + } +} diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp index 025a286043a5..ac8be6459269 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp index b79b372e9771..8018b7eb0d86 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp index 97d1ad25307f..54c26a7a2cf4 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp index 78e4858a0297..8e6009dd5818 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp index 6b1d377c8547..738cb529c9b9 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp index 08f7dc2c6ace..7a0b3b4ab445 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp index 8cd995cce9c8..36554ddc3b42 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp index d87f966bde49..ef321b27443c 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp index 93cb70b14a51..03cb3f0e2aee 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp new file mode 100644 index 000000000000..9c4eb03b1a7b --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp @@ -0,0 +1,365 @@ + +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { + auto fakeTestCase(const char* name, const char* desc = "") { return Catch::makeTestCaseInfo("", { name, desc }, CATCH_INTERNAL_LINEINFO); } +} + +TEST_CASE( "Parse test names and tags", "[command-line][test-spec][approvals]" ) { + using Catch::parseTestSpec; + using Catch::TestSpec; + + auto tcA = fakeTestCase( "a" ); + auto tcB = fakeTestCase( "b", "[one][x]" ); + auto tcC = fakeTestCase( "longer name with spaces", "[two][three][.][x]" ); + auto tcD = fakeTestCase( "zlonger name with spacesz" ); + + SECTION( "Empty test spec should have no filters" ) { + TestSpec spec; + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from empty string should have no filters" ) { + TestSpec spec = parseTestSpec( "" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from just a comma should have no filters" ) { + TestSpec spec = parseTestSpec( "," ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + } + + SECTION( "Test spec from name should have one filter" ) { + TestSpec spec = parseTestSpec( "b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + } + + SECTION( "Test spec from quoted name should have one filter" ) { + TestSpec spec = parseTestSpec( "\"b\"" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + } + + SECTION( "Test spec from name should have one filter" ) { + TestSpec spec = parseTestSpec( "b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + + SECTION( "Wildcard at the start" ) { + TestSpec spec = parseTestSpec( "*spaces" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + CHECK( parseTestSpec( "*a" ).matches( *tcA ) == true ); + } + SECTION( "Wildcard at the end" ) { + TestSpec spec = parseTestSpec( "long*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + CHECK( parseTestSpec( "a*" ).matches( *tcA ) == true ); + } + SECTION( "Wildcard at both ends" ) { + TestSpec spec = parseTestSpec( "*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + CHECK( parseTestSpec( "*a*" ).matches( *tcA ) == true ); + } + SECTION( "Redundant wildcard at the start" ) { + TestSpec spec = parseTestSpec( "*a" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Redundant wildcard at the end" ) { + TestSpec spec = parseTestSpec( "a*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Redundant wildcard at both ends" ) { + TestSpec spec = parseTestSpec( "*a*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + } + SECTION( "Wildcard at both ends, redundant at start" ) { + TestSpec spec = parseTestSpec( "*longer*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "Just wildcard" ) { + TestSpec spec = parseTestSpec( "*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == true ); + } + + SECTION( "Single tag" ) { + TestSpec spec = parseTestSpec( "[one]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "Single tag, two matches" ) { + TestSpec spec = parseTestSpec( "[x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Two tags" ) { + TestSpec spec = parseTestSpec( "[two][x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Two tags, spare separated" ) { + TestSpec spec = parseTestSpec( "[two] [x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + } + SECTION( "Wildcarded name and tag" ) { + TestSpec spec = parseTestSpec( "*name*[x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "Single tag exclusion" ) { + TestSpec spec = parseTestSpec( "~[one]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "One tag exclusion and one tag inclusion" ) { + TestSpec spec = parseTestSpec( "~[two][x]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + } + SECTION( "One tag exclusion and one wldcarded name inclusion" ) { + TestSpec spec = parseTestSpec( "~[two]*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "One tag exclusion, using exclude:, and one wldcarded name inclusion" ) { + TestSpec spec = parseTestSpec( "exclude:[two]*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "name exclusion" ) { + TestSpec spec = parseTestSpec( "~b" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "wildcarded name exclusion" ) { + TestSpec spec = parseTestSpec( "~*name*" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "wildcarded name exclusion with tag inclusion" ) { + TestSpec spec = parseTestSpec( "~*name*,[three]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "wildcarded name exclusion, using exclude:, with tag inclusion" ) { + TestSpec spec = parseTestSpec( "exclude:*name*,[three]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == true ); + CHECK( spec.matches( *tcB ) == true ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "two wildcarded names" ) { + TestSpec spec = parseTestSpec( "\"longer*\"\"*spaces\"" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == true ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "empty tag" ) { + TestSpec spec = parseTestSpec( "[]" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "empty quoted name" ) { + TestSpec spec = parseTestSpec( "\"\"" ); + CHECK( spec.hasFilters() == false ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == false ); + } + SECTION( "quoted string followed by tag exclusion" ) { + TestSpec spec = parseTestSpec( "\"*name*\"~[.]" ); + CHECK( spec.hasFilters() == true ); + CHECK( spec.matches( *tcA ) == false ); + CHECK( spec.matches( *tcB ) == false ); + CHECK( spec.matches( *tcC ) == false ); + CHECK( spec.matches( *tcD ) == true ); + } + SECTION( "Leading and trailing spaces in test spec" ) { + TestSpec spec = parseTestSpec( "\" aardvark \"" ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); + + } + SECTION( "Leading and trailing spaces in test name" ) { + TestSpec spec = parseTestSpec( "aardvark" ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark" ) ) ); + CHECK( spec.matches( *fakeTestCase( " aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark " ) ) ); + CHECK( spec.matches( *fakeTestCase( "aardvark" ) ) ); + } + SECTION("Shortened hide tags are split apart when parsing") { + TestSpec spec = parseTestSpec("[.foo]"); + CHECK(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); + } + SECTION("Shortened hide tags also properly handle exclusion") { + TestSpec spec = parseTestSpec("~[.foo]"); + CHECK_FALSE(spec.matches(*fakeTestCase("hidden and foo", "[.][foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only foo", "[foo]"))); + CHECK_FALSE(spec.matches(*fakeTestCase("only hidden", "[.]"))); + CHECK(spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]"))); + } +} + +TEST_CASE("#1905 -- test spec parser properly clears internal state between compound tests", "[command-line][test-spec]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + // We ask for one of 2 different tests and the latter one of them has a , in name that needs escaping + TestSpec spec = parseTestSpec(R"("spec . char","spec \, char")"); + + REQUIRE(spec.matches(*fakeTestCase("spec . char"))); + REQUIRE(spec.matches(*fakeTestCase("spec , char"))); + REQUIRE_FALSE(spec.matches(*fakeTestCase(R"(spec \, char)"))); +} + +TEST_CASE("#1912 -- test spec parser handles escaping", "[command-line][test-spec]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + + SECTION("Various parentheses") { + TestSpec spec = parseTestSpec(R"(spec {a} char,spec \[a] char)"); + + REQUIRE(spec.matches(*fakeTestCase(R"(spec {a} char)"))); + REQUIRE(spec.matches(*fakeTestCase(R"(spec [a] char)"))); + REQUIRE_FALSE(spec.matches(*fakeTestCase("differs but has similar tag", "[a]"))); + } + SECTION("backslash in test name") { + TestSpec spec = parseTestSpec(R"(spec \\ char)"); + + REQUIRE(spec.matches(*fakeTestCase(R"(spec \ char)"))); + } +} + +TEST_CASE("Test spec serialization is round-trippable", "[test-spec][serialization][approvals]") { + using Catch::parseTestSpec; + using Catch::TestSpec; + + auto serializedTestSpec = []( std::string const& spec ) { + Catch::ReusableStringStream sstr; + sstr << parseTestSpec( spec ); + return sstr.str(); + }; + + SECTION("Spaces are normalized") { + CHECK( serializedTestSpec( "[abc][def]" ) == "[abc] [def]" ); + CHECK( serializedTestSpec( "[def] [abc]" ) == "[def] [abc]" ); + CHECK( serializedTestSpec( "[def] [abc]" ) == "[def] [abc]" ); + } + SECTION("Output is order dependent") { + CHECK( serializedTestSpec( "[abc][def]" ) == "[abc] [def]" ); + CHECK( serializedTestSpec( "[def][abc]" ) == "[def] [abc]" ); + } + SECTION("Multiple disjunct filters") { + CHECK( serializedTestSpec( "[abc],[def]" ) == "[abc],[def]" ); + CHECK( serializedTestSpec( "[def],[abc],[idkfa]" ) == "[def],[abc],[idkfa]" ); + } + SECTION("Test names are enclosed in string") { + CHECK( serializedTestSpec( "Some test" ) == "\"Some test\"" ); + CHECK( serializedTestSpec( "*Some test" ) == "\"*Some test\"" ); + CHECK( serializedTestSpec( "* Some test" ) == "\"* Some test\"" ); + CHECK( serializedTestSpec( "* Some test *" ) == "\"* Some test *\"" ); + } + SECTION( "Mixing test names and tags" ) { + CHECK( serializedTestSpec( "some test[abcd]" ) == + "\"some test\" [abcd]" ); + CHECK( serializedTestSpec( "[ab]some test[cd]" ) == + "[ab] \"some test\" [cd]" ); + } +} diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp index c8ac77b293aa..ae27b40668ae 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp index 379dc624dace..82de5a27f5c9 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp index 63f072dd9940..e50e4c5e717c 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp new file mode 100644 index 000000000000..459e0d4857a0 --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp @@ -0,0 +1,45 @@ + +// 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 +#include +#include + + +#define ADD_TRAIT_TEST_CASE( op ) \ + TEST_CASE( "is_" #op "_comparable", \ + "[traits][is_comparable][approvals]" ) { \ + using Catch::Detail::is_##op##_0_comparable; \ + using Catch::Detail::is_##op##_comparable; \ + \ + STATIC_REQUIRE( is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + is_##op##_comparable::value ); \ + STATIC_REQUIRE( !is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + !is_##op##_comparable::value ); \ + STATIC_REQUIRE( \ + !is_##op##_comparable::value ); \ + \ + STATIC_REQUIRE( is_##op##_0_comparable::value ); \ + STATIC_REQUIRE( \ + is_##op##_0_comparable::value ); \ + STATIC_REQUIRE( !is_##op##_0_comparable::value ); \ + \ + /* This test fails with MSVC in permissive mode, because of course it does */ \ + /* STATIC_REQUIRE( !is_##op##_0_comparable::value ); */ \ +} + +ADD_TRAIT_TEST_CASE(lt) +ADD_TRAIT_TEST_CASE(gt) +ADD_TRAIT_TEST_CASE(le) +ADD_TRAIT_TEST_CASE(ge) +ADD_TRAIT_TEST_CASE(eq) +ADD_TRAIT_TEST_CASE(ne) + +#undef ADD_TRAIT_TEST_CASE diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp index 40c9886c32ca..420bf1b34fdb 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp index 9fe9416a1214..b5982b855176 100644 --- a/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/TestRegistrations.cpp b/thirdParty/catch2/tests/SelfTest/TestRegistrations.cpp index f24c913f5d0c..6476773529c7 100644 --- a/thirdParty/catch2/tests/SelfTest/TestRegistrations.cpp +++ b/thirdParty/catch2/tests/SelfTest/TestRegistrations.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp b/thirdParty/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp index bfb222d037c0..4e9e385b2317 100644 --- a/thirdParty/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp index 853227a2783d..c3d41cb4463c 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp index b128196c3e4d..5ac860553b47 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp index ffedc9a2f65c..557b2131c628 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -16,21 +16,23 @@ namespace { std::uint64_t Fibonacci(std::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]") { - CHECK(Fibonacci(0) == 1); + CHECK(Fibonacci(0) == 0); // some more asserts.. - CHECK(Fibonacci(5) == 8); + CHECK(Fibonacci(5) == 5); // some more asserts.. - BENCHMARK("Fibonacci 20") { + REQUIRE( Fibonacci( 20 ) == 6'765 ); + BENCHMARK( "Fibonacci 20" ) { return Fibonacci(20); }; - BENCHMARK("Fibonacci 25") { + REQUIRE( Fibonacci( 25 ) == 75'025 ); + BENCHMARK( "Fibonacci 25" ) { return Fibonacci(25); }; diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Class.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Class.tests.cpp index 6b2ba4cfe655..bab7a6843793 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Class.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Class.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp index 5d9ab3f05975..1cdcfb788ec1 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp @@ -1,11 +1,13 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 +#include + #include // Setup for #1403 -- look for global overloads of operator << for classes @@ -310,3 +312,44 @@ TEST_CASE("ADL universal operators don't hijack expression deconstruction", "[co REQUIRE(0 & adl::always_true{}); REQUIRE(0 ^ adl::always_true{}); } + +TEST_CASE( "#2555 - types that can only be compared with 0 literal (not int/long) are supported", "[compilation][approvals]" ) { + REQUIRE( TypeWithLit0Comparisons{} < 0 ); + REQUIRE_FALSE( 0 < TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} <= 0 ); + REQUIRE_FALSE( 0 > TypeWithLit0Comparisons{} ); + + REQUIRE( TypeWithLit0Comparisons{} > 0 ); + REQUIRE_FALSE( 0 > TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} >= 0 ); + REQUIRE_FALSE( 0 >= TypeWithLit0Comparisons{} ); + + REQUIRE( TypeWithLit0Comparisons{} == 0 ); + REQUIRE_FALSE( 0 == TypeWithLit0Comparisons{} ); + REQUIRE( TypeWithLit0Comparisons{} != 0 ); + REQUIRE_FALSE( 0 != TypeWithLit0Comparisons{} ); +} + +namespace { + struct MultipleImplicitConstructors { + MultipleImplicitConstructors( double ) {} + MultipleImplicitConstructors( int64_t ) {} + bool operator==( MultipleImplicitConstructors ) const { return true; } + bool operator!=( MultipleImplicitConstructors ) const { return true; } + bool operator<( MultipleImplicitConstructors ) const { return true; } + bool operator<=( MultipleImplicitConstructors ) const { return true; } + bool operator>( MultipleImplicitConstructors ) const { return true; } + bool operator>=( MultipleImplicitConstructors ) const { return true; } + }; +} +TEST_CASE("#2571 - tests compile types that have multiple implicit constructors from lit 0", + "[compilation][approvals]") { + MultipleImplicitConstructors mic1( 0.0 ); + MultipleImplicitConstructors mic2( 0.0 ); + REQUIRE( mic1 == mic2 ); + REQUIRE( mic1 != mic2 ); + REQUIRE( mic1 < mic2 ); + REQUIRE( mic1 <= mic2 ); + REQUIRE( mic1 > mic2 ); + REQUIRE( mic1 >= mic2 ); +} diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp index 2e3b624e1d21..211dd3b91529 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp index 0a169831729d..e92f74060609 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 @@ -34,6 +34,8 @@ TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decompo TEST_CASE("#1005: Comparing pointer to int and long (NULL can be either on various systems)", "[Decomposition][approvals]") { FILE* fptr = nullptr; - REQUIRE(fptr == 0); - REQUIRE(fptr == 0l); + REQUIRE( fptr == 0 ); + REQUIRE_FALSE( fptr != 0 ); + REQUIRE( fptr == 0l ); + REQUIRE_FALSE( fptr != 0l ); } diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp index 7cf621373325..362cf8046d2d 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp index e93cf91930ea..f917932f1d33 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp index 5b205c85c773..3b6912472b64 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp index 5b4e9e033ff2..1ce3158b3f63 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp index 1201581cf1a5..f30af7037fbb 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Message.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Message.tests.cpp index 2ec71b4965e8..a5e695825797 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Message.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Message.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp index 93b5ff1ec5ca..6c1fd68f44ad 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp index e5e12468daf7..624abbf1ee1d 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp index 22c31c687010..744b899be5f9 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp index b8f383b159da..28d60196cb76 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp index bc2d2561cc64..9fd9d6b45300 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp index 4bf592a4ca28..f5cb239c9684 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp index 415cbf8384f9..b2813a817899 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp index e67a7a2cf063..197ba557a9f1 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp index a5ccbfa70af8..c04274485a2a 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp index 7069734f458c..ec7a49ea97fa 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp index bcfa7e699d8d..25770340a02d 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp b/thirdParty/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp index 7bc3920ecc3c..92048a0651f7 100644 --- a/thirdParty/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp +++ b/thirdParty/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp @@ -1,7 +1,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.cpp b/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.cpp new file mode 100644 index 000000000000..aa64404aeb50 --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.cpp @@ -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 + +#include + +#include +#include + +namespace Catch { + + TestSpec parseTestSpec( std::string const& arg ) { + return TestSpecParser( ITagAliasRegistry::get() ) + .parse( arg ) + .testSpec(); + } + +} // namespace Catch diff --git a/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.hpp b/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.hpp new file mode 100644 index 000000000000..39ee0713e185 --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/helpers/parse_test_spec.hpp @@ -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 + +#ifndef CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED +#define CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED + +#include + +#include + +namespace Catch { + TestSpec parseTestSpec( std::string const& arg ); +} + +#endif // CATCH_TEST_HELPERS_PARSE_TEST_SPEC_HPP_INCLUDED diff --git a/thirdParty/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp b/thirdParty/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp new file mode 100644 index 000000000000..202c3af4d9a0 --- /dev/null +++ b/thirdParty/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp @@ -0,0 +1,44 @@ + +// 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_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED +#define CATCH_TEST_HELPERS_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED + +#include + +// Should only be constructible from literal 0. +// Used by `TypeWithLit0Comparisons` for testing comparison +// ops that only work with literal zero, the way std::*orderings do +struct ZeroLiteralDetector { + constexpr ZeroLiteralDetector( ZeroLiteralDetector* ) noexcept {} + + template ::value>> + constexpr ZeroLiteralDetector( T ) = delete; +}; + +struct TypeWithLit0Comparisons { +#define DEFINE_COMP_OP( op ) \ + friend bool operator op( TypeWithLit0Comparisons, ZeroLiteralDetector ) { \ + return true; \ + } \ + friend bool operator op( ZeroLiteralDetector, TypeWithLit0Comparisons ) { \ + return false; \ + } + + DEFINE_COMP_OP( < ) + DEFINE_COMP_OP( <= ) + DEFINE_COMP_OP( > ) + DEFINE_COMP_OP( >= ) + DEFINE_COMP_OP( == ) + DEFINE_COMP_OP( != ) + +#undef DEFINE_COMP_OP +}; + +#endif // CATCH_TEST_HELPERS_TYPE_WITH_LIT_0_COMPARISONS_HPP_INCLUDED diff --git a/thirdParty/catch2/tests/TestScripts/ConfigureTestsCommon.py b/thirdParty/catch2/tests/TestScripts/ConfigureTestsCommon.py index ad5b358be035..13b1d927ff6f 100644 --- a/thirdParty/catch2/tests/TestScripts/ConfigureTestsCommon.py +++ b/thirdParty/catch2/tests/TestScripts/ConfigureTestsCommon.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testBazelReporter.py b/thirdParty/catch2/tests/TestScripts/testBazelReporter.py index 71014ee26eef..d0893f81604d 100644 --- a/thirdParty/catch2/tests/TestScripts/testBazelReporter.py +++ b/thirdParty/catch2/tests/TestScripts/testBazelReporter.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -57,10 +57,10 @@ test_passing = False stdout = ex.stdout else: - print('Could not run "{}"'.format(args)) + print('Could not run "{}"'.format(bin_path)) print("Return code: {}".format(ex.returncode)) print("stdout: {}".format(ex.stdout)) - print("stderr: {}".format(ex.stdout)) + print("stderr: {}".format(ex.stderr)) raise # Check for valid XML output diff --git a/thirdParty/catch2/tests/TestScripts/testBazelSharding.py b/thirdParty/catch2/tests/TestScripts/testBazelSharding.py new file mode 100755 index 000000000000..d4a9aeee8946 --- /dev/null +++ b/thirdParty/catch2/tests/TestScripts/testBazelSharding.py @@ -0,0 +1,75 @@ +#!/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 +import sys +import subprocess + +""" +Test that Catch2 recognizes the three sharding-related environment variables +and responds accordingly (running only the selected shard, creating the +response file, etc). + +Requires 2 arguments, path to Catch2 binary to run and the output directory +for the output file. +""" +if len(sys.argv) != 3: + print("Wrong number of arguments: {}".format(len(sys.argv))) + print("Usage: {} test-bin-path output-dir".format(sys.argv[0])) + exit(1) + + +bin_path = os.path.abspath(sys.argv[1]) +output_dir = os.path.abspath(sys.argv[2]) +info_file_path = os.path.join(output_dir, '{}.shard-support'.format(os.path.basename(bin_path))) + +# Ensure no file exists from previous test runs +if os.path.isfile(info_file_path): + os.remove(info_file_path) + +print('bin path:', bin_path) +print('shard confirmation path:', info_file_path) + +env = os.environ.copy() +# We will run only one shard, and it should have the passing test. +# This simplifies our work a bit, and if we have any regression in this +# functionality we can make more complex tests later. +env["BAZEL_TEST"] = "1" +env["TEST_SHARD_INDEX"] = "0" +env["TEST_TOTAL_SHARDS"] = "2" +env["TEST_SHARD_STATUS_FILE"] = info_file_path + + +try: + ret = subprocess.run( + bin_path, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + check=True, + universal_newlines=True, + env=env + ) + stdout = ret.stdout +except subprocess.SubprocessError as ex: + print('Could not run "{}"'.format(bin_path)) + print("Return code: {}".format(ex.returncode)) + print("stdout: {}".format(ex.stdout)) + print("stderr: {}".format(ex.stderr)) + raise + + +if not "All tests passed (1 assertion in 1 test case)" in stdout: + print("Did not find expected output in stdout.") + print("stdout:\n{}".format(stdout)) + exit(1) + +if not os.path.isfile(info_file_path): + print("Catch2 did not create expected file at path '{}'".format(info_file_path)) + exit(2) diff --git a/thirdParty/catch2/tests/TestScripts/testConfigureDefaultReporter.py b/thirdParty/catch2/tests/TestScripts/testConfigureDefaultReporter.py index 66c88da02eee..5bf9787122e7 100644 --- a/thirdParty/catch2/tests/TestScripts/testConfigureDefaultReporter.py +++ b/thirdParty/catch2/tests/TestScripts/testConfigureDefaultReporter.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -30,15 +30,12 @@ configure_and_build(catch2_source_path, build_dir_path, - [("CATCH_CONFIG_DEFAULT_REPORTER", "compact")]) + [("CATCH_CONFIG_DEFAULT_REPORTER", "xml")]) stdout, _ = run_and_return_output(os.path.join(build_dir_path, 'tests'), 'SelfTest', ['[approx][custom]']) - -# This matches the summary line made by compact reporter, console reporter's -# summary line does not match the regex. -summary_regex = 'Passed \d+ test case with \d+ assertions.' -if not re.search(summary_regex, stdout): - print("Could not find '{}' in the stdout".format(summary_regex)) +xml_tag = '' +if xml_tag not in stdout: + print("Could not find '{}' in the stdout".format(xml_tag)) print('stdout: "{}"'.format(stdout)) exit(2) diff --git a/thirdParty/catch2/tests/TestScripts/testConfigureDisable.py b/thirdParty/catch2/tests/TestScripts/testConfigureDisable.py index 92946d8d839c..b0247700c01b 100644 --- a/thirdParty/catch2/tests/TestScripts/testConfigureDisable.py +++ b/thirdParty/catch2/tests/TestScripts/testConfigureDisable.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testConfigureDisableStringification.py b/thirdParty/catch2/tests/TestScripts/testConfigureDisableStringification.py index a8a53e4f55cd..33f7853e5524 100644 --- a/thirdParty/catch2/tests/TestScripts/testConfigureDisableStringification.py +++ b/thirdParty/catch2/tests/TestScripts/testConfigureDisableStringification.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py b/thirdParty/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py index b5313fe92b85..09ff51e2de18 100644 --- a/thirdParty/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py +++ b/thirdParty/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testPartialTestCaseEvent.py b/thirdParty/catch2/tests/TestScripts/testPartialTestCaseEvent.py index 8259d211c67b..55c6e299d213 100755 --- a/thirdParty/catch2/tests/TestScripts/testPartialTestCaseEvent.py +++ b/thirdParty/catch2/tests/TestScripts/testPartialTestCaseEvent.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testRandomOrder.py b/thirdParty/catch2/tests/TestScripts/testRandomOrder.py index afab231de372..2368423e1ee3 100755 --- a/thirdParty/catch2/tests/TestScripts/testRandomOrder.py +++ b/thirdParty/catch2/tests/TestScripts/testRandomOrder.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/TestScripts/testSharding.py b/thirdParty/catch2/tests/TestScripts/testSharding.py index 6902f83c4a4a..fa6f94d323f0 100755 --- a/thirdParty/catch2/tests/TestScripts/testSharding.py +++ b/thirdParty/catch2/tests/TestScripts/testSharding.py @@ -2,7 +2,7 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tests/meson.build b/thirdParty/catch2/tests/meson.build index 9da8eb525bc5..c8bdfb4b8980 100644 --- a/thirdParty/catch2/tests/meson.build +++ b/thirdParty/catch2/tests/meson.build @@ -1,6 +1,6 @@ # Copyright Catch2 Authors # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# (See accompanying file LICENSE.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) # SPDX-License-Identifier: BSL-1.0 @@ -8,6 +8,7 @@ # define the sources of the self test # Please keep these ordered alphabetically self_test_sources = files( + 'SelfTest/helpers/parse_test_spec.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/FloatingPoint.tests.cpp', 'SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp', 'SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp', + 'SelfTest/IntrospectiveTests/Parse.tests.cpp', 'SelfTest/IntrospectiveTests/PartTracker.tests.cpp', 'SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp', 'SelfTest/IntrospectiveTests/Reporters.tests.cpp', @@ -25,9 +27,11 @@ self_test_sources = files( 'SelfTest/IntrospectiveTests/StringManip.tests.cpp', 'SelfTest/IntrospectiveTests/Tag.tests.cpp', 'SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp', + 'SelfTest/IntrospectiveTests/TestSpec.tests.cpp', 'SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp', 'SelfTest/IntrospectiveTests/TextFlow.tests.cpp', 'SelfTest/IntrospectiveTests/ToString.tests.cpp', + 'SelfTest/IntrospectiveTests/Traits.tests.cpp', 'SelfTest/IntrospectiveTests/UniquePtr.tests.cpp', 'SelfTest/IntrospectiveTests/Xml.tests.cpp', 'SelfTest/TestRegistrations.cpp', @@ -64,7 +68,7 @@ self_test_sources = files( self_test = executable( 'SelfTest', self_test_sources, - include_directories: '../src', + include_directories: ['../src', './SelfTest'], link_with: [catch2_with_main, catch2], ) diff --git a/thirdParty/catch2/tools/misc/appveyorMergeCoverageScript.py b/thirdParty/catch2/tools/misc/appveyorMergeCoverageScript.py index 7cf408d24ec2..5b71f6e1291e 100644 --- a/thirdParty/catch2/tools/misc/appveyorMergeCoverageScript.py +++ b/thirdParty/catch2/tools/misc/appveyorMergeCoverageScript.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 import glob import subprocess diff --git a/thirdParty/catch2/tools/scripts/approvalTests.py b/thirdParty/catch2/tools/scripts/approvalTests.py index 098f40e35bb6..592be36efd62 100755 --- a/thirdParty/catch2/tools/scripts/approvalTests.py +++ b/thirdParty/catch2/tools/scripts/approvalTests.py @@ -1,13 +1,12 @@ #!/usr/bin/env python3 -from __future__ import print_function - import io import os import sys import subprocess import re import difflib +import shutil import scriptCommon from scriptCommon import catchPath @@ -17,6 +16,35 @@ os.system('') rootPath = os.path.join(catchPath, 'tests/SelfTest/Baselines') +# Init so it is guaranteed to fail loudly if the scoping gets messed up +outputDirPath = None + +if len(sys.argv) == 3: + cmdPath = sys.argv[1] + outputDirBasePath = sys.argv[2] + outputDirPath = os.path.join(outputDirBasePath, 'ApprovalTests') + if not os.path.isdir(outputDirPath): + os.mkdir(outputDirPath) +else: + print('Usage: {} path-to-SelfTest-executable path-to-temp-output-dir'.format(sys.argv[0])) + exit(1) + + + +def get_rawResultsPath(baseName): + return os.path.join(outputDirPath, '_{0}.tmp'.format(baseName)) + +def get_baselinesPath(baseName): + return os.path.join(rootPath, '{0}.approved.txt'.format(baseName)) + +def _get_unapprovedPath(path, baseName): + return os.path.join(path, '{0}.unapproved.txt'.format(baseName)) + +def get_filteredResultsPath(baseName): + return _get_unapprovedPath(outputDirPath, baseName) + +def get_unapprovedResultsPath(baseName): + return _get_unapprovedPath(rootPath, baseName) langFilenameParser = re.compile(r'(.+\.[ch]pp)') filelocParser = re.compile(r''' @@ -50,14 +78,8 @@ # The weird OR is there to always have at least empty string for group 1 tapTestNumParser = re.compile(r'^((?:not ok)|(?:ok)|(?:warning)|(?:info)) (\d+) -') -if len(sys.argv) == 2: - cmdPath = sys.argv[1] -else: - cmdPath = os.path.join(catchPath, scriptCommon.getBuildExecutable()) - overallResult = 0 - def diffFiles(fileA, fileB): with io.open(fileA, 'r', encoding='utf-8', errors='surrogateescape') as file: aLines = [line.rstrip() for line in file.readlines()] @@ -134,18 +156,6 @@ def filterLine(line, isCompact): return line -def get_rawResultsPath(baseName): - return os.path.join(rootPath, '_{0}.tmp'.format(baseName)) - - -def get_baselinesPath(baseName): - return os.path.join(rootPath, '{0}.approved.txt'.format(baseName)) - - -def get_filteredResultsPath(baseName): - return os.path.join(rootPath, '{0}.unapproved.txt'.format(baseName)) - - def run_test(baseName, args): args[0:0] = [cmdPath] if not os.path.exists(cmdPath): @@ -174,21 +184,20 @@ def check_outputs(baseName): os.remove(rawResultsPath) print() print(baseName + ":") - if os.path.exists(baselinesPath): - diffResult = diffFiles(baselinesPath, filteredResultsPath) - if diffResult: - print('\n'.join(diffResult)) - print(" \n****************************\n \033[91mResults differed") - if len(diffResult) > overallResult: - overallResult = len(diffResult) - else: - os.remove(filteredResultsPath) - print(" \033[92mResults matched") - print("\033[0m") + if not os.path.exists(baselinesPath): + print( 'first approval') + overallResult += 1 + return + + diffResult = diffFiles(baselinesPath, filteredResultsPath) + if diffResult: + print('\n'.join(diffResult)) + print(" \n****************************\n \033[91mResults differed\033[0m") + overallResult += 1 + shutil.move(filteredResultsPath, get_unapprovedResultsPath(baseName)) else: - print(" first approval") - if overallResult == 0: - overallResult = 1 + os.remove(filteredResultsPath) + print(" \033[92mResults matched\033[0m") def approve(baseName, args): @@ -205,6 +214,7 @@ def approve(baseName, args): ## special cases first: # Standard console reporter approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *"] + base_args) + # console reporter, include passes, warn about No Assertions, limit failures to first 4 approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4"] + base_args) @@ -216,8 +226,8 @@ def approve(baseName, args): reporter_args = ['-r', reporter] approve(filename, common_args + reporter_args) -## All reporters at the same time +## All reporters at the same time common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions"] + base_args filenames = ['{}.sw.multi'.format(reporter) for reporter in reporters] reporter_args = [] @@ -225,6 +235,7 @@ def approve(baseName, args): reporter_args += ['-r', '{}::out={}'.format(reporter, get_rawResultsPath(filename))] run_test("default.sw.multi", common_args + reporter_args) + check_outputs("default.sw.multi") for reporter, filename in zip(reporters, filenames): check_outputs(filename) @@ -232,4 +243,4 @@ def approve(baseName, args): if overallResult != 0: print("If these differences are expected, run approve.py to approve new baselines.") -exit(overallResult) + exit(2) diff --git a/thirdParty/catch2/tools/scripts/approve.py b/thirdParty/catch2/tools/scripts/approve.py index 997b8c710b47..6d73be5c8bed 100755 --- a/thirdParty/catch2/tools/scripts/approve.py +++ b/thirdParty/catch2/tools/scripts/approve.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function - import os import sys import shutil diff --git a/thirdParty/catch2/tools/scripts/checkLicense.py b/thirdParty/catch2/tools/scripts/checkLicense.py index 634b0bfa95fb..9a9497692e79 100755 --- a/thirdParty/catch2/tools/scripts/checkLicense.py +++ b/thirdParty/catch2/tools/scripts/checkLicense.py @@ -7,7 +7,7 @@ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tools/scripts/developBuild.py b/thirdParty/catch2/tools/scripts/developBuild.py index 9252c7d63860..8837770cadb6 100755 --- a/thirdParty/catch2/tools/scripts/developBuild.py +++ b/thirdParty/catch2/tools/scripts/developBuild.py @@ -1,10 +1,9 @@ #!/usr/bin/env python3 -from __future__ import print_function import releaseCommon v = releaseCommon.Version() v.incrementBuildNumber() releaseCommon.performUpdates(v) -print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) +print( "Updated files to v{0}".format( v.getVersionString() ) ) diff --git a/thirdParty/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py b/thirdParty/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py index 11f4955c0b4b..d8be04376d6a 100644 --- a/thirdParty/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py +++ b/thirdParty/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py @@ -21,8 +21,6 @@ # to add the 'Introduced in Catch ...' snippets to the relevant pages. # -from __future__ import print_function - import re diff --git a/thirdParty/catch2/tools/scripts/fixWhitespace.py b/thirdParty/catch2/tools/scripts/fixWhitespace.py index 4591c1c444f5..5840e79047e1 100755 --- a/thirdParty/catch2/tools/scripts/fixWhitespace.py +++ b/thirdParty/catch2/tools/scripts/fixWhitespace.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function import os from scriptCommon import catchPath diff --git a/thirdParty/catch2/tools/scripts/generateAmalgamatedFiles.py b/thirdParty/catch2/tools/scripts/generateAmalgamatedFiles.py index 172353e654c3..99fc446bf96e 100755 --- a/thirdParty/catch2/tools/scripts/generateAmalgamatedFiles.py +++ b/thirdParty/catch2/tools/scripts/generateAmalgamatedFiles.py @@ -16,7 +16,7 @@ copyright_lines = [ '// Copyright Catch2 Authors\n', '// Distributed under the Boost Software License, Version 1.0.\n', -'// (See accompanying file LICENSE_1_0.txt or copy at\n', +'// (See accompanying file LICENSE.txt or copy at\n', '// https://www.boost.org/LICENSE_1_0.txt)\n', '// SPDX-License-Identifier: BSL-1.0\n', ] @@ -26,7 +26,7 @@ file_header = '''\ // Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 diff --git a/thirdParty/catch2/tools/scripts/majorRelease.py b/thirdParty/catch2/tools/scripts/majorRelease.py index e9e285a898b9..eb712b46612c 100755 --- a/thirdParty/catch2/tools/scripts/majorRelease.py +++ b/thirdParty/catch2/tools/scripts/majorRelease.py @@ -1,10 +1,9 @@ #!/usr/bin/env python3 -from __future__ import print_function import releaseCommon v = releaseCommon.Version() v.incrementMajorVersion() releaseCommon.performUpdates(v) -print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) +print( "Updated files to v{0}".format( v.getVersionString() ) ) diff --git a/thirdParty/catch2/tools/scripts/minorRelease.py b/thirdParty/catch2/tools/scripts/minorRelease.py index 2b57c2eab590..0992c8fb9867 100755 --- a/thirdParty/catch2/tools/scripts/minorRelease.py +++ b/thirdParty/catch2/tools/scripts/minorRelease.py @@ -1,10 +1,9 @@ #!/usr/bin/env python3 -from __future__ import print_function import releaseCommon v = releaseCommon.Version() v.incrementMinorVersion() releaseCommon.performUpdates(v) -print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) +print( "Updated files to v{0}".format( v.getVersionString() ) ) diff --git a/thirdParty/catch2/tools/scripts/patchRelease.py b/thirdParty/catch2/tools/scripts/patchRelease.py index d20db714c434..48256c15dfdc 100755 --- a/thirdParty/catch2/tools/scripts/patchRelease.py +++ b/thirdParty/catch2/tools/scripts/patchRelease.py @@ -1,10 +1,9 @@ #!/usr/bin/env python3 -from __future__ import print_function import releaseCommon v = releaseCommon.Version() v.incrementPatchNumber() releaseCommon.performUpdates(v) -print( "Updated Version.hpp, README and Conan to v{0}".format( v.getVersionString() ) ) +print( "Updated files to v{0}".format( v.getVersionString() ) ) diff --git a/thirdParty/catch2/tools/scripts/releaseCommon.py b/thirdParty/catch2/tools/scripts/releaseCommon.py index 4d73431c8ad3..0d995eaf7c9a 100644 --- a/thirdParty/catch2/tools/scripts/releaseCommon.py +++ b/thirdParty/catch2/tools/scripts/releaseCommon.py @@ -1,10 +1,6 @@ -from __future__ import print_function - import os -import sys import re import string -import glob import fnmatch from scriptCommon import catchPath diff --git a/thirdParty/catch2/tools/scripts/scriptCommon.py b/thirdParty/catch2/tools/scripts/scriptCommon.py index a6930063a9b8..5894185dd24a 100644 --- a/thirdParty/catch2/tools/scripts/scriptCommon.py +++ b/thirdParty/catch2/tools/scripts/scriptCommon.py @@ -1,31 +1,4 @@ import os import sys -import subprocess - catchPath = os.path.dirname(os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))) - -def getBuildExecutable(): - if os.name == 'nt': - dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest.exe") - return dir - else: - dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/projects/SelfTest") - return dir - - -def runAndCapture( args ): - child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE) - lines = [] - line = "" - while True: - out = child.stdout.read(1) - if out == '' and child.poll(): - break - if out != '': - if out == '\n': - lines.append( line ) - line = "" - else: - line = line + out - return lines diff --git a/thirdParty/catch2/tools/scripts/updateDocumentToC.py b/thirdParty/catch2/tools/scripts/updateDocumentToC.py index 41b48752cf68..7b56cfc7ad65 100755 --- a/thirdParty/catch2/tools/scripts/updateDocumentToC.py +++ b/thirdParty/catch2/tools/scripts/updateDocumentToC.py @@ -11,8 +11,6 @@ # https://github.com/rasbt/markdown-toclify # -from __future__ import print_function - import argparse import glob import os