Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChris Thrasher2025-09-21 18:05:21 -0600
committerChris Thrasher2025-09-22 11:50:44 -0600
commit8efee9b7632e6dd014b5b041ee326eef7d0b09e6 (patch)
treefbc1657a5d7d414fbe93a412990bcf5cfb2df438
parenta5735af2f7d956600250541d289c552ace7e87ae (diff)
downloadcatch3-devel-c++17.tar.gz
Use std::string_viewdevel-c++17
-rw-r--r--docs/reporter-events.md10
-rw-r--r--examples/210-Evt-EventListeners.cpp6
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/catch2/catch_all.hpp1
-rw-r--r--src/catch2/catch_assertion_info.hpp7
-rw-r--r--src/catch2/catch_assertion_result.cpp4
-rw-r--r--src/catch2/catch_assertion_result.hpp5
-rw-r--r--src/catch2/catch_config.cpp3
-rw-r--r--src/catch2/catch_config.hpp3
-rw-r--r--src/catch2/catch_message.cpp8
-rw-r--r--src/catch2/catch_message.hpp14
-rw-r--r--src/catch2/catch_section_info.hpp1
-rw-r--r--src/catch2/catch_test_case_info.cpp37
-rw-r--r--src/catch2/catch_test_case_info.hpp14
-rw-r--r--src/catch2/catch_test_run_info.hpp6
-rw-r--r--src/catch2/catch_tostring.cpp6
-rw-r--r--src/catch2/catch_tostring.hpp12
-rw-r--r--src/catch2/generators/catch_generators.cpp4
-rw-r--r--src/catch2/generators/catch_generators.hpp9
-rw-r--r--src/catch2/interfaces/catch_interfaces_capture.hpp13
-rw-r--r--src/catch2/interfaces/catch_interfaces_config.hpp3
-rw-r--r--src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp13
-rw-r--r--src/catch2/interfaces/catch_interfaces_generatortracker.cpp2
-rw-r--r--src/catch2/interfaces/catch_interfaces_generatortracker.hpp3
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.hpp11
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter_factory.hpp3
-rw-r--r--src/catch2/internal/catch_assertion_handler.cpp4
-rw-r--r--src/catch2/internal/catch_assertion_handler.hpp4
-rw-r--r--src/catch2/internal/catch_case_insensitive_comparisons.cpp8
-rw-r--r--src/catch2/internal/catch_case_insensitive_comparisons.hpp10
-rw-r--r--src/catch2/internal/catch_clara.cpp20
-rw-r--r--src/catch2/internal/catch_clara.hpp45
-rw-r--r--src/catch2/internal/catch_decomposer.cpp2
-rw-r--r--src/catch2/internal/catch_decomposer.hpp27
-rw-r--r--src/catch2/internal/catch_enum_values_registry.cpp15
-rw-r--r--src/catch2/internal/catch_enum_values_registry.hpp7
-rw-r--r--src/catch2/internal/catch_jsonwriter.cpp24
-rw-r--r--src/catch2/internal/catch_jsonwriter.hpp9
-rw-r--r--src/catch2/internal/catch_list.cpp4
-rw-r--r--src/catch2/internal/catch_list.hpp9
-rw-r--r--src/catch2/internal/catch_message_info.cpp2
-rw-r--r--src/catch2/internal/catch_message_info.hpp5
-rw-r--r--src/catch2/internal/catch_preprocessor.hpp8
-rw-r--r--src/catch2/internal/catch_preprocessor_internal_stringify.hpp4
-rw-r--r--src/catch2/internal/catch_reporter_spec_parser.cpp24
-rw-r--r--src/catch2/internal/catch_reporter_spec_parser.hpp7
-rw-r--r--src/catch2/internal/catch_run_context.cpp16
-rw-r--r--src/catch2/internal/catch_run_context.hpp12
-rw-r--r--src/catch2/internal/catch_section.cpp2
-rw-r--r--src/catch2/internal/catch_section.hpp4
-rw-r--r--src/catch2/internal/catch_stream_end_stop.hpp4
-rw-r--r--src/catch2/internal/catch_string_manip.cpp24
-rw-r--r--src/catch2/internal/catch_string_manip.hpp25
-rw-r--r--src/catch2/internal/catch_stringref.cpp65
-rw-r--r--src/catch2/internal/catch_stringref.hpp123
-rw-r--r--src/catch2/internal/catch_template_test_registry.hpp6
-rw-r--r--src/catch2/internal/catch_test_case_tracker.cpp10
-rw-r--r--src/catch2/internal/catch_test_case_tracker.hpp18
-rw-r--r--src/catch2/internal/catch_test_macro_impl.hpp11
-rw-r--r--src/catch2/internal/catch_test_registry.cpp4
-rw-r--r--src/catch2/internal/catch_test_registry.hpp29
-rw-r--r--src/catch2/internal/catch_xmlwriter.cpp34
-rw-r--r--src/catch2/internal/catch_xmlwriter.hpp32
-rw-r--r--src/catch2/matchers/catch_matchers_string.cpp16
-rw-r--r--src/catch2/matchers/catch_matchers_string.hpp8
-rw-r--r--src/catch2/matchers/catch_matchers_templated.cpp2
-rw-r--r--src/catch2/matchers/catch_matchers_templated.hpp10
-rw-r--r--src/catch2/matchers/internal/catch_matchers_impl.hpp4
-rw-r--r--src/catch2/meson.build2
-rw-r--r--src/catch2/reporters/catch_reporter_compact.cpp24
-rw-r--r--src/catch2/reporters/catch_reporter_compact.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_console.cpp76
-rw-r--r--src/catch2/reporters/catch_reporter_console.hpp8
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.hpp10
-rw-r--r--src/catch2/reporters/catch_reporter_event_listener.cpp10
-rw-r--r--src/catch2/reporters/catch_reporter_event_listener.hpp10
-rw-r--r--src/catch2/reporters/catch_reporter_helpers.cpp16
-rw-r--r--src/catch2/reporters/catch_reporter_json.cpp116
-rw-r--r--src/catch2/reporters/catch_reporter_json.hpp8
-rw-r--r--src/catch2/reporters/catch_reporter_junit.cpp42
-rw-r--r--src/catch2/reporters/catch_reporter_multi.cpp10
-rw-r--r--src/catch2/reporters/catch_reporter_multi.hpp10
-rw-r--r--src/catch2/reporters/catch_reporter_registrars.hpp10
-rw-r--r--src/catch2/reporters/catch_reporter_sonarqube.cpp14
-rw-r--r--src/catch2/reporters/catch_reporter_sonarqube.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_streaming_base.hpp12
-rw-r--r--src/catch2/reporters/catch_reporter_tap.cpp28
-rw-r--r--src/catch2/reporters/catch_reporter_tap.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_teamcity.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_xml.cpp106
-rw-r--r--src/catch2/reporters/catch_reporter_xml.hpp4
-rw-r--r--tests/BUILD.bazel1
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/SelfTest/Baselines/automake.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/automake.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt109
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt109
-rw-r--r--tests/SelfTest/Baselines/console.std.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt493
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt493
-rw-r--r--tests/SelfTest/Baselines/junit.sw.approved.txt29
-rw-r--r--tests/SelfTest/Baselines/junit.sw.multi.approved.txt29
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.approved.txt29
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt29
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt150
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt150
-rw-r--r--tests/SelfTest/Baselines/teamcity.sw.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt486
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt486
-rw-r--r--tests/SelfTest/IntrospectiveTests/AssertionHandler.tests.cpp2
-rw-r--r--tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp20
-rw-r--r--tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp2
-rw-r--r--tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp10
-rw-r--r--tests/SelfTest/IntrospectiveTests/String.tests.cpp212
-rw-r--r--tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp21
-rw-r--r--tests/SelfTest/IntrospectiveTests/Tag.tests.cpp8
-rw-r--r--tests/SelfTest/IntrospectiveTests/ToString.tests.cpp36
-rw-r--r--tests/meson.build1
119 files changed, 913 insertions, 3430 deletions
diff --git a/docs/reporter-events.md b/docs/reporter-events.md
index 015f67be..a9ed40cf 100644
--- a/docs/reporter-events.md
+++ b/docs/reporter-events.md
@@ -109,10 +109,10 @@ and then `assertionEnded` event is emitted.
> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch2 2.9.0.
```cpp
-void benchmarkPreparing( StringRef name ) override;
+void benchmarkPreparing( std::string_view name ) override;
void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;
-void benchmarkFailed( StringRef error ) override;
+void benchmarkFailed( std::string_view error ) override;
```
Due to the benchmark lifecycle being bit more complicated, the benchmarking
@@ -153,9 +153,9 @@ void listTags( std::vector<TagInfo> const& tagInfos );
## Miscellaneous events
```cpp
-void reportInvalidTestSpec( StringRef unmatchedSpec );
-void fatalErrorEncountered( StringRef error );
-void noMatchingTestCases( StringRef unmatchedSpec );
+void reportInvalidTestSpec( std::string_view unmatchedSpec );
+void fatalErrorEncountered( std::string_view error );
+void noMatchingTestCases( std::string_view unmatchedSpec );
```
These are one-off events that do not neatly fit into other categories.
diff --git a/examples/210-Evt-EventListeners.cpp b/examples/210-Evt-EventListeners.cpp
index 26d5c62c..8550e179 100644
--- a/examples/210-Evt-EventListeners.cpp
+++ b/examples/210-Evt-EventListeners.cpp
@@ -131,7 +131,7 @@ void print( std::ostream& os, int const level, std::string const& title, Catch::
}
// struct Tag {
-// StringRef original, lowerCased;
+// std::string_view original, lowerCased;
// };
//
//
@@ -221,9 +221,9 @@ void print( std::ostream& os, int const level, std::string const& title, Catch::
// struct AssertionInfo
// {
-// StringRef macroName;
+// std::string_view macroName;
// SourceLineInfo lineInfo;
-// StringRef capturedExpression;
+// std::string_view capturedExpression;
// ResultDisposition::Flags resultDisposition;
// };
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1b5a7a8b..7c29add5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -124,7 +124,6 @@ set(IMPL_HEADERS
${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
@@ -201,7 +200,6 @@ set(IMPL_SOURCES
${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
diff --git a/src/catch2/catch_all.hpp b/src/catch2/catch_all.hpp
index 4c9ea994..d948e126 100644
--- a/src/catch2/catch_all.hpp
+++ b/src/catch2/catch_all.hpp
@@ -106,7 +106,6 @@
#include <catch2/internal/catch_stdstreams.hpp>
#include <catch2/internal/catch_stream_end_stop.hpp>
#include <catch2/internal/catch_string_manip.hpp>
-#include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_tag_alias_registry.hpp>
#include <catch2/internal/catch_template_test_registry.hpp>
#include <catch2/internal/catch_test_case_info_hasher.hpp>
diff --git a/src/catch2/catch_assertion_info.hpp b/src/catch2/catch_assertion_info.hpp
index 9d2f91fa..b64ad74b 100644
--- a/src/catch2/catch_assertion_info.hpp
+++ b/src/catch2/catch_assertion_info.hpp
@@ -10,16 +10,17 @@
#include <catch2/internal/catch_result_type.hpp>
#include <