| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 map<int32, int32> map2 = 2; | 76 map<int32, int32> map2 = 2; |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 enum MapEnum { | 80 enum MapEnum { |
| 81 MAP_ENUM_FOO = 0; | 81 MAP_ENUM_FOO = 0; |
| 82 MAP_ENUM_BAR = 1; | 82 MAP_ENUM_BAR = 1; |
| 83 MAP_ENUM_BAZ = 2; | 83 MAP_ENUM_BAZ = 2; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Test embedded message with required fields | 86 // Test embeded message with required fields |
| 87 message TestRequiredMessageMap { | 87 message TestRequiredMessageMap { |
| 88 map<int32, TestRequired> map_field = 1; | 88 map<int32, TestRequired> map_field = 1; |
| 89 } | 89 } |
| 90 | 90 |
| 91 message TestArenaMap { | 91 message TestArenaMap { |
| 92 map<int32 , int32 > map_int32_int32 = 1; | 92 map<int32 , int32 > map_int32_int32 = 1; |
| 93 map<int64 , int64 > map_int64_int64 = 2; | 93 map<int64 , int64 > map_int64_int64 = 2; |
| 94 map<uint32 , uint32 > map_uint32_uint32 = 3; | 94 map<uint32 , uint32 > map_uint32_uint32 = 3; |
| 95 map<uint64 , uint64 > map_uint64_uint64 = 4; | 95 map<uint64 , uint64 > map_uint64_uint64 = 4; |
| 96 map<sint32 , sint32 > map_sint32_sint32 = 5; | 96 map<sint32 , sint32 > map_sint32_sint32 = 5; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 120 } | 120 } |
| 121 | 121 |
| 122 // Previously, message cannot contain map field called "entry". | 122 // Previously, message cannot contain map field called "entry". |
| 123 message MessageContainingMapCalledEntry { | 123 message MessageContainingMapCalledEntry { |
| 124 map<int32, int32> entry = 1; | 124 map<int32, int32> entry = 1; |
| 125 } | 125 } |
| 126 | 126 |
| 127 message TestRecursiveMapMessage { | 127 message TestRecursiveMapMessage { |
| 128 map<string, TestRecursiveMapMessage> a = 1; | 128 map<string, TestRecursiveMapMessage> a = 1; |
| 129 } | 129 } |
| OLD | NEW |