@@ -33,7 +33,6 @@ syntax = "proto3";
3333option cc_enable_arenas = true ;
3434
3535import "google/protobuf/unittest.proto" ;
36- import "google/protobuf/unittest_no_arena.proto" ;
3736
3837// We don't put this in a package within proto2 because we need to make sure
3938// that the generated code doesn't depend on being in the proto2 namespace.
@@ -42,25 +41,25 @@ package protobuf_unittest;
4241
4342// Tests maps.
4443message TestMap {
45- map <int32 , int32 > map_int32_int32 = 1 ;
46- map <int64 , int64 > map_int64_int64 = 2 ;
47- map <uint32 , uint32 > map_uint32_uint32 = 3 ;
48- map <uint64 , uint64 > map_uint64_uint64 = 4 ;
49- map <sint32 , sint32 > map_sint32_sint32 = 5 ;
50- map <sint64 , sint64 > map_sint64_sint64 = 6 ;
51- map <fixed32 , fixed32 > map_fixed32_fixed32 = 7 ;
52- map <fixed64 , fixed64 > map_fixed64_fixed64 = 8 ;
44+ map <int32 , int32 > map_int32_int32 = 1 ;
45+ map <int64 , int64 > map_int64_int64 = 2 ;
46+ map <uint32 , uint32 > map_uint32_uint32 = 3 ;
47+ map <uint64 , uint64 > map_uint64_uint64 = 4 ;
48+ map <sint32 , sint32 > map_sint32_sint32 = 5 ;
49+ map <sint64 , sint64 > map_sint64_sint64 = 6 ;
50+ map <fixed32 , fixed32 > map_fixed32_fixed32 = 7 ;
51+ map <fixed64 , fixed64 > map_fixed64_fixed64 = 8 ;
5352 map <sfixed32 , sfixed32 > map_sfixed32_sfixed32 = 9 ;
5453 map <sfixed64 , sfixed64 > map_sfixed64_sfixed64 = 10 ;
55- map <int32 , float > map_int32_float = 11 ;
56- map <int32 , double > map_int32_double = 12 ;
57- map <bool , bool > map_bool_bool = 13 ;
58- map <string , string > map_string_string = 14 ;
59- map <int32 , bytes > map_int32_bytes = 15 ;
60- map <int32 , MapEnum > map_int32_enum = 16 ;
61- map <int32 , ForeignMessage > map_int32_foreign_message = 17 ;
62- map <string , ForeignMessage > map_string_foreign_message = 18 ;
63- map <int32 , TestAllTypes > map_int32_all_types = 19 ;
54+ map <int32 , float > map_int32_float = 11 ;
55+ map <int32 , double > map_int32_double = 12 ;
56+ map <bool , bool > map_bool_bool = 13 ;
57+ map <string , string > map_string_string = 14 ;
58+ map <int32 , bytes > map_int32_bytes = 15 ;
59+ map <int32 , MapEnum > map_int32_enum = 16 ;
60+ map <int32 , ForeignMessage > map_int32_foreign_message = 17 ;
61+ map <string , ForeignMessage > map_string_foreign_message = 18 ;
62+ map <int32 , TestAllTypes > map_int32_all_types = 19 ;
6463}
6564
6665message TestMapSubmessage {
@@ -90,33 +89,29 @@ message TestRequiredMessageMap {
9089}
9190
9291message TestArenaMap {
93- map <int32 , int32 > map_int32_int32 = 1 ;
94- map <int64 , int64 > map_int64_int64 = 2 ;
95- map <uint32 , uint32 > map_uint32_uint32 = 3 ;
96- map <uint64 , uint64 > map_uint64_uint64 = 4 ;
97- map <sint32 , sint32 > map_sint32_sint32 = 5 ;
98- map <sint64 , sint64 > map_sint64_sint64 = 6 ;
99- map <fixed32 , fixed32 > map_fixed32_fixed32 = 7 ;
100- map <fixed64 , fixed64 > map_fixed64_fixed64 = 8 ;
92+ map <int32 , int32 > map_int32_int32 = 1 ;
93+ map <int64 , int64 > map_int64_int64 = 2 ;
94+ map <uint32 , uint32 > map_uint32_uint32 = 3 ;
95+ map <uint64 , uint64 > map_uint64_uint64 = 4 ;
96+ map <sint32 , sint32 > map_sint32_sint32 = 5 ;
97+ map <sint64 , sint64 > map_sint64_sint64 = 6 ;
98+ map <fixed32 , fixed32 > map_fixed32_fixed32 = 7 ;
99+ map <fixed64 , fixed64 > map_fixed64_fixed64 = 8 ;
101100 map <sfixed32 , sfixed32 > map_sfixed32_sfixed32 = 9 ;
102101 map <sfixed64 , sfixed64 > map_sfixed64_sfixed64 = 10 ;
103- map <int32 , float > map_int32_float = 11 ;
104- map <int32 , double > map_int32_double = 12 ;
105- map <bool , bool > map_bool_bool = 13 ;
106- map <string , string > map_string_string = 14 ;
107- map <int32 , bytes > map_int32_bytes = 15 ;
108- map <int32 , MapEnum > map_int32_enum = 16 ;
109- map <int32 , ForeignMessage > map_int32_foreign_message = 17 ;
110- map<int32, .protobuf_unittest_no_arena.ForeignMessage>
111- map_int32_foreign_message_no_arena = 18;
102+ map <int32 , float > map_int32_float = 11 ;
103+ map <int32 , double > map_int32_double = 12 ;
104+ map <bool , bool > map_bool_bool = 13 ;
105+ map <string , string > map_string_string = 14 ;
106+ map <int32 , bytes > map_int32_bytes = 15 ;
107+ map <int32 , MapEnum > map_int32_enum = 16 ;
108+ map <int32 , ForeignMessage > map_int32_foreign_message = 17 ;
112109}
113110
114111// Previously, message containing enum called Type cannot be used as value of
115112// map field.
116113message MessageContainingEnumCalledType {
117- enum Type {
118- TYPE_FOO = 0 ;
119- }
114+ enum Type { TYPE_FOO = 0 ; }
120115 map <string , MessageContainingEnumCalledType > type = 1 ;
121116}
122117
0 commit comments