Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/googletest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2022-10-24 19:01:26 +0300
committerCopybara-Service <copybara-worker@google.com>2022-10-24 19:02:02 +0300
commit03597a01ee50ed33e9dfd640b249b4be3799d395 (patch)
tree8b151cc061ed4ea2d5643a2398e2ff918ae22be8
parente07617d6c692a96e126f11f85c3e38e46b10b4d0 (diff)
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
-rw-r--r--docs/advanced.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/advanced.md b/docs/advanced.md
index c3c54614..59251706 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -1095,6 +1095,11 @@ instantiation of the test suite. The next argument is the name of the test
pattern, and the last is the
[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
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