@@ -31,11 +31,11 @@ { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFSet *set1, *set2; OFMutableSet *mutableSet; #ifdef OF_HAVE_FAST_ENUMERATION - BOOL ok; + bool ok; size_t i; #endif TEST(@"+[setWithArray:]", (set1 = [OFSet setWithArray: [OFArray arrayWithObjects: @"foo", @@ -90,50 +90,50 @@ R([mutableSet unionSet: ([OFSet setWithObjects: @"x", @"bar", nil])]) && [mutableSet isEqual: ([OFSet setWithObjects: @"baz", @"bar", @"x", nil])]) #ifdef OF_HAVE_FAST_ENUMERATION - ok = YES; + ok = true; i = 0; for (OFString *s in set1) { switch (i) { case 0: if (![s isEqual: @"x"]) - ok = NO; + ok = false; break; case 1: if (![s isEqual: @"bar"]) - ok = NO; + ok = false; break; case 2: if (![s isEqual: @"foo"]) - ok = NO; + ok = false; break; case 3: if (![s isEqual: @"baz"]) - ok = NO; + ok = false; break; } i++; } if (i != 4) - ok = NO; + ok = false; TEST(@"Fast enumeration", ok) - ok = NO; + ok = false; @try { for (OFString *s in mutableSet) [mutableSet removeObject: s]; } @catch (OFEnumerationMutationException *e) { - ok = YES; + ok = true; } TEST(@"Detection of mutation during Fast Enumeration", ok); #endif [pool drain]; } @end