Sha256: 665763f3fc02d8f8f40c4964f1afa78fad73b5a3175c6a6a0bb3d4f10066eed4
Contents?: true
Size: 1016 Bytes
Versions: 8
Compression:
Stored size: 1016 Bytes
Contents
#import "EXPMatchers+beKindOf.h" EXPMatcherImplementationBegin(beKindOf, (Class expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL{ return !(actualIsNil || expectedIsNil); }); match(^BOOL{ return [actual isKindOfClass:expected]; }); failureMessageForTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; }); failureMessageForNotTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; }); } EXPMatcherImplementationEnd
Version data entries
8 entries across 8 versions & 2 rubygems