mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
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
This commit is contained in:

committed by
Martin Hořeňovský

parent
7677c1658e
commit
cde3509664
@@ -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)
|
||||
|
@@ -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 );
|
||||
}
|
||||
|
@@ -16,10 +16,10 @@
|
||||
TEST_CASE("Just a dummy test") {
|
||||
auto i = GENERATE(1, 2, 3);
|
||||
SECTION("a") {
|
||||
REQUIRE(1 != 4);
|
||||
REQUIRE(i != 4);
|
||||
}
|
||||
SECTION("b") {
|
||||
CHECK(1 != 5);
|
||||
CHECK(i != 5);
|
||||
}
|
||||
REQUIRE_THAT(1,
|
||||
Catch::Matchers::Predicate<int>([](int i) {
|
||||
|
Reference in New Issue
Block a user