You're comparing an NSInteger (signed) against an NSUInteger (unsigned, from [_testRuns count]), which is probably why you're seeing this problem. My general preference is to not use 'idx' either, but to simply use 'i'. But that's just me.