@@ -260,18 +260,19 @@ TEST(PrintForce, PrintForce)
260260 std::string output_str;
261261
262262 getline (ifs, output_str);
263- EXPECT_THAT (output_str, testing::HasSubstr (" test" ));
263+ EXPECT_THAT (output_str, testing::HasSubstr (" test" ));
264264
265265 getline (ifs, output_str);
266266 EXPECT_THAT (output_str,
267- testing::HasSubstr (" --------------------------------------------------------------------------- " ));
267+ testing::HasSubstr (" -------------------------------------------------------------------------" ));
268268
269269 getline (ifs, output_str);
270- EXPECT_THAT (output_str," Atoms Force_x Force_y Force_z" );
270+ EXPECT_THAT (output_str,
271+ testing::HasSubstr (" Atoms Force_x Force_y Force_z" ));
271272
272273 getline (ifs, output_str);
273274 EXPECT_THAT (output_str,
274- testing::HasSubstr (" --------------------------------------------------------------------------- " ));
275+ testing::HasSubstr (" -------------------------------------------------------------------------" ));
275276
276277 getline (ifs, output_str);
277278 EXPECT_THAT (output_str,
@@ -283,10 +284,10 @@ TEST(PrintForce, PrintForce)
283284
284285 getline (ifs, output_str);
285286 EXPECT_THAT (output_str,
286- testing::HasSubstr (" --------------------------------------------------------------------------- " ));
287+ testing::HasSubstr (" -------------------------------------------------------------------------" ));
287288
288289 ifs.close ();
289- // std::remove("running_force.txt");
290+ std::remove (" running_force.txt" );
290291}
291292
292293TEST (PrintStress, PrintStress)
@@ -309,24 +310,34 @@ TEST(PrintStress, PrintStress)
309310
310311 std::ifstream ifs (" running_stress.txt" );
311312 std::string output_str;
313+ getline (ifs, output_str);
314+ EXPECT_THAT (output_str, testing::HasSubstr (" TOTAL-STRESS (KBAR)" ));
315+
312316 getline (ifs, output_str);
313317 EXPECT_THAT (output_str, testing::HasSubstr (" ----------------------------------------------------------------" ));
318+
314319 getline (ifs, output_str);
315- EXPECT_THAT (output_str, testing::HasSubstr (" TOTAL-STRESS (KBAR) " ));
320+ EXPECT_THAT (output_str, testing::HasSubstr (" Stress_x Stress_y Stress_z" ));
321+
316322 getline (ifs, output_str);
317323 EXPECT_THAT (output_str, testing::HasSubstr (" ----------------------------------------------------------------" ));
324+
318325 getline (ifs, output_str);
319326 EXPECT_THAT (output_str, testing::HasSubstr (" 147105.2279754489 294210.4559508978 441315.6839263467" ));
327+
320328 getline (ifs, output_str);
321329 EXPECT_THAT (output_str, testing::HasSubstr (" 0.0000000000 0.0000000000 0.0000000000" ));
330+
322331 getline (ifs, output_str);
323332 EXPECT_THAT (output_str, testing::HasSubstr (" 0.0000000000 0.0000000000 0.0000000000" ));
333+
324334 getline (ifs, output_str);
325335 EXPECT_THAT (output_str, testing::HasSubstr (" ----------------------------------------------------------------" ));
336+
326337 getline (ifs, output_str);
327- EXPECT_THAT (output_str, testing::HasSubstr (" TOTAL-PRESSURE: 49035.075992 KBAR" ));
338+ EXPECT_THAT (output_str, testing::HasSubstr (" TOTAL-PRESSURE (DO NOT INCLUDE KINETIC PART OF IONS) : 49035.075992 KBAR" ));
328339 ifs.close ();
329- // std::remove("running_stress.txt");
340+ std::remove (" running_stress.txt" );
330341}
331342
332343int main (int argc, char ** argv)
0 commit comments