mirror of
https://github.com/google/googletest.git
synced 2024-12-26 01:30:49 +08:00
Use FAIL() in GTEST_SKIP() documentation
This replaces EXPECT_EQ(0, 1) which would fail if hit. PiperOrigin-RevId: 690491467 Change-Id: Ieff4e616348254f29200e0ba1d9a6900a2eea130
This commit is contained in:
parent
df1544bcee
commit
5ed2186395
@ -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
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user