@@ -184,44 +184,31 @@ TEST_F(FIREtest, PrintMD)
184184 std::ifstream ifs (" running_fire.log" );
185185 std::string output_str;
186186
187- // Line 1
187+ getline (ifs, output_str);
188+ EXPECT_THAT (output_str, testing::HasSubstr (" ELECTRONIC PART OF STRESS: 0.24609992 kbar" ));
189+ getline (ifs, output_str);
190+ EXPECT_THAT (output_str, testing::HasSubstr (" IONIC (KINETIC) PART OF STRESS: 0.83853919 kbar" ));
191+ getline (ifs, output_str);
192+ EXPECT_THAT (output_str, testing::HasSubstr (" MD PRESSURE (ELECTRONS+IONS) : 1.0846391 kbar" ));
193+ getline (ifs, output_str);
188194 getline (ifs, output_str);
189195 EXPECT_THAT (output_str,
190196 testing::HasSubstr (
191197 " ------------------------------------------------------------------------------------------------" ));
192-
193- // Line 2
194198 getline (ifs, output_str);
195199 EXPECT_THAT (output_str,
196200 testing::HasSubstr (
197201 " Energy (Ry) Potential (Ry) Kinetic (Ry) Temperature (K) Pressure (kbar) " ));
198-
199- // Line 3
200202 getline (ifs, output_str);
201203 EXPECT_THAT (output_str,
202204 testing::HasSubstr (
203205 " -0.015365236 -0.023915637 0.0085504016 300 1.0846391 " ));
204-
205- // Line 4
206206 getline (ifs, output_str);
207207 EXPECT_THAT (
208208 output_str,
209209 testing::HasSubstr (
210210 " ------------------------------------------------------------------------------------------------" ));
211-
212- // Line 5
213211 getline (ifs, output_str);
214- EXPECT_THAT (output_str, testing::HasSubstr (" MD PRESSURE (ELECTRONS+IONS) : 1.0846391 kbar" ));
215-
216- // Line 6
217- getline (ifs, output_str);
218- EXPECT_THAT (output_str, testing::HasSubstr (" ELECTRONIC PART OF STRESS: 0.24609992 kbar" ));
219-
220- // Line 7
221- getline (ifs, output_str);
222- EXPECT_THAT (output_str, testing::HasSubstr (" IONIC (KINETIC) PART OF STRESS: 0.83853919 kbar" ));
223-
224- // Line 8
225212 getline (ifs, output_str);
226213 EXPECT_THAT (output_str, testing::HasSubstr (" LARGEST FORCE (eV/A) : 0.049479926" ));
227214
0 commit comments