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.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc
index f92eb316..b3b8140d 100644
--- a/googletest/test/googletest-param-test-test.cc
+++ b/googletest/test/googletest-param-test-test.cc
@@ -1077,6 +1077,17 @@ class NotUsedTest : public testing::TestWithParam<int> {};
template <typename T>
class NotUsedTypeTest : public testing::Test {};
TYPED_TEST_SUITE_P(NotUsedTypeTest);
+
+// Used but not instantiated, this would fail. but...
+class NotInstantiatedTest : public testing::TestWithParam<int> {};
+// ... we mark is as allowed.
+GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(NotInstantiatedTest);
+
+TEST_P(NotInstantiatedTest, Used) { }
+
+using OtherName = NotInstantiatedTest;
+GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(OtherName);
+TEST_P(OtherName, Used) { }
} // namespace works_here
int main(int argc, char **argv) {