| Index: third_party/protobuf/java/src/test/java/com/google/protobuf/map_test.proto
|
| diff --git a/third_party/protobuf/python/google/protobuf/internal/factory_test1.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/map_test.proto
|
| similarity index 64%
|
| copy from third_party/protobuf/python/google/protobuf/internal/factory_test1.proto
|
| copy to third_party/protobuf/java/src/test/java/com/google/protobuf/map_test.proto
|
| index 9f55e037f6e69ff8e76a3f260eff006af1bcce65..2280ac03b7322c59ceba481d341f818c4def8910 100644
|
| --- a/third_party/protobuf/python/google/protobuf/internal/factory_test1.proto
|
| +++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/map_test.proto
|
| @@ -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
|
| @@ -28,28 +28,36 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Author: matthewtoia@google.com (Matt Toia)
|
| +syntax = "proto3";
|
|
|
| +package map_test;
|
|
|
| -package google.protobuf.python.internal;
|
| +option java_package = "map_test";
|
| +option java_outer_classname = "MapTestProto";
|
| +option java_generate_equals_and_hash = true;
|
|
|
| +message TestMap {
|
| + message MessageValue {
|
| + int32 value = 1;
|
| + }
|
| + enum EnumValue {
|
| + FOO = 0;
|
| + BAR = 1;
|
| + BAZ = 2;
|
| + QUX = 3;
|
| + }
|
|
|
| -enum Factory1Enum {
|
| - FACTORY_1_VALUE_0 = 0;
|
| - FACTORY_1_VALUE_1 = 1;
|
| + map<int32, int32> int32_to_int32_field = 1;
|
| + map<int32, string> int32_to_string_field = 2;
|
| + map<int32, bytes> int32_to_bytes_field = 3;
|
| + map<int32, EnumValue> int32_to_enum_field = 4;
|
| + map<int32, MessageValue> int32_to_message_field = 5;
|
| + map<string, int32> string_to_int32_field = 6;
|
| }
|
|
|
| -message Factory1Message {
|
| - optional Factory1Enum factory_1_enum = 1;
|
| - enum NestedFactory1Enum {
|
| - NESTED_FACTORY_1_VALUE_0 = 0;
|
| - NESTED_FACTORY_1_VALUE_1 = 1;
|
| - }
|
| - optional NestedFactory1Enum nested_factory_1_enum = 2;
|
| - message NestedFactory1Message {
|
| - optional string value = 1;
|
| - }
|
| - optional NestedFactory1Message nested_factory_1_message = 3;
|
| - optional int32 scalar_value = 4;
|
| - repeated string list_value = 5;
|
| +// Used to test that a nested bulider containing map fields will properly
|
| +// propagate the onChange event and mark its parent dirty when a change
|
| +// is made to a map field.
|
| +message TestOnChangeEventPropagation {
|
| + TestMap optional_message = 1;
|
| }
|
|
|