I am writing a unit test for an object that has an NSUInteger property and I'm getting a type mismatch when I compare to 0. Can someone explain why?
My object definition:
@interface Item : NSObject
@property (nonatomic) NSUInteger n;
// stuff deleted...
@end
And the line from my unit test that gets a type mismatch error:
STAssertEquals(0, i.n, @"n property should be zero");
I also tried 0L and I get a type mismatch with that as well. I have worked around this by declaring an NSUInteger variable called "zero" and setting that to 0, then using that for the compare, but I'd like to better understand what's going on here.
Thanks!