Adds cocoapods for libraries.
Adds OCMockito and OCHamcrest libs.
This commit is contained in:
45
iOS/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m
generated
Normal file
45
iOS/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m
generated
Normal 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];
|
||||
}
|
||||
Reference in New Issue
Block a user