Lines Matching full:dict
94 GPBInt64UInt32Dictionary *dict = [[GPBInt64UInt32Dictionary alloc] init];
95 XCTAssertNotNil(dict);
96 XCTAssertEqual(dict.count, 0U);
97 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
98 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
102 [dict release];
106 GPBInt64UInt32Dictionary *dict = [GPBInt64UInt32Dictionary dictionaryWithValue:100U forKey:21LL];
107 XCTAssertNotNil(dict);
108 XCTAssertEqual(dict.count, 1U);
110 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
111 XCTAssertTrue([dict valueForKey:21LL value:&value]);
113 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
114 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
124 GPBInt64UInt32Dictionary *dict =
128 XCTAssertNotNil(dict);
129 XCTAssertEqual(dict.count, 3U);
131 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
132 XCTAssertTrue([dict valueForKey:21LL value:&value]);
134 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
135 XCTAssertTrue([dict valueForKey:22LL value:&value]);
137 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
138 XCTAssertTrue([dict valueForKey:23LL value:&value]);
140 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
145 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
167 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint32_t aValue, BOOL *stop) {
173 [dict release];
233 GPBInt64UInt32Dictionary *dict =
237 XCTAssertNotNil(dict);
239 GPBInt64UInt32Dictionary *dict2 = [dict copy];
243 XCTAssertNotEqual(dict, dict2);
244 XCTAssertEqualObjects(dict, dict2);
248 [dict release];
254 GPBInt64UInt32Dictionary *dict =
258 XCTAssertNotNil(dict);
261 [GPBInt64UInt32Dictionary dictionaryWithDictionary:dict];
265 XCTAssertNotEqual(dict, dict2);
266 XCTAssertEqualObjects(dict, dict2);
267 [dict release];
271 GPBInt64UInt32Dictionary *dict = [GPBInt64UInt32Dictionary dictionary];
272 XCTAssertNotNil(dict);
274 XCTAssertEqual(dict.count, 0U);
275 [dict setValue:100U forKey:21LL];
276 XCTAssertEqual(dict.count, 1U);
285 [dict addEntriesFromDictionary:dict2];
286 XCTAssertEqual(dict.count, 4U);
289 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
290 XCTAssertTrue([dict valueForKey:21LL value:&value]);
292 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
293 XCTAssertTrue([dict valueForKey:22LL value:&value]);
295 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
296 XCTAssertTrue([dict valueForKey:23LL value:&value]);
298 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
299 XCTAssertTrue([dict valueForKey:24LL value:&value]);
307 GPBInt64UInt32Dictionary *dict =
311 XCTAssertNotNil(dict);
312 XCTAssertEqual(dict.count, 4U);
314 [dict removeValueForKey:22LL];
315 XCTAssertEqual(dict.count, 3U);
317 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
318 XCTAssertTrue([dict valueForKey:21LL value:&value]);
320 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
321 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
322 XCTAssertTrue([dict valueForKey:23LL value:&value]);
324 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
325 XCTAssertTrue([dict valueForKey:24LL value:&value]);
329 [dict removeValueForKey:22LL];
330 XCTAssertEqual(dict.count, 3U);
331 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
332 XCTAssertTrue([dict valueForKey:21LL value:&value]);
334 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
335 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
336 XCTAssertTrue([dict valueForKey:23LL value:&value]);
338 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
339 XCTAssertTrue([dict valueForKey:24LL value:&value]);
342 [dict removeValueForKey:24LL];
343 XCTAssertEqual(dict.count, 2U);
344 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
345 XCTAssertTrue([dict valueForKey:21LL value:&value]);
347 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
348 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
349 XCTAssertTrue([dict valueForKey:23LL value:&value]);
351 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
353 [dict removeAll];
354 XCTAssertEqual(dict.count, 0U);
355 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
356 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
357 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
358 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
359 [dict release];
365 GPBInt64UInt32Dictionary *dict =
369 XCTAssertNotNil(dict);
370 XCTAssertEqual(dict.count, 4U);
372 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
373 XCTAssertTrue([dict valueForKey:21LL value:&value]);
375 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
376 XCTAssertTrue([dict valueForKey:22LL value:&value]);
378 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
379 XCTAssertTrue([dict valueForKey:23LL value:&value]);
381 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
382 XCTAssertTrue([dict valueForKey:24LL value:&value]);
385 [dict setValue:103U forKey:21LL];
386 XCTAssertEqual(dict.count, 4U);
387 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
388 XCTAssertTrue([dict valueForKey:21LL value:&value]);
390 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
391 XCTAssertTrue([dict valueForKey:22LL value:&value]);
393 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
394 XCTAssertTrue([dict valueForKey:23LL value:&value]);
396 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
397 XCTAssertTrue([dict valueForKey:24LL value:&value]);
400 [dict setValue:101U forKey:24LL];
401 XCTAssertEqual(dict.count, 4U);
402 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
403 XCTAssertTrue([dict valueForKey:21LL value:&value]);
405 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
406 XCTAssertTrue([dict valueForKey:22LL value:&value]);
408 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
409 XCTAssertTrue([dict valueForKey:23LL value:&value]);
411 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
412 XCTAssertTrue([dict valueForKey:24LL value:&value]);
422 [dict addEntriesFromDictionary:dict2];
423 XCTAssertEqual(dict.count, 4U);
424 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
425 XCTAssertTrue([dict valueForKey:21LL value:&value]);
427 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
428 XCTAssertTrue([dict valueForKey:22LL value:&value]);
430 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
431 XCTAssertTrue([dict valueForKey:23LL value:&value]);
433 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
434 XCTAssertTrue([dict valueForKey:24LL value:&value]);
438 [dict release];
451 GPBInt64Int32Dictionary *dict = [[GPBInt64Int32Dictionary alloc] init];
452 XCTAssertNotNil(dict);
453 XCTAssertEqual(dict.count, 0U);
454 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
455 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
459 [dict release];
463 GPBInt64Int32Dictionary *dict = [GPBInt64Int32Dictionary dictionaryWithValue:200 forKey:21LL];
464 XCTAssertNotNil(dict);
465 XCTAssertEqual(dict.count, 1U);
467 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
468 XCTAssertTrue([dict valueForKey:21LL value:&value]);
470 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
471 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
481 GPBInt64Int32Dictionary *dict =
485 XCTAssertNotNil(dict);
486 XCTAssertEqual(dict.count, 3U);
488 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
489 XCTAssertTrue([dict valueForKey:21LL value:&value]);
491 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
492 XCTAssertTrue([dict valueForKey:22LL value:&value]);
494 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
495 XCTAssertTrue([dict valueForKey:23LL value:&value]);
497 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
502 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
524 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
530 [dict release];
590 GPBInt64Int32Dictionary *dict =
594 XCTAssertNotNil(dict);
596 GPBInt64Int32Dictionary *dict2 = [dict copy];
600 XCTAssertNotEqual(dict, dict2);
601 XCTAssertEqualObjects(dict, dict2);
605 [dict release];
611 GPBInt64Int32Dictionary *dict =
615 XCTAssertNotNil(dict);
618 [GPBInt64Int32Dictionary dictionaryWithDictionary:dict];
622 XCTAssertNotEqual(dict, dict2);
623 XCTAssertEqualObjects(dict, dict2);
624 [dict release];
628 GPBInt64Int32Dictionary *dict = [GPBInt64Int32Dictionary dictionary];
629 XCTAssertNotNil(dict);
631 XCTAssertEqual(dict.count, 0U);
632 [dict setValue:200 forKey:21LL];
633 XCTAssertEqual(dict.count, 1U);
642 [dict addEntriesFromDictionary:dict2];
643 XCTAssertEqual(dict.count, 4U);
646 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
647 XCTAssertTrue([dict valueForKey:21LL value:&value]);
649 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
650 XCTAssertTrue([dict valueForKey:22LL value:&value]);
652 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
653 XCTAssertTrue([dict valueForKey:23LL value:&value]);
655 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
656 XCTAssertTrue([dict valueForKey:24LL value:&value]);
664 GPBInt64Int32Dictionary *dict =
668 XCTAssertNotNil(dict);
669 XCTAssertEqual(dict.count, 4U);
671 [dict removeValueForKey:22LL];
672 XCTAssertEqual(dict.count, 3U);
674 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
675 XCTAssertTrue([dict valueForKey:21LL value:&value]);
677 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
678 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
679 XCTAssertTrue([dict valueForKey:23LL value:&value]);
681 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
682 XCTAssertTrue([dict valueForKey:24LL value:&value]);
686 [dict removeValueForKey:22LL];
687 XCTAssertEqual(dict.count, 3U);
688 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
689 XCTAssertTrue([dict valueForKey:21LL value:&value]);
691 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
692 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
693 XCTAssertTrue([dict valueForKey:23LL value:&value]);
695 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
696 XCTAssertTrue([dict valueForKey:24LL value:&value]);
699 [dict removeValueForKey:24LL];
700 XCTAssertEqual(dict.count, 2U);
701 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
702 XCTAssertTrue([dict valueForKey:21LL value:&value]);
704 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
705 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
706 XCTAssertTrue([dict valueForKey:23LL value:&value]);
708 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
710 [dict removeAll];
711 XCTAssertEqual(dict.count, 0U);
712 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
713 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
714 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
715 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
716 [dict release];
722 GPBInt64Int32Dictionary *dict =
726 XCTAssertNotNil(dict);
727 XCTAssertEqual(dict.count, 4U);
729 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
730 XCTAssertTrue([dict valueForKey:21LL value:&value]);
732 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
733 XCTAssertTrue([dict valueForKey:22LL value:&value]);
735 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
736 XCTAssertTrue([dict valueForKey:23LL value:&value]);
738 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
739 XCTAssertTrue([dict valueForKey:24LL value:&value]);
742 [dict setValue:203 forKey:21LL];
743 XCTAssertEqual(dict.count, 4U);
744 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
745 XCTAssertTrue([dict valueForKey:21LL value:&value]);
747 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
748 XCTAssertTrue([dict valueForKey:22LL value:&value]);
750 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
751 XCTAssertTrue([dict valueForKey:23LL value:&value]);
753 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
754 XCTAssertTrue([dict valueForKey:24LL value:&value]);
757 [dict setValue:201 forKey:24LL];
758 XCTAssertEqual(dict.count, 4U);
759 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
760 XCTAssertTrue([dict valueForKey:21LL value:&value]);
762 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
763 XCTAssertTrue([dict valueForKey:22LL value:&value]);
765 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
766 XCTAssertTrue([dict valueForKey:23LL value:&value]);
768 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
769 XCTAssertTrue([dict valueForKey:24LL value:&value]);
779 [dict addEntriesFromDictionary:dict2];
780 XCTAssertEqual(dict.count, 4U);
781 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
782 XCTAssertTrue([dict valueForKey:21LL value:&value]);
784 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
785 XCTAssertTrue([dict valueForKey:22LL value:&value]);
787 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
788 XCTAssertTrue([dict valueForKey:23LL value:&value]);
790 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
791 XCTAssertTrue([dict valueForKey:24LL value:&value]);
795 [dict release];
808 GPBInt64UInt64Dictionary *dict = [[GPBInt64UInt64Dictionary alloc] init];
809 XCTAssertNotNil(dict);
810 XCTAssertEqual(dict.count, 0U);
811 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
812 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
816 [dict release];
820 GPBInt64UInt64Dictionary *dict = [GPBInt64UInt64Dictionary dictionaryWithValue:300U forKey:21LL];
821 XCTAssertNotNil(dict);
822 XCTAssertEqual(dict.count, 1U);
824 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
825 XCTAssertTrue([dict valueForKey:21LL value:&value]);
827 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
828 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
838 GPBInt64UInt64Dictionary *dict =
842 XCTAssertNotNil(dict);
843 XCTAssertEqual(dict.count, 3U);
845 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
846 XCTAssertTrue([dict valueForKey:21LL value:&value]);
848 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
849 XCTAssertTrue([dict valueForKey:22LL value:&value]);
851 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
852 XCTAssertTrue([dict valueForKey:23LL value:&value]);
854 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
859 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
881 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, uint64_t aValue, BOOL *stop) {
887 [dict release];
947 GPBInt64UInt64Dictionary *dict =
951 XCTAssertNotNil(dict);
953 GPBInt64UInt64Dictionary *dict2 = [dict copy];
957 XCTAssertNotEqual(dict, dict2);
958 XCTAssertEqualObjects(dict, dict2);
962 [dict release];
968 GPBInt64UInt64Dictionary *dict =
972 XCTAssertNotNil(dict);
975 [GPBInt64UInt64Dictionary dictionaryWithDictionary:dict];
979 XCTAssertNotEqual(dict, dict2);
980 XCTAssertEqualObjects(dict, dict2);
981 [dict release];
985 GPBInt64UInt64Dictionary *dict = [GPBInt64UInt64Dictionary dictionary];
986 XCTAssertNotNil(dict);
988 XCTAssertEqual(dict.count, 0U);
989 [dict setValue:300U forKey:21LL];
990 XCTAssertEqual(dict.count, 1U);
999 [dict addEntriesFromDictionary:dict2];
1000 XCTAssertEqual(dict.count, 4U);
1003 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1004 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1006 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1007 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1009 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1010 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1012 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1013 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1021 GPBInt64UInt64Dictionary *dict =
1025 XCTAssertNotNil(dict);
1026 XCTAssertEqual(dict.count, 4U);
1028 [dict removeValueForKey:22LL];
1029 XCTAssertEqual(dict.count, 3U);
1031 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1032 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1034 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1035 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1036 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1038 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1039 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1043 [dict removeValueForKey:22LL];
1044 XCTAssertEqual(dict.count, 3U);
1045 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1046 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1048 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1049 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1050 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1052 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1053 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1056 [dict removeValueForKey:24LL];
1057 XCTAssertEqual(dict.count, 2U);
1058 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1059 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1061 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1062 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1063 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1065 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1067 [dict removeAll];
1068 XCTAssertEqual(dict.count, 0U);
1069 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1070 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1071 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
1072 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1073 [dict release];
1079 GPBInt64UInt64Dictionary *dict =
1083 XCTAssertNotNil(dict);
1084 XCTAssertEqual(dict.count, 4U);
1086 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1087 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1089 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1090 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1092 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1093 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1095 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1096 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1099 [dict setValue:303U forKey:21LL];
1100 XCTAssertEqual(dict.count, 4U);
1101 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1102 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1104 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1105 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1107 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1108 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1110 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1111 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1114 [dict setValue:301U forKey:24LL];
1115 XCTAssertEqual(dict.count, 4U);
1116 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1117 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1119 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1120 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1122 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1123 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1125 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1126 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1136 [dict addEntriesFromDictionary:dict2];
1137 XCTAssertEqual(dict.count, 4U);
1138 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1139 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1141 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1142 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1144 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1145 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1147 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1148 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1152 [dict release];
1165 GPBInt64Int64Dictionary *dict = [[GPBInt64Int64Dictionary alloc] init];
1166 XCTAssertNotNil(dict);
1167 XCTAssertEqual(dict.count, 0U);
1168 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1169 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1173 [dict release];
1177 GPBInt64Int64Dictionary *dict = [GPBInt64Int64Dictionary dictionaryWithValue:400 forKey:21LL];
1178 XCTAssertNotNil(dict);
1179 XCTAssertEqual(dict.count, 1U);
1181 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1182 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1184 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1185 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1195 GPBInt64Int64Dictionary *dict =
1199 XCTAssertNotNil(dict);
1200 XCTAssertEqual(dict.count, 3U);
1202 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1203 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1205 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1206 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1208 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1209 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1211 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1216 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1238 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int64_t aValue, BOOL *stop) {
1244 [dict release];
1304 GPBInt64Int64Dictionary *dict =
1308 XCTAssertNotNil(dict);
1310 GPBInt64Int64Dictionary *dict2 = [dict copy];
1314 XCTAssertNotEqual(dict, dict2);
1315 XCTAssertEqualObjects(dict, dict2);
1319 [dict release];
1325 GPBInt64Int64Dictionary *dict =
1329 XCTAssertNotNil(dict);
1332 [GPBInt64Int64Dictionary dictionaryWithDictionary:dict];
1336 XCTAssertNotEqual(dict, dict2);
1337 XCTAssertEqualObjects(dict, dict2);
1338 [dict release];
1342 GPBInt64Int64Dictionary *dict = [GPBInt64Int64Dictionary dictionary];
1343 XCTAssertNotNil(dict);
1345 XCTAssertEqual(dict.count, 0U);
1346 [dict setValue:400 forKey:21LL];
1347 XCTAssertEqual(dict.count, 1U);
1356 [dict addEntriesFromDictionary:dict2];
1357 XCTAssertEqual(dict.count, 4U);
1360 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1361 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1363 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1364 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1366 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1367 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1369 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1370 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1378 GPBInt64Int64Dictionary *dict =
1382 XCTAssertNotNil(dict);
1383 XCTAssertEqual(dict.count, 4U);
1385 [dict removeValueForKey:22LL];
1386 XCTAssertEqual(dict.count, 3U);
1388 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1389 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1391 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1392 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1393 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1395 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1396 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1400 [dict removeValueForKey:22LL];
1401 XCTAssertEqual(dict.count, 3U);
1402 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1403 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1405 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1406 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1407 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1409 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1410 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1413 [dict removeValueForKey:24LL];
1414 XCTAssertEqual(dict.count, 2U);
1415 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1416 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1418 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1419 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1420 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1422 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1424 [dict removeAll];
1425 XCTAssertEqual(dict.count, 0U);
1426 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1427 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1428 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
1429 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1430 [dict release];
1436 GPBInt64Int64Dictionary *dict =
1440 XCTAssertNotNil(dict);
1441 XCTAssertEqual(dict.count, 4U);
1443 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1444 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1446 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1447 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1449 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1450 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1452 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1453 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1456 [dict setValue:403 forKey:21LL];
1457 XCTAssertEqual(dict.count, 4U);
1458 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1459 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1461 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1462 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1464 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1465 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1467 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1468 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1471 [dict setValue:401 forKey:24LL];
1472 XCTAssertEqual(dict.count, 4U);
1473 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1474 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1476 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1477 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1479 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1480 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1482 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1483 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1493 [dict addEntriesFromDictionary:dict2];
1494 XCTAssertEqual(dict.count, 4U);
1495 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1496 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1498 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1499 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1501 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1502 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1504 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1505 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1509 [dict release];
1522 GPBInt64BoolDictionary *dict = [[GPBInt64BoolDictionary alloc] init];
1523 XCTAssertNotNil(dict);
1524 XCTAssertEqual(dict.count, 0U);
1525 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1526 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1530 [dict release];
1534 GPBInt64BoolDictionary *dict = [GPBInt64BoolDictionary dictionaryWithValue:YES forKey:21LL];
1535 XCTAssertNotNil(dict);
1536 XCTAssertEqual(dict.count, 1U);
1538 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1539 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1541 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1542 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1552 GPBInt64BoolDictionary *dict =
1556 XCTAssertNotNil(dict);
1557 XCTAssertEqual(dict.count, 3U);
1559 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1560 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1562 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1563 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1565 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1566 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1568 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1573 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1595 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, BOOL aValue, BOOL *stop) {
1601 [dict release];
1661 GPBInt64BoolDictionary *dict =
1665 XCTAssertNotNil(dict);
1667 GPBInt64BoolDictionary *dict2 = [dict copy];
1671 XCTAssertNotEqual(dict, dict2);
1672 XCTAssertEqualObjects(dict, dict2);
1676 [dict release];
1682 GPBInt64BoolDictionary *dict =
1686 XCTAssertNotNil(dict);
1689 [GPBInt64BoolDictionary dictionaryWithDictionary:dict];
1693 XCTAssertNotEqual(dict, dict2);
1694 XCTAssertEqualObjects(dict, dict2);
1695 [dict release];
1699 GPBInt64BoolDictionary *dict = [GPBInt64BoolDictionary dictionary];
1700 XCTAssertNotNil(dict);
1702 XCTAssertEqual(dict.count, 0U);
1703 [dict setValue:YES forKey:21LL];
1704 XCTAssertEqual(dict.count, 1U);
1713 [dict addEntriesFromDictionary:dict2];
1714 XCTAssertEqual(dict.count, 4U);
1717 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1718 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1720 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1721 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1723 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1724 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1726 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1727 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1735 GPBInt64BoolDictionary *dict =
1739 XCTAssertNotNil(dict);
1740 XCTAssertEqual(dict.count, 4U);
1742 [dict removeValueForKey:22LL];
1743 XCTAssertEqual(dict.count, 3U);
1745 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1746 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1748 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1749 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1750 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1752 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1753 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1757 [dict removeValueForKey:22LL];
1758 XCTAssertEqual(dict.count, 3U);
1759 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1760 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1762 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1763 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1764 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1766 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1767 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1770 [dict removeValueForKey:24LL];
1771 XCTAssertEqual(dict.count, 2U);
1772 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1773 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1775 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1776 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1777 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1779 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1781 [dict removeAll];
1782 XCTAssertEqual(dict.count, 0U);
1783 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1784 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1785 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
1786 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1787 [dict release];
1793 GPBInt64BoolDictionary *dict =
1797 XCTAssertNotNil(dict);
1798 XCTAssertEqual(dict.count, 4U);
1800 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1801 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1803 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1804 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1806 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1807 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1809 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1810 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1813 [dict setValue:NO forKey:21LL];
1814 XCTAssertEqual(dict.count, 4U);
1815 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1816 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1818 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1819 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1821 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1822 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1824 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1825 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1828 [dict setValue:YES forKey:24LL];
1829 XCTAssertEqual(dict.count, 4U);
1830 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1831 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1833 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1834 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1836 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1837 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1839 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1840 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1850 [dict addEntriesFromDictionary:dict2];
1851 XCTAssertEqual(dict.count, 4U);
1852 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1853 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1855 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1856 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1858 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1859 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1861 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
1862 XCTAssertTrue([dict valueForKey:24LL value:&value]);
1866 [dict release];
1879 GPBInt64FloatDictionary *dict = [[GPBInt64FloatDictionary alloc] init];
1880 XCTAssertNotNil(dict);
1881 XCTAssertEqual(dict.count, 0U);
1882 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
1883 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1887 [dict release];
1891 GPBInt64FloatDictionary *dict = [GPBInt64FloatDictionary dictionaryWithValue:500.f forKey:21LL];
1892 XCTAssertNotNil(dict);
1893 XCTAssertEqual(dict.count, 1U);
1895 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1896 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1898 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
1899 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1909 GPBInt64FloatDictionary *dict =
1913 XCTAssertNotNil(dict);
1914 XCTAssertEqual(dict.count, 3U);
1916 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
1917 XCTAssertTrue([dict valueForKey:21LL value:&value]);
1919 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
1920 XCTAssertTrue([dict valueForKey:22LL value:&value]);
1922 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
1923 XCTAssertTrue([dict valueForKey:23LL value:&value]);
1925 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
1930 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1952 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, float aValue, BOOL *stop) {
1958 [dict release];
2018 GPBInt64FloatDictionary *dict =
2022 XCTAssertNotNil(dict);
2024 GPBInt64FloatDictionary *dict2 = [dict copy];
2028 XCTAssertNotEqual(dict, dict2);
2029 XCTAssertEqualObjects(dict, dict2);
2033 [dict release];
2039 GPBInt64FloatDictionary *dict =
2043 XCTAssertNotNil(dict);
2046 [GPBInt64FloatDictionary dictionaryWithDictionary:dict];
2050 XCTAssertNotEqual(dict, dict2);
2051 XCTAssertEqualObjects(dict, dict2);
2052 [dict release];
2056 GPBInt64FloatDictionary *dict = [GPBInt64FloatDictionary dictionary];
2057 XCTAssertNotNil(dict);
2059 XCTAssertEqual(dict.count, 0U);
2060 [dict setValue:500.f forKey:21LL];
2061 XCTAssertEqual(dict.count, 1U);
2070 [dict addEntriesFromDictionary:dict2];
2071 XCTAssertEqual(dict.count, 4U);
2074 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2075 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2077 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2078 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2080 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2081 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2083 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2084 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2092 GPBInt64FloatDictionary *dict =
2096 XCTAssertNotNil(dict);
2097 XCTAssertEqual(dict.count, 4U);
2099 [dict removeValueForKey:22LL];
2100 XCTAssertEqual(dict.count, 3U);
2102 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2103 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2105 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2106 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2107 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2109 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2110 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2114 [dict removeValueForKey:22LL];
2115 XCTAssertEqual(dict.count, 3U);
2116 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2117 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2119 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2120 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2121 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2123 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2124 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2127 [dict removeValueForKey:24LL];
2128 XCTAssertEqual(dict.count, 2U);
2129 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2130 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2132 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2133 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2134 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2136 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2138 [dict removeAll];
2139 XCTAssertEqual(dict.count, 0U);
2140 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
2141 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2142 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
2143 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2144 [dict release];
2150 GPBInt64FloatDictionary *dict =
2154 XCTAssertNotNil(dict);
2155 XCTAssertEqual(dict.count, 4U);
2157 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2158 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2160 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2161 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2163 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2164 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2166 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2167 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2170 [dict setValue:503.f forKey:21LL];
2171 XCTAssertEqual(dict.count, 4U);
2172 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2173 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2175 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2176 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2178 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2179 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2181 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2182 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2185 [dict setValue:501.f forKey:24LL];
2186 XCTAssertEqual(dict.count, 4U);
2187 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2188 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2190 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2191 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2193 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2194 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2196 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2197 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2207 [dict addEntriesFromDictionary:dict2];
2208 XCTAssertEqual(dict.count, 4U);
2209 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2210 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2212 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2213 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2215 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2216 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2218 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2219 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2223 [dict release];
2236 GPBInt64DoubleDictionary *dict = [[GPBInt64DoubleDictionary alloc] init];
2237 XCTAssertNotNil(dict);
2238 XCTAssertEqual(dict.count, 0U);
2239 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
2240 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2244 [dict release];
2248 GPBInt64DoubleDictionary *dict = [GPBInt64DoubleDictionary dictionaryWithValue:600. forKey:21LL];
2249 XCTAssertNotNil(dict);
2250 XCTAssertEqual(dict.count, 1U);
2252 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2253 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2255 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2256 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2266 GPBInt64DoubleDictionary *dict =
2270 XCTAssertNotNil(dict);
2271 XCTAssertEqual(dict.count, 3U);
2273 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2274 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2276 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2277 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2279 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2280 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2282 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2287 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2309 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, double aValue, BOOL *stop) {
2315 [dict release];
2375 GPBInt64DoubleDictionary *dict =
2379 XCTAssertNotNil(dict);
2381 GPBInt64DoubleDictionary *dict2 = [dict copy];
2385 XCTAssertNotEqual(dict, dict2);
2386 XCTAssertEqualObjects(dict, dict2);
2390 [dict release];
2396 GPBInt64DoubleDictionary *dict =
2400 XCTAssertNotNil(dict);
2403 [GPBInt64DoubleDictionary dictionaryWithDictionary:dict];
2407 XCTAssertNotEqual(dict, dict2);
2408 XCTAssertEqualObjects(dict, dict2);
2409 [dict release];
2413 GPBInt64DoubleDictionary *dict = [GPBInt64DoubleDictionary dictionary];
2414 XCTAssertNotNil(dict);
2416 XCTAssertEqual(dict.count, 0U);
2417 [dict setValue:600. forKey:21LL];
2418 XCTAssertEqual(dict.count, 1U);
2427 [dict addEntriesFromDictionary:dict2];
2428 XCTAssertEqual(dict.count, 4U);
2431 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2432 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2434 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2435 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2437 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2438 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2440 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2441 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2449 GPBInt64DoubleDictionary *dict =
2453 XCTAssertNotNil(dict);
2454 XCTAssertEqual(dict.count, 4U);
2456 [dict removeValueForKey:22LL];
2457 XCTAssertEqual(dict.count, 3U);
2459 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2460 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2462 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2463 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2464 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2466 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2467 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2471 [dict removeValueForKey:22LL];
2472 XCTAssertEqual(dict.count, 3U);
2473 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2474 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2476 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2477 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2478 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2480 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2481 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2484 [dict removeValueForKey:24LL];
2485 XCTAssertEqual(dict.count, 2U);
2486 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2487 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2489 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2490 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2491 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2493 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2495 [dict removeAll];
2496 XCTAssertEqual(dict.count, 0U);
2497 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
2498 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2499 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
2500 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2501 [dict release];
2507 GPBInt64DoubleDictionary *dict =
2511 XCTAssertNotNil(dict);
2512 XCTAssertEqual(dict.count, 4U);
2514 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2515 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2517 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2518 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2520 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2521 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2523 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2524 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2527 [dict setValue:603. forKey:21LL];
2528 XCTAssertEqual(dict.count, 4U);
2529 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2530 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2532 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2533 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2535 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2536 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2538 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2539 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2542 [dict setValue:601. forKey:24LL];
2543 XCTAssertEqual(dict.count, 4U);
2544 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2545 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2547 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2548 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2550 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2551 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2553 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2554 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2564 [dict addEntriesFromDictionary:dict2];
2565 XCTAssertEqual(dict.count, 4U);
2566 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2567 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2569 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2570 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2572 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2573 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2575 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2576 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2580 [dict release];
2593 GPBInt64EnumDictionary *dict = [[GPBInt64EnumDictionary alloc] init];
2594 XCTAssertNotNil(dict);
2595 XCTAssertEqual(dict.count, 0U);
2596 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
2597 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2601 [dict release];
2605 GPBInt64EnumDictionary *dict = [GPBInt64EnumDictionary dictionaryWithValue:700 forKey:21LL];
2606 XCTAssertNotNil(dict);
2607 XCTAssertEqual(dict.count, 1U);
2609 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2610 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2612 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2613 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2623 GPBInt64EnumDictionary *dict =
2627 XCTAssertNotNil(dict);
2628 XCTAssertEqual(dict.count, 3U);
2630 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2631 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2633 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2634 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2636 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2637 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2639 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2644 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2666 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
2672 [dict release];
2732 GPBInt64EnumDictionary *dict =
2736 XCTAssertNotNil(dict);
2738 GPBInt64EnumDictionary *dict2 = [dict copy];
2742 XCTAssertNotEqual(dict, dict2);
2743 XCTAssertEqualObjects(dict, dict2);
2747 [dict release];
2753 GPBInt64EnumDictionary *dict =
2757 XCTAssertNotNil(dict);
2760 [GPBInt64EnumDictionary dictionaryWithDictionary:dict];
2764 XCTAssertNotEqual(dict, dict2);
2765 XCTAssertEqualObjects(dict, dict2);
2766 [dict release];
2770 GPBInt64EnumDictionary *dict = [GPBInt64EnumDictionary dictionary];
2771 XCTAssertNotNil(dict);
2773 XCTAssertEqual(dict.count, 0U);
2774 [dict setValue:700 forKey:21LL];
2775 XCTAssertEqual(dict.count, 1U);
2784 [dict addRawEntriesFromDictionary:dict2];
2785 XCTAssertEqual(dict.count, 4U);
2788 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2789 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2791 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2792 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2794 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2795 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2797 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2798 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2806 GPBInt64EnumDictionary *dict =
2810 XCTAssertNotNil(dict);
2811 XCTAssertEqual(dict.count, 4U);
2813 [dict removeValueForKey:22LL];
2814 XCTAssertEqual(dict.count, 3U);
2816 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2817 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2819 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2820 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2821 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2823 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2824 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2828 [dict removeValueForKey:22LL];
2829 XCTAssertEqual(dict.count, 3U);
2830 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2831 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2833 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2834 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2835 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2837 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2838 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2841 [dict removeValueForKey:24LL];
2842 XCTAssertEqual(dict.count, 2U);
2843 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2844 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2846 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2847 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2848 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2850 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2852 [dict removeAll];
2853 XCTAssertEqual(dict.count, 0U);
2854 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
2855 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
2856 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
2857 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
2858 [dict release];
2864 GPBInt64EnumDictionary *dict =
2868 XCTAssertNotNil(dict);
2869 XCTAssertEqual(dict.count, 4U);
2871 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2872 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2874 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2875 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2877 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2878 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2880 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2881 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2884 [dict setValue:703 forKey:21LL];
2885 XCTAssertEqual(dict.count, 4U);
2886 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2887 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2889 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2890 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2892 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2893 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2895 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2896 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2899 [dict setValue:701 forKey:24LL];
2900 XCTAssertEqual(dict.count, 4U);
2901 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2902 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2904 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2905 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2907 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2908 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2910 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2911 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2921 [dict addRawEntriesFromDictionary:dict2];
2922 XCTAssertEqual(dict.count, 4U);
2923 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
2924 XCTAssertTrue([dict valueForKey:21LL value:&value]);
2926 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2927 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2929 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
2930 XCTAssertTrue([dict valueForKey:23LL value:&value]);
2932 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
2933 XCTAssertTrue([dict valueForKey:24LL value:&value]);
2937 [dict release];
2952 GPBInt64EnumDictionary *dict =
2957 XCTAssertNotNil(dict);
2958 XCTAssertEqual(dict.count, 3U);
2959 XCTAssertTrue(dict.validationFunc == TestingEnum_IsValidValue); // Pointer comparison
2961 XCTAssertTrue([dict valueForKey:21LL rawValue:NULL]);
2962 XCTAssertTrue([dict valueForKey:21LL rawValue:&value]);
2964 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
2965 XCTAssertTrue([dict valueForKey:22LL value:&value]);
2967 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
2968 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
2970 XCTAssertTrue([dict valueForKey:23LL rawValue:NULL]);
2971 XCTAssertTrue([dict valueForKey:23LL rawValue:&value]);
2973 XCTAssertFalse([dict valueForKey:24LL rawValue:NULL]);
2978 [dict enumerateKeysAndValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3000 [dict enumerateKeysAndRawValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3022 [dict enumerateKeysAndRawValuesUsingBlock:^(int64_t aKey, int32_t aValue, BOOL *stop) {
3028 [dict release];
3093 GPBInt64EnumDictionary *dict =
3098 XCTAssertNotNil(dict);
3100 GPBInt64EnumDictionary *dict2 = [dict copy];
3104 XCTAssertNotEqual(dict, dict2);
3105 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3106 XCTAssertEqualObjects(dict, dict2);
3109 [dict release];
3115 GPBInt64EnumDictionary *dict =
3120 XCTAssertNotNil(dict);
3123 [GPBInt64EnumDictionary dictionaryWithDictionary:dict];
3127 XCTAssertNotEqual(dict, dict2);
3128 XCTAssertEqualObjects(dict, dict2);
3129 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3130 [dict release];
3134 GPBInt64EnumDictionary *dict =
3136 XCTAssertNotNil(dict);
3138 XCTAssertEqual(dict.count, 0U);
3139 XCTAssertThrowsSpecificNamed([dict setValue:801 forKey:22LL], // Unknown
3141 XCTAssertEqual(dict.count, 0U);
3142 [dict setRawValue:801 forKey:22LL]; // Unknown
3143 XCTAssertEqual(dict.count, 1U);
3152 [dict addRawEntriesFromDictionary:dict2];
3153 XCTAssertEqual(dict.count, 4U);
3156 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3157 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3159 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
3160 XCTAssertTrue([dict valueForKey:22LL value:&value]);
3162 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
3163 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
3165 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3166 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3168 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
3169 XCTAssertTrue([dict valueForKey:24LL value:&value]);
3171 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3172 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3180 GPBInt64EnumDictionary *dict =
3185 XCTAssertNotNil(dict);
3186 XCTAssertEqual(dict.count, 4U);
3188 [dict removeValueForKey:22LL];
3189 XCTAssertEqual(dict.count, 3U);
3191 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3192 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3194 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
3195 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3196 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3198 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3199 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3203 [dict removeValueForKey:22LL];
3204 XCTAssertEqual(dict.count, 3U);
3205 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3206 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3208 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
3209 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3210 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3212 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3213 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3216 [dict removeValueForKey:24LL];
3217 XCTAssertEqual(dict.count, 2U);
3218 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3219 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3221 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
3222 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3223 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3225 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
3227 [dict removeAll];
3228 XCTAssertEqual(dict.count, 0U);
3229 XCTAssertFalse([dict valueForKey:21LL value:NULL]);
3230 XCTAssertFalse([dict valueForKey:22LL value:NULL]);
3231 XCTAssertFalse([dict valueForKey:23LL value:NULL]);
3232 XCTAssertFalse([dict valueForKey:24LL value:NULL]);
3233 [dict release];
3239 GPBInt64EnumDictionary *dict =
3244 XCTAssertNotNil(dict);
3245 XCTAssertEqual(dict.count, 4U);
3247 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3248 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3250 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
3251 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
3253 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3254 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3256 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3257 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3260 XCTAssertThrowsSpecificNamed([dict setValue:803 forKey:21LL], // Unknown
3262 XCTAssertEqual(dict.count, 4U);
3263 XCTAssertTrue([dict valueForKey:21LL value:NULL]);
3264 XCTAssertTrue([dict valueForKey:21LL value:&value]);
3266 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
3267 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
3269 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3270 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3272 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3273 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3276 [dict setRawValue:803 forKey:21LL]; // Unknown
3277 XCTAssertEqual(dict.count, 4U);
3278 XCTAssertTrue([dict valueForKey:21LL rawValue:NULL]);
3279 XCTAssertTrue([dict valueForKey:21LL rawValue:&value]);
3281 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
3282 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
3284 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3285 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3287 XCTAssertTrue([dict valueForKey:24LL rawValue:NULL]);
3288 XCTAssertTrue([dict valueForKey:24LL rawValue:&value]);
3291 [dict setRawValue:700 forKey:24LL];
3292 XCTAssertEqual(dict.count, 4U);
3293 XCTAssertTrue([dict valueForKey:21LL rawValue:NULL]);
3294 XCTAssertTrue([dict valueForKey:21LL rawValue:&value]);
3296 XCTAssertTrue([dict valueForKey:22LL rawValue:NULL]);
3297 XCTAssertTrue([dict valueForKey:22LL rawValue:&value]);
3299 XCTAssertTrue([dict valueForKey:23LL value:NULL]);
3300 XCTAssertTrue([dict valueForKey:23LL value:&value]);
3302 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
3303 XCTAssertTrue([dict valueForKey:24LL value:&value]);
3314 [dict addRawEntriesFromDictionary:dict2];
3315 XCTAssertEqual(dict.count, 4U);
3316 XCTAssertTrue([dict valueForKey:21LL rawValue:NULL]);
3317 XCTAssertTrue([dict valueForKey:21LL rawValue:&value]);
3319 XCTAssertTrue([dict valueForKey:22LL value:NULL]);
3320 XCTAssertTrue([dict valueForKey:22LL value:&value]);
3322 XCTAssertTrue([dict valueForKey:23LL rawValue:NULL]);
3323 XCTAssertTrue([dict valueForKey:23LL rawValue:&value]);
3325 XCTAssertTrue([dict valueForKey:24LL value:NULL]);
3326 XCTAssertTrue([dict valueForKey:24LL value:&value]);
3330 [dict release];
3336 GPBInt64EnumDictionary *dict =
3341 XCTAssertNotNil(dict);
3343 GPBInt64EnumDictionary *dict2 = [dict copy];
3347 XCTAssertNotEqual(dict, dict2);
3348 XCTAssertEqualObjects(dict, dict2);
3349 XCTAssertEqual(dict.validationFunc, dict2.validationFunc); // Pointer comparison
3353 [dict release];
3366 GPBInt64ObjectDictionary<NSString*> *dict = [[GPBInt64ObjectDictionary alloc] init];
3367 XCTAssertNotNil(dict);
3368 XCTAssertEqual(dict.count, 0U);
3369 XCTAssertNil([dict objectForKey:21LL]);
3370 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3374 [dict release];
3378 …GPBInt64ObjectDictionary<NSString*> *dict = [GPBInt64ObjectDictionary dictionaryWithObject:@"abc" …
3379 XCTAssertNotNil(dict);
3380 XCTAssertEqual(dict.count, 1U);
3381 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3382 XCTAssertNil([dict objectForKey:22LL]);
3383 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3393 GPBInt64ObjectDictionary<NSString*> *dict =
3397 XCTAssertNotNil(dict);
3398 XCTAssertEqual(dict.count, 3U);
3399 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3400 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3401 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3402 XCTAssertNil([dict objectForKey:24LL]);
3407 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3429 [dict enumerateKeysAndObjectsUsingBlock:^(int64_t aKey, NSString* aObject, BOOL *stop) {
3435 [dict release];
3495 GPBInt64ObjectDictionary<NSString*> *dict =
3499 XCTAssertNotNil(dict);
3501 GPBInt64ObjectDictionary<NSString*> *dict2 = [dict copy];
3505 XCTAssertNotEqual(dict, dict2);
3506 XCTAssertEqualObjects(dict, dict2);
3510 [dict release];
3516 GPBInt64ObjectDictionary<NSString*> *dict =
3520 XCTAssertNotNil(dict);
3523 [GPBInt64ObjectDictionary dictionaryWithDictionary:dict];
3527 XCTAssertNotEqual(dict, dict2);
3528 XCTAssertEqualObjects(dict, dict2);
3529 [dict release];
3533 GPBInt64ObjectDictionary<NSString*> *dict = [GPBInt64ObjectDictionary dictionary];
3534 XCTAssertNotNil(dict);
3536 XCTAssertEqual(dict.count, 0U);
3537 [dict setObject:@"abc" forKey:21LL];
3538 XCTAssertEqual(dict.count, 1U);
3547 [dict addEntriesFromDictionary:dict2];
3548 XCTAssertEqual(dict.count, 4U);
3550 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3551 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3552 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3553 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3560 GPBInt64ObjectDictionary<NSString*> *dict =
3564 XCTAssertNotNil(dict);
3565 XCTAssertEqual(dict.count, 4U);
3567 [dict removeObjectForKey:22LL];
3568 XCTAssertEqual(dict.count, 3U);
3569 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3570 XCTAssertNil([dict objectForKey:22LL]);
3571 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3572 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3575 [dict removeObjectForKey:22LL];
3576 XCTAssertEqual(dict.count, 3U);
3577 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3578 XCTAssertNil([dict objectForKey:22LL]);
3579 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3580 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3582 [dict removeObjectForKey:24LL];
3583 XCTAssertEqual(dict.count, 2U);
3584 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3585 XCTAssertNil([dict objectForKey:22LL]);
3586 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3587 XCTAssertNil([dict objectForKey:24LL]);
3589 [dict removeAll];
3590 XCTAssertEqual(dict.count, 0U);
3591 XCTAssertNil([dict objectForKey:21LL]);
3592 XCTAssertNil([dict objectForKey:22LL]);
3593 XCTAssertNil([dict objectForKey:23LL]);
3594 XCTAssertNil([dict objectForKey:24LL]);
3595 [dict release];
3601 GPBInt64ObjectDictionary<NSString*> *dict =
3605 XCTAssertNotNil(dict);
3606 XCTAssertEqual(dict.count, 4U);
3607 XCTAssertEqualObjects([dict objectForKey:21LL], @"abc");
3608 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3609 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3610 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3612 [dict setObject:@"jkl" forKey:21LL];
3613 XCTAssertEqual(dict.count, 4U);
3614 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3615 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3616 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3617 XCTAssertEqualObjects([dict objectForKey:24LL], @"jkl");
3619 [dict setObject:@"def" forKey:24LL];
3620 XCTAssertEqual(dict.count, 4U);
3621 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3622 XCTAssertEqualObjects([dict objectForKey:22LL], @"def");
3623 XCTAssertEqualObjects([dict objectForKey:23LL], @"ghi");
3624 XCTAssertEqualObjects([dict objectForKey:24LL], @"def");
3633 [dict addEntriesFromDictionary:dict2];
3634 XCTAssertEqual(dict.count, 4U);
3635 XCTAssertEqualObjects([dict objectForKey:21LL], @"jkl");
3636 XCTAssertEqualObjects([dict objectForKey:22LL], @"ghi");
3637 XCTAssertEqualObjects([dict objectForKey:23LL], @"abc");
3638 XCTAssertEqualObjects([dict objectForKey:24LL], @"def");
3641 [dict release];