diff options
author | Abseil Team <absl-team@google.com> | 2023-02-28 16:16:34 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-28 16:17:16 (GMT) |
commit | 555486f408ab4906118eddf11c856da7f8690f14 (patch) | |
tree | 67fda5d84d2560a0a848d04cda15b6241b14892d /docs | |
parent | 8aa75fa7712d04185c974d535cd6e678a253e9fa (diff) | |
download | googletest-555486f408ab4906118eddf11c856da7f8690f14.zip googletest-555486f408ab4906118eddf11c856da7f8690f14.tar.gz googletest-555486f408ab4906118eddf11c856da7f8690f14.tar.bz2 |
Rephrase the description of TEST_F() arguments for clarity.
PiperOrigin-RevId: 512937964
Change-Id: Ifa6369a80dc7d8efe60511417496d58317cfc28d
Diffstat (limited to 'docs')
-rw-r--r-- | docs/primer.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/primer.md b/docs/primer.md index 80c2d0a..d559fe8 100644 --- a/docs/primer.md +++ b/docs/primer.md @@ -227,14 +227,14 @@ When using a fixture, use `TEST_F()` instead of `TEST()` as it allows you to access objects and subroutines in the test fixture: ```c++ -TEST_F(TestFixtureName, TestName) { +TEST_F(TestFixtureClassName, TestName) { ... test body ... } ``` -Like `TEST()`, the first argument is the test suite name, but for `TEST_F()` -this must be the name of the test fixture class. You've probably guessed: `_F` -is for fixture. +Unlike `TEST()`, in `TEST_F()` the first argument must be the name of the test +fixture class. (`_F` stands for "Fixture"). No test suite name is specified for +this macro. Unfortunately, the C++ macro system does not allow us to create a single macro that can handle both types of tests. Using the wrong macro causes a compiler |