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
302a41c9
Commit
302a41c9
authored
Sep 16, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small code simplification (by Vlad Losev).
parent
866f4a94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
gtest-death-test.cc
src/gtest-death-test.cc
+3
-4
No files found.
src/gtest-death-test.cc
View file @
302a41c9
...
@@ -269,12 +269,11 @@ static void FailFromInternalError(int fd) {
...
@@ -269,12 +269,11 @@ static void FailFromInternalError(int fd) {
}
while
(
num_read
==
-
1
&&
errno
==
EINTR
);
}
while
(
num_read
==
-
1
&&
errno
==
EINTR
);
if
(
num_read
==
0
)
{
if
(
num_read
==
0
)
{
GTEST_LOG_
(
FATAL
)
<<
error
.
GetString
()
.
c_str
()
;
GTEST_LOG_
(
FATAL
)
<<
error
.
GetString
();
}
else
{
}
else
{
const
int
last_error
=
errno
;
const
int
last_error
=
errno
;
const
String
message
=
GetLastErrnoDescription
();
GTEST_LOG_
(
FATAL
)
<<
"Error while reading death test internal: "
GTEST_LOG_
(
FATAL
)
<<
"Error while reading death test internal: "
<<
message
.
c_str
()
<<
" ["
<<
last_error
<<
"]"
;
<<
GetLastErrnoDescription
()
<<
" ["
<<
last_error
<<
"]"
;
}
}
}
}
...
@@ -402,7 +401,7 @@ void DeathTestImpl::ReadAndInterpretStatusByte() {
...
@@ -402,7 +401,7 @@ void DeathTestImpl::ReadAndInterpretStatusByte() {
}
}
}
else
{
}
else
{
GTEST_LOG_
(
FATAL
)
<<
"Read from death test child process failed: "
GTEST_LOG_
(
FATAL
)
<<
"Read from death test child process failed: "
<<
GetLastErrnoDescription
()
.
c_str
()
;
<<
GetLastErrnoDescription
();
}
}
GTEST_DEATH_TEST_CHECK_SYSCALL_
(
posix
::
Close
(
read_fd
()));
GTEST_DEATH_TEST_CHECK_SYSCALL_
(
posix
::
Close
(
read_fd
()));
set_read_fd
(
-
1
);
set_read_fd
(
-
1
);
...
...
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