summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-08-27 13:54:59 -0400
committerGennadiy Civil <misterg@google.com>2018-08-28 16:53:17 -0400
commit1bb76182caee8239b71b9d6d21f479014d37ad5b (patch)
tree831bb5f2bc560dc6d4bb0e6462544c34a74acf42 /googletest/src
parent58f3f1005cffce8a9d005d0361d3471cd9947501 (diff)
downloadgoogletest-1bb76182caee8239b71b9d6d21f479014d37ad5b.tar.gz
googletest-1bb76182caee8239b71b9d6d21f479014d37ad5b.zip
Googletest export
Code Cleanup PiperOrigin-RevId: 210393771
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index f476044b..97966377 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";
}
}
OpenPOWER on IntegriCloud