32 #include "gtest/gtest-typed-test.h" 33 #include "gtest/gtest.h" 38 #if GTEST_HAS_TYPED_TEST_P 42 static const char* SkipSpaces(
const char* str) {
51 const char* TypedTestCasePState::VerifyRegisteredTestNames(
52 const char* file,
int line,
const char* registered_tests) {
53 typedef ::std::set<const char*>::const_iterator DefinedTestIter;
58 registered_tests = SkipSpaces(registered_tests);
61 ::std::set<std::string> tests;
62 for (
const char* names = registered_tests; names != NULL;
63 names = SkipComma(names)) {
65 if (tests.count(name) != 0) {
66 errors <<
"Test " << name <<
" is listed more than once.\n";
71 for (DefinedTestIter it = defined_test_names_.begin();
72 it != defined_test_names_.end();
83 errors <<
"No test named " << name
84 <<
" can be found in this test case.\n";
88 for (DefinedTestIter it = defined_test_names_.begin();
89 it != defined_test_names_.end();
91 if (tests.count(*it) == 0) {
92 errors <<
"You forgot to list test " << *it <<
".\n";
97 if (errors_str !=
"") {
104 return registered_tests;
107 #endif // GTEST_HAS_TYPED_TEST_P
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)