Skip to content

Commit

Permalink
Use FAIL() in GTEST_SKIP() documentation
Browse files Browse the repository at this point in the history
This replaces EXPECT_EQ(0, 1) which would fail if hit.

PiperOrigin-RevId: 690491467
Change-Id: Ieff4e616348254f29200e0ba1d9a6900a2eea130
  • Loading branch information
pbos authored and copybara-github committed Oct 28, 2024
1 parent df1544b commit 5ed2186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
```

Expand Down

0 comments on commit 5ed2186

Please # to comment.