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/include/gtest/gtest-param-test.h | |
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/include/gtest/gtest-param-test.h')
-rw-r--r-- | googletest/include/gtest/gtest-param-test.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h index 70593da..37417a9 100644 --- a/googletest/include/gtest/gtest-param-test.h +++ b/googletest/include/gtest/gtest-param-test.h @@ -491,6 +491,13 @@ internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) { >est_##prefix##test_suite_name##_EvalGenerateName_, \ __FILE__, __LINE__) + +// Allow Marking a Parameterized test class as not needing to be instantiated. +#define GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(T) \ + namespace gtest_do_not_use_outside_namespace_scope {} \ + static const ::testing::internal::MarkAsIgnored gtest_allow_ignore_##T( \ + GTEST_STRINGIFY_(T)) + // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ #define INSTANTIATE_TEST_CASE_P \ |