I'm trying to implement a unit test(XCTest
) to compare two NSArray objects:
Here is my implementation:
- (void)testTwoNumsArrays {
NSArray *result = @[@20,@20];
NSArray *expecteResult = @[@20,@20];
XCTAssertEqual(result, expecteResult);
}
I'm getting this error:
((result) equal to (expecteResult)) failed: ("{length = 8, bytes = 0xb0cfc00001000000}") is not equal to ("{length = 8, bytes = 0x9032ce0001000000}")
Any of you know why I can not compare the two arrays. In Swift it works just fine.
I'll really appreciate your help.