| 7015 | // if the test suite hasn't been registered; otherwise aborts the |
| 7016 | // program. |
| 7017 | bool AddTestName(const char* file, int line, const char* case_name, |
| 7018 | const char* test_name) { |
| 7019 | if (registered_) { |
| 7020 | fprintf(stderr, |
| 7021 | "%s Test %s must be defined before " |
| 7022 | "REGISTER_TYPED_TEST_SUITE_P(%s, ...).\n", |
| 7023 | FormatFileLocation(file, line).c_str(), test_name, case_name); |
| 7024 | fflush(stderr); |
| 7025 | posix::Abort(); |
| 7026 | } |
| 7027 | registered_tests_.insert( |
| 7028 | ::std::make_pair(test_name, CodeLocation(file, line))); |
| 7029 | return true; |
| 7030 | } |
| 7031 | |
| 7032 | bool TestExists(const std::string& test_name) const { |
| 7033 | return registered_tests_.count(test_name) > 0; |
nothing calls this directly
no test coverage detected