From ecc6944fb127be957185731e1dfbfd6eafb02d0e Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 11:12:12 -0400 Subject: [PATCH 1/4] Fixing identation, causes build errors when warnings are treated as errors --- googletest/src/gtest-death-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 564bcd27..22141183 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -238,8 +238,8 @@ static std::string DeathTestThreadWarning(size_t thread_count) { else 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" - << " this is the last message you see before your test times out."; + << " for more explanation and suggested solutions, especially if" + << " this is the last message you see before your test times out."; return msg.GetString(); } # endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA From d5b31df900802ba2651ebd51dfb1a0f83edae860 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 11:33:42 -0400 Subject: [PATCH 2/4] Update gtest-death-test.cc --- googletest/src/gtest-death-test.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 22141183..9735df18 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -233,16 +233,18 @@ static std::string DeathTestThreadWarning(size_t thread_count) { Message msg; msg << "Death tests use fork(), which is unsafe particularly" << " 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."; - else + } else { 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" - << " this is the last message you see before your test times out."; + } + 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" + << " this is the last message you see before your test times out."; 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. static const char kDeathTestLived = 'L'; From f7042937af1b684c02145b0ddc6909e387caa81e Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 11:53:45 -0400 Subject: [PATCH 3/4] Fixing identation, causes build errors when warnings are treated as errors --- googletest/src/gtest-death-test.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 22141183..854bc467 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -233,13 +233,16 @@ static std::string DeathTestThreadWarning(size_t thread_count) { Message msg; msg << "Death tests use fork(), which is unsafe particularly" << " 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."; - else + } else { 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" - << " this is the last message you see before your test times out."; + } + 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" + << " this is the last message you see before your test times out."; return msg.GetString(); } # endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA From 7a79459a663ce98a31fdbb14dea9a750bc285885 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 9 Aug 2018 11:55:48 -0400 Subject: [PATCH 4/4] Fixing identation, causes build errors when warnings are treated as errors --- googletest/src/gtest-death-test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 9735df18..854bc467 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -244,7 +244,8 @@ static std::string DeathTestThreadWarning(size_t thread_count) { << " for more explanation and suggested solutions, especially if" << " this is the last message you see before your test times out."; 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. static const char kDeathTestLived = 'L';