36 #if GTEST_HAS_DEATH_TEST 44 # if GTEST_HAS_EXCEPTIONS 50 TEST(CxxExceptionDeathTest, ExceptionIsFailure) {
54 FAIL() <<
"An exception escaped a death test macro invocation " 55 <<
"with catch_exceptions " 60 class TestException :
public std::exception {
62 const char* what() const noexcept
override {
return "exceptional message"; }
65 TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
68 "exceptional message");
73 # endif // GTEST_HAS_EXCEPTIONS 79 TEST(SehExceptionDeasTest, CatchExceptionsDoesNotInterfere) {
80 EXPECT_DEATH(RaiseException(42, 0x0, 0, NULL),
"")
81 <<
"with catch_exceptions " 86 #endif // GTEST_HAS_DEATH_TEST 88 int main(
int argc,
char** argv) {
#define EXPECT_NONFATAL_FAILURE(statement, substr)
#define TEST(test_suite_name, test_name)
int main(int argc, char **argv)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
GTEST_API_ void InitGoogleTest(int *argc, char **argv)