31 #ifndef GOOGLE_PROTOBUF_MAP_TEST_UTIL_IMPL_H__ 32 #define GOOGLE_PROTOBUF_MAP_TEST_UTIL_IMPL_H__ 38 #define EXPECT_TRUE GOOGLE_CHECK 39 #define ASSERT_TRUE GOOGLE_CHECK 40 #define EXPECT_FALSE(COND) GOOGLE_CHECK(!(COND)) 41 #define EXPECT_EQ GOOGLE_CHECK_EQ 42 #define ASSERT_EQ GOOGLE_CHECK_EQ 45 namespace protobuf_unittest {}
49 namespace unittest = ::protobuf_unittest;
54 template <
typename EnumType, EnumType enum_value0,
55 EnumType enum_value1,
typename MapMessage>
56 static void SetMapFields(MapMessage*
message);
59 template <
typename EnumType, EnumType enum_value0,
60 EnumType enum_value1,
typename MapMessage>
61 static void SetArenaMapFields(MapMessage* message);
64 template <
typename MapMessage>
65 static void SetMapFieldsInitialized(MapMessage* message);
69 template <
typename EnumType, EnumType enum_value,
typename MapMessage>
70 static void ModifyMapFields(MapMessage* message);
74 template <
typename EnumType, EnumType enum_value0,
75 EnumType enum_value1,
typename MapMessage>
76 static void ExpectMapFieldsSet(
const MapMessage& message);
80 template <
typename EnumType, EnumType enum_value0,
81 EnumType enum_value1,
typename MapMessage>
82 static void ExpectArenaMapFieldsSet(
const MapMessage& message);
86 template <
typename EnumType, EnumType enum_value,
typename MapMessage>
87 static void ExpectMapFieldsSetInitialized(
const MapMessage& message);
91 template <
typename EnumType, EnumType enum_value0,
92 EnumType enum_value1,
typename MapMessage>
93 static void ExpectMapFieldsModified(
const MapMessage& message);
96 template <
typename MapMessage>
97 static void ExpectClear(
const MapMessage& message);
112 template <
typename EnumType, EnumType enum_value0,
113 EnumType enum_value1,
typename MapMessage>
114 void MapTestUtilImpl::SetMapFields(MapMessage*
message) {
116 (*message->mutable_map_int32_int32())[0] = 0;
117 (*message->mutable_map_int64_int64())[0] = 0;
118 (*message->mutable_map_uint32_uint32())[0] = 0;
119 (*message->mutable_map_uint64_uint64())[0] = 0;
120 (*message->mutable_map_sint32_sint32())[0] = 0;
121 (*message->mutable_map_sint64_sint64())[0] = 0;
122 (*message->mutable_map_fixed32_fixed32())[0] = 0;
123 (*message->mutable_map_fixed64_fixed64())[0] = 0;
124 (*message->mutable_map_sfixed32_sfixed32())[0] = 0;
125 (*message->mutable_map_sfixed64_sfixed64())[0] = 0;
126 (*message->mutable_map_int32_float())[0] = 0.0;
127 (*message->mutable_map_int32_double())[0] = 0.0;
128 (*message->mutable_map_bool_bool())[0] =
false;
129 (*message->mutable_map_string_string())[
"0"] =
"0";
130 (*message->mutable_map_int32_bytes())[0] =
"0";
131 (*message->mutable_map_int32_enum())[0] = enum_value0;
132 (*message->mutable_map_int32_foreign_message())[0].set_c(0);
135 (*message->mutable_map_int32_int32())[1] = 1;
136 (*message->mutable_map_int64_int64())[1] = 1;
137 (*message->mutable_map_uint32_uint32())[1] = 1;
138 (*message->mutable_map_uint64_uint64())[1] = 1;
139 (*message->mutable_map_sint32_sint32())[1] = 1;
140 (*message->mutable_map_sint64_sint64())[1] = 1;
141 (*message->mutable_map_fixed32_fixed32())[1] = 1;
142 (*message->mutable_map_fixed64_fixed64())[1] = 1;
143 (*message->mutable_map_sfixed32_sfixed32())[1] = 1;
144 (*message->mutable_map_sfixed64_sfixed64())[1] = 1;
145 (*message->mutable_map_int32_float())[1] = 1.0;
146 (*message->mutable_map_int32_double())[1] = 1.0;
147 (*message->mutable_map_bool_bool())[1] =
true;
148 (*message->mutable_map_string_string())[
"1"] =
"1";
149 (*message->mutable_map_int32_bytes())[1] =
"1";
150 (*message->mutable_map_int32_enum())[1] = enum_value1;
151 (*message->mutable_map_int32_foreign_message())[1].set_c(1);
154 template <
typename EnumType, EnumType enum_value0,
155 EnumType enum_value1,
typename MapMessage>
156 void MapTestUtilImpl::SetArenaMapFields(MapMessage*
message) {
158 (*message->mutable_map_int32_int32())[0] = 0;
159 (*message->mutable_map_int64_int64())[0] = 0;
160 (*message->mutable_map_uint32_uint32())[0] = 0;
161 (*message->mutable_map_uint64_uint64())[0] = 0;
162 (*message->mutable_map_sint32_sint32())[0] = 0;
163 (*message->mutable_map_sint64_sint64())[0] = 0;
164 (*message->mutable_map_fixed32_fixed32())[0] = 0;
165 (*message->mutable_map_fixed64_fixed64())[0] = 0;
166 (*message->mutable_map_sfixed32_sfixed32())[0] = 0;
167 (*message->mutable_map_sfixed64_sfixed64())[0] = 0;
168 (*message->mutable_map_int32_float())[0] = 0.0;
169 (*message->mutable_map_int32_double())[0] = 0.0;
170 (*message->mutable_map_bool_bool())[0] =
false;
171 (*message->mutable_map_string_string())[
"0"] =
"0";
172 (*message->mutable_map_int32_bytes())[0] =
"0";
173 (*message->mutable_map_int32_enum())[0] = enum_value0;
174 (*message->mutable_map_int32_foreign_message())[0].set_c(0);
175 (*message->mutable_map_int32_foreign_message_no_arena())[0].set_c(0);
178 (*message->mutable_map_int32_int32())[1] = 1;
179 (*message->mutable_map_int64_int64())[1] = 1;
180 (*message->mutable_map_uint32_uint32())[1] = 1;
181 (*message->mutable_map_uint64_uint64())[1] = 1;
182 (*message->mutable_map_sint32_sint32())[1] = 1;
183 (*message->mutable_map_sint64_sint64())[1] = 1;
184 (*message->mutable_map_fixed32_fixed32())[1] = 1;
185 (*message->mutable_map_fixed64_fixed64())[1] = 1;
186 (*message->mutable_map_sfixed32_sfixed32())[1] = 1;
187 (*message->mutable_map_sfixed64_sfixed64())[1] = 1;
188 (*message->mutable_map_int32_float())[1] = 1.0;
189 (*message->mutable_map_int32_double())[1] = 1.0;
190 (*message->mutable_map_bool_bool())[1] =
true;
191 (*message->mutable_map_string_string())[
"1"] =
"1";
192 (*message->mutable_map_int32_bytes())[1] =
"1";
193 (*message->mutable_map_int32_enum())[1] = enum_value1;
194 (*message->mutable_map_int32_foreign_message())[1].set_c(1);
195 (*message->mutable_map_int32_foreign_message_no_arena())[1].set_c(1);
198 template <
typename MapMessage>
199 void MapTestUtilImpl::SetMapFieldsInitialized(MapMessage*
message) {
202 (*message->mutable_map_int32_int32())[0];
203 (*message->mutable_map_int64_int64())[0];
204 (*message->mutable_map_uint32_uint32())[0];
205 (*message->mutable_map_uint64_uint64())[0];
206 (*message->mutable_map_sint32_sint32())[0];
207 (*message->mutable_map_sint64_sint64())[0];
208 (*message->mutable_map_fixed32_fixed32())[0];
209 (*message->mutable_map_fixed64_fixed64())[0];
210 (*message->mutable_map_sfixed32_sfixed32())[0];
211 (*message->mutable_map_sfixed64_sfixed64())[0];
212 (*message->mutable_map_int32_float())[0];
213 (*message->mutable_map_int32_double())[0];
214 (*message->mutable_map_bool_bool())[0];
215 (*message->mutable_map_string_string())[
"0"];
216 (*message->mutable_map_int32_bytes())[0];
217 (*message->mutable_map_int32_enum())[0];
218 (*message->mutable_map_int32_foreign_message())[0];
221 template <
typename EnumType, EnumType enum_value,
typename MapMessage>
222 void MapTestUtilImpl::ModifyMapFields(MapMessage*
message) {
223 (*message->mutable_map_int32_int32())[1] = 2;
224 (*message->mutable_map_int64_int64())[1] = 2;
225 (*message->mutable_map_uint32_uint32())[1] = 2;
226 (*message->mutable_map_uint64_uint64())[1] = 2;
227 (*message->mutable_map_sint32_sint32())[1] = 2;
228 (*message->mutable_map_sint64_sint64())[1] = 2;
229 (*message->mutable_map_fixed32_fixed32())[1] = 2;
230 (*message->mutable_map_fixed64_fixed64())[1] = 2;
231 (*message->mutable_map_sfixed32_sfixed32())[1] = 2;
232 (*message->mutable_map_sfixed64_sfixed64())[1] = 2;
233 (*message->mutable_map_int32_float())[1] = 2.0;
234 (*message->mutable_map_int32_double())[1] = 2.0;
235 (*message->mutable_map_bool_bool())[1] =
false;
236 (*message->mutable_map_string_string())[
"1"] =
"2";
237 (*message->mutable_map_int32_bytes())[1] =
"2";
238 (*message->mutable_map_int32_enum())[1] = enum_value;
239 (*message->mutable_map_int32_foreign_message())[1].set_c(2);
242 template <
typename MapMessage>
243 void MapTestUtilImpl::ExpectClear(
const MapMessage&
message) {
244 EXPECT_EQ(0, message.map_int32_int32().size());
245 EXPECT_EQ(0, message.map_int64_int64().size());
246 EXPECT_EQ(0, message.map_uint32_uint32().size());
247 EXPECT_EQ(0, message.map_uint64_uint64().size());
248 EXPECT_EQ(0, message.map_sint32_sint32().size());
249 EXPECT_EQ(0, message.map_sint64_sint64().size());
250 EXPECT_EQ(0, message.map_fixed32_fixed32().size());
251 EXPECT_EQ(0, message.map_fixed64_fixed64().size());
252 EXPECT_EQ(0, message.map_sfixed32_sfixed32().size());
253 EXPECT_EQ(0, message.map_sfixed64_sfixed64().size());
254 EXPECT_EQ(0, message.map_int32_float().size());
255 EXPECT_EQ(0, message.map_int32_double().size());
256 EXPECT_EQ(0, message.map_bool_bool().size());
257 EXPECT_EQ(0, message.map_string_string().size());
258 EXPECT_EQ(0, message.map_int32_bytes().size());
259 EXPECT_EQ(0, message.map_int32_enum().size());
260 EXPECT_EQ(0, message.map_int32_foreign_message().size());
265 template <
typename EnumType, EnumType enum_value0,
266 EnumType enum_value1,
typename MapMessage>
267 void MapTestUtilImpl::ExpectMapFieldsSet(
const MapMessage&
message) {
268 EXPECT_EQ(2, message.map_int32_int32().size());
269 EXPECT_EQ(2, message.map_int64_int64().size());
270 EXPECT_EQ(2, message.map_uint32_uint32().size());
271 EXPECT_EQ(2, message.map_uint64_uint64().size());
272 EXPECT_EQ(2, message.map_sint32_sint32().size());
273 EXPECT_EQ(2, message.map_sint64_sint64().size());
274 EXPECT_EQ(2, message.map_fixed32_fixed32().size());
275 EXPECT_EQ(2, message.map_fixed64_fixed64().size());
276 EXPECT_EQ(2, message.map_sfixed32_sfixed32().size());
277 EXPECT_EQ(2, message.map_sfixed64_sfixed64().size());
278 EXPECT_EQ(2, message.map_int32_float().size());
279 EXPECT_EQ(2, message.map_int32_double().size());
280 EXPECT_EQ(2, message.map_bool_bool().size());
281 EXPECT_EQ(2, message.map_string_string().size());
282 EXPECT_EQ(2, message.map_int32_bytes().size());
283 EXPECT_EQ(2, message.map_int32_enum().size());
284 EXPECT_EQ(2, message.map_int32_foreign_message().size());
286 EXPECT_EQ(0, message.map_int32_int32().at(0));
287 EXPECT_EQ(0, message.map_int64_int64().at(0));
288 EXPECT_EQ(0, message.map_uint32_uint32().at(0));
289 EXPECT_EQ(0, message.map_uint64_uint64().at(0));
290 EXPECT_EQ(0, message.map_sint32_sint32().at(0));
291 EXPECT_EQ(0, message.map_sint64_sint64().at(0));
292 EXPECT_EQ(0, message.map_fixed32_fixed32().at(0));
293 EXPECT_EQ(0, message.map_fixed64_fixed64().at(0));
294 EXPECT_EQ(0, message.map_sfixed32_sfixed32().at(0));
295 EXPECT_EQ(0, message.map_sfixed64_sfixed64().at(0));
296 EXPECT_EQ(0, message.map_int32_float().at(0));
297 EXPECT_EQ(0, message.map_int32_double().at(0));
298 EXPECT_EQ(
false, message.map_bool_bool().at(0));
299 EXPECT_EQ(
"0", message.map_string_string().at(
"0"));
300 EXPECT_EQ(
"0", message.map_int32_bytes().at(0));
301 EXPECT_EQ(enum_value0, message.map_int32_enum().at(0));
302 EXPECT_EQ(0, message.map_int32_foreign_message().at(0).c());
304 EXPECT_EQ(1, message.map_int32_int32().at(1));
305 EXPECT_EQ(1, message.map_int64_int64().at(1));
306 EXPECT_EQ(1, message.map_uint32_uint32().at(1));
307 EXPECT_EQ(1, message.map_uint64_uint64().at(1));
308 EXPECT_EQ(1, message.map_sint32_sint32().at(1));
309 EXPECT_EQ(1, message.map_sint64_sint64().at(1));
310 EXPECT_EQ(1, message.map_fixed32_fixed32().at(1));
311 EXPECT_EQ(1, message.map_fixed64_fixed64().at(1));
312 EXPECT_EQ(1, message.map_sfixed32_sfixed32().at(1));
313 EXPECT_EQ(1, message.map_sfixed64_sfixed64().at(1));
314 EXPECT_EQ(1, message.map_int32_float().at(1));
315 EXPECT_EQ(1, message.map_int32_double().at(1));
316 EXPECT_EQ(
true, message.map_bool_bool().at(1));
317 EXPECT_EQ(
"1", message.map_string_string().at(
"1"));
318 EXPECT_EQ(
"1", message.map_int32_bytes().at(1));
319 EXPECT_EQ(enum_value1, message.map_int32_enum().at(1));
320 EXPECT_EQ(1, message.map_int32_foreign_message().at(1).c());
323 template <
typename EnumType, EnumType enum_value0,
324 EnumType enum_value1,
typename MapMessage>
325 void MapTestUtilImpl::ExpectArenaMapFieldsSet(
const MapMessage&
message) {
326 EXPECT_EQ(2, message.map_int32_int32().size());
327 EXPECT_EQ(2, message.map_int64_int64().size());
328 EXPECT_EQ(2, message.map_uint32_uint32().size());
329 EXPECT_EQ(2, message.map_uint64_uint64().size());
330 EXPECT_EQ(2, message.map_sint32_sint32().size());
331 EXPECT_EQ(2, message.map_sint64_sint64().size());
332 EXPECT_EQ(2, message.map_fixed32_fixed32().size());
333 EXPECT_EQ(2, message.map_fixed64_fixed64().size());
334 EXPECT_EQ(2, message.map_sfixed32_sfixed32().size());
335 EXPECT_EQ(2, message.map_sfixed64_sfixed64().size());
336 EXPECT_EQ(2, message.map_int32_float().size());
337 EXPECT_EQ(2, message.map_int32_double().size());
338 EXPECT_EQ(2, message.map_bool_bool().size());
339 EXPECT_EQ(2, message.map_string_string().size());
340 EXPECT_EQ(2, message.map_int32_bytes().size());
341 EXPECT_EQ(2, message.map_int32_enum().size());
342 EXPECT_EQ(2, message.map_int32_foreign_message().size());
343 EXPECT_EQ(2, message.map_int32_foreign_message_no_arena().size());
345 EXPECT_EQ(0, message.map_int32_int32().at(0));
346 EXPECT_EQ(0, message.map_int64_int64().at(0));
347 EXPECT_EQ(0, message.map_uint32_uint32().at(0));
348 EXPECT_EQ(0, message.map_uint64_uint64().at(0));
349 EXPECT_EQ(0, message.map_sint32_sint32().at(0));
350 EXPECT_EQ(0, message.map_sint64_sint64().at(0));
351 EXPECT_EQ(0, message.map_fixed32_fixed32().at(0));
352 EXPECT_EQ(0, message.map_fixed64_fixed64().at(0));
353 EXPECT_EQ(0, message.map_sfixed32_sfixed32().at(0));
354 EXPECT_EQ(0, message.map_sfixed64_sfixed64().at(0));
355 EXPECT_EQ(0, message.map_int32_float().at(0));
356 EXPECT_EQ(0, message.map_int32_double().at(0));
357 EXPECT_EQ(
false, message.map_bool_bool().at(0));
358 EXPECT_EQ(
"0", message.map_string_string().at(
"0"));
359 EXPECT_EQ(
"0", message.map_int32_bytes().at(0));
360 EXPECT_EQ(enum_value0, message.map_int32_enum().at(0));
361 EXPECT_EQ(0, message.map_int32_foreign_message().at(0).c());
362 EXPECT_EQ(0, message.map_int32_foreign_message_no_arena().at(0).c());
364 EXPECT_EQ(1, message.map_int32_int32().at(1));
365 EXPECT_EQ(1, message.map_int64_int64().at(1));
366 EXPECT_EQ(1, message.map_uint32_uint32().at(1));
367 EXPECT_EQ(1, message.map_uint64_uint64().at(1));
368 EXPECT_EQ(1, message.map_sint32_sint32().at(1));
369 EXPECT_EQ(1, message.map_sint64_sint64().at(1));
370 EXPECT_EQ(1, message.map_fixed32_fixed32().at(1));
371 EXPECT_EQ(1, message.map_fixed64_fixed64().at(1));
372 EXPECT_EQ(1, message.map_sfixed32_sfixed32().at(1));
373 EXPECT_EQ(1, message.map_sfixed64_sfixed64().at(1));
374 EXPECT_EQ(1, message.map_int32_float().at(1));
375 EXPECT_EQ(1, message.map_int32_double().at(1));
376 EXPECT_EQ(
true, message.map_bool_bool().at(1));
377 EXPECT_EQ(
"1", message.map_string_string().at(
"1"));
378 EXPECT_EQ(
"1", message.map_int32_bytes().at(1));
379 EXPECT_EQ(enum_value1, message.map_int32_enum().at(1));
380 EXPECT_EQ(1, message.map_int32_foreign_message().at(1).c());
381 EXPECT_EQ(1, message.map_int32_foreign_message_no_arena().at(1).c());
384 template <
typename EnumType, EnumType enum_value,
typename MapMessage>
385 void MapTestUtilImpl::ExpectMapFieldsSetInitialized(
387 EXPECT_EQ(1, message.map_int32_int32().size());
388 EXPECT_EQ(1, message.map_int64_int64().size());
389 EXPECT_EQ(1, message.map_uint32_uint32().size());
390 EXPECT_EQ(1, message.map_uint64_uint64().size());
391 EXPECT_EQ(1, message.map_sint32_sint32().size());
392 EXPECT_EQ(1, message.map_sint64_sint64().size());
393 EXPECT_EQ(1, message.map_fixed32_fixed32().size());
394 EXPECT_EQ(1, message.map_fixed64_fixed64().size());
395 EXPECT_EQ(1, message.map_sfixed32_sfixed32().size());
396 EXPECT_EQ(1, message.map_sfixed64_sfixed64().size());
397 EXPECT_EQ(1, message.map_int32_float().size());
398 EXPECT_EQ(1, message.map_int32_double().size());
399 EXPECT_EQ(1, message.map_bool_bool().size());
400 EXPECT_EQ(1, message.map_string_string().size());
401 EXPECT_EQ(1, message.map_int32_bytes().size());
402 EXPECT_EQ(1, message.map_int32_enum().size());
403 EXPECT_EQ(1, message.map_int32_foreign_message().size());
405 EXPECT_EQ(0, message.map_int32_int32().at(0));
406 EXPECT_EQ(0, message.map_int64_int64().at(0));
407 EXPECT_EQ(0, message.map_uint32_uint32().at(0));
408 EXPECT_EQ(0, message.map_uint64_uint64().at(0));
409 EXPECT_EQ(0, message.map_sint32_sint32().at(0));
410 EXPECT_EQ(0, message.map_sint64_sint64().at(0));
411 EXPECT_EQ(0, message.map_fixed32_fixed32().at(0));
412 EXPECT_EQ(0, message.map_fixed64_fixed64().at(0));
413 EXPECT_EQ(0, message.map_sfixed32_sfixed32().at(0));
414 EXPECT_EQ(0, message.map_sfixed64_sfixed64().at(0));
415 EXPECT_EQ(0, message.map_int32_float().at(0));
416 EXPECT_EQ(0, message.map_int32_double().at(0));
417 EXPECT_EQ(
false, message.map_bool_bool().at(0));
418 EXPECT_EQ(
"", message.map_string_string().at(
"0"));
419 EXPECT_EQ(
"", message.map_int32_bytes().at(0));
420 EXPECT_EQ(enum_value, message.map_int32_enum().at(0));
421 EXPECT_EQ(0, message.map_int32_foreign_message().at(0).ByteSize());
424 template <
typename EnumType, EnumType enum_value0,
425 EnumType enum_value1,
typename MapMessage>
426 void MapTestUtilImpl::ExpectMapFieldsModified(
431 EXPECT_EQ(2, message.map_int32_int32().size());
432 EXPECT_EQ(2, message.map_int64_int64().size());
433 EXPECT_EQ(2, message.map_uint32_uint32().size());
434 EXPECT_EQ(2, message.map_uint64_uint64().size());
435 EXPECT_EQ(2, message.map_sint32_sint32().size());
436 EXPECT_EQ(2, message.map_sint64_sint64().size());
437 EXPECT_EQ(2, message.map_fixed32_fixed32().size());
438 EXPECT_EQ(2, message.map_fixed64_fixed64().size());
439 EXPECT_EQ(2, message.map_sfixed32_sfixed32().size());
440 EXPECT_EQ(2, message.map_sfixed64_sfixed64().size());
441 EXPECT_EQ(2, message.map_int32_float().size());
442 EXPECT_EQ(2, message.map_int32_double().size());
443 EXPECT_EQ(2, message.map_bool_bool().size());
444 EXPECT_EQ(2, message.map_string_string().size());
445 EXPECT_EQ(2, message.map_int32_bytes().size());
446 EXPECT_EQ(2, message.map_int32_enum().size());
447 EXPECT_EQ(2, message.map_int32_foreign_message().size());
449 EXPECT_EQ(0, message.map_int32_int32().at(0));
450 EXPECT_EQ(0, message.map_int64_int64().at(0));
451 EXPECT_EQ(0, message.map_uint32_uint32().at(0));
452 EXPECT_EQ(0, message.map_uint64_uint64().at(0));
453 EXPECT_EQ(0, message.map_sint32_sint32().at(0));
454 EXPECT_EQ(0, message.map_sint64_sint64().at(0));
455 EXPECT_EQ(0, message.map_fixed32_fixed32().at(0));
456 EXPECT_EQ(0, message.map_fixed64_fixed64().at(0));
457 EXPECT_EQ(0, message.map_sfixed32_sfixed32().at(0));
458 EXPECT_EQ(0, message.map_sfixed64_sfixed64().at(0));
459 EXPECT_EQ(0, message.map_int32_float().at(0));
460 EXPECT_EQ(0, message.map_int32_double().at(0));
461 EXPECT_EQ(
false, message.map_bool_bool().at(0));
462 EXPECT_EQ(
"0", message.map_string_string().at(
"0"));
463 EXPECT_EQ(
"0", message.map_int32_bytes().at(0));
464 EXPECT_EQ(enum_value0, message.map_int32_enum().at(0));
465 EXPECT_EQ(0, message.map_int32_foreign_message().at(0).c());
468 EXPECT_EQ(2, message.map_int32_int32().at(1));
469 EXPECT_EQ(2, message.map_int64_int64().at(1));
470 EXPECT_EQ(2, message.map_uint32_uint32().at(1));
471 EXPECT_EQ(2, message.map_uint64_uint64().at(1));
472 EXPECT_EQ(2, message.map_sint32_sint32().at(1));
473 EXPECT_EQ(2, message.map_sint64_sint64().at(1));
474 EXPECT_EQ(2, message.map_fixed32_fixed32().at(1));
475 EXPECT_EQ(2, message.map_fixed64_fixed64().at(1));
476 EXPECT_EQ(2, message.map_sfixed32_sfixed32().at(1));
477 EXPECT_EQ(2, message.map_sfixed64_sfixed64().at(1));
478 EXPECT_EQ(2, message.map_int32_float().at(1));
479 EXPECT_EQ(2, message.map_int32_double().at(1));
480 EXPECT_EQ(
false, message.map_bool_bool().at(1));
481 EXPECT_EQ(
"2", message.map_string_string().at(
"1"));
482 EXPECT_EQ(
"2", message.map_int32_bytes().at(1));
483 EXPECT_EQ(enum_value1, message.map_int32_enum().at(1));
484 EXPECT_EQ(2, message.map_int32_foreign_message().at(1).c());
490 #endif // GOOGLE_PROTOBUF_MAP_TEST_UTIL_IMPL_H__ #define EXPECT_EQ
Definition: map_test_util_impl.h:41
Definition: __init__.py:1
Definition: map_test_util_impl.h:51
Definition: gflags_completions.h:115
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137