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
253d2bc5
Commit
253d2bc5
authored
Jul 23, 2008
by
shiqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makes the output understandable by VS when compiled by MSVC.
parent
b7587263
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
CONTRIBUTORS
CONTRIBUTORS
+1
-0
gtest.cc
src/gtest.cc
+10
-2
gtest_output_test.py
test/gtest_output_test.py
+3
-2
gtest_output_test_golden_win.txt
test/gtest_output_test_golden_win.txt
+0
-0
No files found.
CONTRIBUTORS
View file @
253d2bc5
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
# here. Please keep the list sorted by first names.
# here. Please keep the list sorted by first names.
Ajay Joshi <jaj@google.com>
Ajay Joshi <jaj@google.com>
Balázs Dán <balazs.dan@gmail.com>
Bharat Mediratta <bharat@menalto.com>
Bharat Mediratta <bharat@menalto.com>
Chandler Carruth <chandlerc@google.com>
Chandler Carruth <chandlerc@google.com>
Chris Prince <cprince@google.com>
Chris Prince <cprince@google.com>
...
...
src/gtest.cc
View file @
253d2bc5
...
@@ -2149,7 +2149,11 @@ static const char * TestPartResultTypeToString(TestPartResultType type) {
...
@@ -2149,7 +2149,11 @@ static const char * TestPartResultTypeToString(TestPartResultType type) {
case
TPRT_NONFATAL_FAILURE
:
case
TPRT_NONFATAL_FAILURE
:
case
TPRT_FATAL_FAILURE
:
case
TPRT_FATAL_FAILURE
:
return
"Failure"
;
#ifdef _MSC_VER
return
"error: "
;
#else
return
"Failure
\n
"
;
#endif
}
}
return
"Unknown result type"
;
return
"Unknown result type"
;
...
@@ -2162,9 +2166,13 @@ static void PrintTestPartResult(
...
@@ -2162,9 +2166,13 @@ static void PrintTestPartResult(
printf
(
"%s"
,
file_name
==
NULL
?
"unknown file"
:
file_name
);
printf
(
"%s"
,
file_name
==
NULL
?
"unknown file"
:
file_name
);
if
(
test_part_result
.
line_number
()
>=
0
)
{
if
(
test_part_result
.
line_number
()
>=
0
)
{
#ifdef _MSC_VER
printf
(
"(%d)"
,
test_part_result
.
line_number
());
#else
printf
(
":%d"
,
test_part_result
.
line_number
());
printf
(
":%d"
,
test_part_result
.
line_number
());
#endif
}
}
printf
(
": %s
\n
"
,
TestPartResultTypeToString
(
test_part_result
.
type
()));
printf
(
": %s"
,
TestPartResultTypeToString
(
test_part_result
.
type
()));
printf
(
"%s
\n
"
,
test_part_result
.
message
());
printf
(
"%s
\n
"
,
test_part_result
.
message
());
fflush
(
stdout
);
fflush
(
stdout
);
}
}
...
...
test/gtest_output_test.py
View file @
253d2bc5
...
@@ -78,11 +78,12 @@ def RemoveLocations(output):
...
@@ -78,11 +78,12 @@ def RemoveLocations(output):
Returns:
Returns:
output with all file location info (in the form of
output with all file location info (in the form of
'DIRECTORY/FILE_NAME:LINE_NUMBER: ') replaced by
'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
'DIRECTORY
\\
FILE_NAME(LINE_NUMBER): ') replaced by
'FILE_NAME:#: '.
'FILE_NAME:#: '.
"""
"""
return
re
.
sub
(
r'.*[/\\](.+)
\:\d+
\: '
,
r'\1:#: '
,
output
)
return
re
.
sub
(
r'.*[/\\](.+)
(\:\d+|\(\d+\))
\: '
,
r'\1:#: '
,
output
)
def
RemoveStackTraces
(
output
):
def
RemoveStackTraces
(
output
):
...
...
test/gtest_output_test_golden_win.txt
View file @
253d2bc5
This diff is collapsed.
Click to expand it.
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