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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_run_context.cpp
diff options
context:
space:
mode:
authorChris Thrasher2025-09-21 18:05:21 -0600
committerChris Thrasher2025-09-22 11:50:44 -0600
commit8efee9b7632e6dd014b5b041ee326eef7d0b09e6 (patch)
treefbc1657a5d7d414fbe93a412990bcf5cfb2df438 /src/catch2/internal/catch_run_context.cpp
parenta5735af2f7d956600250541d289c552ace7e87ae (diff)
downloadcatch3-devel-c++17.tar.gz
Use std::string_viewdevel-c++17
Diffstat (limited to 'src/catch2/internal/catch_run_context.cpp')
-rw-r--r--src/catch2/internal/catch_run_context.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp
index e7f43fea..335ca2ce 100644
--- a/src/catch2/internal/catch_run_context.cpp
+++ b/src/catch2/internal/catch_run_context.cpp
@@ -366,7 +366,7 @@ namespace Catch {
}
}
- bool RunContext::sectionStarted( StringRef sectionName,
+ bool RunContext::sectionStarted( std::string_view sectionName,
SourceLineInfo const& sectionLineInfo,
Counts& assertions ) {
ITracker& sectionTracker =
@@ -392,7 +392,7 @@ namespace Catch {
return true;
}
IGeneratorTracker*
- RunContext::acquireGeneratorTracker( StringRef generatorName,
+ RunContext::acquireGeneratorTracker( std::string_view generatorName,
SourceLineInfo const& lineInfo ) {
auto* tracker = Generators::GeneratorTracker::acquire(
m_trackerContext,
@@ -403,7 +403,7 @@ namespace Catch {
}
IGeneratorTracker* RunContext::createGeneratorTracker(
- StringRef generatorName,
+ std::string_view generatorName,
SourceLineInfo lineInfo,
Generators::GeneratorBasePtr&& generator ) {
@@ -466,7 +466,7 @@ namespace Catch {
m_unfinishedSections.push_back(CATCH_MOVE(endInfo));
}
- void RunContext::benchmarkPreparing( StringRef name ) {
+ void RunContext::benchmarkPreparing( std::string_view name ) {
auto _ = scopedDeactivate( *m_outputRedirect );
m_reporter->benchmarkPreparing( name );
}
@@ -478,7 +478,7 @@ namespace Catch {
auto _ = scopedDeactivate( *m_outputRedirect );
m_reporter->benchmarkEnded( stats );
}
- void RunContext::benchmarkFailed( StringRef error ) {
+ void RunContext::benchmarkFailed( std::string_view error ) {
auto _ = scopedDeactivate( *m_outputRedirect );
m_reporter->benchmarkFailed( error );
}
@@ -531,7 +531,7 @@ namespace Catch {
m_shouldReportUnexpected = false;
}
- void RunContext::handleFatalErrorCondition( StringRef message ) {
+ void RunContext::handleFatalErrorCondition( std::string_view message ) {
// We lock only when touching the reporters directly, to avoid
// deadlocks when we call into other functions that also want
// to lock the mutex before touching reporters.
@@ -791,9 +791,9 @@ namespace Catch {
m_activeTestCase->getTestCaseInfo().lineInfo;
return AssertionInfo{
- testCaseJustStarted ? "TEST_CASE"_sr : StringRef(),
+ testCaseJustStarted ? "TEST_CASE" : std::string_view(),
Detail::g_lastKnownLineInfo,
- testCaseJustStarted ? StringRef() : "{Unknown expression after the reported line}"_sr,
+ testCaseJustStarted ? std::string_view() : "{Unknown expression after the reported line}",
ResultDisposition::Normal
};
}