Change naming convention for C++ interfaces
[alexxy/gromacs.git] / src / testutils / testinit.cpp
index 4bfdd9e2030c690451170887d3bef209064bc609..a8bead662c4ba9a0118d619ebd7d9b1bc89d5c07 100644 (file)
@@ -60,7 +60,7 @@
 #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"
@@ -88,7 +88,7 @@ namespace
  *
  * \ingroup module_testutils
  */
-class TestProgramContext : public ProgramContextInterface
+class TestProgramContext : public IProgramContext
 {
     public:
         /*! \brief
@@ -96,7 +96,7 @@ class TestProgramContext : public ProgramContextInterface
          *
          * \param[in] context  Current \Gromacs program context.
          */
-        explicit TestProgramContext(const ProgramContextInterface &context)
+        explicit TestProgramContext(const IProgramContext &context)
             : context_(context), dataPath_(CMAKE_SOURCE_DIR)
         {
         }
@@ -131,19 +131,20 @@ class TestProgramContext : public ProgramContextInterface
         }
 
     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);
 }