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

#include <gromacs/commandline/tests/cmdlinemodulemanagertest.h>

+ Inheritance diagram for gmx::test::CommandLineModuleManagerTestBase:
+ Collaboration diagram for gmx::test::CommandLineModuleManagerTestBase:

Description

Test fixture for tests using gmx::CommandLineModuleManager.

Public Member Functions

void initManager (const CommandLine &args, const char *realBinaryName)
 Creates the manager to run the given command line.
 
MockModuleaddModule (const char *name, const char *description)
 Adds a mock module to the manager.
 
MockOptionsModuleaddOptionsModule (const char *name, const char *description)
 Adds a mock module using gmx::Options to the manager.
 
MockHelpTopic & addHelpTopic (const char *name, const char *title)
 Adds a mock help topic to the manager.
 
CommandLineModuleManagermanager ()
 Returns the manager for this test. More...
 
void checkRedirectedOutput ()
 Checks all output from the manager using reference data. More...
 
- Public Member Functions inherited from gmx::test::StringTestBase
TestReferenceCheckerchecker ()
 Returns the root checker for this test's reference data. More...
 
void checkText (const std::string &text, const char *id)
 Checks a string. More...
 
void checkFileContents (const std::string &filename, const char *id)
 Checks contents of a file as a single string. More...
 
void testFilesEqual (const std::string &refFilename, const std::string &testFilename)
 Tests that contents of two files are equal. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gmx::test::StringTestBase
static void checkText (TestReferenceChecker *checker, const std::string &text, const char *id)
 Checks a block of text. More...
 

Member Function Documentation

void gmx::test::CommandLineModuleManagerTestBase::checkRedirectedOutput ( )

Checks all output from the manager using reference data.

Both output to stdout and to files is checked.

The manager is put into quiet mode by default, so the manager will only print out information if, e.g., help is explicitly requested.

CommandLineModuleManager & gmx::test::CommandLineModuleManagerTestBase::manager ( )

Returns the manager for this test.

initManager() must have been called.


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