#include "gromacs/options/options.h"
#include "gromacs/utility/errorcodes.h"
#include "gromacs/utility/exceptions.h"
-#include "gromacs/utility/file.h"
+#include "gromacs/utility/filestream.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/path.h"
#include "gromacs/utility/programcontext.h"
*
* \ingroup module_testutils
*/
-class TestProgramContext : public ProgramContextInterface
+class TestProgramContext : public IProgramContext
{
public:
/*! \brief
*
* \param[in] context Current \Gromacs program context.
*/
- explicit TestProgramContext(const ProgramContextInterface &context)
+ explicit TestProgramContext(const IProgramContext &context)
: context_(context), dataPath_(CMAKE_SOURCE_DIR)
{
}
}
private:
- const ProgramContextInterface &context_;
+ const IProgramContext &context_;
std::string dataPath_;
};
//! Prints the command-line options for the unit test binary.
void printHelp(const Options &options)
{
+ const std::string &program = getProgramContext().displayName();
std::fprintf(stderr,
"\nYou can use the following GROMACS-specific command-line flags\n"
"to control the behavior of the tests:\n\n");
- CommandLineHelpContext context(&File::standardError(),
- eHelpOutputFormat_Console, NULL);
- context.setModuleDisplayName(getProgramContext().displayName());
+ CommandLineHelpContext context(&TextOutputFile::standardError(),
+ eHelpOutputFormat_Console, NULL, program);
+ context.setModuleDisplayName(program);
CommandLineHelpWriter(options).writeHelp(context);
}