aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/repeated_field_unittest.cc
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-02-28 14:51:22 -0800
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-02-28 17:06:49 -0800
commit885b612f74f133678bf82808c589331e4c59dad9 (patch)
treee5f3f65b41af477c52810053b8694896c8bcd1f7 /src/google/protobuf/repeated_field_unittest.cc
parent1939efed2db35020b7830a4927f10feac47b6757 (diff)
Down integrate from Google internal branch for C++ and Java.
- Maps for C++ lite - C++ Arena optimizations. - Java Lite runtime code size optimization. Change-Id: I7537a4357c1cb385d23f9e8aa7ffdfeefe079f13
Diffstat (limited to 'src/google/protobuf/repeated_field_unittest.cc')
-rw-r--r--src/google/protobuf/repeated_field_unittest.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/google/protobuf/repeated_field_unittest.cc b/src/google/protobuf/repeated_field_unittest.cc
index 15c0c93e..66e74523 100644
--- a/src/google/protobuf/repeated_field_unittest.cc
+++ b/src/google/protobuf/repeated_field_unittest.cc
@@ -1131,7 +1131,7 @@ TEST_F(RepeatedPtrFieldIteratorTest, STLAlgorithms_lower_bound) {
string v = "f";
RepeatedPtrField<string>::const_iterator it =
- lower_bound(proto_array_.begin(), proto_array_.end(), v);
+ std::lower_bound(proto_array_.begin(), proto_array_.end(), v);
EXPECT_EQ(*it, "n");
EXPECT_TRUE(it == proto_array_.begin() + 3);
@@ -1292,8 +1292,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) {
{
string v = "f";
RepeatedPtrField<string>::pointer_iterator it =
- lower_bound(proto_array_.pointer_begin(), proto_array_.pointer_end(),
- &v, StringLessThan());
+ std::lower_bound(proto_array_.pointer_begin(),
+ proto_array_.pointer_end(), &v, StringLessThan());
GOOGLE_CHECK(*it != NULL);
@@ -1302,10 +1302,9 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) {
}
{
string v = "f";
- RepeatedPtrField<string>::const_pointer_iterator it =
- lower_bound(const_proto_array_->pointer_begin(),
- const_proto_array_->pointer_end(),
- &v, StringLessThan());
+ RepeatedPtrField<string>::const_pointer_iterator it = std::lower_bound(
+ const_proto_array_->pointer_begin(), const_proto_array_->pointer_end(),
+ &v, StringLessThan());
GOOGLE_CHECK(*it != NULL);
@@ -1343,9 +1342,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, Sort) {
EXPECT_EQ("foo", proto_array_.Get(0));
EXPECT_EQ("n", proto_array_.Get(5));
EXPECT_EQ("x", proto_array_.Get(9));
- sort(proto_array_.pointer_begin(),
- proto_array_.pointer_end(),
- StringLessThan());
+ std::sort(proto_array_.pointer_begin(), proto_array_.pointer_end(),
+ StringLessThan());
EXPECT_EQ("a", proto_array_.Get(0));
EXPECT_EQ("baz", proto_array_.Get(2));
EXPECT_EQ("y", proto_array_.Get(9));
@@ -1478,9 +1476,9 @@ TEST_F(RepeatedFieldInsertionIteratorsTest,
new_data->set_bb(i);
}
TestAllTypes testproto;
- copy(data.begin(), data.end(),
- AllocatedRepeatedPtrFieldBackInserter(
- testproto.mutable_repeated_nested_message()));
+ std::copy(data.begin(), data.end(),
+ AllocatedRepeatedPtrFieldBackInserter(
+ testproto.mutable_repeated_nested_message()));
EXPECT_EQ(testproto.DebugString(), goldenproto.DebugString());
}
@@ -1497,9 +1495,8 @@ TEST_F(RepeatedFieldInsertionIteratorsTest,
*new_data = "name-" + SimpleItoa(i);
}
TestAllTypes testproto;
- copy(data.begin(), data.end(),
- AllocatedRepeatedPtrFieldBackInserter(
- testproto.mutable_repeated_string()));
+ std::copy(data.begin(), data.end(), AllocatedRepeatedPtrFieldBackInserter(
+ testproto.mutable_repeated_string()));
EXPECT_EQ(testproto.DebugString(), goldenproto.DebugString());
}