@@ -91,22 +91,10 @@ } TEST(@"Detection of mutation during Fast Enumeration", ok) [dict removeObjectForKey: @""]; - - TEST(@"-[replaceObjectsUsingBlock:]", - R([dict replaceObjectsUsingBlock: - ^ id (id key, id obj, BOOL *stop) { - if ([key isEqual: keys[0]]) - return @"value_1"; - if ([key isEqual: keys[1]]) - return @"value_2"; - - return nil; - }]) && [[dict objectForKey: keys[0]] isEqual: @"value_1"] && - [[dict objectForKey: keys[1]] isEqual: @"value_2"]) #endif #ifdef OF_HAVE_BLOCKS { __block size_t i = 0; @@ -138,10 +126,22 @@ TEST(@"Detection of mutation during enumeration using blocks", ok) [dict removeObjectForKey: @""]; } + + TEST(@"-[replaceObjectsUsingBlock:]", + R([dict replaceObjectsUsingBlock: + ^ id (id key, id obj, BOOL *stop) { + if ([key isEqual: keys[0]]) + return @"value_1"; + if ([key isEqual: keys[1]]) + return @"value_2"; + + return nil; + }]) && [[dict objectForKey: keys[0]] isEqual: @"value_1"] && + [[dict objectForKey: keys[1]] isEqual: @"value_2"]) #endif TEST(@"-[count]", [dict count] == 2) TEST(@"+[dictionaryWithKeysAndObjects:]",