Lines Matching full:dict

85   GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
86 XCTAssertNotNil(dict);
87 XCTAssertEqual(dict.count, 0U);
88 XCTAssertFalse([dict getUInt32:NULL forKey:21LL]);
89 [dict enumerateKeysAndUInt32sUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
93 [dict release];
97 GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
98 [dict setUInt32:100U forKey:21LL];
99 XCTAssertNotNil(dict);
100 XCTAssertEqual(dict.count, 1U);
102 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
103 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
105 XCTAssertFalse([dict getUInt32:NULL forKey:22LL]);
106 [dict enumerateKeysAndUInt32sUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
111 [dict release];
117 GPBInt64UInt32Dictionary *dict =
121 XCTAssertNotNil(dict);
122 XCTAssertEqual(dict.count, 3U);
124 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
125 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
127 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
128 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
130 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
131 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
133 XCTAssertFalse([dict getUInt32:NULL forKey:24LL]);
138 [dict enumerateKeysAndUInt32sUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
160 [dict enumerateKeysAndUInt32sUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
166 [dict release];
226 GPBInt64UInt32Dictionary *dict =
230 XCTAssertNotNil(dict);
232 GPBInt64UInt32Dictionary *dict2 = [dict copy];
236 XCTAssertNotEqual(dict, dict2);
237 XCTAssertEqualObjects(dict, dict2);
241 [dict release];
247 GPBInt64UInt32Dictionary *dict =
251 XCTAssertNotNil(dict);
254 [[GPBInt64UInt32Dictionary alloc] initWithDictionary:dict];
258 XCTAssertNotEqual(dict, dict2);
259 XCTAssertEqualObjects(dict, dict2);
261 [dict release];
265 GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
266 XCTAssertNotNil(dict);
268 XCTAssertEqual(dict.count, 0U);
269 [dict setUInt32:100U forKey:21LL];
270 XCTAssertEqual(dict.count, 1U);
279 [dict addEntriesFromDictionary:dict2];
280 XCTAssertEqual(dict.count, 4U);
283 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
284 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
286 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
287 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
289 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
290 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
292 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
293 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
296 [dict release];
302 GPBInt64UInt32Dictionary *dict =
306 XCTAssertNotNil(dict);
307 XCTAssertEqual(dict.count, 4U);
309 [dict removeUInt32ForKey:22LL];
310 XCTAssertEqual(dict.count, 3U);
312 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
313 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
315 XCTAssertFalse([dict getUInt32:NULL forKey:22LL]);
316 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
317 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
319 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
320 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
324 [dict removeUInt32ForKey:22LL];
325 XCTAssertEqual(dict.count, 3U);
326 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
327 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
329 XCTAssertFalse([dict getUInt32:NULL forKey:22LL]);
330 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
331 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
333 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
334 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
337 [dict removeUInt32ForKey:24LL];
338 XCTAssertEqual(dict.count, 2U);
339 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
340 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
342 XCTAssertFalse([dict getUInt32:NULL forKey:22LL]);
343 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
344 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
346 XCTAssertFalse([dict getUInt32:NULL forKey:24LL]);
348 [dict removeAll];
349 XCTAssertEqual(dict.count, 0U);
350 XCTAssertFalse([dict getUInt32:NULL forKey:21LL]);
351 XCTAssertFalse([dict getUInt32:NULL forKey:22LL]);
352 XCTAssertFalse([dict getUInt32:NULL forKey:23LL]);
353 XCTAssertFalse([dict getUInt32:NULL forKey:24LL]);
354 [dict release];
360 GPBInt64UInt32Dictionary *dict =
364 XCTAssertNotNil(dict);
365 XCTAssertEqual(dict.count, 4U);
367 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
368 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
370 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
371 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
373 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
374 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
376 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
377 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
380 [dict setUInt32:103U forKey:21LL];
381 XCTAssertEqual(dict.count, 4U);
382 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
383 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
385 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
386 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
388 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
389 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
391 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
392 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
395 [dict setUInt32:101U forKey:24LL];
396 XCTAssertEqual(dict.count, 4U);
397 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
398 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
400 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
401 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
403 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
404 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
406 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
407 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
417 [dict addEntriesFromDictionary:dict2];
418 XCTAssertEqual(dict.count, 4U);
419 XCTAssertTrue([dict getUInt32:NULL forKey:21LL]);
420 XCTAssertTrue([dict getUInt32:&value forKey:21LL]);
422 XCTAssertTrue([dict getUInt32:NULL forKey:22LL]);
423 XCTAssertTrue([dict getUInt32:&value forKey:22LL]);
425 XCTAssertTrue([dict getUInt32:NULL forKey:23LL]);
426 XCTAssertTrue([dict getUInt32:&value forKey:23LL]);
428 XCTAssertTrue([dict getUInt32:NULL forKey:24LL]);
429 XCTAssertTrue([dict getUInt32:&value forKey:24LL]);
433 [dict release];
446 GPBInt64Int32Dictionary *dict = [[GPBInt64Int32Dictionary alloc] init];
447 XCTAssertNotNil(dict);
448 XCTAssertEqual(dict.count, 0U);
449 XCTAssertFalse([dict getInt32:NULL forKey:21LL]);
450 [dict enumerateKeysAndInt32sUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
454 [dict release];
458 GPBInt64Int32Dictionary *dict = [[GPBInt64Int32Dictionary alloc] init];
459 [dict setInt32:200 forKey:21LL];
460 XCTAssertNotNil(dict);
461 XCTAssertEqual(dict.count, 1U);
463 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
464 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
466 XCTAssertFalse([dict getInt32:NULL forKey:22LL]);
467 [dict enumerateKeysAndInt32sUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
472 [dict release];
478 GPBInt64Int32Dictionary *dict =
482 XCTAssertNotNil(dict);
483 XCTAssertEqual(dict.count, 3U);
485 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
486 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
488 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
489 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
491 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
492 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
494 XCTAssertFalse([dict getInt32:NULL forKey:24LL]);
499 [dict enumerateKeysAndInt32sUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
521 [dict enumerateKeysAndInt32sUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
527 [dict release];
587 GPBInt64Int32Dictionary *dict =
591 XCTAssertNotNil(dict);
593 GPBInt64Int32Dictionary *dict2 = [dict copy];
597 XCTAssertNotEqual(dict, dict2);
598 XCTAssertEqualObjects(dict, dict2);
602 [dict release];
608 GPBInt64Int32Dictionary *dict =
612 XCTAssertNotNil(dict);
615 [[GPBInt64Int32Dictionary alloc] initWithDictionary:dict];
619 XCTAssertNotEqual(dict, dict2);
620 XCTAssertEqualObjects(dict, dict2);
622 [dict release];
626 GPBInt64Int32Dictionary *dict = [[GPBInt64Int32Dictionary alloc] init];
627 XCTAssertNotNil(dict);
629 XCTAssertEqual(dict.count, 0U);
630 [dict setInt32:200 forKey:21LL];
631 XCTAssertEqual(dict.count, 1U);
640 [dict addEntriesFromDictionary:dict2];
641 XCTAssertEqual(dict.count, 4U);
644 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
645 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
647 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
648 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
650 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
651 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
653 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
654 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
657 [dict release];
663 GPBInt64Int32Dictionary *dict =
667 XCTAssertNotNil(dict);
668 XCTAssertEqual(dict.count, 4U);
670 [dict removeInt32ForKey:22LL];
671 XCTAssertEqual(dict.count, 3U);
673 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
674 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
676 XCTAssertFalse([dict getInt32:NULL forKey:22LL]);
677 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
678 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
680 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
681 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
685 [dict removeInt32ForKey:22LL];
686 XCTAssertEqual(dict.count, 3U);
687 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
688 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
690 XCTAssertFalse([dict getInt32:NULL forKey:22LL]);
691 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
692 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
694 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
695 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
698 [dict removeInt32ForKey:24LL];
699 XCTAssertEqual(dict.count, 2U);
700 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
701 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
703 XCTAssertFalse([dict getInt32:NULL forKey:22LL]);
704 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
705 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
707 XCTAssertFalse([dict getInt32:NULL forKey:24LL]);
709 [dict removeAll];
710 XCTAssertEqual(dict.count, 0U);
711 XCTAssertFalse([dict getInt32:NULL forKey:21LL]);
712 XCTAssertFalse([dict getInt32:NULL forKey:22LL]);
713 XCTAssertFalse([dict getInt32:NULL forKey:23LL]);
714 XCTAssertFalse([dict getInt32:NULL forKey:24LL]);
715 [dict release];
721 GPBInt64Int32Dictionary *dict =
725 XCTAssertNotNil(dict);
726 XCTAssertEqual(dict.count, 4U);
728 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
729 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
731 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
732 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
734 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
735 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
737 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
738 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
741 [dict setInt32:203 forKey:21LL];
742 XCTAssertEqual(dict.count, 4U);
743 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
744 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
746 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
747 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
749 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
750 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
752 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
753 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
756 [dict setInt32:201 forKey:24LL];
757 XCTAssertEqual(dict.count, 4U);
758 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
759 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
761 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
762 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
764 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
765 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
767 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
768 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
778 [dict addEntriesFromDictionary:dict2];
779 XCTAssertEqual(dict.count, 4U);
780 XCTAssertTrue([dict getInt32:NULL forKey:21LL]);
781 XCTAssertTrue([dict getInt32:&value forKey:21LL]);
783 XCTAssertTrue([dict getInt32:NULL forKey:22LL]);
784 XCTAssertTrue([dict getInt32:&value forKey:22LL]);
786 XCTAssertTrue([dict getInt32:NULL forKey:23LL]);
787 XCTAssertTrue([dict getInt32:&value forKey:23LL]);
789 XCTAssertTrue([dict getInt32:NULL forKey:24LL]);
790 XCTAssertTrue([dict getInt32:&value forKey:24LL]);
794 [dict release];
807 GPBInt64UInt64Dictionary *dict = [[GPBInt64UInt64Dictionary alloc] init];
808 XCTAssertNotNil(dict);
809 XCTAssertEqual(dict.count, 0U);
810 XCTAssertFalse([dict getUInt64:NULL forKey:21LL]);
811 [dict enumerateKeysAndUInt64sUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
815 [dict release];
819 GPBInt64UInt64Dictionary *dict = [[GPBInt64UInt64Dictionary alloc] init];
820 [dict setUInt64:300U forKey:21LL];
821 XCTAssertNotNil(dict);
822 XCTAssertEqual(dict.count, 1U);
824 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
825 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
827 XCTAssertFalse([dict getUInt64:NULL forKey:22LL]);
828 [dict enumerateKeysAndUInt64sUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
833 [dict release];
839 GPBInt64UInt64Dictionary *dict =
843 XCTAssertNotNil(dict);
844 XCTAssertEqual(dict.count, 3U);
846 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
847 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
849 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
850 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
852 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
853 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
855 XCTAssertFalse([dict getUInt64:NULL forKey:24LL]);
860 [dict enumerateKeysAndUInt64sUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
882 [dict enumerateKeysAndUInt64sUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
888 [dict release];
948 GPBInt64UInt64Dictionary *dict =
952 XCTAssertNotNil(dict);
954 GPBInt64UInt64Dictionary *dict2 = [dict copy];
958 XCTAssertNotEqual(dict, dict2);
959 XCTAssertEqualObjects(dict, dict2);
963 [dict release];
969 GPBInt64UInt64Dictionary *dict =
973 XCTAssertNotNil(dict);
976 [[GPBInt64UInt64Dictionary alloc] initWithDictionary:dict];
980 XCTAssertNotEqual(dict, dict2);
981 XCTAssertEqualObjects(dict, dict2);
983 [dict release];
987 GPBInt64UInt64Dictionary *dict = [[GPBInt64UInt64Dictionary alloc] init];
988 XCTAssertNotNil(dict);
990 XCTAssertEqual(dict.count, 0U);
991 [dict setUInt64:300U forKey:21LL];
992 XCTAssertEqual(dict.count, 1U);
1001 [dict addEntriesFromDictionary:dict2];
1002 XCTAssertEqual(dict.count, 4U);
1005 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1006 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1008 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
1009 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
1011 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1012 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1014 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1015 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1018 [dict release];
1024 GPBInt64UInt64Dictionary *dict =
1028 XCTAssertNotNil(dict);
1029 XCTAssertEqual(dict.count, 4U);
1031 [dict removeUInt64ForKey:22LL];
1032 XCTAssertEqual(dict.count, 3U);
1034 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1035 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1037 XCTAssertFalse([dict getUInt64:NULL forKey:22LL]);
1038 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1039 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1041 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1042 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1046 [dict removeUInt64ForKey:22LL];
1047 XCTAssertEqual(dict.count, 3U);
1048 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1049 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1051 XCTAssertFalse([dict getUInt64:NULL forKey:22LL]);
1052 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1053 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1055 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1056 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1059 [dict removeUInt64ForKey:24LL];
1060 XCTAssertEqual(dict.count, 2U);
1061 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1062 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1064 XCTAssertFalse([dict getUInt64:NULL forKey:22LL]);
1065 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1066 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1068 XCTAssertFalse([dict getUInt64:NULL forKey:24LL]);
1070 [dict removeAll];
1071 XCTAssertEqual(dict.count, 0U);
1072 XCTAssertFalse([dict getUInt64:NULL forKey:21LL]);
1073 XCTAssertFalse([dict getUInt64:NULL forKey:22LL]);
1074 XCTAssertFalse([dict getUInt64:NULL forKey:23LL]);
1075 XCTAssertFalse([dict getUInt64:NULL forKey:24LL]);
1076 [dict release];
1082 GPBInt64UInt64Dictionary *dict =
1086 XCTAssertNotNil(dict);
1087 XCTAssertEqual(dict.count, 4U);
1089 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1090 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1092 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
1093 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
1095 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1096 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1098 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1099 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1102 [dict setUInt64:303U forKey:21LL];
1103 XCTAssertEqual(dict.count, 4U);
1104 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1105 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1107 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
1108 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
1110 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1111 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1113 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1114 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1117 [dict setUInt64:301U forKey:24LL];
1118 XCTAssertEqual(dict.count, 4U);
1119 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1120 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1122 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
1123 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
1125 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1126 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1128 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1129 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1139 [dict addEntriesFromDictionary:dict2];
1140 XCTAssertEqual(dict.count, 4U);
1141 XCTAssertTrue([dict getUInt64:NULL forKey:21LL]);
1142 XCTAssertTrue([dict getUInt64:&value forKey:21LL]);
1144 XCTAssertTrue([dict getUInt64:NULL forKey:22LL]);
1145 XCTAssertTrue([dict getUInt64:&value forKey:22LL]);
1147 XCTAssertTrue([dict getUInt64:NULL forKey:23LL]);
1148 XCTAssertTrue([dict getUInt64:&value forKey:23LL]);
1150 XCTAssertTrue([dict getUInt64:NULL forKey:24LL]);
1151 XCTAssertTrue([dict getUInt64:&value forKey:24LL]);
1155 [dict release];
1168 GPBInt64Int64Dictionary *dict = [[GPBInt64Int64Dictionary alloc] init];
1169 XCTAssertNotNil(dict);
1170 XCTAssertEqual(dict.count, 0U);
1171 XCTAssertFalse([dict getInt64:NULL forKey:21LL]);
1172 [dict enumerateKeysAndInt64sUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1176 [dict release];
1180 GPBInt64Int64Dictionary *dict = [[GPBInt64Int64Dictionary alloc] init];
1181 [dict setInt64:400 forKey:21LL];
1182 XCTAssertNotNil(dict);
1183 XCTAssertEqual(dict.count, 1U);
1185 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1186 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1188 XCTAssertFalse([dict getInt64:NULL forKey:22LL]);
1189 [dict enumerateKeysAndInt64sUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1194 [dict release];
1200 GPBInt64Int64Dictionary *dict =
1204 XCTAssertNotNil(dict);
1205 XCTAssertEqual(dict.count, 3U);
1207 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1208 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1210 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1211 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1213 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1214 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1216 XCTAssertFalse([dict getInt64:NULL forKey:24LL]);
1221 [dict enumerateKeysAndInt64sUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1243 [dict enumerateKeysAndInt64sUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1249 [dict release];
1309 GPBInt64Int64Dictionary *dict =
1313 XCTAssertNotNil(dict);
1315 GPBInt64Int64Dictionary *dict2 = [dict copy];
1319 XCTAssertNotEqual(dict, dict2);
1320 XCTAssertEqualObjects(dict, dict2);
1324 [dict release];
1330 GPBInt64Int64Dictionary *dict =
1334 XCTAssertNotNil(dict);
1337 [[GPBInt64Int64Dictionary alloc] initWithDictionary:dict];
1341 XCTAssertNotEqual(dict, dict2);
1342 XCTAssertEqualObjects(dict, dict2);
1344 [dict release];
1348 GPBInt64Int64Dictionary *dict = [[GPBInt64Int64Dictionary alloc] init];
1349 XCTAssertNotNil(dict);
1351 XCTAssertEqual(dict.count, 0U);
1352 [dict setInt64:400 forKey:21LL];
1353 XCTAssertEqual(dict.count, 1U);
1362 [dict addEntriesFromDictionary:dict2];
1363 XCTAssertEqual(dict.count, 4U);
1366 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1367 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1369 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1370 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1372 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1373 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1375 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1376 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1379 [dict release];
1385 GPBInt64Int64Dictionary *dict =
1389 XCTAssertNotNil(dict);
1390 XCTAssertEqual(dict.count, 4U);
1392 [dict removeInt64ForKey:22LL];
1393 XCTAssertEqual(dict.count, 3U);
1395 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1396 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1398 XCTAssertFalse([dict getInt64:NULL forKey:22LL]);
1399 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1400 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1402 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1403 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1407 [dict removeInt64ForKey:22LL];
1408 XCTAssertEqual(dict.count, 3U);
1409 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1410 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1412 XCTAssertFalse([dict getInt64:NULL forKey:22LL]);
1413 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1414 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1416 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1417 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1420 [dict removeInt64ForKey:24LL];
1421 XCTAssertEqual(dict.count, 2U);
1422 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1423 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1425 XCTAssertFalse([dict getInt64:NULL forKey:22LL]);
1426 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1427 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1429 XCTAssertFalse([dict getInt64:NULL forKey:24LL]);
1431 [dict removeAll];
1432 XCTAssertEqual(dict.count, 0U);
1433 XCTAssertFalse([dict getInt64:NULL forKey:21LL]);
1434 XCTAssertFalse([dict getInt64:NULL forKey:22LL]);
1435 XCTAssertFalse([dict getInt64:NULL forKey:23LL]);
1436 XCTAssertFalse([dict getInt64:NULL forKey:24LL]);
1437 [dict release];
1443 GPBInt64Int64Dictionary *dict =
1447 XCTAssertNotNil(dict);
1448 XCTAssertEqual(dict.count, 4U);
1450 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1451 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1453 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1454 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1456 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1457 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1459 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1460 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1463 [dict setInt64:403 forKey:21LL];
1464 XCTAssertEqual(dict.count, 4U);
1465 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1466 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1468 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1469 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1471 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1472 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1474 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1475 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1478 [dict setInt64:401 forKey:24LL];
1479 XCTAssertEqual(dict.count, 4U);
1480 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1481 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1483 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1484 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1486 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1487 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1489 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1490 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1500 [dict addEntriesFromDictionary:dict2];
1501 XCTAssertEqual(dict.count, 4U);
1502 XCTAssertTrue([dict getInt64:NULL forKey:21LL]);
1503 XCTAssertTrue([dict getInt64:&value forKey:21LL]);
1505 XCTAssertTrue([dict getInt64:NULL forKey:22LL]);
1506 XCTAssertTrue([dict getInt64:&value forKey:22LL]);
1508 XCTAssertTrue([dict getInt64:NULL forKey:23LL]);
1509 XCTAssertTrue([dict getInt64:&value forKey:23LL]);
1511 XCTAssertTrue([dict getInt64:NULL forKey:24LL]);
1512 XCTAssertTrue([dict getInt64:&value forKey:24LL]);
1516 [dict release];
1529 GPBInt64BoolDictionary *dict = [[GPBInt64BoolDictionary alloc] init];
1530 XCTAssertNotNil(dict);
1531 XCTAssertEqual(dict.count, 0U);
1532 XCTAssertFalse([dict getBool:NULL forKey:21LL]);
1533 [dict enumerateKeysAndBoolsUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1537 [dict release];
1541 GPBInt64BoolDictionary *dict = [[GPBInt64BoolDictionary alloc] init];
1542 [dict setBool:YES forKey:21LL];
1543 XCTAssertNotNil(dict);
1544 XCTAssertEqual(dict.count, 1U);
1546 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1547 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1549 XCTAssertFalse([dict getBool:NULL forKey:22LL]);
1550 [dict enumerateKeysAndBoolsUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1555 [dict release];
1561 GPBInt64BoolDictionary *dict =
1565 XCTAssertNotNil(dict);
1566 XCTAssertEqual(dict.count, 3U);
1568 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1569 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1571 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1572 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1574 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1575 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1577 XCTAssertFalse([dict getBool:NULL forKey:24LL]);
1582 [dict enumerateKeysAndBoolsUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1604 [dict enumerateKeysAndBoolsUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1610 [dict release];
1670 GPBInt64BoolDictionary *dict =
1674 XCTAssertNotNil(dict);
1676 GPBInt64BoolDictionary *dict2 = [dict copy];
1680 XCTAssertNotEqual(dict, dict2);
1681 XCTAssertEqualObjects(dict, dict2);
1685 [dict release];
1691 GPBInt64BoolDictionary *dict =
1695 XCTAssertNotNil(dict);
1698 [[GPBInt64BoolDictionary alloc] initWithDictionary:dict];
1702 XCTAssertNotEqual(dict, dict2);
1703 XCTAssertEqualObjects(dict, dict2);
1705 [dict release];
1709 GPBInt64BoolDictionary *dict = [[GPBInt64BoolDictionary alloc] init];
1710 XCTAssertNotNil(dict);
1712 XCTAssertEqual(dict.count, 0U);
1713 [dict setBool:YES forKey:21LL];
1714 XCTAssertEqual(dict.count, 1U);
1723 [dict addEntriesFromDictionary:dict2];
1724 XCTAssertEqual(dict.count, 4U);
1727 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1728 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1730 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1731 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1733 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1734 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1736 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1737 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1740 [dict release];
1746 GPBInt64BoolDictionary *dict =
1750 XCTAssertNotNil(dict);
1751 XCTAssertEqual(dict.count, 4U);
1753 [dict removeBoolForKey:22LL];
1754 XCTAssertEqual(dict.count, 3U);
1756 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1757 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1759 XCTAssertFalse([dict getBool:NULL forKey:22LL]);
1760 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1761 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1763 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1764 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1768 [dict removeBoolForKey:22LL];
1769 XCTAssertEqual(dict.count, 3U);
1770 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1771 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1773 XCTAssertFalse([dict getBool:NULL forKey:22LL]);
1774 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1775 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1777 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1778 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1781 [dict removeBoolForKey:24LL];
1782 XCTAssertEqual(dict.count, 2U);
1783 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1784 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1786 XCTAssertFalse([dict getBool:NULL forKey:22LL]);
1787 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1788 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1790 XCTAssertFalse([dict getBool:NULL forKey:24LL]);
1792 [dict removeAll];
1793 XCTAssertEqual(dict.count, 0U);
1794 XCTAssertFalse([dict getBool:NULL forKey:21LL]);
1795 XCTAssertFalse([dict getBool:NULL forKey:22LL]);
1796 XCTAssertFalse([dict getBool:NULL forKey:23LL]);
1797 XCTAssertFalse([dict getBool:NULL forKey:24LL]);
1798 [dict release];
1804 GPBInt64BoolDictionary *dict =
1808 XCTAssertNotNil(dict);
1809 XCTAssertEqual(dict.count, 4U);
1811 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1812 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1814 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1815 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1817 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1818 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1820 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1821 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1824 [dict setBool:NO forKey:21LL];
1825 XCTAssertEqual(dict.count, 4U);
1826 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1827 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1829 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1830 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1832 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1833 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1835 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1836 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1839 [dict setBool:YES forKey:24LL];
1840 XCTAssertEqual(dict.count, 4U);
1841 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1842 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1844 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1845 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1847 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1848 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1850 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1851 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1861 [dict addEntriesFromDictionary:dict2];
1862 XCTAssertEqual(dict.count, 4U);
1863 XCTAssertTrue([dict getBool:NULL forKey:21LL]);
1864 XCTAssertTrue([dict getBool:&value forKey:21LL]);
1866 XCTAssertTrue([dict getBool:NULL forKey:22LL]);
1867 XCTAssertTrue([dict getBool:&value forKey:22LL]);
1869 XCTAssertTrue([dict getBool:NULL forKey:23LL]);
1870 XCTAssertTrue([dict getBool:&value forKey:23LL]);
1872 XCTAssertTrue([dict getBool:NULL forKey:24LL]);
1873 XCTAssertTrue([dict getBool:&value forKey:24LL]);
1877 [dict release];
1890 GPBInt64FloatDictionary *dict = [[GPBInt64FloatDictionary alloc] init];
1891 XCTAssertNotNil(dict);
1892 XCTAssertEqual(dict.count, 0U);
1893 XCTAssertFalse([dict getFloat:NULL forKey:21LL]);
1894 [dict enumerateKeysAndFloatsUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1898 [dict release];
1902 GPBInt64FloatDictionary *dict = [[GPBInt64FloatDictionary alloc] init];
1903 [dict setFloat:500.f forKey:21LL];
1904 XCTAssertNotNil(dict);
1905 XCTAssertEqual(dict.count, 1U);
1907 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
1908 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
1910 XCTAssertFalse([dict getFloat:NULL forKey:22LL]);
1911 [dict enumerateKeysAndFloatsUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1916 [dict release];
1922 GPBInt64FloatDictionary *dict =
1926 XCTAssertNotNil(dict);
1927 XCTAssertEqual(dict.count, 3U);
1929 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
1930 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
1932 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
1933 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
1935 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
1936 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
1938 XCTAssertFalse([dict getFloat:NULL forKey:24LL]);
1943 [dict enumerateKeysAndFloatsUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1965 [dict enumerateKeysAndFloatsUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1971 [dict release];
2031 GPBInt64FloatDictionary *dict =
2035 XCTAssertNotNil(dict);
2037 GPBInt64FloatDictionary *dict2 = [dict copy];
2041 XCTAssertNotEqual(dict, dict2);
2042 XCTAssertEqualObjects(dict, dict2);
2046 [dict release];
2052 GPBInt64FloatDictionary *dict =
2056 XCTAssertNotNil(dict);
2059 [[GPBInt64FloatDictionary alloc] initWithDictionary:dict];
2063 XCTAssertNotEqual(dict, dict2);
2064 XCTAssertEqualObjects(dict, dict2);
2066 [dict release];
2070 GPBInt64FloatDictionary *dict = [[GPBInt64FloatDictionary alloc] init];
2071 XCTAssertNotNil(dict);
2073 XCTAssertEqual(dict.count, 0U);
2074 [dict setFloat:500.f forKey:21LL];
2075 XCTAssertEqual(dict.count, 1U);
2084 [dict addEntriesFromDictionary:dict2];
2085 XCTAssertEqual(dict.count, 4U);
2088 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2089 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2091 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
2092 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
2094 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2095 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2097 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2098 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2101 [dict release];
2107 GPBInt64FloatDictionary *dict =
2111 XCTAssertNotNil(dict);
2112 XCTAssertEqual(dict.count, 4U);
2114 [dict removeFloatForKey:22LL];
2115 XCTAssertEqual(dict.count, 3U);
2117 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2118 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2120 XCTAssertFalse([dict getFloat:NULL forKey:22LL]);
2121 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2122 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2124 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2125 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2129 [dict removeFloatForKey:22LL];
2130 XCTAssertEqual(dict.count, 3U);
2131 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2132 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2134 XCTAssertFalse([dict getFloat:NULL forKey:22LL]);
2135 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2136 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2138 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2139 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2142 [dict removeFloatForKey:24LL];
2143 XCTAssertEqual(dict.count, 2U);
2144 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2145 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2147 XCTAssertFalse([dict getFloat:NULL forKey:22LL]);
2148 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2149 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2151 XCTAssertFalse([dict getFloat:NULL forKey:24LL]);
2153 [dict removeAll];
2154 XCTAssertEqual(dict.count, 0U);
2155 XCTAssertFalse([dict getFloat:NULL forKey:21LL]);
2156 XCTAssertFalse([dict getFloat:NULL forKey:22LL]);
2157 XCTAssertFalse([dict getFloat:NULL forKey:23LL]);
2158 XCTAssertFalse([dict getFloat:NULL forKey:24LL]);
2159 [dict release];
2165 GPBInt64FloatDictionary *dict =
2169 XCTAssertNotNil(dict);
2170 XCTAssertEqual(dict.count, 4U);
2172 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2173 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2175 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
2176 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
2178 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2179 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2181 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2182 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2185 [dict setFloat:503.f forKey:21LL];
2186 XCTAssertEqual(dict.count, 4U);
2187 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2188 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2190 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
2191 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
2193 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2194 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2196 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2197 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2200 [dict setFloat:501.f forKey:24LL];
2201 XCTAssertEqual(dict.count, 4U);
2202 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2203 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2205 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
2206 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
2208 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2209 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2211 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2212 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2222 [dict addEntriesFromDictionary:dict2];
2223 XCTAssertEqual(dict.count, 4U);
2224 XCTAssertTrue([dict getFloat:NULL forKey:21LL]);
2225 XCTAssertTrue([dict getFloat:&value forKey:21LL]);
2227 XCTAssertTrue([dict getFloat:NULL forKey:22LL]);
2228 XCTAssertTrue([dict getFloat:&value forKey:22LL]);
2230 XCTAssertTrue([dict getFloat:NULL forKey:23LL]);
2231 XCTAssertTrue([dict getFloat:&value forKey:23LL]);
2233 XCTAssertTrue([dict getFloat:NULL forKey:24LL]);
2234 XCTAssertTrue([dict getFloat:&value forKey:24LL]);
2238 [dict release];
2251 GPBInt64DoubleDictionary *dict = [[GPBInt64DoubleDictionary alloc] init];
2252 XCTAssertNotNil(dict);
2253 XCTAssertEqual(dict.count, 0U);
2254 XCTAssertFalse([dict getDouble:NULL forKey:21LL]);
2255 [dict enumerateKeysAndDoublesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2259 [dict release];
2263 GPBInt64DoubleDictionary *dict = [[GPBInt64DoubleDictionary alloc] init];
2264 [dict setDouble:600. forKey:21LL];
2265 XCTAssertNotNil(dict);
2266 XCTAssertEqual(dict.count, 1U);
2268 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2269 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2271 XCTAssertFalse([dict getDouble:NULL forKey:22LL]);
2272 [dict enumerateKeysAndDoublesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2277 [dict release];
2283 GPBInt64DoubleDictionary *dict =
2287 XCTAssertNotNil(dict);
2288 XCTAssertEqual(dict.count, 3U);
2290 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2291 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2293 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2294 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2296 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2297 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2299 XCTAssertFalse([dict getDouble:NULL forKey:24LL]);
2304 [dict enumerateKeysAndDoublesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2326 [dict enumerateKeysAndDoublesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2332 [dict release];
2392 GPBInt64DoubleDictionary *dict =
2396 XCTAssertNotNil(dict);
2398 GPBInt64DoubleDictionary *dict2 = [dict copy];
2402 XCTAssertNotEqual(dict, dict2);
2403 XCTAssertEqualObjects(dict, dict2);
2407 [dict release];
2413 GPBInt64DoubleDictionary *dict =
2417 XCTAssertNotNil(dict);
2420 [[GPBInt64DoubleDictionary alloc] initWithDictionary:dict];
2424 XCTAssertNotEqual(dict, dict2);
2425 XCTAssertEqualObjects(dict, dict2);
2427 [dict release];
2431 GPBInt64DoubleDictionary *dict = [[GPBInt64DoubleDictionary alloc] init];
2432 XCTAssertNotNil(dict);
2434 XCTAssertEqual(dict.count, 0U);
2435 [dict setDouble:600. forKey:21LL];
2436 XCTAssertEqual(dict.count, 1U);
2445 [dict addEntriesFromDictionary:dict2];
2446 XCTAssertEqual(dict.count, 4U);
2449 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2450 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2452 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2453 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2455 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2456 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2458 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2459 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2462 [dict release];
2468 GPBInt64DoubleDictionary *dict =
2472 XCTAssertNotNil(dict);
2473 XCTAssertEqual(dict.count, 4U);
2475 [dict removeDoubleForKey:22LL];
2476 XCTAssertEqual(dict.count, 3U);
2478 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2479 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2481 XCTAssertFalse([dict getDouble:NULL forKey:22LL]);
2482 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2483 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2485 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2486 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2490 [dict removeDoubleForKey:22LL];
2491 XCTAssertEqual(dict.count, 3U);
2492 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2493 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2495 XCTAssertFalse([dict getDouble:NULL forKey:22LL]);
2496 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2497 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2499 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2500 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2503 [dict removeDoubleForKey:24LL];
2504 XCTAssertEqual(dict.count, 2U);
2505 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2506 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2508 XCTAssertFalse([dict getDouble:NULL forKey:22LL]);
2509 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2510 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2512 XCTAssertFalse([dict getDouble:NULL forKey:24LL]);
2514 [dict removeAll];
2515 XCTAssertEqual(dict.count, 0U);
2516 XCTAssertFalse([dict getDouble:NULL forKey:21LL]);
2517 XCTAssertFalse([dict getDouble:NULL forKey:22LL]);
2518 XCTAssertFalse([dict getDouble:NULL forKey:23LL]);
2519 XCTAssertFalse([dict getDouble:NULL forKey:24LL]);
2520 [dict release];
2526 GPBInt64DoubleDictionary *dict =
2530 XCTAssertNotNil(dict);
2531 XCTAssertEqual(dict.count, 4U);
2533 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2534 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2536 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2537 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2539 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2540 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2542 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2543 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2546 [dict setDouble:603. forKey:21LL];
2547 XCTAssertEqual(dict.count, 4U);
2548 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2549 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2551 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2552 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2554 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2555 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2557 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2558 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2561 [dict setDouble:601. forKey:24LL];
2562 XCTAssertEqual(dict.count, 4U);
2563 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2564 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2566 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2567 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2569 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2570 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2572 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2573 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2583 [dict addEntriesFromDictionary:dict2];
2584 XCTAssertEqual(dict.count, 4U);
2585 XCTAssertTrue([dict getDouble:NULL forKey:21LL]);
2586 XCTAssertTrue([dict getDouble:&value forKey:21LL]);
2588 XCTAssertTrue([dict getDouble:NULL forKey:22LL]);
2589 XCTAssertTrue([dict getDouble:&value forKey:22LL]);
2591 XCTAssertTrue([dict getDouble:NULL forKey:23LL]);
2592 XCTAssertTrue([dict getDouble:&value forKey:23LL]);
2594 XCTAssertTrue([dict getDouble:NULL forKey:24LL]);
2595 XCTAssertTrue([dict getDouble:&value forKey:24LL]);
2599 [dict release];
2612 GPBInt64EnumDictionary *dict = [[GPBInt64EnumDictionary alloc] init];
2613 XCTAssertNotNil(dict);
2614 XCTAssertEqual(dict.count, 0U);
2615 XCTAssertFalse([dict getEnum:NULL forKey:21LL]);
2616 [dict enumerateKeysAndEnumsUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2620 [dict release];
2624 GPBInt64EnumDictionary *dict = [[GPBInt64EnumDictionary alloc] init];
2625 [dict setEnum:700 forKey:21LL];
2626 XCTAssertNotNil(dict);
2627 XCTAssertEqual(dict.count, 1U);
2629 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2630 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2632 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
2633 [dict enumerateKeysAndEnumsUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2638 [dict release];
2644 GPBInt64EnumDictionary *dict =
2648 XCTAssertNotNil(dict);
2649 XCTAssertEqual(dict.count, 3U);
2651 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2652 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2654 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2655 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2657 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2658 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2660 XCTAssertFalse([dict getEnum:NULL forKey:24LL]);
2665 [dict enumerateKeysAndEnumsUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2687 [dict enumerateKeysAndEnumsUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2693 [dict release];
2753 GPBInt64EnumDictionary *dict =
2757 XCTAssertNotNil(dict);
2759 GPBInt64EnumDictionary *dict2 = [dict copy];
2763 XCTAssertNotEqual(dict, dict2);
2764 XCTAssertEqualObjects(dict, dict2);
2768 [dict release];
2774 GPBInt64EnumDictionary *dict =
2778 XCTAssertNotNil(dict);
2781 [[GPBInt64EnumDictionary alloc] initWithDictionary:dict];
2785 XCTAssertNotEqual(dict, dict2);
2786 XCTAssertEqualObjects(dict, dict2);
2788 [dict release];
2792 GPBInt64EnumDictionary *dict = [[GPBInt64EnumDictionary alloc] init];
2793 XCTAssertNotNil(dict);
2795 XCTAssertEqual(dict.count, 0U);
2796 [dict setEnum:700 forKey:21LL];
2797 XCTAssertEqual(dict.count, 1U);
2806 [dict addRawEntriesFromDictionary:dict2];
2807 XCTAssertEqual(dict.count, 4U);
2810 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2811 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2813 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2814 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2816 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2817 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2819 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2820 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2823 [dict release];
2829 GPBInt64EnumDictionary *dict =
2833 XCTAssertNotNil(dict);
2834 XCTAssertEqual(dict.count, 4U);
2836 [dict removeEnumForKey:22LL];
2837 XCTAssertEqual(dict.count, 3U);
2839 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2840 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2842 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
2843 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2844 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2846 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2847 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2851 [dict removeEnumForKey:22LL];
2852 XCTAssertEqual(dict.count, 3U);
2853 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2854 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2856 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
2857 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2858 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2860 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2861 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2864 [dict removeEnumForKey:24LL];
2865 XCTAssertEqual(dict.count, 2U);
2866 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2867 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2869 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
2870 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2871 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2873 XCTAssertFalse([dict getEnum:NULL forKey:24LL]);
2875 [dict removeAll];
2876 XCTAssertEqual(dict.count, 0U);
2877 XCTAssertFalse([dict getEnum:NULL forKey:21LL]);
2878 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
2879 XCTAssertFalse([dict getEnum:NULL forKey:23LL]);
2880 XCTAssertFalse([dict getEnum:NULL forKey:24LL]);
2881 [dict release];
2887 GPBInt64EnumDictionary *dict =
2891 XCTAssertNotNil(dict);
2892 XCTAssertEqual(dict.count, 4U);
2894 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2895 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2897 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2898 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2900 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2901 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2903 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2904 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2907 [dict setEnum:703 forKey:21LL];
2908 XCTAssertEqual(dict.count, 4U);
2909 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2910 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2912 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2913 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2915 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2916 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2918 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2919 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2922 [dict setEnum:701 forKey:24LL];
2923 XCTAssertEqual(dict.count, 4U);
2924 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2925 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2927 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2928 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2930 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2931 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2933 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2934 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2944 [dict addRawEntriesFromDictionary:dict2];
2945 XCTAssertEqual(dict.count, 4U);
2946 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
2947 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
2949 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2950 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2952 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
2953 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
2955 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
2956 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
2960 [dict release];
2975 GPBInt64EnumDictionary *dict =
2980 XCTAssertNotNil(dict);
2981 XCTAssertEqual(dict.count, 3U);
2982 XCTAssertTrue(dict.validationFunc == TestingEnum_IsValidValue); // Pointer comparison
2984 XCTAssertTrue([dict getRawValue:NULL forKey:21LL]);
2985 XCTAssertTrue([dict getRawValue:&value forKey:21LL]);
2987 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
2988 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
2990 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
2991 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
2993 XCTAssertTrue([dict getRawValue:NULL forKey:23LL]);
2994 XCTAssertTrue([dict getRawValue:&value forKey:23LL]);
2996 XCTAssertFalse([dict getRawValue:NULL forKey:24LL]);
3001 [dict enumerateKeysAndEnumsUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3023 [dict enumerateKeysAndRawValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3045 [dict enumerateKeysAndRawValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3051 [dict release];
3116 GPBInt64EnumDictionary *dict =
3121 XCTAssertNotNil(dict);
3123 GPBInt64EnumDictionary *dict2 = [dict copy];
3127 XCTAssertNotEqual(dict, dict2);
3128 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3129 XCTAssertEqualObjects(dict, dict2);
3132 [dict release];
3138 GPBInt64EnumDictionary *dict =
3143 XCTAssertNotNil(dict);
3146 [[GPBInt64EnumDictionary alloc] initWithDictionary:dict];
3150 XCTAssertNotEqual(dict, dict2);
3151 XCTAssertEqualObjects(dict, dict2);
3152 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3154 [dict release];
3158 GPBInt64EnumDictionary *dict =
3160 XCTAssertNotNil(dict);
3162 XCTAssertEqual(dict.count, 0U);
3163 XCTAssertThrowsSpecificNamed([dict setEnum:801 forKey:22LL], // Unknown
3165 XCTAssertEqual(dict.count, 0U);
3166 [dict setRawValue:801 forKey:22LL]; // Unknown
3167 XCTAssertEqual(dict.count, 1U);
3176 [dict addRawEntriesFromDictionary:dict2];
3177 XCTAssertEqual(dict.count, 4U);
3180 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3181 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3183 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
3184 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
3186 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
3187 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
3189 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3190 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3192 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
3193 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
3195 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3196 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3199 [dict release];
3205 GPBInt64EnumDictionary *dict =
3210 XCTAssertNotNil(dict);
3211 XCTAssertEqual(dict.count, 4U);
3213 [dict removeEnumForKey:22LL];
3214 XCTAssertEqual(dict.count, 3U);
3216 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3217 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3219 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
3220 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3221 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3223 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3224 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3228 [dict removeEnumForKey:22LL];
3229 XCTAssertEqual(dict.count, 3U);
3230 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3231 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3233 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
3234 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3235 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3237 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3238 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3241 [dict removeEnumForKey:24LL];
3242 XCTAssertEqual(dict.count, 2U);
3243 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3244 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3246 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
3247 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3248 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3250 XCTAssertFalse([dict getEnum:NULL forKey:24LL]);
3252 [dict removeAll];
3253 XCTAssertEqual(dict.count, 0U);
3254 XCTAssertFalse([dict getEnum:NULL forKey:21LL]);
3255 XCTAssertFalse([dict getEnum:NULL forKey:22LL]);
3256 XCTAssertFalse([dict getEnum:NULL forKey:23LL]);
3257 XCTAssertFalse([dict getEnum:NULL forKey:24LL]);
3258 [dict release];
3264 GPBInt64EnumDictionary *dict =
3269 XCTAssertNotNil(dict);
3270 XCTAssertEqual(dict.count, 4U);
3272 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3273 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3275 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
3276 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
3278 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3279 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3281 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3282 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3285 XCTAssertThrowsSpecificNamed([dict setEnum:803 forKey:21LL], // Unknown
3287 XCTAssertEqual(dict.count, 4U);
3288 XCTAssertTrue([dict getEnum:NULL forKey:21LL]);
3289 XCTAssertTrue([dict getEnum:&value forKey:21LL]);
3291 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
3292 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
3294 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3295 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3297 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3298 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3301 [dict setRawValue:803 forKey:21LL]; // Unknown
3302 XCTAssertEqual(dict.count, 4U);
3303 XCTAssertTrue([dict getRawValue:NULL forKey:21LL]);
3304 XCTAssertTrue([dict getRawValue:&value forKey:21LL]);
3306 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
3307 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
3309 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3310 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3312 XCTAssertTrue([dict getRawValue:NULL forKey:24LL]);
3313 XCTAssertTrue([dict getRawValue:&value forKey:24LL]);
3316 [dict setRawValue:700 forKey:24LL];
3317 XCTAssertEqual(dict.count, 4U);
3318 XCTAssertTrue([dict getRawValue:NULL forKey:21LL]);
3319 XCTAssertTrue([dict getRawValue:&value forKey:21LL]);
3321 XCTAssertTrue([dict getRawValue:NULL forKey:22LL]);
3322 XCTAssertTrue([dict getRawValue:&value forKey:22LL]);
3324 XCTAssertTrue([dict getEnum:NULL forKey:23LL]);
3325 XCTAssertTrue([dict getEnum:&value forKey:23LL]);
3327 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
3328 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
3339 [dict addRawEntriesFromDictionary:dict2];
3340 XCTAssertEqual(dict.count, 4U);
3341 XCTAssertTrue([dict getRawValue:NULL forKey:21LL]);
3342 XCTAssertTrue([dict getRawValue:&value forKey:21LL]);
3344 XCTAssertTrue([dict getEnum:NULL forKey:22LL]);
3345 XCTAssertTrue([dict getEnum:&value forKey:22LL]);
3347 XCTAssertTrue([dict getRawValue:NULL forKey:23LL]);
3348 XCTAssertTrue([dict getRawValue:&value forKey:23LL]);
3350 XCTAssertTrue([dict getEnum:NULL forKey:24LL]);
3351 XCTAssertTrue([dict getEnum:&value forKey:24LL]);
3355 [dict release];
3361 GPBInt64EnumDictionary *dict =
3366 XCTAssertNotNil(dict);
3368 GPBInt64EnumDictionary *dict2 = [dict copy];
3372 XCTAssertNotEqual(dict, dict2);
3373 XCTAssertEqualObjects(dict, dict2);
3374 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3378 [dict release];
3391 GPBInt64ObjectDictionary<NSString*> *dict = [[GPBInt64ObjectDictionary alloc] init];
3392 XCTAssertNotNil(dict);
3393 XCTAssertEqual(dict.count, 0U);
3394 XCTAssertNil([dict objectForKey:21LL]);
3395 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3399 [dict release];
3403 GPBInt64ObjectDictionary<NSString*> *dict = [[GPBInt64ObjectDictionary alloc] init];
3404 [dict setObject:@"abc" forKey:21LL];
3405 XCTAssertNotNil(dict);
3406 XCTAssertEqual(dict.count, 1U);
3407 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3408 XCTAssertNil([dict objectForKey:22LL]);
3409 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3414 [dict release];
3420 GPBInt64ObjectDictionary<NSString*> *dict =
3424 XCTAssertNotNil(dict);
3425 XCTAssertEqual(dict.count, 3U);
3426 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3427 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3428 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3429 XCTAssertNil([dict objectForKey:24LL]);
3434 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3456 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3462 [dict release];
3522 GPBInt64ObjectDictionary<NSString*> *dict =
3526 XCTAssertNotNil(dict);
3528 GPBInt64ObjectDictionary<NSString*> *dict2 = [dict copy];
3532 XCTAssertNotEqual(dict, dict2);
3533 XCTAssertEqualObjects(dict, dict2);
3537 [dict release];
3543 GPBInt64ObjectDictionary<NSString*> *dict =
3547 XCTAssertNotNil(dict);
3550 [[GPBInt64ObjectDictionary alloc] initWithDictionary:dict];
3554 XCTAssertNotEqual(dict, dict2);
3555 XCTAssertEqualObjects(dict, dict2);
3557 [dict release];
3561 GPBInt64ObjectDictionary<NSString*> *dict = [[GPBInt64ObjectDictionary alloc] init];
3562 XCTAssertNotNil(dict);
3564 XCTAssertEqual(dict.count, 0U);
3565 [dict setObject:@"abc" forKey:21LL];
3566 XCTAssertEqual(dict.count, 1U);
3575 [dict addEntriesFromDictionary:dict2];
3576 XCTAssertEqual(dict.count, 4U);
3578 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3579 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3580 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3581 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3583 [dict release];
3589 GPBInt64ObjectDictionary<NSString*> *dict =
3593 XCTAssertNotNil(dict);
3594 XCTAssertEqual(dict.count, 4U);
3596 [dict removeObjectForKey:22LL];
3597 XCTAssertEqual(dict.count, 3U);
3598 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3599 XCTAssertNil([dict objectForKey:22LL]);
3600 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3601 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3604 [dict removeObjectForKey:22LL];
3605 XCTAssertEqual(dict.count, 3U);
3606 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3607 XCTAssertNil([dict objectForKey:22LL]);
3608 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3609 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3611 [dict removeObjectForKey:24LL];
3612 XCTAssertEqual(dict.count, 2U);
3613 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3614 XCTAssertNil([dict objectForKey:22LL]);
3615 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3616 XCTAssertNil([dict objectForKey:24LL]);
3618 [dict removeAll];
3619 XCTAssertEqual(dict.count, 0U);
3620 XCTAssertNil([dict objectForKey:21LL]);
3621 XCTAssertNil([dict objectForKey:22LL]);
3622 XCTAssertNil([dict objectForKey:23LL]);
3623 XCTAssertNil([dict objectForKey:24LL]);
3624 [dict release];
3630 GPBInt64ObjectDictionary<NSString*> *dict =
3634 XCTAssertNotNil(dict);
3635 XCTAssertEqual(dict.count, 4U);
3636 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3637 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3638 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3639 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3641 [dict setObject:@"jkl" forKey:21LL];
3642 XCTAssertEqual(dict.count, 4U);
3643 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3644 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3645 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3646 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3648 [dict setObject:@"def" forKey:24LL];
3649 XCTAssertEqual(dict.count, 4U);
3650 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3651 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3652 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3653 XCTAssertEqualObjects([dict objectForKey:24LL], @"def");
3662 [dict addEntriesFromDictionary:dict2];
3663 XCTAssertEqual(dict.count, 4U);
3664 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3665 XCTAssertEqualObjects([dict objectForKey:22LL], @"ghi");
3666 XCTAssertEqualObjects([dict objectForKey:23LL], @"abc");
3667 XCTAssertEqualObjects([dict objectForKey:24LL], @"def");
3670 [dict release];