| 7398 | |
| 7399 | #if GTEST_USE_OWN_FLAGFILE_FLAG_ |
| 7400 | static void LoadFlagsFromFile(const std::string& path) { |
| 7401 | FILE* flagfile = posix::FOpen(path.c_str(), "r"); |
| 7402 | if (!flagfile) { |
| 7403 | GTEST_LOG_(FATAL) << "Unable to open file \"" << GTEST_FLAG(flagfile) |
| 7404 | << "\""; |
| 7405 | } |
| 7406 | std::string contents(ReadEntireFile(flagfile)); |
| 7407 | posix::FClose(flagfile); |
| 7408 | std::vector<std::string> lines; |
| 7409 | SplitString(contents, '\n', &lines); |
| 7410 | for (size_t i = 0; i < lines.size(); ++i) { |
| 7411 | if (lines[i].empty()) |
| 7412 | continue; |
| 7413 | if (!ParseGoogleTestFlag(lines[i].c_str())) |
| 7414 | g_help_flag = true; |
| 7415 | } |
| 7416 | } |
| 7417 | #endif // GTEST_USE_OWN_FLAGFILE_FLAG_ |
| 7418 | |
| 7419 | // Parses the command line for Google Test flags, without initializing |
no test coverage detected