38 #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ 39 #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ 52 #if GTEST_HAS_DEATH_TEST 157 # define ASSERT_EXIT(statement, predicate, regex) \ 158 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) 162 # define EXPECT_EXIT(statement, predicate, regex) \ 163 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) 168 # define ASSERT_DEATH(statement, regex) \ 169 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) 173 # define EXPECT_DEATH(statement, regex) \ 174 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) 181 explicit ExitedWithCode(
int exit_code);
182 bool operator()(
int exit_status)
const;
185 void operator=(
const ExitedWithCode& other);
187 const int exit_code_;
190 # if !GTEST_OS_WINDOWS 195 explicit KilledBySignal(
int signum);
196 bool operator()(
int exit_status)
const;
200 # endif // !GTEST_OS_WINDOWS 247 # define EXPECT_DEBUG_DEATH(statement, regex) \ 248 do { statement; } while (::testing::internal::AlwaysFalse()) 250 # define ASSERT_DEBUG_DEATH(statement, regex) \ 251 do { statement; } while (::testing::internal::AlwaysFalse()) 255 # define EXPECT_DEBUG_DEATH(statement, regex) \ 256 EXPECT_DEATH(statement, regex) 258 # define ASSERT_DEBUG_DEATH(statement, regex) \ 259 ASSERT_DEATH(statement, regex) 261 # endif // NDEBUG for EXPECT_DEBUG_DEATH 262 #endif // GTEST_HAS_DEATH_TEST 269 #if GTEST_HAS_DEATH_TEST 270 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ 271 EXPECT_DEATH(statement, regex) 272 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ 273 ASSERT_DEATH(statement, regex) 275 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ 276 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, ) 277 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ 278 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return) 283 #endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ Definition: gmock-actions.h:49
#define GTEST_API_
Definition: gtest-port.h:662
GTEST_DECLARE_string_(death_test_style)