Test fixture for tests that call a gmx analysis tool with input/output files.
|
|
void | runAndCheckResults () |
| | Run command and check the resulting output.
|
| |
|
void | selectGroups (const std::initializer_list< const char * > groups) |
| | Select groups when prompted for when running the tool.
|
| |
|
void | selectGroups (const ArrayRef< const std::string > groups) |
| | Select groups when prompted for when running the tool.
|
| |
| void | setInputFile (const char *option, const char *filename) |
| | Sets an input file. More...
|
| |
| void | setInputFile (const char *option, const std::string &filename) |
| | Sets an input file. More...
|
| |
| void | setModifiableInputFile (const char *option, const char *filename) |
| | Sets an input file that may be modified. The file is copied to a temporary file, which is used as the test input. More...
|
| |
| void | setModifiableInputFile (const char *option, const std::string &filename) |
| | Sets an input file that may be modified. The file is copied to a temporary file, which is used as the test input. More...
|
| |
| void | setInputFileContents (const char *option, const char *extension, const std::string &contents) |
| | Generates and sets an input file. More...
|
| |
| void | setInputFileContents (const char *option, const char *extension, const ArrayRef< const char *const > &contents) |
| | Generates and sets an input file. More...
|
| |
| std::string | setOutputFile (const char *option, const char *filename, const ITextBlockMatcherSettings &matcher) |
| | Sets an output file whose name is passed via an option and adds it to the set of tested files. More...
|
| |
| std::string | setOutputFile (const char *option, const char *filename, const IFileMatcherSettings &matcher) |
| |
| std::string | setOutputFileWithGeneratedName (const std::string_view label, const std::filesystem::path &filename, const ITextBlockMatcherSettings &matcher) |
| | Sets an output file whose name is generated by the tool and adds it to the set of tested files. More...
|
| |
| std::string | setOutputFileWithGeneratedName (const std::string_view label, const std::filesystem::path &filename, const IFileMatcherSettings &matcher) |
| |
|
std::string | setInputAndOutputFile (const char *option, const char *filename, const ITextBlockMatcherSettings &matcher) |
| | Sets a file parameter that is used for input and modified as output. The input file is copied to a temporary file that is used as input and can be modified.
|
| |
| std::string | setInputAndOutputFile (const char *option, const char *filename, const IFileMatcherSettings &matcher) |
| | Sets a file parameter that is used for input and modified as output. The input file is copied to a temporary file that is used as input and can be modified. More...
|
| |
| CommandLine & | commandLine () |
| | Returns the internal CommandLine object used to construct the command line for the test. More...
|
| |
| TestFileManager & | fileManager () |
| | Returns the internal TestFileManager object used to manage the files. More...
|
| |
| TestReferenceChecker | rootChecker () |
| | Returns the root reference data checker. More...
|
| |
| void | setDefaultTolerance (const FloatingPointTolerance &tolerance) |
| | Sets the tolerance for floating-point comparisons. More...
|
| |
|
void | testWriteHelp (ICommandLineModule *module) |
| | Checks the output of writeHelp() against reference data.
|
| |
| void | checkOutputFiles () |
| | Checks output files added with setOutputFile() against reference data. More...
|
| |
| std::string gmx::test::CommandLineTestBase::setOutputFileWithGeneratedName |
( |
const std::string_view |
label, |
|
|
const std::filesystem::path & |
filename, |
|
|
const ITextBlockMatcherSettings & |
matcher |
|
) |
| |
|
inherited |
Sets an output file whose name is generated by the tool and adds it to the set of tested files.
Sometimes label and filename can be the same, depending how the tool generates the filename. When the tool has generated the filename from the name of another output file, rather than as its own string, it can be necessary to prefix filename with the temporary directory name so it can be found.
This method is useful when a tool generates a series of output files by modifying a common base name. Call this method with every file name that is expected to be generated by the tool.
- See Also
- CommandLineTestHelper::setOutputFileWithGeneratedName()