summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Boström <pbos@google.com>2024-10-28 06:56:39 (GMT)
committerCopybara-Service <copybara-worker@google.com>2024-10-28 06:57:15 (GMT)
commit5ed21863955149a5a877a53d7d5045b6919090ed (patch)
tree6eb2afedc1612a3af55e55f7f6bb3f0accf35e51
parentdf1544bcee0c7ce35cd5ea0b3eb8cc81855a4140 (diff)
downloadgoogletest-5ed21863955149a5a877a53d7d5045b6919090ed.zip
googletest-5ed21863955149a5a877a53d7d5045b6919090ed.tar.gz
googletest-5ed21863955149a5a877a53d7d5045b6919090ed.tar.bz2
Use FAIL() in GTEST_SKIP() documentation
This replaces EXPECT_EQ(0, 1) which would fail if hit. PiperOrigin-RevId: 690491467 Change-Id: Ieff4e616348254f29200e0ba1d9a6900a2eea130
-rw-r--r--docs/advanced.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/advanced.md b/docs/advanced.md
index 240588a..7e998cc 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -286,7 +286,7 @@ For example:
```c++
TEST(SkipTest, DoesSkip) {
GTEST_SKIP() << "Skipping single test";
- EXPECT_EQ(0, 1); // Won't fail; it won't be executed
+ FAIL(); // Won't fail; it won't be executed
}
class SkipFixture : public ::testing::Test {
@@ -298,7 +298,7 @@ class SkipFixture : public ::testing::Test {
// Tests for SkipFixture won't be executed.
TEST_F(SkipFixture, SkipsOneTest) {
- EXPECT_EQ(5, 7); // Won't fail
+ FAIL(); // Won't fail; it won't be executed
}
```