Apply clang-format to source tree
[alexxy/gromacs.git] / src / programs / mdrun / tests / moduletest.cpp
index c4a59ca751a4b1f2365d7e522e2d3cfa7edcadd5..4447ae8f0798602b00c27e1ee9d9ddc45b8b3e44 100644 (file)
@@ -85,15 +85,15 @@ GMX_TEST_OPTIONS(MdrunTestOptions, options)
 {
     GMX_UNUSED_VALUE(options);
 #if GMX_OPENMP
-    options->addOption(IntegerOption("ntomp").store(&g_numOpenMPThreads)
-                           .description("Number of OpenMP threads for child mdrun calls"));
+    options->addOption(
+            IntegerOption("ntomp").store(&g_numOpenMPThreads).description("Number of OpenMP threads for child mdrun calls"));
 #endif
 }
 //! \endcond
 
-}       // namespace
+} // namespace
 
-SimulationRunner::SimulationRunner(TestFileManager *fileManager) :
+SimulationRunner::SimulationRunner(TestFileManagerfileManager) :
     fullPrecisionTrajectoryFileName_(fileManager->getTemporaryFilePath(".trr")),
     mdpOutputFileName_(fileManager->getTemporaryFilePath("output.mdp")),
     tprFileName_(fileManager->getTemporaryFilePath(".tpr")),
@@ -116,54 +116,46 @@ SimulationRunner::SimulationRunner(TestFileManager *fileManager) :
 // TODO There is possible outstanding unexplained behaviour of mdp
 // input parsing e.g. Redmine 2074, so this particular set of mdp
 // contents is also tested with GetIrTest in gmxpreprocess-test.
-void
-SimulationRunner::useEmptyMdpFile()
+void SimulationRunner::useEmptyMdpFile()
 {
     useStringAsMdpFile("");
 }
 
-void
-SimulationRunner::useStringAsMdpFile(const char *mdpString)
+void SimulationRunner::useStringAsMdpFile(const char* mdpString)
 {
     useStringAsMdpFile(std::string(mdpString));
 }
 
-void
-SimulationRunner::useStringAsMdpFile(const std::string &mdpString)
+void SimulationRunner::useStringAsMdpFile(const std::string& mdpString)
 {
     mdpInputContents_ = mdpString;
 }
 
-void
-SimulationRunner::useStringAsNdxFile(const char *ndxString)
+void SimulationRunner::useStringAsNdxFile(const char* ndxString)
 {
     gmx::TextWriter::writeFileFromString(ndxFileName_, ndxString);
 }
 
-void
-SimulationRunner::useTopG96AndNdxFromDatabase(const std::string &name)
+void SimulationRunner::useTopG96AndNdxFromDatabase(const std::string& name)
 {
     topFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".top");
     groFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".g96");
     ndxFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".ndx");
 }
 
-void
-SimulationRunner::useTopGroAndNdxFromDatabase(const std::string &name)
+void SimulationRunner::useTopGroAndNdxFromDatabase(const std::string& name)
 {
     topFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".top");
     groFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".gro");
     ndxFileName_ = gmx::test::TestFileManager::getInputFilePath(name + ".ndx");
 }
 
-void
-SimulationRunner::useGroFromDatabase(const char *name)
+void SimulationRunner::useGroFromDatabase(const char* name)
 {
     groFileName_ = gmx::test::TestFileManager::getInputFilePath((std::string(name) + ".gro").c_str());
 }
 
-int
-SimulationRunner::callGromppOnThisRank(const CommandLine &callerRef)
+int SimulationRunner::callGromppOnThisRank(const CommandLine& callerRef)
 {
     const std::string mdpInputFileName(fileManager_.getTemporaryFilePath("input.mdp"));
     gmx::TextWriter::writeFileFromString(mdpInputFileName, mdpInputContents_);
@@ -186,14 +178,12 @@ SimulationRunner::callGromppOnThisRank(const CommandLine &callerRef)
     return gmx_grompp(caller.argc(), caller.argv());
 }
 
-int
-SimulationRunner::callGromppOnThisRank()
+int SimulationRunner::callGromppOnThisRank()
 {
     return callGromppOnThisRank(CommandLine());
 }
 
-int
-SimulationRunner::callGrompp(const CommandLine &callerRef)
+int SimulationRunner::callGrompp(const CommandLine& callerRef)
 {
     int returnValue = 0;
 #if GMX_LIB_MPI
@@ -214,14 +204,12 @@ SimulationRunner::callGrompp(const CommandLine &callerRef)
     return returnValue;
 }
 
-int
-SimulationRunner::callGrompp()
+int SimulationRunner::callGrompp()
 {
     return callGrompp(CommandLine());
 }
 
-int
-SimulationRunner::changeTprNsteps(int nsteps)
+int SimulationRunner::changeTprNsteps(int nsteps)
 {
     CommandLine caller;
     caller.append("convert-tpr");
@@ -234,8 +222,7 @@ SimulationRunner::changeTprNsteps(int nsteps)
     return gmx_convert_tpr(caller.argc(), caller.argv());
 }
 
-int
-SimulationRunner::callNmeig()
+int SimulationRunner::callNmeig()
 {
     /* Conforming to style guide by not passing a non-const reference
        to this function. Passing a non-const reference might make it
@@ -256,8 +243,7 @@ SimulationRunner::callNmeig()
     return gmx_nmeig(caller.argc(), caller.argv());
 }
 
-int
-SimulationRunner::callMdrun(const CommandLine &callerRef)
+int SimulationRunner::callMdrun(const CommandLine& callerRef)
 {
     /* Conforming to style guide by not passing a non-const reference
        to this function. Passing a non-const reference might make it
@@ -293,8 +279,7 @@ SimulationRunner::callMdrun(const CommandLine &callerRef)
     return gmx_mdrun(caller.argc(), caller.argv());
 }
 
-int
-SimulationRunner::callMdrun()
+int SimulationRunner::callMdrun()
 {
     return callMdrun(CommandLine());
 }
@@ -308,15 +293,11 @@ MdrunTestFixtureBase::MdrunTestFixtureBase()
 #endif
 }
 
-MdrunTestFixtureBase::~MdrunTestFixtureBase()
-{
-}
+MdrunTestFixtureBase::~MdrunTestFixtureBase() {}
 
 // ====
 
-MdrunTestFixture::MdrunTestFixture() : runner_(&fileManager_)
-{
-}
+MdrunTestFixture::MdrunTestFixture() : runner_(&fileManager_) {}
 
 MdrunTestFixture::~MdrunTestFixture()
 {