Merge pull request #4313 from kimvaleen:main

PiperOrigin-RevId: 549039222
Change-Id: I96bea310beede5ba0ed6160155251ffd9d7a2103
pull/4317/head
Copybara-Service 1 year ago
commit d66ce58510
  1. 2
      googletest/include/gtest/gtest.h
  2. 5
      googletest/include/gtest/internal/gtest-internal.h

@ -2102,7 +2102,7 @@ class GTEST_API_ ScopedTrace {
// Therefore, a SCOPED_TRACE() would (correctly) only affect the // Therefore, a SCOPED_TRACE() would (correctly) only affect the
// assertions in its own thread. // assertions in its own thread.
#define SCOPED_TRACE(message) \ #define SCOPED_TRACE(message) \
::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \ const ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
__FILE__, __LINE__, (message)) __FILE__, __LINE__, (message))
// Compile-time assertion for type equality. // Compile-time assertion for type equality.

@ -1500,12 +1500,13 @@ class NeverThrown {
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \ if (::testing::internal::AlwaysTrue()) { \
::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ const ::testing::internal::HasNewFatalFailureHelper \
gtest_fatal_failure_checker; \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
} \ } \
} else \ } else /* NOLINT */ \
GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \ GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \
: fail("Expected: " #statement \ : fail("Expected: " #statement \
" doesn't generate new fatal " \ " doesn't generate new fatal " \

Loading…
Cancel
Save