diff options
author | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:23:27 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:38:03 -0700 |
commit | d64a2d9941c36a7bc2a7959ea10ab8363192ac14 (patch) | |
tree | 52330d146ad63d3d70f3baade00d5d1fea8f5e0c /java/core/src/test/proto/com | |
parent | c18aa7795a2e02ef700ff8b039d94ecdcc33432f (diff) | |
download | protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.gz protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.bz2 protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.zip |
Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
Diffstat (limited to 'java/core/src/test/proto/com')
4 files changed, 35 insertions, 1 deletions
diff --git a/java/core/src/test/proto/com/google/protobuf/field_presence_test.proto b/java/core/src/test/proto/com/google/protobuf/field_presence_test.proto index 8f3ca8c6..86cdd286 100644 --- a/java/core/src/test/proto/com/google/protobuf/field_presence_test.proto +++ b/java/core/src/test/proto/com/google/protobuf/field_presence_test.proto @@ -54,6 +54,7 @@ message TestAllTypes { NestedEnum optional_nested_enum = 4; NestedMessage optional_nested_message = 5; protobuf_unittest.TestRequired optional_proto2_message = 6; + NestedMessage optional_lazy_message = 7 [lazy=true]; oneof oneof_field { int32 oneof_int32 = 11; @@ -81,6 +82,7 @@ message TestOptionalFieldsOnly { TestAllTypes.NestedEnum optional_nested_enum = 4; TestAllTypes.NestedMessage optional_nested_message = 5; protobuf_unittest.TestRequired optional_proto2_message = 6; + TestAllTypes.NestedMessage optional_lazy_message = 7 [lazy=true]; } message TestRepeatedFieldsOnly { diff --git a/java/core/src/test/proto/com/google/protobuf/map_for_proto2_lite_test.proto b/java/core/src/test/proto/com/google/protobuf/map_for_proto2_lite_test.proto index d5418f28..de3336a5 100644 --- a/java/core/src/test/proto/com/google/protobuf/map_for_proto2_lite_test.proto +++ b/java/core/src/test/proto/com/google/protobuf/map_for_proto2_lite_test.proto @@ -70,6 +70,17 @@ message TestRecursiveMap { optional int32 value = 1; map<int32, TestRecursiveMap> recursive_map_field = 2; } + + +// a decoy of TestMap for testing parsing errors +message BizarroTestMap { + map<int32, bytes> int32_to_int32_field = 1; // same key type, different value + map<string, int32> int32_to_string_field = 2; // different key and value types + map<string, int32> int32_to_bytes_field = 3; // different key types, same value + map<string, bytes> int32_to_enum_field = 4; // different key and value types + map<string, bytes> int32_to_message_field = 5; // different key and value types + map<string, bytes> string_to_int32_field = 6; // same key type, different value +} package map_for_proto2_lite_test; option java_package = "map_lite_test"; option optimize_for = LITE_RUNTIME; diff --git a/java/core/src/test/proto/com/google/protobuf/map_for_proto2_test.proto b/java/core/src/test/proto/com/google/protobuf/map_for_proto2_test.proto index a9be5166..0c92b0ae 100644 --- a/java/core/src/test/proto/com/google/protobuf/map_for_proto2_test.proto +++ b/java/core/src/test/proto/com/google/protobuf/map_for_proto2_test.proto @@ -72,3 +72,14 @@ message TestRecursiveMap { optional int32 value = 1; map<int32, TestRecursiveMap> recursive_map_field = 2; } + + +// a decoy of TestMap for testing parsing errors +message BizarroTestMap { + map<int32, bytes> int32_to_int32_field = 1; // same key type, different value + map<string, int32> int32_to_string_field = 2; // different key and value types + map<string, int32> int32_to_bytes_field = 3; // different key types, same value + map<string, bytes> int32_to_enum_field = 4; // different key and value types + map<string, bytes> int32_to_message_field = 5; // different key and value types + map<string, bytes> string_to_int32_field = 6; // same key type, different value +} diff --git a/java/core/src/test/proto/com/google/protobuf/map_test.proto b/java/core/src/test/proto/com/google/protobuf/map_test.proto index 2280ac03..9eb63fc3 100644 --- a/java/core/src/test/proto/com/google/protobuf/map_test.proto +++ b/java/core/src/test/proto/com/google/protobuf/map_test.proto @@ -55,9 +55,19 @@ message TestMap { map<string, int32> string_to_int32_field = 6; } -// Used to test that a nested bulider containing map fields will properly +// Used to test that a nested builder 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; } + +// a decoy of TestMap for testing parsing errors +message BizarroTestMap { + map<int32, bytes> int32_to_int32_field = 1; // same key type, different value + map<string, int32> int32_to_string_field = 2; // different key and value types + map<string, int32> int32_to_bytes_field = 3; // different key types, same value + map<string, bytes> int32_to_enum_field = 4; // different key and value types + map<string, bytes> int32_to_message_field = 5; // different key and value types + map<string, bytes> string_to_int32_field = 6; // same key type, different value +} |