summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2022-05-12 13:57:18 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-05-12 13:58:02 (GMT)
commit8a011b8a38b7748d1a3eaf1e99c8b859d754d060 (patch)
treeafa45f20494b3da92c571ac40e5fa68eb0c9fac0
parentcbca6bc3957b28b8062f20b65f9349d94a4bf0b3 (diff)
downloadgoogletest-8a011b8a38b7748d1a3eaf1e99c8b859d754d060.zip
googletest-8a011b8a38b7748d1a3eaf1e99c8b859d754d060.tar.gz
googletest-8a011b8a38b7748d1a3eaf1e99c8b859d754d060.tar.bz2
Add clarifying comments about when to use EXPECT_NONFATAL_FAILURE vs. EXPECT_FATAL_FAILURE.
PiperOrigin-RevId: 448237839 Change-Id: Id6242f278912f8c47cf19e3ea8c061f8b18ba832
-rw-r--r--googletest/include/gtest/gtest-spi.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/googletest/include/gtest/gtest-spi.h b/googletest/include/gtest/gtest-spi.h
index 9fdfbe7..bec8c48 100644
--- a/googletest/include/gtest/gtest-spi.h
+++ b/googletest/include/gtest/gtest-spi.h
@@ -121,7 +121,8 @@ class GTEST_API_ SingleFailureChecker {
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251
// A set of macros for testing Google Test assertions or code that's expected
-// to generate Google Test fatal failures. It verifies that the given
+// to generate Google Test fatal failures (e.g. a failure from an ASSERT_EQ, but
+// not a non-fatal failure, as from EXPECT_EQ). It verifies that the given
// statement will cause exactly one fatal Google Test failure with 'substr'
// being part of the failure message.
//
@@ -179,9 +180,10 @@ GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251
} while (::testing::internal::AlwaysFalse())
// A macro for testing Google Test assertions or code that's expected to
-// generate Google Test non-fatal failures. It asserts that the given
-// statement will cause exactly one non-fatal Google Test failure with 'substr'
-// being part of the failure message.
+// generate Google Test non-fatal failures (e.g. a failure from an EXPECT_EQ,
+// but not from an ASSERT_EQ). It asserts that the given statement will cause
+// exactly one non-fatal Google Test failure with 'substr' being part of the
+// failure message.
//
// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only
// affects and considers failures generated in the current thread and