diff options
author | Abseil Team <absl-team@google.com> | 2020-01-14 19:56:23 (GMT) |
---|---|---|
committer | vslashg <gfalcon@google.com> | 2020-01-16 18:56:04 (GMT) |
commit | 3e79d366e380ec85b7de9409211b184bc8529655 (patch) | |
tree | faab3a533deda76d3795cbf4702744abfba07111 /googletest/test/googletest-param-test-test.cc | |
parent | 7a8591e6e4e206b748feb052f620c45278e686d0 (diff) | |
download | googletest-3e79d366e380ec85b7de9409211b184bc8529655.zip googletest-3e79d366e380ec85b7de9409211b184bc8529655.tar.gz googletest-3e79d366e380ec85b7de9409211b184bc8529655.tar.bz2 |
Googletest export
Wire up things to support marking a type paramaterized test as allowed to be un-instantiated.
PiperOrigin-RevId: 289699939
Diffstat (limited to 'googletest/test/googletest-param-test-test.cc')
-rw-r--r-- | googletest/test/googletest-param-test-test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index b3b8140..72a4837 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -1088,6 +1088,16 @@ TEST_P(NotInstantiatedTest, Used) { } using OtherName = NotInstantiatedTest; GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(OtherName); TEST_P(OtherName, Used) { } + +// Used but not instantiated, this would fail. but... +template <typename T> +class NotInstantiatedTypeTest : public testing::Test {}; +TYPED_TEST_SUITE_P(NotInstantiatedTypeTest); +// ... we mark is as allowed. +GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(NotInstantiatedTypeTest); + +TYPED_TEST_P(NotInstantiatedTypeTest, Used) { } +REGISTER_TYPED_TEST_SUITE_P(NotInstantiatedTypeTest, Used); } // namespace works_here int main(int argc, char **argv) { |