Sha256: 86a047ac193235679e9a6a6bb5520f58107944c3398652bd3e3819d29d52ef1b
Contents?: true
Size: 785 Bytes
Versions: 8
Compression:
Stored size: 785 Bytes
Contents
#import "EXPMatchers+beTruthy.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(beTruthy, (void)) { match(^BOOL{ if([actual isKindOfClass:[NSNumber class]]) { return !![(NSNumber *)actual boolValue]; } else if([actual isKindOfClass:[NSValue class]]) { if(EXPIsValuePointer((NSValue *)actual)) { return !![(NSValue *)actual pointerValue]; } } return !!actual; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd
Version data entries
8 entries across 8 versions & 2 rubygems