mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45: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
@@ -80,20 +80,20 @@ TEST_CASE( "Output from all sections is reported", "[failing][messages][.]" ) {
|
||||
|
||||
TEST_CASE( "Standard output from all sections is reported", "[messages][.]" ) {
|
||||
SECTION( "one" ) {
|
||||
std::cout << "Message from section one" << std::endl;
|
||||
std::cout << "Message from section one\n";
|
||||
}
|
||||
|
||||
SECTION( "two" ) {
|
||||
std::cout << "Message from section two" << std::endl;
|
||||
std::cout << "Message from section two\n";
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE( "Standard error is reported and redirected", "[messages][.][approvals]" ) {
|
||||
SECTION( "std::cerr" ) {
|
||||
std::cerr << "Write to std::cerr" << std::endl;
|
||||
std::cerr << "Write to std::cerr\n";
|
||||
}
|
||||
SECTION( "std::clog" ) {
|
||||
std::clog << "Write to std::clog" << std::endl;
|
||||
std::clog << "Write to std::clog\n";
|
||||
}
|
||||
SECTION( "Interleaved writes to cerr and clog" ) {
|
||||
std::cerr << "Inter";
|
||||
@@ -101,7 +101,7 @@ TEST_CASE( "Standard error is reported and redirected", "[messages][.][approvals
|
||||
std::cerr << ' ';
|
||||
std::clog << "writes";
|
||||
std::cerr << " to error";
|
||||
std::clog << " streams" << std::endl;
|
||||
std::clog << " streams\n" << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user