@@ -61,8 +61,8 @@ TEST_F(ToolCheckTest, Name)
6161 EXPECT_THAT (output,testing::HasSubstr (" not match" ));
6262 // quit check: quit = false
6363 testing::internal::CaptureStdout ();
64- EXPECT_DEATH (ModuleBase::CHECK_NAME (ifs, " abacus" ), " " );
65- output = testing::internal::GetCapturedStdout ();
64+ EXPECT_EXIT (ModuleBase::CHECK_NAME (ifs, " abacus" ), :: testing::ExitedWithCode ( 0 ), " " );
65+ output = testing::internal::GetCapturedStdout ();
6666 EXPECT_THAT (output,testing::HasSubstr (" NOTICE" ));
6767 ifs.close ();
6868}
@@ -82,7 +82,7 @@ TEST_F(ToolCheckTest, Int)
8282 EXPECT_THAT (output,testing::HasSubstr (" not match" ));
8383 // quit check: quit = false
8484 testing::internal::CaptureStdout ();
85- EXPECT_DEATH (ModuleBase::CHECK_INT (ifs, 80 ), " " );
85+ EXPECT_EXIT (ModuleBase::CHECK_INT (ifs, 80 ), :: testing::ExitedWithCode ( 0 ), " " );
8686 output = testing::internal::GetCapturedStdout ();
8787 EXPECT_THAT (output,testing::HasSubstr (" NOTICE" ));
8888 ifs.close ();
@@ -103,7 +103,7 @@ TEST_F(ToolCheckTest, Double)
103103 EXPECT_THAT (output,testing::HasSubstr (" not match" ));
104104 // quit check
105105 testing::internal::CaptureStdout ();
106- EXPECT_DEATH (ModuleBase::CHECK_DOUBLE (ifs, 0.22998 ), " " );
106+ EXPECT_EXIT (ModuleBase::CHECK_DOUBLE (ifs, 0.22998 ), :: testing::ExitedWithCode ( 0 ), " " );
107107 output = testing::internal::GetCapturedStdout ();
108108 EXPECT_THAT (output,testing::HasSubstr (" NOTICE" ));
109109 ifs.close ();
@@ -124,7 +124,7 @@ TEST_F(ToolCheckTest, String)
124124 EXPECT_THAT (output,testing::HasSubstr (" not match" ));
125125 // quit check
126126 testing::internal::CaptureStdout ();
127- EXPECT_DEATH (ModuleBase::CHECK_STRING (ifs, " scf" ), " " );
127+ EXPECT_EXIT (ModuleBase::CHECK_STRING (ifs, " scf" ), :: testing::ExitedWithCode ( 0 ), " " );
128128 output = testing::internal::GetCapturedStdout ();
129129 EXPECT_THAT (output,testing::HasSubstr (" NOTICE" ));
130130 ifs.close ();
0 commit comments