@@ -53,17 +53,17 @@ [[dict objectForKey: keys[0]] isEqual: values[0]] && [[dict objectForKey: keys[1]] isEqual: values[1]] && [dict objectForKey: @"key3"] == nil) TEST(@"-[containsObject:]", - [dict containsObject: values[0]] == YES && - [dict containsObject: @"nonexistant"] == NO) + [dict containsObject: values[0]] && + ![dict containsObject: @"nonexistant"]) TEST(@"-[containsObjectIdenticalTo:]", - [dict containsObjectIdenticalTo: values[0]] == YES && - [dict containsObjectIdenticalTo: - [OFString stringWithString: values[0]]] == NO) + [dict containsObjectIdenticalTo: values[0]] && + ![dict containsObjectIdenticalTo: + [OFString stringWithString: values[0]]]) TEST(@"-[description]", [[dict description] isEqual: @"{\n\tkey1 = value1;\n\tkey2 = value2;\n}"]) @@ -94,15 +94,15 @@ [dict setObject: values[0] forKey: keys[0]]; #ifdef OF_HAVE_FAST_ENUMERATION size_t i = 0; - BOOL ok = YES; + bool ok = true; for (OFString *key in dict) { if (i > 1 || ![key isEqual: keys[i]]) { - ok = NO; + ok = false; break; } [dict setObject: [dict objectForKey: key] forKey: key]; @@ -109,17 +109,17 @@ i++; } TEST(@"Fast Enumeration", ok) - ok = NO; + ok = false; @try { for (OFString *key in dict) [dict setObject: @"" forKey: @""]; } @catch (OFEnumerationMutationException *e) { - ok = YES; + ok = true; } TEST(@"Detection of mutation during Fast Enumeration", ok) [dict removeObjectForKey: @""]; @@ -126,17 +126,17 @@ #endif #ifdef OF_HAVE_BLOCKS { __block size_t i = 0; - __block BOOL ok = YES; + __block bool ok = true; [dict enumerateKeysAndObjectsUsingBlock: - ^ (id key, id obj, BOOL *stop) { + ^ (id key, id obj, bool *stop) { if (i > 1 || ![key isEqual: keys[i]]) { - ok = NO; - *stop = YES; + ok = false; + *stop = true; return; } [dict setObject: [dict objectForKey: key] forKey: key]; @@ -143,19 +143,19 @@ i++; }]; TEST(@"Enumeration using blocks", ok) - ok = NO; + ok = false; @try { [dict enumerateKeysAndObjectsUsingBlock: - ^ (id key, id obj, BOOL *stop) { + ^ (id key, id obj, bool *stop) { [dict setObject: @"" forKey: @""]; }]; } @catch (OFEnumerationMutationException *e) { - ok = YES; + ok = true; } TEST(@"Detection of mutation during enumeration using blocks", ok) @@ -162,11 +162,11 @@ [dict removeObjectForKey: @""]; } TEST(@"-[replaceObjectsUsingBlock:]", R([dict replaceObjectsUsingBlock: - ^ id (id key, id obj, BOOL *stop) { + ^ id (id key, id obj, bool *stop) { if ([key isEqual: keys[0]]) return @"value_1"; if ([key isEqual: keys[1]]) return @"value_2"; @@ -183,12 +183,12 @@ return nil; }] description] isEqual: @"{\n\tkey1 = val1;\n\tkey2 = val2;\n}"]) TEST(@"-[filteredDictionaryUsingBlock:]", - [[[dict filteredDictionaryUsingBlock: ^ BOOL (id key, id obj) { - return ([key isEqual: keys[0]] ? YES : NO); + [[[dict filteredDictionaryUsingBlock: ^ bool (id key, id obj) { + return [key isEqual: keys[0]]; }] description] isEqual: @"{\n\tkey1 = value_1;\n}"]) #endif TEST(@"-[count]", [dict count] == 2)