37#if GTEST_HAS_DEATH_TEST
45# if GTEST_HAS_EXCEPTIONS
51TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
55 FAIL() <<
"An exception escaped a death test macro invocation "
56 <<
"with catch_exceptions "
57 << (testing::GTEST_FLAG(catch_exceptions) ?
"enabled" :
"disabled");
61class TestException :
public std::exception {
63 virtual const char* what()
const throw() {
return "exceptional message"; }
66TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
69 "exceptional message");
72 "gtest-death-test_ex_test.cc");
80TEST(SehExceptionDeasTest, CatchExceptionsDoesNotInterfere) {
81 EXPECT_DEATH(RaiseException(42, 0x0, 0, NULL),
"")
82 <<
"with catch_exceptions "
83 << (testing::GTEST_FLAG(catch_exceptions) ?
"enabled" :
"disabled");
91 testing::GTEST_FLAG(catch_exceptions) = GTEST_ENABLE_CATCH_EXCEPTIONS_ != 0;
#define EXPECT_NONFATAL_FAILURE(statement, substr)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define TEST(test_case_name, test_name)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)