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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Jeřábek2024-03-01 11:15:27 +0100
committerMartin Hořeňovský2024-03-01 21:24:45 +0100
commitcde35096641d55b4aa0f743bb03e04703fbb5e9c (patch)
tree7072371d7a380dcac9142a4ef8e701756e3fbcd2
parent7677c1658eb4417ec60649589610bf4e3d731bc9 (diff)
downloadcatch3-cde35096641d55b4aa0f743bb03e04703fbb5e9c.tar.gz
Fix various useful clang-tidy warnings
* bugprone-branch-clone * bugprone-copy-constructor-init * bugprone-empty-catch * bugprone-sizeof-expression * bugprone-switch-missing-default-case * bugprone-unused-local-non-trivial-variable * clang-analyzer-core.uninitialized.Assign * clang-analyzer-cplusplus.Move * clang-analyzer-optin.cplusplus.VirtualCall * modernize-loop-convert * modernize-raw-string-literal * modernize-use-equals-default * modernize-use-override * modernize-use-using * performance-avoid-endl * performance-inefficient-string-concatenation * performance-inefficient-vector-operation * performance-noexcept-move-constructor * performance-unnecessary-value-param (and improve generator example) * readability-duplicate-include * readability-inconsistent-declaration-parameter-name * readability-non-const-parameter * readability-redundant-casting * readability-redundant-member-init * readability-redundant-smartptr-get * readability-static-accessed-through-instance * unused variable in amalgamted tests
-rw-r--r--examples/210-Evt-EventListeners.cpp3
-rw-r--r--examples/231-Cfg-OutputStreams.cpp2
-rw-r--r--examples/232-Cfg-CustomMain.cpp2
-rw-r--r--examples/300-Gen-OwnGenerator.cpp2
-rw-r--r--examples/301-Gen-MapTypeConversion.cpp17
-rw-r--r--src/catch2/catch_message.cpp1
-rw-r--r--src/catch2/catch_registry_hub.cpp1
-rw-r--r--src/catch2/catch_test_case_info.hpp2
-rw-r--r--src/catch2/catch_tostring.cpp10
-rw-r--r--src/catch2/catch_tostring.hpp4
-rw-r--r--src/catch2/internal/catch_commandline.cpp2
-rw-r--r--src/catch2/internal/catch_console_colour.cpp12
-rw-r--r--src/catch2/internal/catch_enum_values_registry.hpp2
-rw-r--r--src/catch2/internal/catch_jsonwriter.cpp4
-rw-r--r--src/catch2/internal/catch_jsonwriter.hpp4
-rw-r--r--src/catch2/internal/catch_reporter_spec_parser.cpp2
-rw-r--r--src/catch2/internal/catch_stringref.hpp4
-rw-r--r--src/catch2/reporters/catch_reporter_console.cpp4
-rw-r--r--src/catch2/reporters/catch_reporter_cumulative_base.cpp3
-rw-r--r--src/catch2/reporters/catch_reporter_json.cpp4
-rw-r--r--src/catch2/reporters/catch_reporter_junit.cpp2
-rw-r--r--src/catch2/reporters/catch_reporter_multi.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_sonarqube.hpp2
-rw-r--r--src/catch2/reporters/catch_reporter_teamcity.hpp4
-rw-r--r--tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp2
-rw-r--r--tests/ExtraTests/X29-CustomArgumentsForReporters.cpp1
-rw-r--r--tests/ExtraTests/X91-AmalgamatedCatch.cpp4
-rw-r--r--tests/SelfTest/IntrospectiveTests/Details.tests.cpp4
-rw-r--r--tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp1
-rw-r--r--tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp2
-rw-r--r--tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp2
-rw-r--r--tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp2
-rw-r--r--tests/SelfTest/UsageTests/Benchmark.tests.cpp14
-rw-r--r--tests/SelfTest/UsageTests/Class.tests.cpp2
-rw-r--r--tests/SelfTest/UsageTests/Exception.tests.cpp4
-rw-r--r--tests/SelfTest/UsageTests/Matchers.tests.cpp14
-rw-r--r--tests/SelfTest/UsageTests/Message.tests.cpp10
-rw-r--r--tests/SelfTest/UsageTests/Misc.tests.cpp12
-rw-r--r--tests/SelfTest/UsageTests/Tricky.tests.cpp4
39 files changed, 86 insertions, 87 deletions
diff --git a/examples/210-Evt-EventListeners.cpp b/examples/210-Evt-EventListeners.cpp
index 56b050d4..d05dfaaa 100644
--- a/examples/210-Evt-EventListeners.cpp
+++ b/examples/210-Evt-EventListeners.cpp
@@ -385,8 +385,7 @@ struct MyListener : Catch::EventListenerBase {
CATCH_REGISTER_LISTENER( MyListener )
// Get rid of Wweak-tables
-MyListener::~MyListener() {}
-
+MyListener::~MyListener() = default;
// -----------------------------------------------------------------------
// 3. Test cases:
diff --git a/examples/231-Cfg-OutputStreams.cpp b/examples/231-Cfg-OutputStreams.cpp
index da1713cf..5aee38bc 100644
--- a/examples/231-Cfg-OutputStreams.cpp
+++ b/examples/231-Cfg-OutputStreams.cpp
@@ -22,7 +22,7 @@ class out_buff : public std::stringbuf {
std::FILE* m_stream;
public:
out_buff(std::FILE* stream):m_stream(stream) {}
- ~out_buff();
+ ~out_buff() override;
int sync() override {
int ret = 0;
for (unsigned char c : str()) {
diff --git a/examples/232-Cfg-CustomMain.cpp b/examples/232-Cfg-CustomMain.cpp
index 69fba7f1..27040993 100644
--- a/examples/232-Cfg-CustomMain.cpp
+++ b/examples/232-Cfg-CustomMain.cpp
@@ -35,7 +35,7 @@ int main(int argc, char** argv) {
return returnCode;
// if set on the command line then 'height' is now set at this point
- std::cout << "height: " << height << std::endl;
+ std::cout << "height: " << height << '\n';
return session.run();
}
diff --git a/examples/300-Gen-OwnGenerator.cpp b/examples/300-Gen-OwnGenerator.cpp
index b5d951ac..9cb02e39 100644
--- a/examples/300-Gen-OwnGenerator.cpp
+++ b/examples/300-Gen-OwnGenerator.cpp
@@ -21,7 +21,7 @@
namespace {
// This class shows how to implement a simple generator for Catch tests
-class RandomIntGenerator : public Catch::Generators::IGenerator<int> {
+class RandomIntGenerator final : public Catch::Generators::IGenerator<int> {
std::minstd_rand m_rand;
std::uniform_int_distribution<> m_dist;
int current_number;
diff --git a/examples/301-Gen-MapTypeConversion.cpp b/examples/301-Gen-MapTypeConversion.cpp
index a065d87a..0a284483 100644
--- a/examples/301-Gen-MapTypeConversion.cpp
+++ b/examples/301-Gen-MapTypeConversion.cpp
@@ -24,12 +24,12 @@ namespace {
// Returns a line from a stream. You could have it e.g. read lines from
// a file, but to avoid problems with paths in examples, we will use
// a fixed stringstream.
-class LineGenerator : public Catch::Generators::IGenerator<std::string> {
+class LineGenerator final : public Catch::Generators::IGenerator<std::string> {
std::string m_line;
std::stringstream m_stream;
public:
- LineGenerator() {
- m_stream.str("1\n2\n3\n4\n");
+ explicit LineGenerator( std::string const& lines ) {
+ m_stream.str( lines );
if (!next()) {
Catch::Generators::Detail::throw_generator_exception("Couldn't read a single line");
}
@@ -49,18 +49,19 @@ std::string const& LineGenerator::get() const {
// This helper function provides a nicer UX when instantiating the generator
// Notice that it returns an instance of GeneratorWrapper<std::string>, which
// is a value-wrapper around std::unique_ptr<IGenerator<std::string>>.
-Catch::Generators::GeneratorWrapper<std::string> lines(std::string /* ignored for example */) {
+Catch::Generators::GeneratorWrapper<std::string>
+lines( std::string const& lines ) {
return Catch::Generators::GeneratorWrapper<std::string>(
- new LineGenerator()
- );
+ new LineGenerator( lines ) );
}
} // end anonymous namespace
TEST_CASE("filter can convert types inside the generator expression", "[example][generator]") {
- auto num = GENERATE(map<int>([](std::string const& line) { return std::stoi(line); },
- lines("fake-file")));
+ auto num = GENERATE(
+ map<int>( []( std::string const& line ) { return std::stoi( line ); },
+ lines( "1\n2\n3\n4\n" ) ) );
REQUIRE(num > 0);
}
diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp
index 384f180e..4b223d96 100644
--- a/src/catch2/catch_message.cpp
+++ b/src/catch2/catch_message.cpp
@@ -91,6 +91,7 @@ namespace Catch {
m_messages.back().message += " := ";
start = pos;
}
+ default:; // noop
}
}
assert(openings.empty() && "Mismatched openings");
diff --git a/src/catch2/catch_registry_hub.cpp b/src/catch2/catch_registry_hub.cpp
index 8716db3a..3a594678 100644
--- a/src/catch2/catch_registry_hub.cpp
+++ b/src/catch2/catch_registry_hub.cpp
@@ -20,7 +20,6 @@
#include <catch2/internal/catch_noncopyable.hpp>
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>
-#include <catch2/internal/catch_reporter_registry.hpp>
#include <exception>
diff --git a/src/catch2/catch_test_case_info.hpp b/src/catch2/catch_test_case_info.hpp
index a2f4b43e..da9927e7 100644
--- a/src/catch2/catch_test_case_info.hpp
+++ b/src/catch2/catch_test_case_info.hpp
@@ -68,7 +68,7 @@ namespace Catch {
struct TestCaseInfo : Detail::NonCopyable {
TestCaseInfo(StringRef _className,
- NameAndTags const& _tags,
+ NameAndTags const& _nameAndTags,
SourceLineInfo const& _lineInfo);
bool isHidden() const;
diff --git a/src/catch2/catch_tostring.cpp b/src/catch2/catch_tostring.cpp
index b97cf560..b0b53c5e 100644
--- a/src/catch2/catch_tostring.cpp
+++ b/src/catch2/catch_tostring.cpp
@@ -54,13 +54,13 @@ namespace Detail {
}
} // end unnamed namespace
- std::string convertIntoString(StringRef string, bool escape_invisibles) {
+ std::string convertIntoString(StringRef string, bool escapeInvisibles) {
std::string ret;
// This is enough for the "don't escape invisibles" case, and a good
// lower bound on the "escape invisibles" case.
ret.reserve(string.size() + 2);
- if (!escape_invisibles) {
+ if (!escapeInvisibles) {
ret += '"';
ret += string;
ret += '"';
@@ -138,7 +138,7 @@ std::string StringMaker<char const*>::convert(char const* str) {
return{ "{null string}" };
}
}
-std::string StringMaker<char*>::convert(char* str) {
+std::string StringMaker<char*>::convert(char* str) { // NOLINT(readability-non-const-parameter)
if (str) {
return Detail::convertIntoString( str );
} else {
@@ -235,8 +235,8 @@ std::string StringMaker<signed char>::convert(signed char value) {
std::string StringMaker<char>::convert(char c) {
return ::Catch::Detail::stringify(static_cast<signed char>(c));
}
-std::string StringMaker<unsigned char>::convert(unsigned char c) {
- return ::Catch::Detail::stringify(static_cast<char>(c));
+std::string StringMaker<unsigned char>::convert(unsigned char value) {
+ return ::Catch::Detail::stringify(static_cast<char>(value));
}
int StringMaker<float>::precision = 5;
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp
index f3fb0beb..67a7c1d2 100644
--- a/src/catch2/catch_tostring.hpp
+++ b/src/catch2/catch_tostring.hpp
@@ -279,11 +279,11 @@ namespace Catch {
};
template<>
struct StringMaker<signed char> {
- static std::string convert(signed char c);
+ static std::string convert(signed char value);
};
template<>
struct StringMaker<unsigned char> {
- static std::string convert(unsigned char c);
+ static std::string convert(unsigned char value);
};
template<>
diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp
index c29a801d..212f1774 100644
--- a/src/catch2/internal/catch_commandline.cpp
+++ b/src/catch2/internal/catch_commandline.cpp
@@ -47,7 +47,7 @@ namespace Catch {
line = trim(line);
if( !line.empty() && !startsWith( line, '#' ) ) {
if( !startsWith( line, '"' ) )
- line = '"' + line + '"';
+ line = '"' + CATCH_MOVE(line) + '"';
config.testsOrTags.push_back( line );
config.testsOrTags.emplace_back( "," );
}
diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp
index e1238816..b19e01ec 100644
--- a/src/catch2/internal/catch_console_colour.cpp
+++ b/src/catch2/internal/catch_console_colour.cpp
@@ -230,21 +230,21 @@ namespace {
namespace Catch {
- Detail::unique_ptr<ColourImpl> makeColourImpl( ColourMode implSelection,
+ Detail::unique_ptr<ColourImpl> makeColourImpl( ColourMode colourSelection,
IStream* stream ) {
#if defined( CATCH_CONFIG_COLOUR_WIN32 )
- if ( implSelection == ColourMode::Win32 ) {
+ if ( colourSelection == ColourMode::Win32 ) {
return Detail::make_unique<Win32ColourImpl>( stream );
}
#endif
- if ( implSelection == ColourMode::ANSI ) {
+ if ( colourSelection == ColourMode::ANSI ) {
return Detail::make_unique<ANSIColourImpl>( stream );
}
- if ( implSelection == ColourMode::None ) {
+ if ( colourSelection == ColourMode::None ) {
return Detail::make_unique<NoColourImpl>( stream );
}
- if ( implSelection == ColourMode::PlatformDefault) {
+ if ( colourSelection == ColourMode::PlatformDefault) {
#if defined( CATCH_CONFIG_COLOUR_WIN32 )
if ( Win32ColourImpl::useImplementationForStream( *stream ) ) {
return Detail::make_unique<Win32ColourImpl>( stream );
@@ -256,7 +256,7 @@ namespace Catch {
return Detail::make_unique<NoColourImpl>( stream );
}
- CATCH_ERROR( "Could not create colour impl for selection " << static_cast<int>(implSelection) );
+ CATCH_ERROR( "Could not create colour impl for selection " << static_cast<int>(colourSelection) );
}
bool isColourImplAvailable( ColourMode colourSelection ) {
diff --git a/src/catch2/internal/catch_enum_values_registry.hpp b/src/catch2/internal/catch_enum_values_registry.hpp
index 999059ae..de994c35 100644
--- a/src/catch2/internal/catch_enum_values_registry.hpp
+++ b/src/catch2/internal/catch_enum_values_registry.hpp
@@ -24,7 +24,7 @@ namespace Catch {
std::vector<Catch::Detail::unique_ptr<EnumInfo>> m_enumInfos;
- EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
+ EnumInfo const& registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values) override;
};
std::vector<StringRef> parseEnums( StringRef enums );
diff --git a/src/catch2/internal/catch_jsonwriter.cpp b/src/catch2/internal/catch_jsonwriter.cpp
index ff65a9d3..1a96e348 100644
--- a/src/catch2/internal/catch_jsonwriter.cpp
+++ b/src/catch2/internal/catch_jsonwriter.cpp
@@ -31,7 +31,7 @@ namespace Catch {
m_os{ os }, m_indent_level{ indent_level } {
m_os << '{';
}
- JsonObjectWriter::JsonObjectWriter( JsonObjectWriter&& source ):
+ JsonObjectWriter::JsonObjectWriter( JsonObjectWriter&& source ) noexcept:
m_os{ source.m_os },
m_indent_level{ source.m_indent_level },
m_should_comma{ source.m_should_comma },
@@ -62,7 +62,7 @@ namespace Catch {
m_os{ os }, m_indent_level{ indent_level } {
m_os << '[';
}
- JsonArrayWriter::JsonArrayWriter( JsonArrayWriter&& source ):
+ JsonArrayWriter::JsonArrayWriter( JsonArrayWriter&& source ) noexcept:
m_os{ source.m_os },
m_indent_level{ source.m_indent_level },
m_should_comma{ source.m_should_comma },
diff --git a/src/catch2/internal/catch_jsonwriter.hpp b/src/catch2/internal/catch_jsonwriter.hpp
index 59c044e4..23b56d13 100644
--- a/src/catch2/internal/catch_jsonwriter.hpp
+++ b/src/catch2/internal/catch_jsonwriter.hpp
@@ -65,7 +65,7 @@ namespace Catch {
JsonObjectWriter( std::ostream& os );
JsonObjectWriter( std::ostream& os, std::uint64_t indent_level );
- JsonObjectWriter( JsonObjectWriter&& source );
+ JsonObjectWriter( JsonObjectWriter&& source ) noexcept;
JsonObjectWriter& operator=( JsonObjectWriter&& source ) = delete;
~JsonObjectWriter();
@@ -84,7 +84,7 @@ namespace Catch {
JsonArrayWriter( std::ostream& os );
JsonArrayWriter( std::ostream& os, std::uint64_t indent_level );
- JsonArrayWriter( JsonArrayWriter&& source );
+ JsonArrayWriter( JsonArrayWriter&& source ) noexcept;
JsonArrayWriter& operator=( JsonArrayWriter&& source ) = delete;
~JsonArrayWriter();
diff --git a/src/catch2/internal/catch_reporter_spec_parser.cpp b/src/catch2/internal/catch_reporter_spec_parser.cpp
index 8b88b170..2b08758a 100644
--- a/src/catch2/internal/catch_reporter_spec_parser.cpp
+++ b/src/catch2/internal/catch_reporter_spec_parser.cpp
@@ -117,7 +117,7 @@ namespace Catch {
auto kv = splitKVPair( parts[i] );
auto key = kv.key, value = kv.value;
- if ( key.empty() || value.empty() ) {
+ if ( key.empty() || value.empty() ) { // NOLINT(bugprone-branch-clone)
return {};
} else if ( key[0] == 'X' ) {
// This is a reporter-specific option, we don't check these
diff --git a/src/catch2/internal/catch_stringref.hpp b/src/catch2/internal/catch_stringref.hpp
index 4b9212bf..421ce712 100644
--- a/src/catch2/internal/catch_stringref.hpp
+++ b/src/catch2/internal/catch_stringref.hpp
@@ -97,8 +97,8 @@ namespace Catch {
constexpr const_iterator end() const { return m_start + m_size; }
- friend std::string& operator += (std::string& lhs, StringRef sr);
- friend std::ostream& operator << (std::ostream& os, StringRef sr);
+ friend std::string& operator += (std::string& lhs, StringRef rhs);
+ friend std::ostream& operator << (std::ostream& os, StringRef str);
friend std::string operator+(StringRef lhs, StringRef rhs);
/**
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index f3b8b5b1..c5678548 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -520,8 +520,8 @@ void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) {
m_stream << '\n' << std::flush;
StreamingReporterBase::testRunEnded(_testRunStats);
}
-void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) {
- StreamingReporterBase::testRunStarting(_testInfo);
+void ConsoleReporter::testRunStarting(TestRunInfo const& _testRunInfo) {
+ StreamingReporterBase::testRunStarting(_testRunInfo);
if ( m_config->testSpec().hasFilters() ) {
m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: "
<< m_config->testSpec() << '\n';
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
index 5e106326..09169632 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
@@ -16,8 +16,7 @@ namespace Catch {
namespace {
struct BySectionInfo {
BySectionInfo( SectionInfo const& other ): m_other( other ) {}
- BySectionInfo( BySectionInfo const& other ):
- m_other( other.m_other ) {}
+ BySectionInfo( BySectionInfo const& other ) = default;
bool operator()(
Detail::unique_ptr<CumulativeReporterBase::SectionNode> const&
node ) const {
diff --git a/src/catch2/reporters/catch_reporter_json.cpp b/src/catch2/reporters/catch_reporter_json.cpp
index 1f0db8b0..6a8e655f 100644
--- a/src/catch2/reporters/catch_reporter_json.cpp
+++ b/src/catch2/reporters/catch_reporter_json.cpp
@@ -133,8 +133,8 @@ namespace Catch {
return "Outputs listings as JSON. Test listing is Work-in-Progress!";
}
- void JsonReporter::testRunStarting( TestRunInfo const& testInfo ) {
- StreamingReporterBase::testRunStarting( testInfo );
+ void JsonReporter::testRunStarting( TestRunInfo const& runInfo ) {
+ StreamingReporterBase::testRunStarting( runInfo );
endListing();
assert( isInside( Writer::Object ) );
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index fc5cae34..4589365c 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -74,7 +74,7 @@ namespace Catch {
static void normalizeNamespaceMarkers(std::string& str) {
std::size_t pos = str.find( "::" );
- while ( pos != str.npos ) {
+ while ( pos != std::string::npos ) {
str.replace( pos, 2, "." );
pos += 1;
pos = str.find( "::", pos );
diff --git a/src/catch2/reporters/catch_reporter_multi.hpp b/src/catch2/reporters/catch_reporter_multi.hpp
index c43f511f..66113837 100644
--- a/src/catch2/reporters/catch_reporter_multi.hpp
+++ b/src/catch2/reporters/catch_reporter_multi.hpp
@@ -53,7 +53,7 @@ namespace Catch {
void assertionEnded( AssertionStats const& assertionStats ) override;
void sectionEnded( SectionStats const& sectionStats ) override;
- void testCasePartialEnded(TestCaseStats const& testInfo, uint64_t partNumber) override;
+ void testCasePartialEnded(TestCaseStats const& testStats, uint64_t partNumber) override;
void testCaseEnded( TestCaseStats const& testCaseStats ) override;
void testRunEnded( TestRunStats const& testRunStats ) override;
diff --git a/src/catch2/reporters/catch_reporter_sonarqube.hpp b/src/catch2/reporters/catch_reporter_sonarqube.hpp
index d26af62e..906578bb 100644
--- a/src/catch2/reporters/catch_reporter_sonarqube.hpp
+++ b/src/catch2/reporters/catch_reporter_sonarqube.hpp
@@ -37,7 +37,7 @@ namespace Catch {
xml.endElement();
}
- void writeRun( TestRunNode const& groupNode );
+ void writeRun( TestRunNode const& runNode );
void writeTestFile(StringRef filename, std::vector<TestCaseNode const*> const& testCaseNodes);
diff --git a/src/catch2/reporters/catch_reporter_teamcity.hpp b/src/catch2/reporters/catch_reporter_teamcity.hpp
index 04feb2e6..662e9892 100644
--- a/src/catch2/reporters/catch_reporter_teamcity.hpp
+++ b/src/catch2/reporters/catch_reporter_teamcity.hpp
@@ -35,8 +35,8 @@ namespace Catch {
return "Reports test results as TeamCity service messages"s;
}
- void testRunStarting( TestRunInfo const& groupInfo ) override;
- void testRunEnded( TestRunStats const& testGroupStats ) override;
+ void testRunStarting( TestRunInfo const& runInfo ) override;
+ void testRunEnded( TestRunStats const& runStats ) override;
void assertionEnded(AssertionStats const& assertionStats) override;
diff --git a/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp b/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp
index af03ce30..33399a68 100644
--- a/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp
+++ b/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp
@@ -34,7 +34,7 @@ public:
return "Custom reporter for testing cumulative reporter base";
}
- virtual void testRunEndedCumulative() override;
+ void testRunEndedCumulative() override;
};
CATCH_REGISTER_REPORTER("testReporter", CumulativeBenchmarkReporter)
diff --git a/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp b/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp
index 9bd816ef..13d9fc18 100644
--- a/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp
+++ b/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp
@@ -36,6 +36,7 @@ public:
void testRunStarting( Catch::TestRunInfo const& ) override {
std::vector<std::pair<std::string, std::string>> options;
+ options.reserve( m_customOptions.size() );
for ( auto const& kv : m_customOptions ) {
options.push_back( kv );
}
diff --git a/tests/ExtraTests/X91-AmalgamatedCatch.cpp b/tests/ExtraTests/X91-AmalgamatedCatch.cpp
index c00462be..78d45a2c 100644
--- a/tests/E