Fix warnings in ExtraTests and Examples

This commit is contained in:
Martin Hořeňovský
2020-02-25 12:39:40 +01:00
parent 33b47f7309
commit d1ffaf55a1
8 changed files with 27 additions and 12 deletions

View File

@@ -19,6 +19,8 @@
// 1. Printing of listener data:
//
namespace {
std::string ws(int const level) {
return std::string( 2 * level, ' ' );
}
@@ -34,7 +36,6 @@ std::ostream& operator<<( std::ostream& os, std::vector<T> const& v ) {
os << x << ", ";
return os << "}";
}
// struct SourceLineInfo {
// char const* file;
// std::size_t line;
@@ -281,8 +282,8 @@ void print( std::ostream& os, int const level, std::string const& title, Catch::
print( os, level+1 , "- getSourceInfo(): ", info.getSourceInfo() );
os << ws(level+1) << "- getTestMacroName(): '" << info.getTestMacroName() << "'\n";
// print( os, level+1 , "- *** m_info (AssertionInfo)", info.m_info );
// print( os, level+1 , "- *** m_resultData (AssertionResultData)", info.m_resultData );
print( os, level+1 , "- *** m_info (AssertionInfo)", info.m_info );
print( os, level+1 , "- *** m_resultData (AssertionResultData)", info.m_resultData );
}
// struct AssertionStats {
@@ -305,6 +306,7 @@ void print( std::ostream& os, int const level, std::string const& title, Catch::
char const * dashed_line =
"--------------------------------------------------------------------------";
struct MyListener : Catch::TestEventListenerBase {
using TestEventListenerBase::TestEventListenerBase; // inherit constructor
@@ -375,6 +377,8 @@ struct MyListener : Catch::TestEventListenerBase {
}
};
} // end anonymous namespace
CATCH_REGISTER_LISTENER( MyListener )
// Get rid of Wweak-tables