Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: webrtc/system_wrappers/source/logging_unittest.cc

Issue 2796353002: Delete system_wrappers logging facility. (Closed)
Patch Set: Rebase, and update include in aec3 code. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/system_wrappers/source/logging.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/logging_unittest.cc
diff --git a/webrtc/system_wrappers/source/logging_unittest.cc b/webrtc/system_wrappers/source/logging_unittest.cc
deleted file mode 100644
index 6be4da10e1f656038ddd46edf88b762e1725de8a..0000000000000000000000000000000000000000
--- a/webrtc/system_wrappers/source/logging_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/system_wrappers/include/logging.h"
-
-#include "webrtc/base/arraysize.h"
-#include "webrtc/base/event.h"
-#include "webrtc/system_wrappers/include/trace.h"
-#include "webrtc/test/gtest.h"
-
-namespace webrtc {
-namespace {
-const char kTestLogString[] = "Incredibly important test message!(?)";
-const int kTestLevel = kTraceWarning;
-
-class LoggingTestCallback : public TraceCallback {
- public:
- LoggingTestCallback(rtc::Event* event) : event_(event) {}
-
- private:
- void Print(TraceLevel level, const char* msg, int length) override {
- if (static_cast<size_t>(length) < arraysize(kTestLogString) ||
- level != kTestLevel) {
- return;
- }
-
- std::string msg_str(msg, length);
- if (msg_str.find(kTestLogString) != std::string::npos)
- event_->Set();
- }
-
- rtc::Event* const event_;
-};
-
-} // namespace
-
-TEST(LoggingTest, LogStream) {
- Trace::CreateTrace();
-
- rtc::Event event(false, false);
- LoggingTestCallback callback(&event);
- Trace::SetTraceCallback(&callback);
-
- LOG(LS_WARNING) << kTestLogString;
- EXPECT_TRUE(event.Wait(2000));
-
- Trace::SetTraceCallback(nullptr);
- Trace::ReturnTrace();
-}
-} // namespace webrtc
« no previous file with comments | « webrtc/system_wrappers/source/logging.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698