X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flogging_unittest.cc;h=600cd06c7fd704a36788f2d82a0463051728a7e6;hb=e209906823b9144e955f9e01fedd90281c6d54c8;hp=e180567d77d71bcf0b2cdf90d30a5a20f6fe9d8d;hpb=f7691955e8289e539ff60aec6e23336ad5149ff0;p=platform%2Fupstream%2Fglog.git diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc index e180567..600cd06 100644 --- a/src/logging_unittest.cc +++ b/src/logging_unittest.cc @@ -272,17 +272,19 @@ void TestLogging(bool check_counts) { LOG(ERROR) << string("foo") << ' '<< j << ' ' << setw(10) << j << " " << setw(1) << hex << j; + LOG(ERROR) << (&LOG(ERROR) && 0) << " nested LOG"; + LogMessage("foo", LogMessage::kNoLogPrefix, GLOG_INFO).stream() << "no prefix"; if (check_counts) { CHECK_EQ(base_num_infos + 14, LogMessage::num_messages(GLOG_INFO)); CHECK_EQ(base_num_warning + 3, LogMessage::num_messages(GLOG_WARNING)); - CHECK_EQ(base_num_errors + 15, LogMessage::num_messages(GLOG_ERROR)); + CHECK_EQ(base_num_errors + 17, LogMessage::num_messages(GLOG_ERROR)); } } static void NoAllocNewHook() { - CHECK(false) << "unexpected new"; + LOG(FATAL) << "unexpected new"; } struct NewHook { @@ -628,14 +630,15 @@ static void GetFiles(const string& pattern, vector* files) { LOG(FATAL) << "No directory separator."; } const string dirname = pattern.substr(0, index + 1); - if (FAILED(handle)) { + if (handle == INVALID_HANDLE_VALUE) { // Finding no files is OK. return; } do { files->push_back(dirname + data.cFileName); } while (FindNextFileA(handle, &data)); - LOG_SYSRESULT(FindClose(handle)); + BOOL result = FindClose(handle); + LOG_SYSRESULT(result); #else # error There is no way to do glob. #endif