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

Unified Diff: third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 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
Index: third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc
diff --git a/third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc b/third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc
index ac72ddcdbe31f6b7ed28d53b0bea614b3135c876..1fc3816e16c57b2dbaa50c6a86ccc18c4a1e76e0 100644
--- a/third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc
+++ b/third_party/protobuf/src/google/protobuf/descriptor_database_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
@@ -35,6 +35,10 @@
// This file makes extensive use of RFC 3092. :)
#include <algorithm>
+#include <memory>
+#ifndef _SHARED_PTR_H
+#include <google/protobuf/stubs/shared_ptr.h>
+#endif
#include <google/protobuf/descriptor_database.h>
#include <google/protobuf/descriptor.h>
@@ -42,7 +46,9 @@
#include <google/protobuf/text_format.h>
#include <google/protobuf/stubs/strutil.h>
+#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/scoped_ptr.h>
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
@@ -175,7 +181,7 @@ class DescriptorDatabaseTest
EXPECT_FALSE(test_case_->AddToDatabase(file_proto));
}
- scoped_ptr<DescriptorDatabaseTestCase> test_case_;
+ google::protobuf::scoped_ptr<DescriptorDatabaseTestCase> test_case_;
DescriptorDatabase* database_;
};
@@ -408,7 +414,7 @@ TEST_P(DescriptorDatabaseTest, FindAllExtensionNumbers) {
vector<int> numbers;
EXPECT_TRUE(database_->FindAllExtensionNumbers("Foo", &numbers));
ASSERT_EQ(2, numbers.size());
- sort(numbers.begin(), numbers.end());
+ std::sort(numbers.begin(), numbers.end());
EXPECT_EQ(5, numbers[0]);
EXPECT_EQ(32, numbers[1]);
}
@@ -722,7 +728,7 @@ TEST_F(MergedDescriptorDatabaseTest, FindAllExtensionNumbers) {
vector<int> numbers;
EXPECT_TRUE(forward_merged_.FindAllExtensionNumbers("Baz", &numbers));
ASSERT_EQ(2, numbers.size());
- sort(numbers.begin(), numbers.end());
+ std::sort(numbers.begin(), numbers.end());
EXPECT_EQ(12, numbers[0]);
EXPECT_EQ(13, numbers[1]);
}
@@ -731,7 +737,7 @@ TEST_F(MergedDescriptorDatabaseTest, FindAllExtensionNumbers) {
vector<int> numbers;
EXPECT_TRUE(reverse_merged_.FindAllExtensionNumbers("Baz", &numbers));
ASSERT_EQ(2, numbers.size());
- sort(numbers.begin(), numbers.end());
+ std::sort(numbers.begin(), numbers.end());
EXPECT_EQ(12, numbers[0]);
EXPECT_EQ(13, numbers[1]);
}

Powered by Google App Engine
This is Rietveld 408576698