Sha256: 78335a3b9b12919b2cb4ea9a6ae2d319a8897bc6918731d5a913fa11cc8056b3
Contents?: true
Size: 885 Bytes
Versions: 8
Compression:
Stored size: 885 Bytes
Contents
#import "EXPMatchers+equal.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_equal, (id expected)) { match(^BOOL{ if((actual == expected) || [actual isEqual:expected]) { return YES; } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) { if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) { return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue]; } } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd
Version data entries
8 entries across 8 versions & 2 rubygems