Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
1bb76182
Commit
1bb76182
authored
Aug 27, 2018
by
misterg
Committed by
Gennadiy Civil
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Code Cleanup PiperOrigin-RevId: 210393771
parent
58f3f100
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
gtest.cc
googletest/src/gtest.cc
+1
-6
No files found.
googletest/src/gtest.cc
View file @
1bb76182
...
@@ -459,8 +459,6 @@ FilePath GetCurrentExecutableName() {
...
@@ -459,8 +459,6 @@ FilePath GetCurrentExecutableName() {
// Returns the output format, or "" for normal printed output.
// Returns the output format, or "" for normal printed output.
std
::
string
UnitTestOptions
::
GetOutputFormat
()
{
std
::
string
UnitTestOptions
::
GetOutputFormat
()
{
const
char
*
const
gtest_output_flag
=
GTEST_FLAG
(
output
).
c_str
();
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
,
':'
);
const
char
*
const
colon
=
strchr
(
gtest_output_flag
,
':'
);
return
(
colon
==
NULL
)
?
return
(
colon
==
NULL
)
?
std
::
string
(
gtest_output_flag
)
:
std
::
string
(
gtest_output_flag
)
:
...
@@ -469,11 +467,8 @@ std::string UnitTestOptions::GetOutputFormat() {
...
@@ -469,11 +467,8 @@ std::string UnitTestOptions::GetOutputFormat() {
// Returns the name of the requested output file, or the default if none
// Returns the name of the requested output file, or the default if none
// was explicitly specified.
// was explicitly specified.
// FIXME Remove GetAbsolutePathToOutputFile checking gtest_output_flag == NULL
std
::
string
UnitTestOptions
::
GetAbsolutePathToOutputFile
()
{
std
::
string
UnitTestOptions
::
GetAbsolutePathToOutputFile
()
{
const
char
*
const
gtest_output_flag
=
GTEST_FLAG
(
output
).
c_str
();
const
char
*
const
gtest_output_flag
=
GTEST_FLAG
(
output
).
c_str
();
if
(
gtest_output_flag
==
NULL
)
return
""
;
std
::
string
format
=
GetOutputFormat
();
std
::
string
format
=
GetOutputFormat
();
if
(
format
.
empty
())
if
(
format
.
empty
())
...
@@ -3505,7 +3500,7 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener {
...
@@ -3505,7 +3500,7 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener {
// Creates a new XmlUnitTestResultPrinter.
// Creates a new XmlUnitTestResultPrinter.
XmlUnitTestResultPrinter
::
XmlUnitTestResultPrinter
(
const
char
*
output_file
)
XmlUnitTestResultPrinter
::
XmlUnitTestResultPrinter
(
const
char
*
output_file
)
:
output_file_
(
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"
;
GTEST_LOG_
(
FATAL
)
<<
"XML output file may not be null"
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment