I have an object which accepts an block as call back, like this
@interface MyObject
@property(nonatomic, copy) (void(^)()) callback;
- (void)trigger;
@end
When trigger
is called, callback will be called asynchronously in 1 second, I want to write a test to make sure that if I set nil to callback
, it won't crash due to calling a nil block.
How to do this?
Aucun commentaire:
Enregistrer un commentaire