aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r--googletest/src/gtest.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 1abc664f..8e68c04e 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -515,8 +515,10 @@ void TypeParameterizedTestSuiteRegistry::RegisterInstantiation(
}
void TypeParameterizedTestSuiteRegistry::CheckForInstantiations() {
+ const auto& ignored = *GetIgnoredParameterizedTestSuites();
for (const auto& testcase : suites_) {
if (testcase.second.instantiated) continue;
+ if (ignored.find(testcase.first) != ignored.end()) continue;
std::string message =
"Type paramaterized test suite " + testcase.first +
@@ -526,7 +528,12 @@ void TypeParameterizedTestSuiteRegistry::CheckForInstantiations() {
"Ideally, TYPED_TEST_P definitions should only ever be included as "
"part of binaries that intend to use them. (As opposed to, for "
"example, being placed in a library that may be linked in to get other "
- "utilities.)";
+ "utilities.)"
+ "\n\n"
+ "To suppress this error for this test suite, insert the following line "
+ "(in a non-header) in the namespace it is definedin in:"
+ "\n\n"
+ "GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST(" + testcase.first + ");";
std::string full_name =
"UninstantiatedTypeParamaterizedTestSuite<" + testcase.first + ">";