37 #if GTEST_HAS_DEATH_TEST
45 # if GTEST_HAS_EXCEPTIONS
51 TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
55 FAIL() <<
"An exception escaped a death test macro invocation "
56 <<
"with catch_exceptions "
61 class TestException :
public std::exception {
63 virtual const char* what()
const throw() {
return "exceptional message"; }
66 TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
69 "exceptional message");
72 "gtest-death-test_ex_test.cc");
74 # endif // GTEST_HAS_EXCEPTIONS
80 TEST(SehExceptionDeasTest, CatchExceptionsDoesNotInterfere) {
81 EXPECT_DEATH(RaiseException(42, 0
x0, 0, NULL),
"")
82 <<
"with catch_exceptions "
87 #endif // GTEST_HAS_DEATH_TEST
89 int main(
int argc,
char** argv) {