diff options
author | Abseil Team <absl-team@google.com> | 2020-01-14 05:41:46 (GMT) |
---|---|---|
committer | vslashg <gfalcon@google.com> | 2020-01-16 18:55:45 (GMT) |
commit | 0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa (patch) | |
tree | 78c316c82a0281387d5b1959eb6cafcd68848c0b /googletest/docs | |
parent | ed16134fb31382fd41e8fe513a0e9e940d04cd31 (diff) | |
download | googletest-0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa.zip googletest-0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa.tar.gz googletest-0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa.tar.bz2 |
Googletest export
Add GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST to mark a paramaterized test as allowed to be un-instantiated.
This allows test suites, that are defined in libraries and, for other reasons, get linked in (which should probably be avoided, but isn't always possible) to be marked as allowed to go uninstantiated.
This can also be used to grandfather existing issues and expedite adoption of the checks with regards to new cases before they can be fixed.
PiperOrigin-RevId: 289581573
Diffstat (limited to 'googletest/docs')
-rw-r--r-- | googletest/docs/advanced.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index 10af769..5631e8e 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -1377,6 +1377,17 @@ function scope. NOTE: Don't forget this step! If you do your test will silently pass, but none of its suites will ever run! +There is work in progress to make omitting `INSTANTIATE_TEST_SUITE_P` show up +under the `GoogleTestVerification` test suite and to then make that an error. +If you have a test suite where that omission is not an error, for example it is +in a library that may be linked in for other reason or where the list of test +cases is dynamic and may be empty, then this check can be suppressed by tagging +the test suite: + +```c++ +GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(FooTest); +``` + To distinguish different instances of the pattern (yes, you can instantiate it more than once), the first argument to `INSTANTIATE_TEST_SUITE_P` is a prefix that will be added to the actual test suite name. Remember to pick unique |