mirror of
https://github.com/google/googletest.git
synced 2025-01-14 08:27:56 +08:00
Clarify that parameter generator does not evaluate immediately
This aims to avoid confusion as to what kinds of computations are valid inside a parameter generator expression, calling out flags as a supported use case. PiperOrigin-RevId: 483397027 Change-Id: I2d036fae95120d617f30a5566ea7498ce1f9bfb6
This commit is contained in:
parent
e07617d6c6
commit
03597a01ee
@ -1095,6 +1095,11 @@ instantiation of the test suite. The next argument is the name of the test
|
|||||||
pattern, and the last is the
|
pattern, and the last is the
|
||||||
[parameter generator](reference/testing.md#param-generators).
|
[parameter generator](reference/testing.md#param-generators).
|
||||||
|
|
||||||
|
The parameter generator expression is not evaluated until GoogleTest is
|
||||||
|
initialized (via `InitGoogleTest()`). Any prior initialization done in the
|
||||||
|
`main` function will be accessible from the parameter generator, for example,
|
||||||
|
the results of flag parsing.
|
||||||
|
|
||||||
You can instantiate a test pattern more than once, so to distinguish different
|
You can instantiate a test pattern more than once, so to distinguish different
|
||||||
instances of the pattern, the instantiation name is added as a prefix to the
|
instances of the pattern, the instantiation name is added as a prefix to the
|
||||||
actual test suite name. Remember to pick unique prefixes for different
|
actual test suite name. Remember to pick unique prefixes for different
|
||||||
|
Loading…
x
Reference in New Issue
Block a user