Lines Matching full:dict

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