| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |