Closed LinkRober closed 8 years ago
The use of any is not possible. Please see section 4.1 and 4.2 in the documentation for details and a possible workaround: http://ocmock.org/reference/#argument-constraints
Thx,I got it
I hava a enmu:
typedef NS_ENUM(NSUInteger, MSImageCollectionViewType) {
MSImageCollectionViewFoodType = 0,
MSImageCollectionViewNormalType = 1,
};
and I want to return a enum value when stub
[[[mock stub] andReturnValue:MSImageCollectionViewNormalType] collectionType];
but, I can't get a correct value.why?
@erikdoe
Please ask questions about the use of OCMock on Stackoverflow using the ocmock
tag.
I want to pass parameter which is kind of CGPoint. I try to use [OCMArg any] ,OCMOCK_VALUE. but it is useless.like this
[[collectionViewMock expect] setContentOffset:OCMOCK_VALUE(NSMakePoint(0,0)) animated:[OCMArg any]];