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

Side by Side Diff: webrtc/system_wrappers/source/logging_unittest.cc

Issue 1522053002: Remove unused and rarely used LOG_ macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « webrtc/system_wrappers/include/logging.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 { 65 {
66 CriticalSectionScoped cs(crit_.get()); 66 CriticalSectionScoped cs(crit_.get());
67 level_ = kTraceWarning; 67 level_ = kTraceWarning;
68 std::string msg = "Important message"; 68 std::string msg = "Important message";
69 expected_log_ << "(logging_unittest.cc:" << __LINE__ + 1 << "): " << msg; 69 expected_log_ << "(logging_unittest.cc:" << __LINE__ + 1 << "): " << msg;
70 LOG(LS_WARNING) << msg; 70 LOG(LS_WARNING) << msg;
71 cv_->SleepCS(*crit_.get(), 2000); 71 cv_->SleepCS(*crit_.get(), 2000);
72 } 72 }
73 } 73 }
74 74
75 TEST_F(LoggingTest, LogFunctionError) {
76 {
77 CriticalSectionScoped cs(crit_.get());
78 int bar = 42;
79 int baz = 99;
80 level_ = kTraceError;
81 expected_log_ << "(logging_unittest.cc:" << __LINE__ + 2
82 << "): Foo failed: bar=" << bar << ", baz=" << baz;
83 LOG_FERR2(LS_ERROR, Foo, bar, baz);
84 cv_->SleepCS(*crit_.get(), 2000);
85 }
86 }
87
88 } // namespace 75 } // namespace
89 } // namespace webrtc 76 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/include/logging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698