Skip to content

Commit 555486f

Browse files
Abseil Teamcopybara-github
Abseil Team
authored andcommitted
Rephrase the description of TEST_F() arguments for clarity.
PiperOrigin-RevId: 512937964 Change-Id: Ifa6369a80dc7d8efe60511417496d58317cfc28d
1 parent 8aa75fa commit 555486f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/primer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ When using a fixture, use `TEST_F()` instead of `TEST()` as it allows you to
227227
access objects and subroutines in the test fixture:
228228

229229
```c++
230-
TEST_F(TestFixtureName, TestName) {
230+
TEST_F(TestFixtureClassName, TestName) {
231231
... test body ...
232232
}
233233
```
234234
235-
Like `TEST()`, the first argument is the test suite name, but for `TEST_F()`
236-
this must be the name of the test fixture class. You've probably guessed: `_F`
237-
is for fixture.
235+
Unlike `TEST()`, in `TEST_F()` the first argument must be the name of the test
236+
fixture class. (`_F` stands for "Fixture"). No test suite name is specified for
237+
this macro.
238238
239239
Unfortunately, the C++ macro system does not allow us to create a single macro
240240
that can handle both types of tests. Using the wrong macro causes a compiler

0 commit comments

Comments
 (0)