Improve testutils infrastructure
[alexxy/gromacs.git] / src / testutils / include / testutils / cmdlinetest.h
index 3dfcd4eac38aa09272be0b050d5cac06482193aa..b8be83134adbac1c7523df003aed71696cb4520e 100644 (file)
@@ -333,6 +333,18 @@ public:
                        const char*                 option,
                        const char*                 filename,
                        const IFileMatcherSettings& matcher);
+    /*! \brief As for \c setOutputFile() but does not create an option
+     *
+     * 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. */
+    void setOutputFileWithGeneratedName(const char* filename, const ITextBlockMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(std::string&& filename, const ITextBlockMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(const char* filename, const IFileMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(std::string&& filename, const IFileMatcherSettings& matcher);
 
     /*! \brief
      * Checks output files added with setOutputFile() against reference
@@ -415,17 +427,28 @@ public:
                               const char*                        extension,
                               const ArrayRef<const char* const>& contents);
     /*! \brief
-     * Sets an output file parameter and adds it to the set of tested files.
+     * Sets an output file whose name is passed via an option and adds it to the set of tested files.
      *
      * \see CommandLineTestHelper::setOutputFile()
      */
     void setOutputFile(const char* option, const char* filename, const ITextBlockMatcherSettings& matcher);
-    /*! \brief
-     * Sets an output file parameter and adds it to the set of tested files.
-     *
-     * \see CommandLineTestHelper::setOutputFile()
-     */
+    //! \copydoc setOutputFile(const char *, const ITextBlockMatcherSettings &)
     void setOutputFile(const char* option, const char* filename, const IFileMatcherSettings& matcher);
+    /*! \brief
+     * 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 CommandLineTestHelper::setOutputFileWithGeneratedName() */
+    void setOutputFileWithGeneratedName(const char* filename, const ITextBlockMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(std::string&& filename, const ITextBlockMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(const char* filename, const IFileMatcherSettings& matcher);
+    //! \copydoc setOutputFileWithGeneratedName(const char *, const ITextBlockMatcherSettings &)
+    void setOutputFileWithGeneratedName(std::string&& filename, const IFileMatcherSettings& matcher);
     /*! \brief
      * 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.