diff options
author | Gennadiy Civil <misterg@google.com> | 2018-02-13 19:56:05 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-02-13 19:56:05 (GMT) |
commit | 09581b38523a0598d645fb801c31c9baead5d36f (patch) | |
tree | f3b34054e7c39b6796ba2c5ed1c1c560f8f0c336 /googletest/src/gtest.cc | |
parent | 069724197c03e56c0197b80ace8b97187d27c45d (diff) | |
download | googletest-09581b38523a0598d645fb801c31c9baead5d36f.zip googletest-09581b38523a0598d645fb801c31c9baead5d36f.tar.gz googletest-09581b38523a0598d645fb801c31c9baead5d36f.tar.bz2 |
cleanup/merges
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r-- | googletest/src/gtest.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index ada5849..7afa5a9 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -2571,12 +2571,10 @@ void ReportInvalidTestCaseType(const char* test_case_name, << "probably rename one of the classes to put the tests into different\n" << "test cases."; - GTEST_LOG_(ERROR) - << FormatFileLocation(code_location.file.c_str(), - code_location.line) - << " " << errors.GetString(); + GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(), + code_location.line) + << " " << errors.GetString(); } - } // namespace internal namespace { @@ -2898,7 +2896,7 @@ static int GetBitOffset(WORD color_mask) { if (color_mask == 0) return 0; int bitOffset = 0; - while((color_mask & 1) == 0) { + while ((color_mask & 1) == 0) { color_mask >>= 1; ++bitOffset; } @@ -3106,7 +3104,6 @@ void PrettyUnitTestResultPrinter::OnTestIterationStart( "Note: Randomizing tests' orders with a seed of %d .\n", unit_test.random_seed()); } - ColoredPrintf(COLOR_GREEN, "[==========] "); printf("Running %s from %s.\n", FormatTestCount(unit_test.test_to_run_count()).c_str(), @@ -3473,8 +3470,8 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, // 3. To interpret the meaning of errno in a thread-safe way, // we need the strerror_r() function, which is not available on // Windows. - GTEST_LOG_(FATAL) << "Unable to open file \"" - << output_file_ << "\""; + + GTEST_LOG_(FATAL) << "Unable to open file \"" << output_file_ << "\""; } std::stringstream stream; PrintXmlUnitTest(&stream, unit_test); @@ -3773,6 +3770,7 @@ std::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes( // End XmlUnitTestResultPrinter + #if GTEST_CAN_STREAM_RESULTS_ // Checks if str contains '=', '&', '%' or '\n' characters. If yes, @@ -4401,8 +4399,7 @@ void UnitTestImpl::ConfigureXmlOutput() { UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); } else if (output_format != "") { GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \"" - << output_format - << "\" ignored."; + << output_format << "\" ignored."; } } @@ -4417,8 +4414,7 @@ void UnitTestImpl::ConfigureStreamingOutput() { listeners()->Append(new StreamingListener(target.substr(0, pos), target.substr(pos+1))); } else { - GTEST_LOG_(WARNING) << "unrecognized streaming target \"" - << target + GTEST_LOG_(WARNING) << "unrecognized streaming target \"" << target << "\" ignored."; } } @@ -5255,8 +5251,7 @@ static bool ParseGoogleTestFlag(const char* const arg) { static void LoadFlagsFromFile(const std::string& path) { FILE* flagfile = posix::FOpen(path.c_str(), "r"); if (!flagfile) { - GTEST_LOG_(FATAL) << "Unable to open file \"" - << GTEST_FLAG(flagfile) + GTEST_LOG_(FATAL) << "Unable to open file \"" << GTEST_FLAG(flagfile) << "\""; } std::string contents(ReadEntireFile(flagfile)); @@ -5387,8 +5382,9 @@ void InitGoogleTest(int* argc, wchar_t** argv) { std::string TempDir() { #if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_) - return GTEST_CUSTOM_TEMPDIR_FUNCTION_(); + return GTEST_CUSTOM_TEMPDIR_FUNCTION_(); #endif + #if GTEST_OS_WINDOWS_MOBILE return "\\temp\\"; #elif GTEST_OS_WINDOWS |