|
|
|
@ -1497,19 +1497,20 @@ class NeverThrown { |
|
|
|
|
gtest_ar_, text, #actual, #expected) \
|
|
|
|
|
.c_str()) |
|
|
|
|
|
|
|
|
|
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ |
|
|
|
|
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
|
|
|
|
if (::testing::internal::AlwaysTrue()) { \
|
|
|
|
|
::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
|
|
|
|
|
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
|
|
|
|
|
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
|
|
|
|
|
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
|
|
|
|
|
} \
|
|
|
|
|
} else \
|
|
|
|
|
GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \
|
|
|
|
|
: fail("Expected: " #statement \
|
|
|
|
|
" doesn't generate new fatal " \
|
|
|
|
|
"failures in the current thread.\n" \
|
|
|
|
|
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ |
|
|
|
|
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
|
|
|
|
if (::testing::internal::AlwaysTrue()) { \
|
|
|
|
|
const ::testing::internal::HasNewFatalFailureHelper \
|
|
|
|
|
gtest_fatal_failure_checker; \
|
|
|
|
|
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
|
|
|
|
|
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
|
|
|
|
|
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
|
|
|
|
|
} \
|
|
|
|
|
} else /* NOLINT */ \
|
|
|
|
|
GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \
|
|
|
|
|
: fail("Expected: " #statement \
|
|
|
|
|
" doesn't generate new fatal " \
|
|
|
|
|
"failures in the current thread.\n" \
|
|
|
|
|
" Actual: it does.") |
|
|
|
|
|
|
|
|
|
// Expands to the name of the class that implements the given test.
|
|
|
|
|