OCMVerify failing with array parameters
Posted: 30 Sep 2014, 17:52
Using Xcode 6.0.1 the following test fails, whereas it run successfully with Xcode 5.1.1:
@protocol Foo <NSObject>
- (void)process:(NSArray*)data;
@end
@implementation FooTests
- (void)testFoo
{
id foo = OCMProtocolMock(@protocol(Foo));
[foo process:@[@0]];
OCMVerify([foo process:@[@0]]);
}
@end
Using Xcode 6.0.1 it fails with this error:
FooTests.m: test failure: -[FooTests testFoo] failed: OCMockObject(Foo): Method process:(
0
) was not invoked.
I have tried this with the iOS 8.0 and iOS 7.1 simulator.
@protocol Foo <NSObject>
- (void)process:(NSArray*)data;
@end
@implementation FooTests
- (void)testFoo
{
id foo = OCMProtocolMock(@protocol(Foo));
[foo process:@[@0]];
OCMVerify([foo process:@[@0]]);
}
@end
Using Xcode 6.0.1 it fails with this error:
FooTests.m: test failure: -[FooTests testFoo] failed: OCMockObject(Foo): Method process:(
0
) was not invoked.
I have tried this with the iOS 8.0 and iOS 7.1 simulator.