38 #if GTEST_HAS_TYPED_TEST_P
42 static const char* SkipSpaces(
const char*
str) {
48 static std::vector<std::string> SplitIntoTestNames(
const char* src) {
49 std::vector<std::string> name_vec;
50 src = SkipSpaces(src);
51 for (; src != NULL; src = SkipComma(src)) {
60 const char* TypedTestCasePState::VerifyRegisteredTestNames(
61 const char*
file,
int line,
const char* registered_tests) {
62 typedef RegisteredTestsMap::const_iterator RegisteredTestIter;
65 std::vector<std::string> name_vec = SplitIntoTestNames(registered_tests);
69 std::set<std::string> tests;
70 for (std::vector<std::string>::const_iterator name_it = name_vec.begin();
71 name_it != name_vec.end(); ++name_it) {
73 if (tests.count(name) != 0) {
74 errors <<
"Test " << name <<
" is listed more than once.\n";
79 for (RegisteredTestIter
it = registered_tests_.begin();
80 it != registered_tests_.end();
82 if (name ==
it->first) {
91 errors <<
"No test named " << name
92 <<
" can be found in this test case.\n";
96 for (RegisteredTestIter
it = registered_tests_.begin();
97 it != registered_tests_.end();
99 if (tests.count(
it->first) == 0) {
100 errors <<
"You forgot to list test " <<
it->first <<
".\n";
104 const std::string& errors_str = errors.GetString();
105 if (errors_str !=
"") {
112 return registered_tests;
115 #endif // GTEST_HAS_TYPED_TEST_P