| Index: third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc b/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
|
| index 43cd6d010be703613cd5ffd209dfb06b7000e31b..25bae9b074157cfd911bcf18d546d4245892122e 100644
|
| --- a/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// http://code.google.com/p/protobuf/
|
| +// https://developers.google.com/protocol-buffers/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -31,6 +31,7 @@
|
| // Author: kenton@google.com (Kenton Varda)
|
|
|
| #include <vector>
|
| +#include <google/protobuf/stubs/casts.h>
|
| #include <google/protobuf/stubs/common.h>
|
| #include <google/protobuf/stubs/strutil.h>
|
| #include <google/protobuf/stubs/substitute.h>
|
| @@ -38,10 +39,10 @@
|
| #include <google/protobuf/testing/googletest.h>
|
| #include <gtest/gtest.h>
|
|
|
| -#include "config.h"
|
| -
|
| namespace google {
|
| namespace protobuf {
|
| +using internal::NewCallback;
|
| +using internal::NewPermanentCallback;
|
| namespace {
|
|
|
| // TODO(kenton): More tests.
|
| @@ -94,9 +95,9 @@ TEST(LoggingTest, DefaultLogging) {
|
|
|
| string text = GetCapturedTestStderr();
|
| EXPECT_EQ(
|
| - "[libprotobuf INFO "__FILE__":" + SimpleItoa(line + 1) + "] A message.\n"
|
| - "[libprotobuf WARNING "__FILE__":" + SimpleItoa(line + 2) + "] A warning.\n"
|
| - "[libprotobuf ERROR "__FILE__":" + SimpleItoa(line + 3) + "] An error.\n",
|
| + "[libprotobuf INFO " __FILE__ ":" + SimpleItoa(line + 1) + "] A message.\n"
|
| + "[libprotobuf WARNING " __FILE__ ":" + SimpleItoa(line + 2) + "] A warning.\n"
|
| + "[libprotobuf ERROR " __FILE__ ":" + SimpleItoa(line + 3) + "] An error.\n",
|
| text);
|
| }
|
|
|
| @@ -127,10 +128,10 @@ TEST(LoggingTest, CaptureLogging) {
|
|
|
| ASSERT_EQ(2, captured_messages_.size());
|
| EXPECT_EQ(
|
| - "2 "__FILE__":" + SimpleItoa(start_line + 1) + ": An error.",
|
| + "2 " __FILE__ ":" + SimpleItoa(start_line + 1) + ": An error.",
|
| captured_messages_[0]);
|
| EXPECT_EQ(
|
| - "1 "__FILE__":" + SimpleItoa(start_line + 2) + ": A warning.",
|
| + "1 " __FILE__ ":" + SimpleItoa(start_line + 2) + ": A warning.",
|
| captured_messages_[1]);
|
| }
|
|
|
| @@ -153,10 +154,10 @@ TEST(LoggingTest, SilenceLogging) {
|
|
|
| ASSERT_EQ(2, captured_messages_.size());
|
| EXPECT_EQ(
|
| - "0 "__FILE__":" + SimpleItoa(line1) + ": Visible1",
|
| + "0 " __FILE__ ":" + SimpleItoa(line1) + ": Visible1",
|
| captured_messages_[0]);
|
| EXPECT_EQ(
|
| - "0 "__FILE__":" + SimpleItoa(line2) + ": Visible2",
|
| + "0 " __FILE__ ":" + SimpleItoa(line2) + ": Visible2",
|
| captured_messages_[1]);
|
| }
|
|
|
|
|