NSMutableArray *arr = [NSMutableArray array];
[arr addObject:@\"1\"];
[arr addObject:@\"2\"];
[arr addObject:@\"3\"];
// This statement is fine.
XCTAssertTrue(arr.c
I have had this problem, too. As @ephemera and @napier indicated, this is a type issue.
It can be solved by supplying a value of the correct type, using the c-literal modifiers.
XCTAssertEqual(arr.count, 3ul, @"Wrong array size.");
You can find the correct type by looking up the return type of the function used on the left hand side - ALT-click
on arr.count
:
- (NSUInteger)count;
Now ALT-click on NSUInteger
to find its type:
typedef unsigned long NSUInteger;
Now find the c literal numeric format for unsigned long - google is a good friend but this page works:
http://www.tutorialspoint.com/cprogramming/c_constants.htm
As a quick hint here, you may need to use U (unsigned) L (long) or F (float), and make sure you write 1.0 instead of 1 to get a double. Lowercase also works, as in my example above.