diff options
Diffstat (limited to 'src/google/protobuf/drop_unknown_fields_test.cc')
-rw-r--r-- | src/google/protobuf/drop_unknown_fields_test.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/google/protobuf/drop_unknown_fields_test.cc b/src/google/protobuf/drop_unknown_fields_test.cc index f2f2f749..437a04e7 100644 --- a/src/google/protobuf/drop_unknown_fields_test.cc +++ b/src/google/protobuf/drop_unknown_fields_test.cc @@ -29,9 +29,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <memory> -#ifndef _SHARED_PTR_H -#include <google/protobuf/stubs/shared_ptr.h> -#endif #include <google/protobuf/unittest_drop_unknown_fields.pb.h> #include <google/protobuf/dynamic_message.h> @@ -94,7 +91,7 @@ TEST(DropUnknownFieldsTest, DynamicMessageDefaultDrop) { foo_with_extra_fields.set_extra_int32_value(2); google::protobuf::DynamicMessageFactory factory; - google::protobuf::scoped_ptr<google::protobuf::Message> foo( + std::unique_ptr<google::protobuf::Message> foo( factory.GetPrototype(Foo::descriptor())->New()); ASSERT_TRUE(foo->ParseFromString(foo_with_extra_fields.SerializeAsString())); EXPECT_TRUE(foo->GetReflection()->GetUnknownFields(*foo).empty()); @@ -114,7 +111,7 @@ TEST(DropUnknownFieldsTest, DynamicMessageDefaultPreserve) { foo_with_extra_fields.set_extra_int32_value(2); google::protobuf::DynamicMessageFactory factory; - google::protobuf::scoped_ptr<google::protobuf::Message> foo( + std::unique_ptr<google::protobuf::Message> foo( factory.GetPrototype(Foo::descriptor())->New()); ASSERT_TRUE(foo->ParseFromString(foo_with_extra_fields.SerializeAsString())); EXPECT_FALSE(foo->GetReflection()->GetUnknownFields(*foo).empty()); |