diff options
author | misterg <misterg@google.com> | 2018-08-27 17:54:59 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-08-28 20:53:17 (GMT) |
commit | 1bb76182caee8239b71b9d6d21f479014d37ad5b (patch) | |
tree | 831bb5f2bc560dc6d4bb0e6462544c34a74acf42 /googletest | |
parent | 58f3f1005cffce8a9d005d0361d3471cd9947501 (diff) | |
download | googletest-1bb76182caee8239b71b9d6d21f479014d37ad5b.zip googletest-1bb76182caee8239b71b9d6d21f479014d37ad5b.tar.gz googletest-1bb76182caee8239b71b9d6d21f479014d37ad5b.tar.bz2 |
Googletest export
Code Cleanup
PiperOrigin-RevId: 210393771
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/src/gtest.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index f476044..9796637 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -459,8 +459,6 @@ FilePath GetCurrentExecutableName() { // Returns the output format, or "" for normal printed output. std::string UnitTestOptions::GetOutputFormat() { const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) return std::string(""); - const char* const colon = strchr(gtest_output_flag, ':'); return (colon == NULL) ? std::string(gtest_output_flag) : @@ -469,11 +467,8 @@ std::string UnitTestOptions::GetOutputFormat() { // Returns the name of the requested output file, or the default if none // was explicitly specified. -// FIXME Remove GetAbsolutePathToOutputFile checking gtest_output_flag == NULL std::string UnitTestOptions::GetAbsolutePathToOutputFile() { const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) - return ""; std::string format = GetOutputFormat(); if (format.empty()) @@ -3505,7 +3500,7 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener { // Creates a new XmlUnitTestResultPrinter. XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file) : output_file_(output_file) { - if (output_file_.c_str() == NULL || output_file_.empty()) { + if (output_file_.empty()) { GTEST_LOG_(FATAL) << "XML output file may not be null"; } } |