Adds cocoapods for libraries.

Adds OCMockito and OCHamcrest libs.
This commit is contained in:
2020-09-05 22:06:51 -07:00
parent af47156557
commit c3031fbc39
364 changed files with 17147 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
// OCHamcrest by Jon Reid, https://qualitycoding.org/
// Copyright 2019 hamcrest.org. See LICENSE.txt
#import "HCIsEqualIgnoringCase.h"
#import "HCRequireNonNilObject.h"
@interface HCIsEqualIgnoringCase ()
@property (nonatomic, copy, readonly) NSString *string;
@end
@implementation HCIsEqualIgnoringCase
- (instancetype)initWithString:(NSString *)string
{
HCRequireNonNilObject(string);
self = [super init];
if (self)
_string = [string copy];
return self;
}
- (BOOL)matches:(nullable id)item
{
if (![item isKindOfClass:[NSString class]])
return NO;
return [self.string caseInsensitiveCompare:item] == NSOrderedSame;
}
- (void)describeTo:(id <HCDescription>)description
{
[[description appendDescriptionOf:self.string]
appendText:@" ignoring case"];
}
@end
id HC_equalToIgnoringCase(NSString *expectedString)
{
return [[HCIsEqualIgnoringCase alloc] initWithString:expectedString];
}