1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
10 import "objectivec/Tests/unittest_import.proto";
12 package objc.protobuf.tests;
14 // Explicit empty prefix, tests some validations code paths also.
15 option objc_class_prefix = "";
18 PROTO2_MAP_ENUM_FOO = 0;
19 PROTO2_MAP_ENUM_BAR = 1;
20 PROTO2_MAP_ENUM_BAZ = 2;
23 enum Proto2MapEnumPlusExtra {
24 E_PROTO2_MAP_ENUM_FOO = 0;
25 E_PROTO2_MAP_ENUM_BAR = 1;
26 E_PROTO2_MAP_ENUM_BAZ = 2;
27 E_PROTO2_MAP_ENUM_EXTRA = 3;
31 map<int32, Proto2MapEnum> known_map_field = 101;
32 map<int32, Proto2MapEnum> unknown_map_field = 102;
35 message TestEnumMapPlusExtra {
36 map<int32, Proto2MapEnumPlusExtra> known_map_field = 101;
37 map<int32, Proto2MapEnumPlusExtra> unknown_map_field = 102;
40 message TestImportEnumMap {
41 map<int32, objc.protobuf.tests.import.EnumForMap> import_enum_amp = 1;
44 message TestIntIntMap {
45 map<int32, int32> m = 1;
48 // Test all key types: string, plus the non-floating-point scalars.
50 map<int32, TestIntIntMap> m_int32 = 1;
51 map<int64, TestIntIntMap> m_int64 = 2;
52 map<uint32, TestIntIntMap> m_uint32 = 3;
53 map<uint64, TestIntIntMap> m_uint64 = 4;
54 map<sint32, TestIntIntMap> m_sint32 = 5;
55 map<sint64, TestIntIntMap> m_sint64 = 6;
56 map<fixed32, TestIntIntMap> m_fixed32 = 7;
57 map<fixed64, TestIntIntMap> m_fixed64 = 8;
58 map<sfixed32, TestIntIntMap> m_sfixed32 = 9;
59 map<sfixed64, TestIntIntMap> m_sfixed64 = 10;
60 map<bool, TestIntIntMap> m_bool = 11;
61 map<string, TestIntIntMap> m_string = 12;
64 // Test maps in submessages.
65 message TestSubmessageMaps {
66 optional TestMaps m = 1;