mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +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
@@ -158,9 +158,9 @@ TEST_CASE( "looped tests", "[.][failing]" ) {
|
||||
}
|
||||
|
||||
TEST_CASE( "Sends stuff to stdout and stderr", "[.]" ) {
|
||||
std::cout << "A string sent directly to stdout" << std::endl;
|
||||
std::cerr << "A string sent directly to stderr" << std::endl;
|
||||
std::clog << "A string sent to stderr via clog" << std::endl;
|
||||
std::cout << "A string sent directly to stdout\n" << std::flush;
|
||||
std::cerr << "A string sent directly to stderr\n" << std::flush;
|
||||
std::clog << "A string sent to stderr via clog\n" << std::flush;
|
||||
}
|
||||
|
||||
TEST_CASE( "null strings" ) {
|
||||
@@ -396,7 +396,7 @@ TEMPLATE_PRODUCT_TEST_CASE("Product with differing arities", "[template][product
|
||||
using MyTypes = std::tuple<int, char, float>;
|
||||
TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside std::tuple", "[template][list]", MyTypes)
|
||||
{
|
||||
REQUIRE(sizeof(TestType) > 0);
|
||||
REQUIRE(std::is_arithmetic<TestType>::value);
|
||||
}
|
||||
|
||||
struct NonDefaultConstructibleType {
|
||||
@@ -406,7 +406,7 @@ struct NonDefaultConstructibleType {
|
||||
using MyNonDefaultConstructibleTypes = std::tuple<NonDefaultConstructibleType, float>;
|
||||
TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-default-constructible std::tuple", "[template][list]", MyNonDefaultConstructibleTypes)
|
||||
{
|
||||
REQUIRE(sizeof(TestType) > 0);
|
||||
REQUIRE(std::is_trivially_copyable<TestType>::value);
|
||||
}
|
||||
|
||||
struct NonCopyableAndNonMovableType {
|
||||
@@ -421,7 +421,7 @@ struct NonCopyableAndNonMovableType {
|
||||
using NonCopyableAndNonMovableTypes = std::tuple<NonCopyableAndNonMovableType, float>;
|
||||
TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-copyable and non-movable std::tuple", "[template][list]", NonCopyableAndNonMovableTypes)
|
||||
{
|
||||
REQUIRE(sizeof(TestType) > 0);
|
||||
REQUIRE(std::is_default_constructible<TestType>::value);
|
||||
}
|
||||
|
||||
// https://github.com/philsquared/Catch/issues/166
|
||||
|
Reference in New Issue
Block a user