Apply clang-format to source tree
[alexxy/gromacs.git] / src / programs / mdrun / tests / moduletest.h
index 70fb20e20e491b3a9d9a76c01916f020f8319ed7..3790cd220d1a0f46b6a7532310add1e8eaf574a1 100644 (file)
@@ -86,75 +86,75 @@ namespace test
  */
 class SimulationRunner
 {
-    public:
-        //! Initializes a runner with given manager for temporary files.
-        explicit SimulationRunner(TestFileManager *fileManager);
+public:
+    //! Initializes a runner with given manager for temporary files.
+    explicit SimulationRunner(TestFileManager* fileManager);
 
-        //! Use an empty .mdp file as input to grompp
-        void useEmptyMdpFile();
-        //! Use a given string as input to grompp
-        void useStringAsMdpFile(const char *mdpString);
-        //! Use a given string as input to grompp
-        void useStringAsMdpFile(const std::string &mdpString);
-        //! Use a string as -n input to grompp
-        void useStringAsNdxFile(const char *ndxString);
-        //! Use a standard .top and .g96 file as input to grompp
-        void useTopG96AndNdxFromDatabase(const std::string &name);
-        //! Use a standard .top and .gro file as input to grompp
-        void useTopGroAndNdxFromDatabase(const std::string &name);
-        //! Use a standard .gro file as input to grompp
-        void useGroFromDatabase(const char *name);
-        //! Calls grompp (on rank 0, with a customized command line) to prepare for the mdrun test
-        int callGrompp(const CommandLine &callerRef);
-        //! Convenience wrapper for a default call to \c callGrompp
-        int callGrompp();
-        //! Calls grompp (on this rank, with a customized command line) to prepare for the mdrun test
-        int callGromppOnThisRank(const CommandLine &callerRef);
-        //! Convenience wrapper for a default call to \c callGromppOnThisRank
-        int callGromppOnThisRank();
-        //! Calls nmeig for testing
-        int callNmeig();
-        //! Calls mdrun for testing with a customized command line
-        int callMdrun(const CommandLine &callerRef);
-        /*! \brief Convenience wrapper for calling mdrun for testing
-         * with default command line */
-        int callMdrun();
-        //! Calls convert-tpr on this rank to set a new number of steps in the tpr.
-        int changeTprNsteps(int nsteps);
+    //! Use an empty .mdp file as input to grompp
+    void useEmptyMdpFile();
+    //! Use a given string as input to grompp
+    void useStringAsMdpFile(const char* mdpString);
+    //! Use a given string as input to grompp
+    void useStringAsMdpFile(const std::string& mdpString);
+    //! Use a string as -n input to grompp
+    void useStringAsNdxFile(const char* ndxString);
+    //! Use a standard .top and .g96 file as input to grompp
+    void useTopG96AndNdxFromDatabase(const std::string& name);
+    //! Use a standard .top and .gro file as input to grompp
+    void useTopGroAndNdxFromDatabase(const std::string& name);
+    //! Use a standard .gro file as input to grompp
+    void useGroFromDatabase(const char* name);
+    //! Calls grompp (on rank 0, with a customized command line) to prepare for the mdrun test
+    int callGrompp(const CommandLine& callerRef);
+    //! Convenience wrapper for a default call to \c callGrompp
+    int callGrompp();
+    //! Calls grompp (on this rank, with a customized command line) to prepare for the mdrun test
+    int callGromppOnThisRank(const CommandLine& callerRef);
+    //! Convenience wrapper for a default call to \c callGromppOnThisRank
+    int callGromppOnThisRank();
+    //! Calls nmeig for testing
+    int callNmeig();
+    //! Calls mdrun for testing with a customized command line
+    int callMdrun(const CommandLine& callerRef);
+    /*! \brief Convenience wrapper for calling mdrun for testing
+     * with default command line */
+    int callMdrun();
+    //! Calls convert-tpr on this rank to set a new number of steps in the tpr.
+    int changeTprNsteps(int nsteps);
 
-        //@{
-        /*! \name Names for frequently used grompp and mdrun output files
-         *
-         * These strings can be set to point to files present in the
-         * source tree, or to temporary files created for the test
-         * fixture. In the latter case,
-         * IntegrationTestFixture::fileManager_ should be used to fill
-         * these strings with paths to files, so that they are created
-         * in a temporary directory and (by default behaviour of
-         * TestFileManager) deleted when the test is complete.
-         */
-        std::string topFileName_;
-        std::string groFileName_;
-        std::string fullPrecisionTrajectoryFileName_;
-        std::string reducedPrecisionTrajectoryFileName_;
-        std::string groOutputFileName_;
-        std::string ndxFileName_;
-        std::string mdpOutputFileName_;
-        std::string tprFileName_;
-        std::string logFileName_;
-        std::string edrFileName_;
-        std::string mtxFileName_;
-        std::string cptFileName_;
-        std::string swapFileName_;
-        int         nsteps_;
-        //@}
-        //! What will be written into a temporary mdp file before the grompp call
-        std::string mdpInputContents_;
+    //@{
+    /*! \name Names for frequently used grompp and mdrun output files
+     *
+     * These strings can be set to point to files present in the
+     * source tree, or to temporary files created for the test
+     * fixture. In the latter case,
+     * IntegrationTestFixture::fileManager_ should be used to fill
+     * these strings with paths to files, so that they are created
+     * in a temporary directory and (by default behaviour of
+     * TestFileManager) deleted when the test is complete.
+     */
+    std::string topFileName_;
+    std::string groFileName_;
+    std::string fullPrecisionTrajectoryFileName_;
+    std::string reducedPrecisionTrajectoryFileName_;
+    std::string groOutputFileName_;
+    std::string ndxFileName_;
+    std::string mdpOutputFileName_;
+    std::string tprFileName_;
+    std::string logFileName_;
+    std::string edrFileName_;
+    std::string mtxFileName_;
+    std::string cptFileName_;
+    std::string swapFileName_;
+    int         nsteps_;
+    //@}
+    //! What will be written into a temporary mdp file before the grompp call
+    std::string mdpInputContents_;
 
-    private:
-        TestFileManager &fileManager_;
+private:
+    TestFileManager& fileManager_;
 
-        GMX_DISALLOW_COPY_AND_ASSIGN(SimulationRunner);
+    GMX_DISALLOW_COPY_AND_ASSIGN(SimulationRunner);
 };
 
 /*! \internal
@@ -183,9 +183,9 @@ class SimulationRunner
  */
 class MdrunTestFixtureBase : public ::testing::Test
 {
-    public:
-        MdrunTestFixtureBase();
-        ~MdrunTestFixtureBase() override;
+public:
+    MdrunTestFixtureBase();
+    ~MdrunTestFixtureBase() override;
 };
 
 /*! \internal
@@ -198,22 +198,23 @@ class MdrunTestFixtureBase : public ::testing::Test
  */
 class MdrunTestFixture : public ::testing::Test
 {
-    public:
-        MdrunTestFixture();
-        ~MdrunTestFixture() override;
+public:
+    MdrunTestFixture();
+    ~MdrunTestFixture() override;
 
-        //! Manages temporary files during the test.
-        TestFileManager  fileManager_;
-        //! Helper object to manage the preparation for and call of mdrun
-        SimulationRunner runner_;
+    //! Manages temporary files during the test.
+    TestFileManager fileManager_;
+    //! Helper object to manage the preparation for and call of mdrun
+    SimulationRunner runner_;
 };
 
 /*! \internal
  * \brief
  * Parameterized test fixture for mdrun integration tests
  */
-class ParameterizedMdrunTestFixture : public gmx::test::MdrunTestFixture,
-                                      public ::testing::WithParamInterface<const char *>
+class ParameterizedMdrunTestFixture :
+    public gmx::test::MdrunTestFixture,
+    public ::testing::WithParamInterface<const char*>
 {
 };