Refactor mdrun integration tests
[alexxy/gromacs.git] / src / programs / mdrun / tests / swapcoords.cpp
index 7f12d33b1bdea646df34a6146040d1c224d0c0de..ac43152206629f9ce99050335086a71eafb09cbd 100644 (file)
@@ -77,29 +77,29 @@ typedef gmx::test::SwapTestFixture CompelTest;
 TEST_F(CompelTest, SwapCanRun)
 {
     std::string name = "OctaneSandwich";
-    useTopGroAndNdxFromDatabase(name.c_str());
-    mdpInputFileName = fileManager_.getInputFilePath((name + ".mdp").c_str());
+    runner_.useTopGroAndNdxFromDatabase(name.c_str());
+    runner_.mdpInputFileName_ = fileManager_.getInputFilePath((name + ".mdp").c_str());
 
-    EXPECT_EQ(0, callGrompp());
+    EXPECT_EQ(0, runner_.callGrompp());
 
-    cptFileName       = fileManager_.getTemporaryFilePath(".cpt");
-    groOutputFileName = fileManager_.getTemporaryFilePath(".gro");
-    swapFileName      = fileManager_.getTemporaryFilePath("swap.xvg");
+    runner_.cptFileName_       = fileManager_.getTemporaryFilePath(".cpt");
+    runner_.groOutputFileName_ = fileManager_.getTemporaryFilePath(".gro");
+    runner_.swapFileName_      = fileManager_.getTemporaryFilePath("swap.xvg");
 
     ::gmx::test::CommandLine swapCaller;
     swapCaller.append("mdrun");
-    swapCaller.addOption("-c", groOutputFileName);
-    swapCaller.addOption("-swap", swapFileName);
+    swapCaller.addOption("-c", runner_.groOutputFileName_);
+    swapCaller.addOption("-swap", runner_.swapFileName_);
 
     // Do an initial mdrun that writes a checkpoint file
     ::gmx::test::CommandLine firstCaller(swapCaller);
-    firstCaller.addOption("-cpo", cptFileName);
-    ASSERT_EQ(0, callMdrun(firstCaller));
+    firstCaller.addOption("-cpo", runner_.cptFileName_);
+    ASSERT_EQ(0, runner_.callMdrun(firstCaller));
     // Continue mdrun from that checkpoint file
     ::gmx::test::CommandLine secondCaller(swapCaller);
-    secondCaller.addOption("-cpi", cptFileName);
-    nsteps = 2;
-    ASSERT_EQ(0, callMdrun(secondCaller));
+    secondCaller.addOption("-cpi", runner_.cptFileName_);
+    runner_.nsteps_ = 2;
+    ASSERT_EQ(0, runner_.callMdrun(secondCaller));
 }