Returns the output format, or "" for normal printed output.
| 412 | |
| 413 | // Returns the output format, or "" for normal printed output. |
| 414 | std::string UnitTestOptions::GetOutputFormat() { |
| 415 | const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); |
| 416 | if (gtest_output_flag == NULL) return std::string(""); |
| 417 | |
| 418 | const char* const colon = strchr(gtest_output_flag, ':'); |
| 419 | return (colon == NULL) ? |
| 420 | std::string(gtest_output_flag) : |
| 421 | std::string(gtest_output_flag, colon - gtest_output_flag); |
| 422 | } |
| 423 | |
| 424 | // Returns the name of the requested output file, or the default if none |
| 425 | // was explicitly specified. |