Lines Matching full:dict
54 GPBBoolUInt32Dictionary *dict = [[GPBBoolUInt32Dictionary alloc] init];
55 XCTAssertNotNil(dict);
56 XCTAssertEqual(dict.count, 0U);
57 XCTAssertFalse([dict valueForKey:YES value:NULL]);
58 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
62 [dict release];
66 GPBBoolUInt32Dictionary *dict = [GPBBoolUInt32Dictionary dictionaryWithValue:100U forKey:YES];
67 XCTAssertNotNil(dict);
68 XCTAssertEqual(dict.count, 1U);
70 XCTAssertTrue([dict valueForKey:YES value:NULL]);
71 XCTAssertTrue([dict valueForKey:YES value:&value]);
73 XCTAssertFalse([dict valueForKey:NO value:NULL]);
74 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
84 GPBBoolUInt32Dictionary *dict =
88 XCTAssertNotNil(dict);
89 XCTAssertEqual(dict.count, 2U);
91 XCTAssertTrue([dict valueForKey:YES value:NULL]);
92 XCTAssertTrue([dict valueForKey:YES value:&value]);
94 XCTAssertTrue([dict valueForKey:NO value:NULL]);
95 XCTAssertTrue([dict valueForKey:NO value:&value]);
101 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
123 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint32_t aValue, BOOL *stop) {
129 [dict release];
189 GPBBoolUInt32Dictionary *dict =
193 XCTAssertNotNil(dict);
195 GPBBoolUInt32Dictionary *dict2 = [dict copy];
199 XCTAssertNotEqual(dict, dict2);
200 XCTAssertEqualObjects(dict, dict2);
204 [dict release];
210 GPBBoolUInt32Dictionary *dict =
214 XCTAssertNotNil(dict);
217 [GPBBoolUInt32Dictionary dictionaryWithDictionary:dict];
221 XCTAssertNotEqual(dict, dict2);
222 XCTAssertEqualObjects(dict, dict2);
223 [dict release];
227 GPBBoolUInt32Dictionary *dict = [GPBBoolUInt32Dictionary dictionary];
228 XCTAssertNotNil(dict);
230 XCTAssertEqual(dict.count, 0U);
231 [dict setValue:100U forKey:YES];
232 XCTAssertEqual(dict.count, 1U);
241 [dict addEntriesFromDictionary:dict2];
242 XCTAssertEqual(dict.count, 2U);
245 XCTAssertTrue([dict valueForKey:YES value:NULL]);
246 XCTAssertTrue([dict valueForKey:YES value:&value]);
248 XCTAssertTrue([dict valueForKey:NO value:NULL]);
249 XCTAssertTrue([dict valueForKey:NO value:&value]);
257 GPBBoolUInt32Dictionary *dict =
261 XCTAssertNotNil(dict);
262 XCTAssertEqual(dict.count, 2U);
264 [dict removeValueForKey:NO];
265 XCTAssertEqual(dict.count, 1U);
267 XCTAssertTrue([dict valueForKey:YES value:NULL]);
268 XCTAssertTrue([dict valueForKey:YES value:&value]);
270 XCTAssertFalse([dict valueForKey:NO value:NULL]);
273 [dict removeValueForKey:NO];
274 XCTAssertEqual(dict.count, 1U);
275 XCTAssertTrue([dict valueForKey:YES value:NULL]);
276 XCTAssertTrue([dict valueForKey:YES value:&value]);
278 XCTAssertFalse([dict valueForKey:NO value:NULL]);
280 [dict removeAll];
281 XCTAssertEqual(dict.count, 0U);
282 XCTAssertFalse([dict valueForKey:YES value:NULL]);
283 XCTAssertFalse([dict valueForKey:NO value:NULL]);
284 [dict release];
290 GPBBoolUInt32Dictionary *dict =
294 XCTAssertNotNil(dict);
295 XCTAssertEqual(dict.count, 2U);
297 XCTAssertTrue([dict valueForKey:YES value:NULL]);
298 XCTAssertTrue([dict valueForKey:YES value:&value]);
300 XCTAssertTrue([dict valueForKey:NO value:NULL]);
301 XCTAssertTrue([dict valueForKey:NO value:&value]);
304 [dict setValue:101U forKey:YES];
305 XCTAssertEqual(dict.count, 2U);
306 XCTAssertTrue([dict valueForKey:YES value:NULL]);
307 XCTAssertTrue([dict valueForKey:YES value:&value]);
309 XCTAssertTrue([dict valueForKey:NO value:NULL]);
310 XCTAssertTrue([dict valueForKey:NO value:&value]);
313 [dict setValue:100U forKey:NO];
314 XCTAssertEqual(dict.count, 2U);
315 XCTAssertTrue([dict valueForKey:YES value:NULL]);
316 XCTAssertTrue([dict valueForKey:YES value:&value]);
318 XCTAssertTrue([dict valueForKey:NO value:NULL]);
319 XCTAssertTrue([dict valueForKey:NO value:&value]);
329 [dict addEntriesFromDictionary:dict2];
330 XCTAssertEqual(dict.count, 2U);
331 XCTAssertTrue([dict valueForKey:YES value:NULL]);
332 XCTAssertTrue([dict valueForKey:YES value:&value]);
334 XCTAssertTrue([dict valueForKey:NO value:NULL]);
335 XCTAssertTrue([dict valueForKey:NO value:&value]);
339 [dict release];
355 GPBBoolInt32Dictionary *dict = [[GPBBoolInt32Dictionary alloc] init];
356 XCTAssertNotNil(dict);
357 XCTAssertEqual(dict.count, 0U);
358 XCTAssertFalse([dict valueForKey:YES value:NULL]);
359 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
363 [dict release];
367 GPBBoolInt32Dictionary *dict = [GPBBoolInt32Dictionary dictionaryWithValue:200 forKey:YES];
368 XCTAssertNotNil(dict);
369 XCTAssertEqual(dict.count, 1U);
371 XCTAssertTrue([dict valueForKey:YES value:NULL]);
372 XCTAssertTrue([dict valueForKey:YES value:&value]);
374 XCTAssertFalse([dict valueForKey:NO value:NULL]);
375 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
385 GPBBoolInt32Dictionary *dict =
389 XCTAssertNotNil(dict);
390 XCTAssertEqual(dict.count, 2U);
392 XCTAssertTrue([dict valueForKey:YES value:NULL]);
393 XCTAssertTrue([dict valueForKey:YES value:&value]);
395 XCTAssertTrue([dict valueForKey:NO value:NULL]);
396 XCTAssertTrue([dict valueForKey:NO value:&value]);
402 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
424 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int32_t aValue, BOOL *stop) {
430 [dict release];
490 GPBBoolInt32Dictionary *dict =
494 XCTAssertNotNil(dict);
496 GPBBoolInt32Dictionary *dict2 = [dict copy];
500 XCTAssertNotEqual(dict, dict2);
501 XCTAssertEqualObjects(dict, dict2);
505 [dict release];
511 GPBBoolInt32Dictionary *dict =
515 XCTAssertNotNil(dict);
518 [GPBBoolInt32Dictionary dictionaryWithDictionary:dict];
522 XCTAssertNotEqual(dict, dict2);
523 XCTAssertEqualObjects(dict, dict2);
524 [dict release];
528 GPBBoolInt32Dictionary *dict = [GPBBoolInt32Dictionary dictionary];
529 XCTAssertNotNil(dict);
531 XCTAssertEqual(dict.count, 0U);
532 [dict setValue:200 forKey:YES];
533 XCTAssertEqual(dict.count, 1U);
542 [dict addEntriesFromDictionary:dict2];
543 XCTAssertEqual(dict.count, 2U);
546 XCTAssertTrue([dict valueForKey:YES value:NULL]);
547 XCTAssertTrue([dict valueForKey:YES value:&value]);
549 XCTAssertTrue([dict valueForKey:NO value:NULL]);
550 XCTAssertTrue([dict valueForKey:NO value:&value]);
558 GPBBoolInt32Dictionary *dict =
562 XCTAssertNotNil(dict);
563 XCTAssertEqual(dict.count, 2U);
565 [dict removeValueForKey:NO];
566 XCTAssertEqual(dict.count, 1U);
568 XCTAssertTrue([dict valueForKey:YES value:NULL]);
569 XCTAssertTrue([dict valueForKey:YES value:&value]);
571 XCTAssertFalse([dict valueForKey:NO value:NULL]);
574 [dict removeValueForKey:NO];
575 XCTAssertEqual(dict.count, 1U);
576 XCTAssertTrue([dict valueForKey:YES value:NULL]);
577 XCTAssertTrue([dict valueForKey:YES value:&value]);
579 XCTAssertFalse([dict valueForKey:NO value:NULL]);
581 [dict removeAll];
582 XCTAssertEqual(dict.count, 0U);
583 XCTAssertFalse([dict valueForKey:YES value:NULL]);
584 XCTAssertFalse([dict valueForKey:NO value:NULL]);
585 [dict release];
591 GPBBoolInt32Dictionary *dict =
595 XCTAssertNotNil(dict);
596 XCTAssertEqual(dict.count, 2U);
598 XCTAssertTrue([dict valueForKey:YES value:NULL]);
599 XCTAssertTrue([dict valueForKey:YES value:&value]);
601 XCTAssertTrue([dict valueForKey:NO value:NULL]);
602 XCTAssertTrue([dict valueForKey:NO value:&value]);
605 [dict setValue:201 forKey:YES];
606 XCTAssertEqual(dict.count, 2U);
607 XCTAssertTrue([dict valueForKey:YES value:NULL]);
608 XCTAssertTrue([dict valueForKey:YES value:&value]);
610 XCTAssertTrue([dict valueForKey:NO value:NULL]);
611 XCTAssertTrue([dict valueForKey:NO value:&value]);
614 [dict setValue:200 forKey:NO];
615 XCTAssertEqual(dict.count, 2U);
616 XCTAssertTrue([dict valueForKey:YES value:NULL]);
617 XCTAssertTrue([dict valueForKey:YES value:&value]);
619 XCTAssertTrue([dict valueForKey:NO value:NULL]);
620 XCTAssertTrue([dict valueForKey:NO value:&value]);
630 [dict addEntriesFromDictionary:dict2];
631 XCTAssertEqual(dict.count, 2U);
632 XCTAssertTrue([dict valueForKey:YES value:NULL]);
633 XCTAssertTrue([dict valueForKey:YES value:&value]);
635 XCTAssertTrue([dict valueForKey:NO value:NULL]);
636 XCTAssertTrue([dict valueForKey:NO value:&value]);
640 [dict release];
656 GPBBoolUInt64Dictionary *dict = [[GPBBoolUInt64Dictionary alloc] init];
657 XCTAssertNotNil(dict);
658 XCTAssertEqual(dict.count, 0U);
659 XCTAssertFalse([dict valueForKey:YES value:NULL]);
660 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
664 [dict release];
668 GPBBoolUInt64Dictionary *dict = [GPBBoolUInt64Dictionary dictionaryWithValue:300U forKey:YES];
669 XCTAssertNotNil(dict);
670 XCTAssertEqual(dict.count, 1U);
672 XCTAssertTrue([dict valueForKey:YES value:NULL]);
673 XCTAssertTrue([dict valueForKey:YES value:&value]);
675 XCTAssertFalse([dict valueForKey:NO value:NULL]);
676 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
686 GPBBoolUInt64Dictionary *dict =
690 XCTAssertNotNil(dict);
691 XCTAssertEqual(dict.count, 2U);
693 XCTAssertTrue([dict valueForKey:YES value:NULL]);
694 XCTAssertTrue([dict valueForKey:YES value:&value]);
696 XCTAssertTrue([dict valueForKey:NO value:NULL]);
697 XCTAssertTrue([dict valueForKey:NO value:&value]);
703 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
725 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, uint64_t aValue, BOOL *stop) {
731 [dict release];
791 GPBBoolUInt64Dictionary *dict =
795 XCTAssertNotNil(dict);
797 GPBBoolUInt64Dictionary *dict2 = [dict copy];
801 XCTAssertNotEqual(dict, dict2);
802 XCTAssertEqualObjects(dict, dict2);
806 [dict release];
812 GPBBoolUInt64Dictionary *dict =
816 XCTAssertNotNil(dict);
819 [GPBBoolUInt64Dictionary dictionaryWithDictionary:dict];
823 XCTAssertNotEqual(dict, dict2);
824 XCTAssertEqualObjects(dict, dict2);
825 [dict release];
829 GPBBoolUInt64Dictionary *dict = [GPBBoolUInt64Dictionary dictionary];
830 XCTAssertNotNil(dict);
832 XCTAssertEqual(dict.count, 0U);
833 [dict setValue:300U forKey:YES];
834 XCTAssertEqual(dict.count, 1U);
843 [dict addEntriesFromDictionary:dict2];
844 XCTAssertEqual(dict.count, 2U);
847 XCTAssertTrue([dict valueForKey:YES value:NULL]);
848 XCTAssertTrue([dict valueForKey:YES value:&value]);
850 XCTAssertTrue([dict valueForKey:NO value:NULL]);
851 XCTAssertTrue([dict valueForKey:NO value:&value]);
859 GPBBoolUInt64Dictionary *dict =
863 XCTAssertNotNil(dict);
864 XCTAssertEqual(dict.count, 2U);
866 [dict removeValueForKey:NO];
867 XCTAssertEqual(dict.count, 1U);
869 XCTAssertTrue([dict valueForKey:YES value:NULL]);
870 XCTAssertTrue([dict valueForKey:YES value:&value]);
872 XCTAssertFalse([dict valueForKey:NO value:NULL]);
875 [dict removeValueForKey:NO];
876 XCTAssertEqual(dict.count, 1U);
877 XCTAssertTrue([dict valueForKey:YES value:NULL]);
878 XCTAssertTrue([dict valueForKey:YES value:&value]);
880 XCTAssertFalse([dict valueForKey:NO value:NULL]);
882 [dict removeAll];
883 XCTAssertEqual(dict.count, 0U);
884 XCTAssertFalse([dict valueForKey:YES value:NULL]);
885 XCTAssertFalse([dict valueForKey:NO value:NULL]);
886 [dict release];
892 GPBBoolUInt64Dictionary *dict =
896 XCTAssertNotNil(dict);
897 XCTAssertEqual(dict.count, 2U);
899 XCTAssertTrue([dict valueForKey:YES value:NULL]);
900 XCTAssertTrue([dict valueForKey:YES value:&value]);
902 XCTAssertTrue([dict valueForKey:NO value:NULL]);
903 XCTAssertTrue([dict valueForKey:NO value:&value]);
906 [dict setValue:301U forKey:YES];
907 XCTAssertEqual(dict.count, 2U);
908 XCTAssertTrue([dict valueForKey:YES value:NULL]);
909 XCTAssertTrue([dict valueForKey:YES value:&value]);
911 XCTAssertTrue([dict valueForKey:NO value:NULL]);
912 XCTAssertTrue([dict valueForKey:NO value:&value]);
915 [dict setValue:300U forKey:NO];
916 XCTAssertEqual(dict.count, 2U);
917 XCTAssertTrue([dict valueForKey:YES value:NULL]);
918 XCTAssertTrue([dict valueForKey:YES value:&value]);
920 XCTAssertTrue([dict valueForKey:NO value:NULL]);
921 XCTAssertTrue([dict valueForKey:NO value:&value]);
931 [dict addEntriesFromDictionary:dict2];
932 XCTAssertEqual(dict.count, 2U);
933 XCTAssertTrue([dict valueForKey:YES value:NULL]);
934 XCTAssertTrue([dict valueForKey:YES value:&value]);
936 XCTAssertTrue([dict valueForKey:NO value:NULL]);
937 XCTAssertTrue([dict valueForKey:NO value:&value]);
941 [dict release];
957 GPBBoolInt64Dictionary *dict = [[GPBBoolInt64Dictionary alloc] init];
958 XCTAssertNotNil(dict);
959 XCTAssertEqual(dict.count, 0U);
960 XCTAssertFalse([dict valueForKey:YES value:NULL]);
961 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
965 [dict release];
969 GPBBoolInt64Dictionary *dict = [GPBBoolInt64Dictionary dictionaryWithValue:400 forKey:YES];
970 XCTAssertNotNil(dict);
971 XCTAssertEqual(dict.count, 1U);
973 XCTAssertTrue([dict valueForKey:YES value:NULL]);
974 XCTAssertTrue([dict valueForKey:YES value:&value]);
976 XCTAssertFalse([dict valueForKey:NO value:NULL]);
977 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
987 GPBBoolInt64Dictionary *dict =
991 XCTAssertNotNil(dict);
992 XCTAssertEqual(dict.count, 2U);
994 XCTAssertTrue([dict valueForKey:YES value:NULL]);
995 XCTAssertTrue([dict valueForKey:YES value:&value]);
997 XCTAssertTrue([dict valueForKey:NO value:NULL]);
998 XCTAssertTrue([dict valueForKey:NO value:&value]);
1004 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
1026 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, int64_t aValue, BOOL *stop) {
1032 [dict release];
1092 GPBBoolInt64Dictionary *dict =
1096 XCTAssertNotNil(dict);
1098 GPBBoolInt64Dictionary *dict2 = [dict copy];
1102 XCTAssertNotEqual(dict, dict2);
1103 XCTAssertEqualObjects(dict, dict2);
1107 [dict release];
1113 GPBBoolInt64Dictionary *dict =
1117 XCTAssertNotNil(dict);
1120 [GPBBoolInt64Dictionary dictionaryWithDictionary:dict];
1124 XCTAssertNotEqual(dict, dict2);
1125 XCTAssertEqualObjects(dict, dict2);
1126 [dict release];
1130 GPBBoolInt64Dictionary *dict = [GPBBoolInt64Dictionary dictionary];
1131 XCTAssertNotNil(dict);
1133 XCTAssertEqual(dict.count, 0U);
1134 [dict setValue:400 forKey:YES];
1135 XCTAssertEqual(dict.count, 1U);
1144 [dict addEntriesFromDictionary:dict2];
1145 XCTAssertEqual(dict.count, 2U);
1148 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1149 XCTAssertTrue([dict valueForKey:YES value:&value]);
1151 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1152 XCTAssertTrue([dict valueForKey:NO value:&value]);
1160 GPBBoolInt64Dictionary *dict =
1164 XCTAssertNotNil(dict);
1165 XCTAssertEqual(dict.count, 2U);
1167 [dict removeValueForKey:NO];
1168 XCTAssertEqual(dict.count, 1U);
1170 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1171 XCTAssertTrue([dict valueForKey:YES value:&value]);
1173 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1176 [dict removeValueForKey:NO];
1177 XCTAssertEqual(dict.count, 1U);
1178 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1179 XCTAssertTrue([dict valueForKey:YES value:&value]);
1181 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1183 [dict removeAll];
1184 XCTAssertEqual(dict.count, 0U);
1185 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1186 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1187 [dict release];
1193 GPBBoolInt64Dictionary *dict =
1197 XCTAssertNotNil(dict);
1198 XCTAssertEqual(dict.count, 2U);
1200 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1201 XCTAssertTrue([dict valueForKey:YES value:&value]);
1203 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1204 XCTAssertTrue([dict valueForKey:NO value:&value]);
1207 [dict setValue:401 forKey:YES];
1208 XCTAssertEqual(dict.count, 2U);
1209 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1210 XCTAssertTrue([dict valueForKey:YES value:&value]);
1212 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1213 XCTAssertTrue([dict valueForKey:NO value:&value]);
1216 [dict setValue:400 forKey:NO];
1217 XCTAssertEqual(dict.count, 2U);
1218 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1219 XCTAssertTrue([dict valueForKey:YES value:&value]);
1221 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1222 XCTAssertTrue([dict valueForKey:NO value:&value]);
1232 [dict addEntriesFromDictionary:dict2];
1233 XCTAssertEqual(dict.count, 2U);
1234 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1235 XCTAssertTrue([dict valueForKey:YES value:&value]);
1237 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1238 XCTAssertTrue([dict valueForKey:NO value:&value]);
1242 [dict release];
1258 GPBBoolBoolDictionary *dict = [[GPBBoolBoolDictionary alloc] init];
1259 XCTAssertNotNil(dict);
1260 XCTAssertEqual(dict.count, 0U);
1261 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1262 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1266 [dict release];
1270 GPBBoolBoolDictionary *dict = [GPBBoolBoolDictionary dictionaryWithValue:NO forKey:YES];
1271 XCTAssertNotNil(dict);
1272 XCTAssertEqual(dict.count, 1U);
1274 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1275 XCTAssertTrue([dict valueForKey:YES value:&value]);
1277 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1278 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1288 GPBBoolBoolDictionary *dict =
1292 XCTAssertNotNil(dict);
1293 XCTAssertEqual(dict.count, 2U);
1295 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1296 XCTAssertTrue([dict valueForKey:YES value:&value]);
1298 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1299 XCTAssertTrue([dict valueForKey:NO value:&value]);
1305 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1327 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, BOOL aValue, BOOL *stop) {
1333 [dict release];
1393 GPBBoolBoolDictionary *dict =
1397 XCTAssertNotNil(dict);
1399 GPBBoolBoolDictionary *dict2 = [dict copy];
1403 XCTAssertNotEqual(dict, dict2);
1404 XCTAssertEqualObjects(dict, dict2);
1408 [dict release];
1414 GPBBoolBoolDictionary *dict =
1418 XCTAssertNotNil(dict);
1421 [GPBBoolBoolDictionary dictionaryWithDictionary:dict];
1425 XCTAssertNotEqual(dict, dict2);
1426 XCTAssertEqualObjects(dict, dict2);
1427 [dict release];
1431 GPBBoolBoolDictionary *dict = [GPBBoolBoolDictionary dictionary];
1432 XCTAssertNotNil(dict);
1434 XCTAssertEqual(dict.count, 0U);
1435 [dict setValue:NO forKey:YES];
1436 XCTAssertEqual(dict.count, 1U);
1445 [dict addEntriesFromDictionary:dict2];
1446 XCTAssertEqual(dict.count, 2U);
1449 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1450 XCTAssertTrue([dict valueForKey:YES value:&value]);
1452 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1453 XCTAssertTrue([dict valueForKey:NO value:&value]);
1461 GPBBoolBoolDictionary *dict =
1465 XCTAssertNotNil(dict);
1466 XCTAssertEqual(dict.count, 2U);
1468 [dict removeValueForKey:NO];
1469 XCTAssertEqual(dict.count, 1U);
1471 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1472 XCTAssertTrue([dict valueForKey:YES value:&value]);
1474 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1477 [dict removeValueForKey:NO];
1478 XCTAssertEqual(dict.count, 1U);
1479 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1480 XCTAssertTrue([dict valueForKey:YES value:&value]);
1482 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1484 [dict removeAll];
1485 XCTAssertEqual(dict.count, 0U);
1486 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1487 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1488 [dict release];
1494 GPBBoolBoolDictionary *dict =
1498 XCTAssertNotNil(dict);
1499 XCTAssertEqual(dict.count, 2U);
1501 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1502 XCTAssertTrue([dict valueForKey:YES value:&value]);
1504 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1505 XCTAssertTrue([dict valueForKey:NO value:&value]);
1508 [dict setValue:YES forKey:YES];
1509 XCTAssertEqual(dict.count, 2U);
1510 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1511 XCTAssertTrue([dict valueForKey:YES value:&value]);
1513 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1514 XCTAssertTrue([dict valueForKey:NO value:&value]);
1517 [dict setValue:NO forKey:NO];
1518 XCTAssertEqual(dict.count, 2U);
1519 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1520 XCTAssertTrue([dict valueForKey:YES value:&value]);
1522 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1523 XCTAssertTrue([dict valueForKey:NO value:&value]);
1533 [dict addEntriesFromDictionary:dict2];
1534 XCTAssertEqual(dict.count, 2U);
1535 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1536 XCTAssertTrue([dict valueForKey:YES value:&value]);
1538 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1539 XCTAssertTrue([dict valueForKey:NO value:&value]);
1543 [dict release];
1559 GPBBoolFloatDictionary *dict = [[GPBBoolFloatDictionary alloc] init];
1560 XCTAssertNotNil(dict);
1561 XCTAssertEqual(dict.count, 0U);
1562 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1563 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1567 [dict release];
1571 GPBBoolFloatDictionary *dict = [GPBBoolFloatDictionary dictionaryWithValue:500.f forKey:YES];
1572 XCTAssertNotNil(dict);
1573 XCTAssertEqual(dict.count, 1U);
1575 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1576 XCTAssertTrue([dict valueForKey:YES value:&value]);
1578 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1579 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1589 GPBBoolFloatDictionary *dict =
1593 XCTAssertNotNil(dict);
1594 XCTAssertEqual(dict.count, 2U);
1596 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1597 XCTAssertTrue([dict valueForKey:YES value:&value]);
1599 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1600 XCTAssertTrue([dict valueForKey:NO value:&value]);
1606 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1628 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, float aValue, BOOL *stop) {
1634 [dict release];
1694 GPBBoolFloatDictionary *dict =
1698 XCTAssertNotNil(dict);
1700 GPBBoolFloatDictionary *dict2 = [dict copy];
1704 XCTAssertNotEqual(dict, dict2);
1705 XCTAssertEqualObjects(dict, dict2);
1709 [dict release];
1715 GPBBoolFloatDictionary *dict =
1719 XCTAssertNotNil(dict);
1722 [GPBBoolFloatDictionary dictionaryWithDictionary:dict];
1726 XCTAssertNotEqual(dict, dict2);
1727 XCTAssertEqualObjects(dict, dict2);
1728 [dict release];
1732 GPBBoolFloatDictionary *dict = [GPBBoolFloatDictionary dictionary];
1733 XCTAssertNotNil(dict);
1735 XCTAssertEqual(dict.count, 0U);
1736 [dict setValue:500.f forKey:YES];
1737 XCTAssertEqual(dict.count, 1U);
1746 [dict addEntriesFromDictionary:dict2];
1747 XCTAssertEqual(dict.count, 2U);
1750 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1751 XCTAssertTrue([dict valueForKey:YES value:&value]);
1753 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1754 XCTAssertTrue([dict valueForKey:NO value:&value]);
1762 GPBBoolFloatDictionary *dict =
1766 XCTAssertNotNil(dict);
1767 XCTAssertEqual(dict.count, 2U);
1769 [dict removeValueForKey:NO];
1770 XCTAssertEqual(dict.count, 1U);
1772 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1773 XCTAssertTrue([dict valueForKey:YES value:&value]);
1775 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1778 [dict removeValueForKey:NO];
1779 XCTAssertEqual(dict.count, 1U);
1780 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1781 XCTAssertTrue([dict valueForKey:YES value:&value]);
1783 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1785 [dict removeAll];
1786 XCTAssertEqual(dict.count, 0U);
1787 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1788 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1789 [dict release];
1795 GPBBoolFloatDictionary *dict =
1799 XCTAssertNotNil(dict);
1800 XCTAssertEqual(dict.count, 2U);
1802 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1803 XCTAssertTrue([dict valueForKey:YES value:&value]);
1805 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1806 XCTAssertTrue([dict valueForKey:NO value:&value]);
1809 [dict setValue:501.f forKey:YES];
1810 XCTAssertEqual(dict.count, 2U);
1811 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1812 XCTAssertTrue([dict valueForKey:YES value:&value]);
1814 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1815 XCTAssertTrue([dict valueForKey:NO value:&value]);
1818 [dict setValue:500.f forKey:NO];
1819 XCTAssertEqual(dict.count, 2U);
1820 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1821 XCTAssertTrue([dict valueForKey:YES value:&value]);
1823 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1824 XCTAssertTrue([dict valueForKey:NO value:&value]);
1834 [dict addEntriesFromDictionary:dict2];
1835 XCTAssertEqual(dict.count, 2U);
1836 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1837 XCTAssertTrue([dict valueForKey:YES value:&value]);
1839 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1840 XCTAssertTrue([dict valueForKey:NO value:&value]);
1844 [dict release];
1860 GPBBoolDoubleDictionary *dict = [[GPBBoolDoubleDictionary alloc] init];
1861 XCTAssertNotNil(dict);
1862 XCTAssertEqual(dict.count, 0U);
1863 XCTAssertFalse([dict valueForKey:YES value:NULL]);
1864 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1868 [dict release];
1872 GPBBoolDoubleDictionary *dict = [GPBBoolDoubleDictionary dictionaryWithValue:600. forKey:YES];
1873 XCTAssertNotNil(dict);
1874 XCTAssertEqual(dict.count, 1U);
1876 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1877 XCTAssertTrue([dict valueForKey:YES value:&value]);
1879 XCTAssertFalse([dict valueForKey:NO value:NULL]);
1880 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1890 GPBBoolDoubleDictionary *dict =
1894 XCTAssertNotNil(dict);
1895 XCTAssertEqual(dict.count, 2U);
1897 XCTAssertTrue([dict valueForKey:YES value:NULL]);
1898 XCTAssertTrue([dict valueForKey:YES value:&value]);
1900 XCTAssertTrue([dict valueForKey:NO value:NULL]);
1901 XCTAssertTrue([dict valueForKey:NO value:&value]);
1907 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1929 [dict enumerateKeysAndValuesUsingBlock:^(BOOL aKey, double aValue, BOOL *stop) {
1935 [dict release];
1995 GPBBoolDoubleDictionary *dict =
1999 XCTAssertNotNil(dict);
2001 GPBBoolDoubleDictionary *dict2 = [dict copy];
2005 XCTAssertNotEqual(dict, dict2);
2006 XCTAssertEqualObjects(dict, dict2);
2010 [dict release];
2016 GPBBoolDoubleDictionary *dict =
2020 XCTAssertNotNil(dict);
2023 [GPBBoolDoubleDictionary dictionaryWithDictionary:dict];
2027 XCTAssertNotEqual(dict, dict2);
2028 XCTAssertEqualObjects(dict, dict2);
2029 [dict release];
2033 GPBBoolDoubleDictionary *dict = [GPBBoolDoubleDictionary dictionary];
2034 XCTAssertNotNil(dict);
2036 XCTAssertEqual(dict.count, 0U);
2037 [dict setValue:600. forKey:YES];
2038 XCTAssertEqual(dict.count, 1U);
2047 [dict addEntriesFromDictionary:dict2];
2048 XCTAssertEqual(dict.count, 2U);
2051 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2052 XCTAssertTrue([dict valueForKey:YES value:&value]);
2054 XCTAssertTrue([dict valueForKey:NO value:NULL]);
2055 XCTAssertTrue([dict valueForKey:NO value:&value]);
2063 GPBBoolDoubleDictionary *dict =
2067 XCTAssertNotNil(dict);
2068 XCTAssertEqual(dict.count, 2U);
2070 [dict removeValueForKey:NO];
2071 XCTAssertEqual(dict.count, 1U);
2073 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2074 XCTAssertTrue([dict valueForKey:YES value:&value]);
2076 XCTAssertFalse([dict valueForKey:NO value:NULL]);
2079 [dict removeValueForKey:NO];
2080 XCTAssertEqual(dict.count, 1U);
2081 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2082 XCTAssertTrue([dict valueForKey:YES value:&value]);
2084 XCTAssertFalse([dict valueForKey:NO value:NULL]);
2086 [dict removeAll];
2087 XCTAssertEqual(dict.count, 0U);
2088 XCTAssertFalse([dict valueForKey:YES value:NULL]);
2089 XCTAssertFalse([dict valueForKey:NO value:NULL]);
2090 [dict release];
2096 GPBBoolDoubleDictionary *dict =
2100 XCTAssertNotNil(dict);
2101 XCTAssertEqual(dict.count, 2U);
2103 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2104 XCTAssertTrue([dict valueForKey:YES value:&value]);
2106 XCTAssertTrue([dict valueForKey:NO value:NULL]);
2107 XCTAssertTrue([dict valueForKey:NO value:&value]);
2110 [dict setValue:601. forKey:YES];
2111 XCTAssertEqual(dict.count, 2U);
2112 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2113 XCTAssertTrue([dict valueForKey:YES value:&value]);
2115 XCTAssertTrue([dict valueForKey:NO value:NULL]);
2116 XCTAssertTrue([dict valueForKey:NO value:&value]);
2119 [dict setValue:600. forKey:NO];
2120 XCTAssertEqual(dict.count, 2U);
2121 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2122 XCTAssertTrue([dict valueForKey:YES value:&value]);
2124 XCTAssertTrue([dict valueForKey:NO value:NULL]);
2125 XCTAssertTrue([dict valueForKey:NO value:&value]);
2135 [dict addEntriesFromDictionary:dict2];
2136 XCTAssertEqual(dict.count, 2U);
2137 XCTAssertTrue([dict valueForKey:YES value:NULL]);
2138 XCTAssertTrue([dict valueForKey:YES value:&value]);
2140 XCTAssertTrue([dict valueForKey:NO value:NULL]);
2141 XCTAssertTrue([dict valueForKey:NO value:&value]);
2145 [dict release];
2161 GPBBoolObjectDictionary<NSString*> *dict = [[GPBBoolObjectDictionary alloc] init];
2162 XCTAssertNotNil(dict);
2163 XCTAssertEqual(dict.count, 0U);
2164 XCTAssertNil([dict objectForKey:YES]);
2165 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2169 [dict release];
2173 …GPBBoolObjectDictionary<NSString*> *dict = [GPBBoolObjectDictionary dictionaryWithObject:@"abc" fo…
2174 XCTAssertNotNil(dict);
2175 XCTAssertEqual(dict.count, 1U);
2176 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2177 XCTAssertNil([dict objectForKey:NO]);
2178 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2188 GPBBoolObjectDictionary<NSString*> *dict =
2192 XCTAssertNotNil(dict);
2193 XCTAssertEqual(dict.count, 2U);
2194 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2195 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2200 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2222 [dict enumerateKeysAndObjectsUsingBlock:^(BOOL aKey, NSString* aObject, BOOL *stop) {
2228 [dict release];
2288 GPBBoolObjectDictionary<NSString*> *dict =
2292 XCTAssertNotNil(dict);
2294 GPBBoolObjectDictionary<NSString*> *dict2 = [dict copy];
2298 XCTAssertNotEqual(dict, dict2);
2299 XCTAssertEqualObjects(dict, dict2);
2303 [dict release];
2309 GPBBoolObjectDictionary<NSString*> *dict =
2313 XCTAssertNotNil(dict);
2316 [GPBBoolObjectDictionary dictionaryWithDictionary:dict];
2320 XCTAssertNotEqual(dict, dict2);
2321 XCTAssertEqualObjects(dict, dict2);
2322 [dict release];
2326 GPBBoolObjectDictionary<NSString*> *dict = [GPBBoolObjectDictionary dictionary];
2327 XCTAssertNotNil(dict);
2329 XCTAssertEqual(dict.count, 0U);
2330 [dict setObject:@"abc" forKey:YES];
2331 XCTAssertEqual(dict.count, 1U);
2340 [dict addEntriesFromDictionary:dict2];
2341 XCTAssertEqual(dict.count, 2U);
2343 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2344 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2351 GPBBoolObjectDictionary<NSString*> *dict =
2355 XCTAssertNotNil(dict);
2356 XCTAssertEqual(dict.count, 2U);
2358 [dict removeObjectForKey:NO];
2359 XCTAssertEqual(dict.count, 1U);
2360 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2361 XCTAssertNil([dict objectForKey:NO]);
2364 [dict removeObjectForKey:NO];
2365 XCTAssertEqual(dict.count, 1U);
2366 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2367 XCTAssertNil([dict objectForKey:NO]);
2369 [dict removeAll];
2370 XCTAssertEqual(dict.count, 0U);
2371 XCTAssertNil([dict objectForKey:YES]);
2372 XCTAssertNil([dict objectForKey:NO]);
2373 [dict release];
2379 GPBBoolObjectDictionary<NSString*> *dict =
2383 XCTAssertNotNil(dict);
2384 XCTAssertEqual(dict.count, 2U);
2385 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2386 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2388 [dict setObject:@"def" forKey:YES];
2389 XCTAssertEqual(dict.count, 2U);
2390 XCTAssertEqualObjects([dict objectForKey:YES], @"def");
2391 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2393 [dict setObject:@"abc" forKey:NO];
2394 XCTAssertEqual(dict.count, 2U);
2395 XCTAssertEqualObjects([dict objectForKey:YES], @"def");
2396 XCTAssertEqualObjects([dict objectForKey:NO], @"abc");
2405 [dict addEntriesFromDictionary:dict2];
2406 XCTAssertEqual(dict.count, 2U);
2407 XCTAssertEqualObjects([dict objectForKey:YES], @"abc");
2408 XCTAssertEqualObjects([dict objectForKey:NO], @"def");
2411 [dict release];