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

Version Path
second_curtain-0.6.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m
second_curtain-0.5.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m
second_curtain-0.4.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m
second_curtain-0.3.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m
cocoapods-deintegrate-0.2.1 spec/fixtures/Project/StaticLibraries/Pods/Expecta/src/matchers/EXPMatchers+equal.m
cocoapods-deintegrate-0.2.0 spec/fixtures/Project/StaticLibraries/Pods/Expecta/src/matchers/EXPMatchers+equal.m
second_curtain-0.2.4 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m
second_curtain-0.2.3 Demo/Pods/Expecta/src/matchers/EXPMatchers+equal.m