Merge pull request #1451 from gennadiycivil/master

merges
This commit is contained in:
Gennadiy Civil 2018-02-12 14:33:35 -05:00 committed by GitHub
commit 222607a019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -983,7 +983,6 @@ static int ExecDeathTestChildMain(void* child_arg) {
}
# endif // !GTEST_OS_QNX
# if GTEST_HAS_CLONE
// Two utility routines that together determine the direction the stack
// grows.
// This could be accomplished more elegantly by a single recursive
@ -1008,7 +1007,6 @@ static bool StackGrowsDown() {
StackLowerThanAddress(&dummy, &result);
return result;
}
# endif // GTEST_HAS_CLONE
// Spawns a child process with the same executable as the current process in
// a thread-safe manner and instructs it to run the death test. The

View File

@ -617,7 +617,11 @@ TEST_F(TestForDeathTest, ReturnIsFailure) {
TEST_F(TestForDeathTest, TestExpectDebugDeath) {
int sideeffect = 0;
EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), "death.*DieInDebugElse12")
// Put the regex in a local variable to make sure we don't get an "unused"
// warning in opt mode.
const char* regex = "death.*DieInDebugElse12";
EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), regex)
<< "Must accept a streamed message";
# ifdef NDEBUG