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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-12-12 21:54:00 +0100
committerMartin Hořeňovský2021-12-18 20:49:50 +0100
commit602e484f027ccdfb59cfde852e20283ad1635f81 (patch)
tree5a4f5691d69d25ef7a6413645181956aa23c288d
parent08939cc8bb01ec84ea01d83cf03e4edb8484460c (diff)
downloadcatch3-602e484f027ccdfb59cfde852e20283ad1635f81.tar.gz
Rename reportInvalidArguments -> reportInvalidTestSpec
This is has been what it actually does for a long time, but it has not been renamed earlier due to API compatibility.
-rw-r--r--docs/reporter-events.md4
-rw-r--r--src/catch2/catch_session.cpp6
-rw-r--r--src/catch2/catch_test_spec.cpp4
-rw-r--r--src/catch2/catch_test_spec.hpp4
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.hpp4
-rw-r--r--src/catch2/internal/catch_test_spec_parser.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_combined_tu.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_console.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_console.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_event_listener.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_listening.cpp6
-rw-r--r--src/catch2/reporters/catch_reporter_listening.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_streaming_base.hpp2
14 files changed, 22 insertions, 22 deletions
diff --git a/docs/reporter-events.md b/docs/reporter-events.md
index b5374460..3641656a 100644
--- a/docs/reporter-events.md
+++ b/docs/reporter-events.md
@@ -153,14 +153,14 @@ void listTags( std::vector<TagInfo> const& tagInfos );
## Miscellaneous events
```cpp
-void reportInvalidArguments( StringRef unmatchedSpec );
+void reportInvalidTestSpec( StringRef unmatchedSpec );
void fatalErrorEncountered( StringRef error );
void noMatchingTestCases( StringRef unmatchedSpec );
```
These are one-off events that do not neatly fit into other categories.
-`reportInvalidArguments` is sent for each [test specification command line
+`reportInvalidTestSpec` is sent for each [test specification command line
argument](command-line.md#specifying-which-tests-to-run) that wasn't
parsed into a valid spec.
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp
index b50d6e48..ff5e4cd8 100644
--- a/src/catch2/catch_session.cpp
+++ b/src/catch2/catch_session.cpp
@@ -62,7 +62,7 @@ namespace Catch {
m_config{config},
m_context{config, CATCH_MOVE(reporter)} {
- assert( m_config->testSpec().getInvalidArgs().empty() &&
+ assert( m_config->testSpec().getInvalidSpecs().empty() &&
"Invalid test specs should be handled before running tests" );
auto const& allTestCases = getAllTestCasesSorted(*m_config);
@@ -286,10 +286,10 @@ namespace Catch {
// Create reporter(s) so we can route listings through them
auto reporter = makeReporter(m_config.get());
- auto const& invalidSpecs = m_config->testSpec().getInvalidArgs();
+ auto const& invalidSpecs = m_config->testSpec().getInvalidSpecs();
if ( !invalidSpecs.empty() ) {
for ( auto const& spec : invalidSpecs ) {
- reporter->reportInvalidArguments( spec );
+ reporter->reportInvalidTestSpec( spec );
}
return 1;
}
diff --git a/src/catch2/catch_test_spec.cpp b/src/catch2/catch_test_spec.cpp
index df0d570f..4c59695d 100644
--- a/src/catch2/catch_test_spec.cpp
+++ b/src/catch2/catch_test_spec.cpp
@@ -98,8 +98,8 @@ namespace Catch {
return matches;
}
- const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{
- return (m_invalidArgs);
+ const TestSpec::vectorStrings& TestSpec::getInvalidSpecs() const {
+ return m_invalidSpecs;
}
}
diff --git a/src/catch2/catch_test_spec.hpp b/src/catch2/catch_test_spec.hpp
index c8804a2c..4f444fff 100644
--- a/src/catch2/catch_test_spec.hpp
+++ b/src/catch2/catch_test_spec.hpp
@@ -72,11 +72,11 @@ namespace Catch {
bool hasFilters() const;
bool matches( TestCaseInfo const& testCase ) const;
Matches matchesByFilter( std::vector<TestCaseHandle> const& testCases, IConfig const& config ) const;
- const vectorStrings & getInvalidArgs() const;
+ const vectorStrings & getInvalidSpecs() const;
private:
std::vector<Filter> m_filters;
- std::vector<std::string> m_invalidArgs;
+ std::vector<std::string> m_invalidSpecs;
friend class TestSpecParser;
};
}
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp
index d6197902..5d3e85a3 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.hpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp
@@ -173,8 +173,8 @@ namespace Catch {
//! Called when no test cases match provided test spec
virtual void noMatchingTestCases( StringRef unmatchedSpec ) = 0;
- //! Called for all invalid arguments from the cli
- virtual void reportInvalidArguments( StringRef invalidArgument ) = 0;
+ //! Called for all invalid test specs from the cli
+ virtual void reportInvalidTestSpec( StringRef invalidArgument ) = 0;
/**
* Called once in a testing run before tests are started
diff --git a/src/catch2/internal/catch_test_spec_parser.cpp b/src/catch2/internal/catch_test_spec_parser.cpp
index 86b25bfa..4dd1ea2a 100644
--- a/src/catch2/internal/catch_test_spec_parser.cpp
+++ b/src/catch2/internal/catch_test_spec_parser.cpp
@@ -28,7 +28,7 @@ namespace Catch {
for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )
//if visitChar fails
if( !visitChar( m_arg[m_pos] ) ){
- m_testSpec.m_invalidArgs.push_back(arg);
+ m_testSpec.m_invalidSpecs.push_back(arg);
break;
}
endMode();
diff --git a/src/catch2/reporters/catch_reporter_combined_tu.cpp b/src/catch2/reporters/catch_reporter_combined_tu.cpp
index f6cda401..3d82f729 100644
--- a/src/catch2/reporters/catch_reporter_combined_tu.cpp
+++ b/src/catch2/reporters/catch_reporter_combined_tu.cpp
@@ -236,7 +236,7 @@ namespace Catch {
void EventListenerBase::listTests( std::vector<TestCaseHandle> const& ) {}
void EventListenerBase::listTags( std::vector<TagInfo> const& ) {}
void EventListenerBase::noMatchingTestCases( StringRef ) {}
- void EventListenerBase::reportInvalidArguments( StringRef ) {}
+ void EventListenerBase::reportInvalidTestSpec( StringRef ) {}
void EventListenerBase::testRunStarting( TestRunInfo const& ) {}
void EventListenerBase::testCaseStarting( TestCaseInfo const& ) {}
void EventListenerBase::testCasePartialStarting(TestCaseInfo const&, uint64_t) {}
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index 2b208f1c..0d3a5202 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -386,7 +386,7 @@ void ConsoleReporter::noMatchingTestCases( StringRef unmatchedSpec ) {
m_stream << "No test cases matched '" << unmatchedSpec << "'\n";
}
-void ConsoleReporter::reportInvalidArguments( StringRef arg ) {
+void ConsoleReporter::reportInvalidTestSpec( StringRef arg ) {
m_stream << "Invalid Filter: " << arg << '\n';
}
diff --git a/src/catch2/reporters/catch_reporter_console.hpp b/src/catch2/reporters/catch_reporter_console.hpp
index 7d010339..cbf73844 100644
--- a/src/catch2/reporters/catch_reporter_console.hpp
+++ b/src/catch2/reporters/catch_reporter_console.hpp
@@ -24,7 +24,7 @@ namespace Catch {
static std::string getDescription();
void noMatchingTestCases( StringRef unmatchedSpec ) override;
- void reportInvalidArguments( StringRef arg ) override;
+ void reportInvalidTestSpec( StringRef arg ) override;
void assertionStarting(AssertionInfo const&) override;
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.hpp b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
index 732a9469..685c9776 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.hpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.hpp
@@ -100,7 +100,7 @@ namespace Catch {
void benchmarkFailed( StringRef ) override {}
void noMatchingTestCases( StringRef ) override {}
- void reportInvalidArguments( StringRef ) override {}
+ void reportInvalidTestSpec( StringRef ) override {}
void fatalErrorEncountered( StringRef /*error*/ ) override {}
void testRunStarting( TestRunInfo const& ) override {}
diff --git a/src/catch2/reporters/catch_reporter_event_listener.hpp b/src/catch2/reporters/catch_reporter_event_listener.hpp
index d2cccb6b..1df7626c 100644
--- a/src/catch2/reporters/catch_reporter_event_listener.hpp
+++ b/src/catch2/reporters/catch_reporter_event_listener.hpp
@@ -24,7 +24,7 @@ namespace Catch {
EventListenerBase( ReporterConfig const& config ):
IStreamingReporter( config.fullConfig() ) {}
- void reportInvalidArguments( StringRef unmatchedSpec ) override;
+ void reportInvalidTestSpec( StringRef unmatchedSpec ) override;
void fatalErrorEncountered( StringRef error ) override;
void benchmarkPreparing( StringRef name ) override;
diff --git a/src/catch2/reporters/catch_reporter_listening.cpp b/src/catch2/reporters/catch_reporter_listening.cpp
index f233b0a2..10176055 100644
--- a/src/catch2/reporters/catch_reporter_listening.cpp
+++ b/src/catch2/reporters/catch_reporter_listening.cpp
@@ -36,11 +36,11 @@ namespace Catch {
m_reporter->fatalErrorEncountered( error );
}
- void ListeningReporter::reportInvalidArguments( StringRef arg ) {
+ void ListeningReporter::reportInvalidTestSpec( StringRef arg ) {
for ( auto& listener : m_listeners ) {
- listener->reportInvalidArguments( arg );
+ listener->reportInvalidTestSpec( arg );
}
- m_reporter->reportInvalidArguments( arg );
+ m_reporter->reportInvalidTestSpec( arg );
}
void ListeningReporter::benchmarkPreparing( StringRef name ) {
diff --git a/src/catch2/reporters/catch_reporter_listening.hpp b/src/catch2/reporters/catch_reporter_listening.hpp
index caa5c1a8..feddabed 100644
--- a/src/catch2/reporters/catch_reporter_listening.hpp
+++ b/src/catch2/reporters/catch_reporter_listening.hpp
@@ -32,7 +32,7 @@ namespace Catch {
void noMatchingTestCases( StringRef unmatchedSpec ) override;
void fatalErrorEncountered( StringRef error ) override;
- void reportInvalidArguments( StringRef arg ) override;
+ void reportInvalidTestSpec( StringRef arg ) override;
void benchmarkPreparing( StringRef name ) override;
void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
diff --git a/src/catch2/reporters/catch_reporter_streaming_base.hpp b/src/catch2/reporters/catch_reporter_streaming_base.hpp
index d32d01f2..8f805547 100644
--- a/src/catch2/reporters/catch_reporter_streaming_base.hpp
+++ b/src/catch2/reporters/catch_reporter_streaming_base.hpp
@@ -32,7 +32,7 @@ namespace Catch {
void fatalErrorEncountered( StringRef /*error*/ ) override {}
void noMatchingTestCases( StringRef /*unmatchedSpec*/ ) override {}
- void reportInvalidArguments( StringRef /*invalidArgument*/ ) override {}
+ void reportInvalidTestSpec( StringRef /*invalidArgument*/ ) override {}
void testRunStarting( TestRunInfo const& _testRunInfo ) override;