Add trace printouts to all unit tests.
Unfortunately, this requires splitting system_wrappers_unittests out of system_wrappers.gyp to avoid a cyclic dependency.
TESTED=ran a few unit tests and observed printouts
Review URL: https://webrtc-codereview.appspot.com/1221006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3711 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/system_wrappers/source/logging_unittest.cc b/webrtc/system_wrappers/source/logging_unittest.cc
index 8d8a580..de790a5 100644
--- a/webrtc/system_wrappers/source/logging_unittest.cc
+++ b/webrtc/system_wrappers/source/logging_unittest.cc
@@ -20,18 +20,16 @@
namespace webrtc {
namespace {
-const size_t kBoilerplateLength = 71;
-
class LoggingTest : public ::testing::Test, public TraceCallback {
public:
virtual void Print(TraceLevel level, const char* msg, int length) {
CriticalSectionScoped cs(crit_.get());
// We test the length here to ensure (with high likelihood) that only our
// traces will be tested.
- if (level_ != kTraceNone &&
- expected_log_.str().size() == length - kBoilerplateLength - 1) {
+ if (level_ != kTraceNone && static_cast<int>(expected_log_.str().size()) ==
+ length - Trace::kBoilerplateLength - 1) {
EXPECT_EQ(level_, level);
- EXPECT_EQ(expected_log_.str(), &msg[kBoilerplateLength]);
+ EXPECT_EQ(expected_log_.str(), &msg[Trace::kBoilerplateLength]);
level_ = kTraceNone;
cv_->Wake();
}