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

#include <gromacs/coordinateio/tests/outputadapters.h>

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

Description

Helper to test supported file names.

Public Member Functions

void prepareTest (const char *filename)
 
TrajectoryFrameWriterPointer runTest (const char *filename, const OutputRequirements &requirements) const
 Run the builder to create an TrajectoryFrameWriter during tests. More...
 
void addTopology ()
 Add topology information to test if needed.
 
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 char *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 (std::string &&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 char *filename, const IFileMatcherSettings &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 (std::string &&filename, const IFileMatcherSettings &matcher)
 Sets an output file whose name is generated by the tool and adds it to the set of tested files. More...
 
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...
 
CommandLinecommandLine ()
 Returns the internal CommandLine object used to construct the command line for the test. More...
 
TestFileManagerfileManager ()
 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...
 

Public Attributes

TopologyInformation dummyTopology_
 Dummy topology to use to create CoordinateFile.
 
Selection dummySelection_
 Dummy selection.
 

Member Function Documentation

void gmx::test::CommandLineTestBase::checkOutputFiles ( )
inherited

Checks output files added with setOutputFile() against reference data.

See Also
CommandLineTestHelper::checkOutputFiles()
CommandLine & gmx::test::CommandLineTestBase::commandLine ( )
inherited

Returns the internal CommandLine object used to construct the command line for the test.

Derived test fixtures can use this to add additional options, and to access the final command line to do the actual call that is being tested.

Does not throw.

TestFileManager & gmx::test::CommandLineTestBase::fileManager ( )
inherited

Returns the internal TestFileManager object used to manage the files.

Derived test fixtures can use this to manage files in cases the canned methods are not sufficient.

Does not throw.

void gmx::test::SetAtomsUnSupportedFiles::prepareTest ( const char *  filename)
inline

Storage for requirements.

TestReferenceChecker gmx::test::CommandLineTestBase::rootChecker ( )
inherited

Returns the root reference data checker.

Derived test fixtures can use this to check other things than output file contents.

TrajectoryFrameWriterPointer gmx::test::ModuleTest::runTest ( const char *  filename,
const OutputRequirements requirements 
) const
inlineinherited

Run the builder to create an TrajectoryFrameWriter during tests.

Parameters
[in]filenameName for output file, to determine filetype during construction.
[in]requirementsRequirements for adding to the object.
Returns
The newly created object.
void gmx::test::CommandLineTestBase::setDefaultTolerance ( const FloatingPointTolerance tolerance)
inherited

Sets the tolerance for floating-point comparisons.

All following floating-point comparisons using the checker will use the new tolerance.

Does not throw.

std::string gmx::test::CommandLineTestBase::setInputAndOutputFile ( const char *  option,
const char *  filename,
const IFileMatcherSettings matcher 
)
inherited

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.

void gmx::test::CommandLineTestBase::setInputFile ( const char *  option,
const char *  filename 
)
inherited

Sets an input file.

Parameters
[in]optionOption to set.
[in]filenameName of the input file.
See Also
TestFileManager::getInputFilePath()
void gmx::test::CommandLineTestBase::setInputFile ( const char *  option,
const std::string &  filename 
)
inherited

Sets an input file.

Parameters
[in]optionOption to set.
[in]filenameName of the input file.
See Also
TestFileManager::getInputFilePath()
void gmx::test::CommandLineTestBase::setInputFileContents ( const char *  option,
const char *  extension,
const std::string &  contents 
)
inherited

Generates and sets an input file.

See Also
CommandLineTestHelper::setInputFileContents()
void gmx::test::CommandLineTestBase::setInputFileContents ( const char *  option,
const char *  extension,
const ArrayRef< const char *const > &  contents 
)
inherited

Generates and sets an input file.

See Also
CommandLineTestHelper::setInputFileContents()
void gmx::test::CommandLineTestBase::setModifiableInputFile ( const char *  option,
const char *  filename 
)
inherited

Sets an input file that may be modified. The file is copied to a temporary file, which is used as the test input.

Parameters
[in]optionOption to set.
[in]filenameName of the input file.
void gmx::test::CommandLineTestBase::setModifiableInputFile ( const char *  option,
const std::string &  filename 
)
inherited

Sets an input file that may be modified. The file is copied to a temporary file, which is used as the test input.

Parameters
[in]optionOption to set.
[in]filenameName of the input file.
std::string gmx::test::CommandLineTestBase::setOutputFile ( const char *  option,
const char *  filename,
const ITextBlockMatcherSettings matcher 
)
inherited

Sets an output file whose name is passed via an option and adds it to the set of tested files.

See Also
CommandLineTestHelper::setOutputFile()
std::string gmx::test::CommandLineTestBase::setOutputFile ( const char *  option,
const char *  filename,
const IFileMatcherSettings matcher 
)
inherited

std::string gmx::test::CommandLineTestBase::setOutputFileWithGeneratedName ( const char *  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.

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()
std::string gmx::test::CommandLineTestBase::setOutputFileWithGeneratedName ( std::string &&  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.

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()
std::string gmx::test::CommandLineTestBase::setOutputFileWithGeneratedName ( const char *  filename,
const IFileMatcherSettings matcher 
)
inherited

Sets an output file whose name is generated by the tool and adds it to the set of tested files.

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()
std::string gmx::test::CommandLineTestBase::setOutputFileWithGeneratedName ( std::string &&  filename,
const IFileMatcherSettings matcher 
)
inherited

Sets an output file whose name is generated by the tool and adds it to the set of tested files.

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()

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