| Index: third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_mset.proto
|
| diff --git a/third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto b/third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_mset.proto
|
| similarity index 62%
|
| copy from third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
|
| copy to third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_mset.proto
|
| index 916cc54637538cb4e4a28b7c617dcbebd4b846a5..3497f09fa6d41b7b38357e7f2610dfb5c087d3e4 100644
|
| --- a/third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
|
| +++ b/third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/google/protobuf/unittest_mset.proto
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// https://developers.google.com/protocol-buffers/
|
| +// http://code.google.com/p/protobuf/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -28,39 +28,45 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -syntax = "proto2";
|
| -
|
| -
|
| -import "google/protobuf/unittest_import.proto";
|
| +// Author: kenton@google.com (Kenton Varda)
|
| +// Based on original Protocol Buffers design by
|
| +// Sanjay Ghemawat, Jeff Dean, and others.
|
| +//
|
| +// This file contains messages for testing message_set_wire_format.
|
|
|
| -// We don't put this in a package within proto2 because we need to make sure
|
| -// that the generated code doesn't depend on being in the proto2 namespace.
|
| -// In map_test_util.h we do "using namespace unittest = protobuf_unittest".
|
| package protobuf_unittest;
|
|
|
| -enum Proto2MapEnum {
|
| - PROTO2_MAP_ENUM_FOO = 0;
|
| - PROTO2_MAP_ENUM_BAR = 1;
|
| - PROTO2_MAP_ENUM_BAZ = 2;
|
| +option optimize_for = SPEED;
|
| +
|
| +// A message with message_set_wire_format.
|
| +message TestMessageSet {
|
| + option message_set_wire_format = true;
|
| + extensions 4 to max;
|
| }
|
|
|
| -enum Proto2MapEnumPlusExtra {
|
| - E_PROTO2_MAP_ENUM_FOO = 0;
|
| - E_PROTO2_MAP_ENUM_BAR = 1;
|
| - E_PROTO2_MAP_ENUM_BAZ = 2;
|
| - E_PROTO2_MAP_ENUM_EXTRA = 3;
|
| +message TestMessageSetContainer {
|
| + optional TestMessageSet message_set = 1;
|
| }
|
|
|
| -message TestEnumMap {
|
| - map<int32, Proto2MapEnum> known_map_field = 101;
|
| - map<int32, Proto2MapEnum> unknown_map_field = 102;
|
| +message TestMessageSetExtension1 {
|
| + extend TestMessageSet {
|
| + optional TestMessageSetExtension1 message_set_extension = 1545008;
|
| + }
|
| + optional int32 i = 15;
|
| }
|
|
|
| -message TestEnumMapPlusExtra {
|
| - map<int32, Proto2MapEnumPlusExtra> known_map_field = 101;
|
| - map<int32, Proto2MapEnumPlusExtra> unknown_map_field = 102;
|
| +message TestMessageSetExtension2 {
|
| + extend TestMessageSet {
|
| + optional TestMessageSetExtension2 message_set_extension = 1547769;
|
| + }
|
| + optional string str = 25;
|
| }
|
|
|
| -message TestImportEnumMap {
|
| - map<int32, protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
|
| +// MessageSet wire format is equivalent to this.
|
| +message RawMessageSet {
|
| + repeated group Item = 1 {
|
| + required int32 type_id = 2;
|
| + required bytes message = 3;
|
| + }
|
| }
|
| +
|
|
|