Gromacs
5.1
|
#include <gromacs/commandline/tests/cmdlinemodulemanagertest.h>
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. | |
MockModule & | addModule (const char *name, const char *description) |
Adds a mock module to the manager. | |
MockOptionsModule & | addOptionsModule (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. | |
CommandLineModuleManager & | manager () |
Returns the manager for this test. More... | |
void | redirectManagerOutput () |
Redirects all manager output to files. More... | |
Public Member Functions inherited from gmx::test::StringTestBase | |
FileOutputRedirectorInterface & | initOutputRedirector (TestFileManager *fileManager) |
Creates a redirector that directs all output to temporary files. More... | |
TestReferenceChecker & | checker () |
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 | checkRedirectedOutputFiles () |
Checks contents of all files redirected with initOutputRedirector(). More... | |
CommandLineModuleManager & gmx::test::CommandLineModuleManagerTestBase::manager | ( | ) |
Returns the manager for this test.
initManager() must have been called.
void gmx::test::CommandLineModuleManagerTestBase::redirectManagerOutput | ( | ) |
Redirects all manager output to files.
Can be used to silence tests that would otherwise print out something, and/or checkRedirectedFileContents() from the base class can be used to check the output.
The manager is put into quiet mode by default, so the manager will only print out information if, e.g., help is explicitly requested.