• Home
  • Raw
  • Download

Lines Matching refs:dict

54   GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
55 XCTAssertNotNil(dict);
56 XCTAssertEqual(dict.count, 0U);
57 XCTAssertFalse([dict getUInt32:NULL forKey:YES]);
58 [dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
62 [dict release];
66 GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
67 [dict setUInt32:100U forKey:YES];
68 XCTAssertNotNil(dict);
69 XCTAssertEqual(dict.count, 1U);
71 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
72 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
74 XCTAssertFalse([dict getUInt32:NULL forKey:NO]);
75 [dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
80 [dict release];
86 GPBBoolUInt32Dictionary *dict =
90 XCTAssertNotNil(dict);
91 XCTAssertEqual(dict.count, 2U);
93 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
94 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
96 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
97 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
103 [dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
125 [dict enumerateKeysAndUInt32sUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
131 [dict release];
191 GPBBoolUInt32Dictionary *dict =
195 XCTAssertNotNil(dict);
197 GPBBoolUInt32Dictionary *dict2 = [dict copy];
201 XCTAssertNotEqual(dict, dict2);
202 XCTAssertEqualObjects(dict, dict2);
206 [dict release];
212 GPBBoolUInt32Dictionary *dict =
216 XCTAssertNotNil(dict);
219 [[GPBBoolUInt32Dictionary alloc] initWithDictionary:dict];
223 XCTAssertNotEqual(dict, dict2);
224 XCTAssertEqualObjects(dict, dict2);
226 [dict release];
230 GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
231 XCTAssertNotNil(dict);
233 XCTAssertEqual(dict.count, 0U);
234 [dict setUInt32:100U forKey:YES];
235 XCTAssertEqual(dict.count, 1U);
244 [dict addEntriesFromDictionary:dict2];
245 XCTAssertEqual(dict.count, 2U);
248 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
249 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
251 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
252 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
255 [dict release];
261 GPBBoolUInt32Dictionary *dict =
265 XCTAssertNotNil(dict);
266 XCTAssertEqual(dict.count, 2U);
268 [dict removeUInt32ForKey:NO];
269 XCTAssertEqual(dict.count, 1U);
271 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
272 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
274 XCTAssertFalse([dict getUInt32:NULL forKey:NO]);
277 [dict removeUInt32ForKey:NO];
278 XCTAssertEqual(dict.count, 1U);
279 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
280 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
282 XCTAssertFalse([dict getUInt32:NULL forKey:NO]);
284 [dict removeAll];
285 XCTAssertEqual(dict.count, 0U);
286 XCTAssertFalse([dict getUInt32:NULL forKey:YES]);
287 XCTAssertFalse([dict getUInt32:NULL forKey:NO]);
288 [dict release];
294 GPBBoolUInt32Dictionary *dict =
298 XCTAssertNotNil(dict);
299 XCTAssertEqual(dict.count, 2U);
301 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
302 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
304 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
305 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
308 [dict setUInt32:101U forKey:YES];
309 XCTAssertEqual(dict.count, 2U);
310 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
311 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
313 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
314 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
317 [dict setUInt32:100U forKey:NO];
318 XCTAssertEqual(dict.count, 2U);
319 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
320 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
322 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
323 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
333 [dict addEntriesFromDictionary:dict2];
334 XCTAssertEqual(dict.count, 2U);
335 XCTAssertTrue([dict getUInt32:NULL forKey:YES]);
336 XCTAssertTrue([dict getUInt32:&value forKey:YES]);
338 XCTAssertTrue([dict getUInt32:NULL forKey:NO]);
339 XCTAssertTrue([dict getUInt32:&value forKey:NO]);
343 [dict release];
359 GPBBoolInt32Dictionary *dict = [[GPBBoolInt32Dictionary alloc] init];
360 XCTAssertNotNil(dict);
361 XCTAssertEqual(dict.count, 0U);
362 XCTAssertFalse([dict getInt32:NULL forKey:YES]);
363 [dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
367 [dict release];
371 GPBBoolInt32Dictionary *dict = [[GPBBoolInt32Dictionary alloc] init];
372 [dict setInt32:200 forKey:YES];
373 XCTAssertNotNil(dict);
374 XCTAssertEqual(dict.count, 1U);
376 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
377 XCTAssertTrue([dict getInt32:&value forKey:YES]);
379 XCTAssertFalse([dict getInt32:NULL forKey:NO]);
380 [dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
385 [dict release];
391 GPBBoolInt32Dictionary *dict =
395 XCTAssertNotNil(dict);
396 XCTAssertEqual(dict.count, 2U);
398 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
399 XCTAssertTrue([dict getInt32:&value forKey:YES]);
401 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
402 XCTAssertTrue([dict getInt32:&value forKey:NO]);
408 [dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
430 [dict enumerateKeysAndInt32sUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
436 [dict release];
496 GPBBoolInt32Dictionary *dict =
500 XCTAssertNotNil(dict);
502 GPBBoolInt32Dictionary *dict2 = [dict copy];
506 XCTAssertNotEqual(dict, dict2);
507 XCTAssertEqualObjects(dict, dict2);
511 [dict release];
517 GPBBoolInt32Dictionary *dict =
521 XCTAssertNotNil(dict);
524 [[GPBBoolInt32Dictionary alloc] initWithDictionary:dict];
528 XCTAssertNotEqual(dict, dict2);
529 XCTAssertEqualObjects(dict, dict2);
531 [dict release];
535 GPBBoolInt32Dictionary *dict = [[GPBBoolInt32Dictionary alloc] init];
536 XCTAssertNotNil(dict);
538 XCTAssertEqual(dict.count, 0U);
539 [dict setInt32:200 forKey:YES];
540 XCTAssertEqual(dict.count, 1U);
549 [dict addEntriesFromDictionary:dict2];
550 XCTAssertEqual(dict.count, 2U);
553 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
554 XCTAssertTrue([dict getInt32:&value forKey:YES]);
556 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
557 XCTAssertTrue([dict getInt32:&value forKey:NO]);
560 [dict release];
566 GPBBoolInt32Dictionary *dict =
570 XCTAssertNotNil(dict);
571 XCTAssertEqual(dict.count, 2U);
573 [dict removeInt32ForKey:NO];
574 XCTAssertEqual(dict.count, 1U);
576 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
577 XCTAssertTrue([dict getInt32:&value forKey:YES]);
579 XCTAssertFalse([dict getInt32:NULL forKey:NO]);
582 [dict removeInt32ForKey:NO];
583 XCTAssertEqual(dict.count, 1U);
584 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
585 XCTAssertTrue([dict getInt32:&value forKey:YES]);
587 XCTAssertFalse([dict getInt32:NULL forKey:NO]);
589 [dict removeAll];
590 XCTAssertEqual(dict.count, 0U);
591 XCTAssertFalse([dict getInt32:NULL forKey:YES]);
592 XCTAssertFalse([dict getInt32:NULL forKey:NO]);
593 [dict release];
599 GPBBoolInt32Dictionary *dict =
603 XCTAssertNotNil(dict);
604 XCTAssertEqual(dict.count, 2U);
606 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
607 XCTAssertTrue([dict getInt32:&value forKey:YES]);
609 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
610 XCTAssertTrue([dict getInt32:&value forKey:NO]);
613 [dict setInt32:201 forKey:YES];
614 XCTAssertEqual(dict.count, 2U);
615 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
616 XCTAssertTrue([dict getInt32:&value forKey:YES]);
618 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
619 XCTAssertTrue([dict getInt32:&value forKey:NO]);
622 [dict setInt32:200 forKey:NO];
623 XCTAssertEqual(dict.count, 2U);
624 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
625 XCTAssertTrue([dict getInt32:&value forKey:YES]);
627 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
628 XCTAssertTrue([dict getInt32:&value forKey:NO]);
638 [dict addEntriesFromDictionary:dict2];
639 XCTAssertEqual(dict.count, 2U);
640 XCTAssertTrue([dict getInt32:NULL forKey:YES]);
641 XCTAssertTrue([dict getInt32:&value forKey:YES]);
643 XCTAssertTrue([dict getInt32:NULL forKey:NO]);
644 XCTAssertTrue([dict getInt32:&value forKey:NO]);
648 [dict release];
664 GPBBoolUInt64Dictionary *dict = [[GPBBoolUInt64Dictionary alloc] init];
665 XCTAssertNotNil(dict);
666 XCTAssertEqual(dict.count, 0U);
667 XCTAssertFalse([dict getUInt64:NULL forKey:YES]);
668 [dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
672 [dict release];
676 GPBBoolUInt64Dictionary *dict = [[GPBBoolUInt64Dictionary alloc] init];
677 [dict setUInt64:300U forKey:YES];
678 XCTAssertNotNil(dict);
679 XCTAssertEqual(dict.count, 1U);
681 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
682 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
684 XCTAssertFalse([dict getUInt64:NULL forKey:NO]);
685 [dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
690 [dict release];
696 GPBBoolUInt64Dictionary *dict =
700 XCTAssertNotNil(dict);
701 XCTAssertEqual(dict.count, 2U);
703 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
704 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
706 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
707 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
713 [dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
735 [dict enumerateKeysAndUInt64sUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
741 [dict release];
801 GPBBoolUInt64Dictionary *dict =
805 XCTAssertNotNil(dict);
807 GPBBoolUInt64Dictionary *dict2 = [dict copy];
811 XCTAssertNotEqual(dict, dict2);
812 XCTAssertEqualObjects(dict, dict2);
816 [dict release];
822 GPBBoolUInt64Dictionary *dict =
826 XCTAssertNotNil(dict);
829 [[GPBBoolUInt64Dictionary alloc] initWithDictionary:dict];
833 XCTAssertNotEqual(dict, dict2);
834 XCTAssertEqualObjects(dict, dict2);
836 [dict release];
840 GPBBoolUInt64Dictionary *dict = [[GPBBoolUInt64Dictionary alloc] init];
841 XCTAssertNotNil(dict);
843 XCTAssertEqual(dict.count, 0U);
844 [dict setUInt64:300U forKey:YES];
845 XCTAssertEqual(dict.count, 1U);
854 [dict addEntriesFromDictionary:dict2];
855 XCTAssertEqual(dict.count, 2U);
858 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
859 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
861 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
862 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
865 [dict release];
871 GPBBoolUInt64Dictionary *dict =
875 XCTAssertNotNil(dict);
876 XCTAssertEqual(dict.count, 2U);
878 [dict removeUInt64ForKey:NO];
879 XCTAssertEqual(dict.count, 1U);
881 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
882 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
884 XCTAssertFalse([dict getUInt64:NULL forKey:NO]);
887 [dict removeUInt64ForKey:NO];
888 XCTAssertEqual(dict.count, 1U);
889 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
890 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
892 XCTAssertFalse([dict getUInt64:NULL forKey:NO]);
894 [dict removeAll];
895 XCTAssertEqual(dict.count, 0U);
896 XCTAssertFalse([dict getUInt64:NULL forKey:YES]);
897 XCTAssertFalse([dict getUInt64:NULL forKey:NO]);
898 [dict release];
904 GPBBoolUInt64Dictionary *dict =
908 XCTAssertNotNil(dict);
909 XCTAssertEqual(dict.count, 2U);
911 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
912 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
914 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
915 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
918 [dict setUInt64:301U forKey:YES];
919 XCTAssertEqual(dict.count, 2U);
920 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
921 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
923 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
924 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
927 [dict setUInt64:300U forKey:NO];
928 XCTAssertEqual(dict.count, 2U);
929 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
930 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
932 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
933 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
943 [dict addEntriesFromDictionary:dict2];
944 XCTAssertEqual(dict.count, 2U);
945 XCTAssertTrue([dict getUInt64:NULL forKey:YES]);
946 XCTAssertTrue([dict getUInt64:&value forKey:YES]);
948 XCTAssertTrue([dict getUInt64:NULL forKey:NO]);
949 XCTAssertTrue([dict getUInt64:&value forKey:NO]);
953 [dict release];
969 GPBBoolInt64Dictionary *dict = [[GPBBoolInt64Dictionary alloc] init];
970 XCTAssertNotNil(dict);
971 XCTAssertEqual(dict.count, 0U);
972 XCTAssertFalse([dict getInt64:NULL forKey:YES]);
973 [dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
977 [dict release];
981 GPBBoolInt64Dictionary *dict = [[GPBBoolInt64Dictionary alloc] init];
982 [dict setInt64:400 forKey:YES];
983 XCTAssertNotNil(dict);
984 XCTAssertEqual(dict.count, 1U);
986 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
987 XCTAssertTrue([dict getInt64:&value forKey:YES]);
989 XCTAssertFalse([dict getInt64:NULL forKey:NO]);
990 [dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
995 [dict release];
1001 GPBBoolInt64Dictionary *dict =
1005 XCTAssertNotNil(dict);
1006 XCTAssertEqual(dict.count, 2U);
1008 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1009 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1011 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1012 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1018 [dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
1040 [dict enumerateKeysAndInt64sUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
1046 [dict release];
1106 GPBBoolInt64Dictionary *dict =
1110 XCTAssertNotNil(dict);
1112 GPBBoolInt64Dictionary *dict2 = [dict copy];
1116 XCTAssertNotEqual(dict, dict2);
1117 XCTAssertEqualObjects(dict, dict2);
1121 [dict release];
1127 GPBBoolInt64Dictionary *dict =
1131 XCTAssertNotNil(dict);
1134 [[GPBBoolInt64Dictionary alloc] initWithDictionary:dict];
1138 XCTAssertNotEqual(dict, dict2);
1139 XCTAssertEqualObjects(dict, dict2);
1141 [dict release];
1145 GPBBoolInt64Dictionary *dict = [[GPBBoolInt64Dictionary alloc] init];
1146 XCTAssertNotNil(dict);
1148 XCTAssertEqual(dict.count, 0U);
1149 [dict setInt64:400 forKey:YES];
1150 XCTAssertEqual(dict.count, 1U);
1159 [dict addEntriesFromDictionary:dict2];
1160 XCTAssertEqual(dict.count, 2U);
1163 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1164 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1166 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1167 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1170 [dict release];
1176 GPBBoolInt64Dictionary *dict =
1180 XCTAssertNotNil(dict);
1181 XCTAssertEqual(dict.count, 2U);
1183 [dict removeInt64ForKey:NO];
1184 XCTAssertEqual(dict.count, 1U);
1186 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1187 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1189 XCTAssertFalse([dict getInt64:NULL forKey:NO]);
1192 [dict removeInt64ForKey:NO];
1193 XCTAssertEqual(dict.count, 1U);
1194 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1195 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1197 XCTAssertFalse([dict getInt64:NULL forKey:NO]);
1199 [dict removeAll];
1200 XCTAssertEqual(dict.count, 0U);
1201 XCTAssertFalse([dict getInt64:NULL forKey:YES]);
1202 XCTAssertFalse([dict getInt64:NULL forKey:NO]);
1203 [dict release];
1209 GPBBoolInt64Dictionary *dict =
1213 XCTAssertNotNil(dict);
1214 XCTAssertEqual(dict.count, 2U);
1216 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1217 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1219 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1220 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1223 [dict setInt64:401 forKey:YES];
1224 XCTAssertEqual(dict.count, 2U);
1225 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1226 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1228 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1229 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1232 [dict setInt64:400 forKey:NO];
1233 XCTAssertEqual(dict.count, 2U);
1234 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1235 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1237 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1238 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1248 [dict addEntriesFromDictionary:dict2];
1249 XCTAssertEqual(dict.count, 2U);
1250 XCTAssertTrue([dict getInt64:NULL forKey:YES]);
1251 XCTAssertTrue([dict getInt64:&value forKey:YES]);
1253 XCTAssertTrue([dict getInt64:NULL forKey:NO]);
1254 XCTAssertTrue([dict getInt64:&value forKey:NO]);
1258 [dict release];
1274 GPBBoolBoolDictionary *dict = [[GPBBoolBoolDictionary alloc] init];
1275 XCTAssertNotNil(dict);
1276 XCTAssertEqual(dict.count, 0U);
1277 XCTAssertFalse([dict getBool:NULL forKey:YES]);
1278 [dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1282 [dict release];
1286 GPBBoolBoolDictionary *dict = [[GPBBoolBoolDictionary alloc] init];
1287 [dict setBool:NO forKey:YES];
1288 XCTAssertNotNil(dict);
1289 XCTAssertEqual(dict.count, 1U);
1291 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1292 XCTAssertTrue([dict getBool:&value forKey:YES]);
1294 XCTAssertFalse([dict getBool:NULL forKey:NO]);
1295 [dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1300 [dict release];
1306 GPBBoolBoolDictionary *dict =
1310 XCTAssertNotNil(dict);
1311 XCTAssertEqual(dict.count, 2U);
1313 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1314 XCTAssertTrue([dict getBool:&value forKey:YES]);
1316 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1317 XCTAssertTrue([dict getBool:&value forKey:NO]);
1323 [dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1345 [dict enumerateKeysAndBoolsUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1351 [dict release];
1411 GPBBoolBoolDictionary *dict =
1415 XCTAssertNotNil(dict);
1417 GPBBoolBoolDictionary *dict2 = [dict copy];
1421 XCTAssertNotEqual(dict, dict2);
1422 XCTAssertEqualObjects(dict, dict2);
1426 [dict release];
1432 GPBBoolBoolDictionary *dict =
1436 XCTAssertNotNil(dict);
1439 [[GPBBoolBoolDictionary alloc] initWithDictionary:dict];
1443 XCTAssertNotEqual(dict, dict2);
1444 XCTAssertEqualObjects(dict, dict2);
1446 [dict release];
1450 GPBBoolBoolDictionary *dict = [[GPBBoolBoolDictionary alloc] init];
1451 XCTAssertNotNil(dict);
1453 XCTAssertEqual(dict.count, 0U);
1454 [dict setBool:NO forKey:YES];
1455 XCTAssertEqual(dict.count, 1U);
1464 [dict addEntriesFromDictionary:dict2];
1465 XCTAssertEqual(dict.count, 2U);
1468 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1469 XCTAssertTrue([dict getBool:&value forKey:YES]);
1471 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1472 XCTAssertTrue([dict getBool:&value forKey:NO]);
1475 [dict release];
1481 GPBBoolBoolDictionary *dict =
1485 XCTAssertNotNil(dict);
1486 XCTAssertEqual(dict.count, 2U);
1488 [dict removeBoolForKey:NO];
1489 XCTAssertEqual(dict.count, 1U);
1491 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1492 XCTAssertTrue([dict getBool:&value forKey:YES]);
1494 XCTAssertFalse([dict getBool:NULL forKey:NO]);
1497 [dict removeBoolForKey:NO];
1498 XCTAssertEqual(dict.count, 1U);
1499 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1500 XCTAssertTrue([dict getBool:&value forKey:YES]);
1502 XCTAssertFalse([dict getBool:NULL forKey:NO]);
1504 [dict removeAll];
1505 XCTAssertEqual(dict.count, 0U);
1506 XCTAssertFalse([dict getBool:NULL forKey:YES]);
1507 XCTAssertFalse([dict getBool:NULL forKey:NO]);
1508 [dict release];
1514 GPBBoolBoolDictionary *dict =
1518 XCTAssertNotNil(dict);
1519 XCTAssertEqual(dict.count, 2U);
1521 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1522 XCTAssertTrue([dict getBool:&value forKey:YES]);
1524 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1525 XCTAssertTrue([dict getBool:&value forKey:NO]);
1528 [dict setBool:YES forKey:YES];
1529 XCTAssertEqual(dict.count, 2U);
1530 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1531 XCTAssertTrue([dict getBool:&value forKey:YES]);
1533 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1534 XCTAssertTrue([dict getBool:&value forKey:NO]);
1537 [dict setBool:NO forKey:NO];
1538 XCTAssertEqual(dict.count, 2U);
1539 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1540 XCTAssertTrue([dict getBool:&value forKey:YES]);
1542 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1543 XCTAssertTrue([dict getBool:&value forKey:NO]);
1553 [dict addEntriesFromDictionary:dict2];
1554 XCTAssertEqual(dict.count, 2U);
1555 XCTAssertTrue([dict getBool:NULL forKey:YES]);
1556 XCTAssertTrue([dict getBool:&value forKey:YES]);
1558 XCTAssertTrue([dict getBool:NULL forKey:NO]);
1559 XCTAssertTrue([dict getBool:&value forKey:NO]);
1563 [dict release];
1579 GPBBoolFloatDictionary *dict = [[GPBBoolFloatDictionary alloc] init];
1580 XCTAssertNotNil(dict);
1581 XCTAssertEqual(dict.count, 0U);
1582 XCTAssertFalse([dict getFloat:NULL forKey:YES]);
1583 [dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1587 [dict release];
1591 GPBBoolFloatDictionary *dict = [[GPBBoolFloatDictionary alloc] init];
1592 [dict setFloat:500.f forKey:YES];
1593 XCTAssertNotNil(dict);
1594 XCTAssertEqual(dict.count, 1U);
1596 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1597 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1599 XCTAssertFalse([dict getFloat:NULL forKey:NO]);
1600 [dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1605 [dict release];
1611 GPBBoolFloatDictionary *dict =
1615 XCTAssertNotNil(dict);
1616 XCTAssertEqual(dict.count, 2U);
1618 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1619 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1621 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1622 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1628 [dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1650 [dict enumerateKeysAndFloatsUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1656 [dict release];
1716 GPBBoolFloatDictionary *dict =
1720 XCTAssertNotNil(dict);
1722 GPBBoolFloatDictionary *dict2 = [dict copy];
1726 XCTAssertNotEqual(dict, dict2);
1727 XCTAssertEqualObjects(dict, dict2);
1731 [dict release];
1737 GPBBoolFloatDictionary *dict =
1741 XCTAssertNotNil(dict);
1744 [[GPBBoolFloatDictionary alloc] initWithDictionary:dict];
1748 XCTAssertNotEqual(dict, dict2);
1749 XCTAssertEqualObjects(dict, dict2);
1751 [dict release];
1755 GPBBoolFloatDictionary *dict = [[GPBBoolFloatDictionary alloc] init];
1756 XCTAssertNotNil(dict);
1758 XCTAssertEqual(dict.count, 0U);
1759 [dict setFloat:500.f forKey:YES];
1760 XCTAssertEqual(dict.count, 1U);
1769 [dict addEntriesFromDictionary:dict2];
1770 XCTAssertEqual(dict.count, 2U);
1773 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1774 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1776 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1777 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1780 [dict release];
1786 GPBBoolFloatDictionary *dict =
1790 XCTAssertNotNil(dict);
1791 XCTAssertEqual(dict.count, 2U);
1793 [dict removeFloatForKey:NO];
1794 XCTAssertEqual(dict.count, 1U);
1796 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1797 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1799 XCTAssertFalse([dict getFloat:NULL forKey:NO]);
1802 [dict removeFloatForKey:NO];
1803 XCTAssertEqual(dict.count, 1U);
1804 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1805 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1807 XCTAssertFalse([dict getFloat:NULL forKey:NO]);
1809 [dict removeAll];
1810 XCTAssertEqual(dict.count, 0U);
1811 XCTAssertFalse([dict getFloat:NULL forKey:YES]);
1812 XCTAssertFalse([dict getFloat:NULL forKey:NO]);
1813 [dict release];
1819 GPBBoolFloatDictionary *dict =
1823 XCTAssertNotNil(dict);
1824 XCTAssertEqual(dict.count, 2U);
1826 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1827 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1829 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1830 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1833 [dict setFloat:501.f forKey:YES];
1834 XCTAssertEqual(dict.count, 2U);
1835 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1836 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1838 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1839 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1842 [dict setFloat:500.f forKey:NO];
1843 XCTAssertEqual(dict.count, 2U);
1844 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1845 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1847 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1848 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1858 [dict addEntriesFromDictionary:dict2];
1859 XCTAssertEqual(dict.count, 2U);
1860 XCTAssertTrue([dict getFloat:NULL forKey:YES]);
1861 XCTAssertTrue([dict getFloat:&value forKey:YES]);
1863 XCTAssertTrue([dict getFloat:NULL forKey:NO]);
1864 XCTAssertTrue([dict getFloat:&value forKey:NO]);
1868 [dict release];
1884 GPBBoolDoubleDictionary *dict = [[GPBBoolDoubleDictionary alloc] init];
1885 XCTAssertNotNil(dict);
1886 XCTAssertEqual(dict.count, 0U);
1887 XCTAssertFalse([dict getDouble:NULL forKey:YES]);
1888 [dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1892 [dict release];
1896 GPBBoolDoubleDictionary *dict = [[GPBBoolDoubleDictionary alloc] init];
1897 [dict setDouble:600. forKey:YES];
1898 XCTAssertNotNil(dict);
1899 XCTAssertEqual(dict.count, 1U);
1901 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
1902 XCTAssertTrue([dict getDouble:&value forKey:YES]);
1904 XCTAssertFalse([dict getDouble:NULL forKey:NO]);
1905 [dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1910 [dict release];
1916 GPBBoolDoubleDictionary *dict =
1920 XCTAssertNotNil(dict);
1921 XCTAssertEqual(dict.count, 2U);
1923 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
1924 XCTAssertTrue([dict getDouble:&value forKey:YES]);
1926 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
1927 XCTAssertTrue([dict getDouble:&value forKey:NO]);
1933 [dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1955 [dict enumerateKeysAndDoublesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1961 [dict release];
2021 GPBBoolDoubleDictionary *dict =
2025 XCTAssertNotNil(dict);
2027 GPBBoolDoubleDictionary *dict2 = [dict copy];
2031 XCTAssertNotEqual(dict, dict2);
2032 XCTAssertEqualObjects(dict, dict2);
2036 [dict release];
2042 GPBBoolDoubleDictionary *dict =
2046 XCTAssertNotNil(dict);
2049 [[GPBBoolDoubleDictionary alloc] initWithDictionary:dict];
2053 XCTAssertNotEqual(dict, dict2);
2054 XCTAssertEqualObjects(dict, dict2);
2056 [dict release];
2060 GPBBoolDoubleDictionary *dict = [[GPBBoolDoubleDictionary alloc] init];
2061 XCTAssertNotNil(dict);
2063 XCTAssertEqual(dict.count, 0U);
2064 [dict setDouble:600. forKey:YES];
2065 XCTAssertEqual(dict.count, 1U);
2074 [dict addEntriesFromDictionary:dict2];
2075 XCTAssertEqual(dict.count, 2U);
2078 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2079 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2081 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
2082 XCTAssertTrue([dict getDouble:&value forKey:NO]);
2085 [dict release];
2091 GPBBoolDoubleDictionary *dict =
2095 XCTAssertNotNil(dict);
2096 XCTAssertEqual(dict.count, 2U);
2098 [dict removeDoubleForKey:NO];
2099 XCTAssertEqual(dict.count, 1U);
2101 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2102 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2104 XCTAssertFalse([dict getDouble:NULL forKey:NO]);
2107 [dict removeDoubleForKey:NO];
2108 XCTAssertEqual(dict.count, 1U);
2109 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2110 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2112 XCTAssertFalse([dict getDouble:NULL forKey:NO]);
2114 [dict removeAll];
2115 XCTAssertEqual(dict.count, 0U);
2116 XCTAssertFalse([dict getDouble:NULL forKey:YES]);
2117 XCTAssertFalse([dict getDouble:NULL forKey:NO]);
2118 [dict release];
2124 GPBBoolDoubleDictionary *dict =
2128 XCTAssertNotNil(dict);
2129 XCTAssertEqual(dict.count, 2U);
2131 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2132 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2134 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
2135 XCTAssertTrue([dict getDouble:&value forKey:NO]);
2138 [dict setDouble:601. forKey:YES];
2139 XCTAssertEqual(dict.count, 2U);
2140 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2141 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2143 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
2144 XCTAssertTrue([dict getDouble:&value forKey:NO]);
2147 [dict setDouble:600. forKey:NO];
2148 XCTAssertEqual(dict.count, 2U);
2149 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2150 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2152 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
2153 XCTAssertTrue([dict getDouble:&value forKey:NO]);
2163 [dict addEntriesFromDictionary:dict2];
2164 XCTAssertEqual(dict.count, 2U);
2165 XCTAssertTrue([dict getDouble:NULL forKey:YES]);
2166 XCTAssertTrue([dict getDouble:&value forKey:YES]);
2168 XCTAssertTrue([dict getDouble:NULL forKey:NO]);
2169 XCTAssertTrue([dict getDouble:&value forKey:NO]);
2173 [dict release];
2189 GPBBoolObjectDictionary<NSString*> *dict = [[GPBBoolObjectDictionary alloc] init];
2190 XCTAssertNotNil(dict);
2191 XCTAssertEqual(dict.count, 0U);
2192 XCTAssertNil([dict objectForKey:YES]);
2193 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2197 [dict release];
2201 GPBBoolObjectDictionary<NSString*> *dict = [[GPBBoolObjectDictionary alloc] init];
2202 [dict setObject:@"abc" forKey:YES];
2203 XCTAssertNotNil(dict);
2204 XCTAssertEqual(dict.count, 1U);
2205 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2206 XCTAssertNil([dict objectForKey:NO]);
2207 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2212 [dict release];
2218 GPBBoolObjectDictionary<NSString*> *dict =
2222 XCTAssertNotNil(dict);
2223 XCTAssertEqual(dict.count, 2U);
2224 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2225 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2230 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2252 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2258 [dict release];
2318 GPBBoolObjectDictionary<NSString*> *dict =
2322 XCTAssertNotNil(dict);
2324 GPBBoolObjectDictionary<NSString*> *dict2 = [dict copy];
2328 XCTAssertNotEqual(dict, dict2);
2329 XCTAssertEqualObjects(dict, dict2);
2333 [dict release];
2339 GPBBoolObjectDictionary<NSString*> *dict =
2343 XCTAssertNotNil(dict);
2346 [[GPBBoolObjectDictionary alloc] initWithDictionary:dict];
2350 XCTAssertNotEqual(dict, dict2);
2351 XCTAssertEqualObjects(dict, dict2);
2353 [dict release];
2357 GPBBoolObjectDictionary<NSString*> *dict = [[GPBBoolObjectDictionary alloc] init];
2358 XCTAssertNotNil(dict);
2360 XCTAssertEqual(dict.count, 0U);
2361 [dict setObject:@"abc" forKey:YES];
2362 XCTAssertEqual(dict.count, 1U);
2371 [dict addEntriesFromDictionary:dict2];
2372 XCTAssertEqual(dict.count, 2U);
2374 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2375 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2377 [dict release];
2383 GPBBoolObjectDictionary<NSString*> *dict =
2387 XCTAssertNotNil(dict);
2388 XCTAssertEqual(dict.count, 2U);
2390 [dict removeObjectForKey:NO];
2391 XCTAssertEqual(dict.count, 1U);
2392 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2393 XCTAssertNil([dict objectForKey:NO]);
2396 [dict removeObjectForKey:NO];
2397 XCTAssertEqual(dict.count, 1U);
2398 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2399 XCTAssertNil([dict objectForKey:NO]);
2401 [dict removeAll];
2402 XCTAssertEqual(dict.count, 0U);
2403 XCTAssertNil([dict objectForKey:YES]);
2404 XCTAssertNil([dict objectForKey:NO]);
2405 [dict release];
2411 GPBBoolObjectDictionary<NSString*> *dict =
2415 XCTAssertNotNil(dict);
2416 XCTAssertEqual(dict.count, 2U);
2417 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2418 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2420 [dict setObject:@"def" forKey:YES];
2421 XCTAssertEqual(dict.count, 2U);
2422 XCTAssertEqualObjects([dict objectForKey:YES], @"def");
2423 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2425 [dict setObject:@"abc" forKey:NO];
2426 XCTAssertEqual(dict.count, 2U);
2427 XCTAssertEqualObjects([dict objectForKey:YES], @"def");
2428 XCTAssertEqualObjects([dict objectForKey:NO], @"abc");
2437 [dict addEntriesFromDictionary:dict2];
2438 XCTAssertEqual(dict.count, 2U);
2439 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2440 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2443 [dict release];