Sha256: 4211846023de02374f25a5c5ef4cf4453ace8bec16b2ee413b20e7a9ee906d7a

Contents?: true

Size: 691 Bytes

Versions: 8

Compression:

Stored size: 691 Bytes

Contents

#import "EXPMatchers+equal.h"
#import "EXPMatcherHelpers.h"

EXPMatcherImplementationBegin(beIdenticalTo, (void *expected)) {
  match(^BOOL{
    if(actual == expected) {
      return YES;
    } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) {
      if([(NSValue *)actual pointerValue] == expected) {
        return YES;
      }
    }
    return NO;
  });

  failureMessageForTo(^NSString *{
    return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual];
  });

  failureMessageForNotTo(^NSString *{
    return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, 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+beIdenticalTo.m
second_curtain-0.5.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
second_curtain-0.4.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
second_curtain-0.3.0 Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
cocoapods-deintegrate-0.2.1 spec/fixtures/Project/StaticLibraries/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
cocoapods-deintegrate-0.2.0 spec/fixtures/Project/StaticLibraries/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
second_curtain-0.2.4 Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m
second_curtain-0.2.3 Demo/Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m