Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::test::LoggerTestHelper Class Reference

#include <testutils/include/testutils/loggertest.h>

Description

Helper class for tests to check output written to a logger.

Public Member Functions

const MDLoggerlogger ()
 Returns the logger to pass to code under test.
 
void expectEntryMatchingRegex (gmx::MDLogger::LogLevel level, const char *re)
 Expects a log entry at a given level matching a given regex. More...
 
void expectNoEntries (gmx::MDLogger::LogLevel level)
 Expects that no log entries were made at a given level. More...
 

Member Function Documentation

void gmx::test::LoggerTestHelper::expectEntryMatchingRegex ( gmx::MDLogger::LogLevel  level,
const char *  re 
)

Expects a log entry at a given level matching a given regex.

Currently, the order of the entries is not checked, and if this method is called once for a log level, then it needs to be called for all entries produced by the test.

If not called for a log level, all entries for that level are accepted.

Note that this expectation should be set up before the logger is used in the test.

void gmx::test::LoggerTestHelper::expectNoEntries ( gmx::MDLogger::LogLevel  level)

Expects that no log entries were made at a given level.

If not called for a log level, all entries for that level are accepted.

Note that this expectation should be set up before the logger is used in the test.


The documentation for this class was generated from the following files: