Gromacs
2025-dev-20241003-bd59e46
|
#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 | checkRedirectedOutput () |
Checks all output from the manager using reference data. More... | |
Public Member Functions inherited from gmx::test::StringTestBase | |
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::filesystem::path &filename, const char *id) |
Checks contents of a file as a single string. 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... | |
static void | testFilesEqual (const std::filesystem::path &refFilename, const std::filesystem::path &testFilename) |
Tests that contents of two files are equal. More... | |
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.