Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
d5b31df9
Unverified
Commit
d5b31df9
authored
Aug 09, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 09, 2018
Browse files
Update gtest-death-test.cc
parent
9faeaded
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
googletest/src/gtest-death-test.cc
googletest/src/gtest-death-test.cc
+9
-7
No files found.
googletest/src/gtest-death-test.cc
View file @
d5b31df9
...
@@ -233,16 +233,18 @@ static std::string DeathTestThreadWarning(size_t thread_count) {
...
@@ -233,16 +233,18 @@ static std::string DeathTestThreadWarning(size_t thread_count) {
Message
msg
;
Message
msg
;
msg
<<
"Death tests use fork(), which is unsafe particularly"
msg
<<
"Death tests use fork(), which is unsafe particularly"
<<
" in a threaded context. For this test, "
<<
GTEST_NAME_
<<
" "
;
<<
" in a threaded context. For this test, "
<<
GTEST_NAME_
<<
" "
;
if
(
thread_count
==
0
)
if
(
thread_count
==
0
)
{
msg
<<
"couldn't detect the number of threads."
;
msg
<<
"couldn't detect the number of threads."
;
else
}
else
{
msg
<<
"detected "
<<
thread_count
<<
" threads."
;
msg
<<
"detected "
<<
thread_count
<<
" threads."
;
msg
<<
" See https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-tests-and-threads"
}
<<
" for more explanation and suggested solutions, especially if"
msg
<<
" See "
<<
" this is the last message you see before your test times out."
;
"https://github.com/google/googletest/blob/master/googletest/docs/"
"advanced.md#death-tests-and-threads"
<<
" for more explanation and suggested solutions, especially if"
<<
" this is the last message you see before your test times out."
;
return
msg
.
GetString
();
return
msg
.
GetString
();
}
}
#
endif
// !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
# endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
// Flag characters for reporting a death test that did not die.
// Flag characters for reporting a death test that did not die.
static
const
char
kDeathTestLived
=
'L'
;
static
const
char
kDeathTestLived
=
'L'
;
...
...
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