From 46e8ff63cb67a6520711da5317aaaef04d0414d0 Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Mon, 5 Oct 2015 11:59:43 -0700 Subject: Down-integrate from google internal. --- src/google/protobuf/dynamic_message_unittest.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/google/protobuf/dynamic_message_unittest.cc') diff --git a/src/google/protobuf/dynamic_message_unittest.cc b/src/google/protobuf/dynamic_message_unittest.cc index b9796c76..70e437d7 100644 --- a/src/google/protobuf/dynamic_message_unittest.cc +++ b/src/google/protobuf/dynamic_message_unittest.cc @@ -40,6 +40,11 @@ // reflection_ops_unittest, cover the rest of the functionality used by // DynamicMessage. +#include +#ifndef _SHARED_PTR_H +#include +#endif + #include #include #include @@ -144,7 +149,7 @@ TEST_F(DynamicMessageTest, IndependentOffsets) { // Check that all fields have independent offsets by setting each // one to a unique value then checking that they all still have those // unique values (i.e. they don't stomp each other). - scoped_ptr message(prototype_->New()); + google::protobuf::scoped_ptr message(prototype_->New()); TestUtil::ReflectionTester reflection_tester(descriptor_); reflection_tester.SetAllFieldsViaReflection(message.get()); @@ -153,7 +158,7 @@ TEST_F(DynamicMessageTest, IndependentOffsets) { TEST_F(DynamicMessageTest, Extensions) { // Check that extensions work. - scoped_ptr message(extensions_prototype_->New()); + google::protobuf::scoped_ptr message(extensions_prototype_->New()); TestUtil::ReflectionTester reflection_tester(extensions_descriptor_); reflection_tester.SetAllFieldsViaReflection(message.get()); @@ -162,7 +167,7 @@ TEST_F(DynamicMessageTest, Extensions) { TEST_F(DynamicMessageTest, PackedFields) { // Check that packed fields work properly. - scoped_ptr message(packed_prototype_->New()); + google::protobuf::scoped_ptr message(packed_prototype_->New()); TestUtil::ReflectionTester reflection_tester(packed_descriptor_); reflection_tester.SetPackedFieldsViaReflection(message.get()); @@ -171,7 +176,7 @@ TEST_F(DynamicMessageTest, PackedFields) { TEST_F(DynamicMessageTest, Oneof) { // Check that oneof fields work properly. - scoped_ptr message(oneof_prototype_->New()); + google::protobuf::scoped_ptr message(oneof_prototype_->New()); // Check default values. const Descriptor* descriptor = message->GetDescriptor(); @@ -232,7 +237,7 @@ TEST_F(DynamicMessageTest, SpaceUsed) { // Since we share the implementation with generated messages, we don't need // to test very much here. Just make sure it appears to be working. - scoped_ptr message(prototype_->New()); + google::protobuf::scoped_ptr message(prototype_->New()); TestUtil::ReflectionTester reflection_tester(descriptor_); int initial_space_used = message->SpaceUsed(); -- cgit v1.2.3