Lines Matching refs:statement
170 // Asserts that a given `statement` causes the program to exit, with an
173 #define ASSERT_EXIT(statement, predicate, matcher) \
174 GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_FATAL_FAILURE_)
178 #define EXPECT_EXIT(statement, predicate, matcher) \
179 GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_NONFATAL_FAILURE_)
181 // Asserts that a given `statement` causes the program to exit, either by
184 #define ASSERT_DEATH(statement, matcher) \
185 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)
189 #define EXPECT_DEATH(statement, matcher) \
190 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)
257 // // Side-effects here will have an effect after this statement in
264 #define EXPECT_DEBUG_DEATH(statement, regex) \
265 GTEST_EXECUTE_STATEMENT_(statement, regex)
267 #define ASSERT_DEBUG_DEATH(statement, regex) \
268 GTEST_EXECUTE_STATEMENT_(statement, regex)
272 #define EXPECT_DEBUG_DEATH(statement, regex) EXPECT_DEATH(statement, regex)
274 #define ASSERT_DEBUG_DEATH(statement, regex) ASSERT_DEATH(statement, regex)
291 // statement - A statement that a macro such as EXPECT_DEATH would test
293 // statement is compiled but not executed, to ensure that
297 // the output of statement. This parameter has to be
301 // terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
302 // and a return statement for ASSERT_DEATH_IF_SUPPORTED.
308 // statement and regex are compiled (and thus syntactically correct) but
310 // statement from generating an 'unreachable code' warning in case
311 // statement unconditionally returns or throws. The Message constructor at
314 #define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
318 << "Statement '" #statement "' cannot be verified."; \
321 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
326 // EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
327 // ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
332 #define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
333 EXPECT_DEATH(statement, regex)
334 #define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
335 ASSERT_DEATH(statement, regex)
337 #define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
338 GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
339 #define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
340 GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)