aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/test/googletest-param-test-test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/test/googletest-param-test-test.cc')
-rw-r--r--googletest/test/googletest-param-test-test.cc10
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 b3b8140d..72a48375 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) {