| 288 | //********************************************************************************************* |
| 289 | |
| 290 | TestSuite::TestSuite( std::string const & name ) |
| 291 | : tclog{ std::make_unique< test::LogStreambuf< test::DebugLogStreambufTraits > >( name, std::clog ) } |
| 292 | , tcout{ std::make_unique< test::LogStreambuf< test::InfoLogStreambufTraits > >( name, std::cout ) } |
| 293 | , tcerr{ std::make_unique< test::LogStreambuf< test::ErrorLogStreambufTraits > >( name, std::cerr ) } |
| 294 | { |
| 295 | crg::Logger::setTraceCallback( []( std::string_view, bool )noexcept |
| 296 | { |
| 297 | // Don't log trace |
| 298 | } ); |
| 299 | crg::Logger::setDebugCallback( []( std::string_view msg, bool newLine )noexcept |
| 300 | { |
| 301 | std::clog << msg.data(); |
| 302 | if ( newLine ) |
| 303 | std::clog << "\n"; |
| 304 | } ); |
| 305 | crg::Logger::setInfoCallback( []( std::string_view msg, bool newLine )noexcept |
| 306 | { |
| 307 | std::cout << msg.data(); |
| 308 | if ( newLine ) |
| 309 | std::cout << "\n"; |
| 310 | } ); |
| 311 | crg::Logger::setWarningCallback( []( std::string_view msg, bool newLine )noexcept |
| 312 | { |
| 313 | std::cout << msg.data(); |
| 314 | if ( newLine ) |
| 315 | std::cout << "\n"; |
| 316 | } ); |
| 317 | crg::Logger::setErrorCallback( []( std::string_view msg, bool newLine )noexcept |
| 318 | { |
| 319 | std::cerr << msg.data(); |
| 320 | if ( newLine ) |
| 321 | std::cerr << "\n"; |
| 322 | } ); |
| 323 | } |
| 324 | |
| 325 | //********************************************************************************************* |
| 326 |
nothing calls this directly
no outgoing calls
no test coverage detected