Adds cocoapods for libraries.
Adds OCMockito and OCHamcrest libs.
This commit is contained in:
45
Pods/OCHamcrest/Source/Core/HCStringDescription.m
generated
Normal file
45
Pods/OCHamcrest/Source/Core/HCStringDescription.m
generated
Normal file
@@ -0,0 +1,45 @@
|
||||
// OCHamcrest by Jon Reid, https://qualitycoding.org/
|
||||
// Copyright 2019 hamcrest.org. See LICENSE.txt
|
||||
|
||||
#import "HCStringDescription.h"
|
||||
|
||||
#import "HCSelfDescribing.h"
|
||||
|
||||
|
||||
@interface HCStringDescription ()
|
||||
@property (nonatomic, strong) NSMutableString *accumulator;
|
||||
@end
|
||||
|
||||
@implementation HCStringDescription
|
||||
|
||||
+ (NSString *)stringFrom:(id <HCSelfDescribing>)selfDescribing
|
||||
{
|
||||
HCStringDescription *description = [HCStringDescription stringDescription];
|
||||
[description appendDescriptionOf:selfDescribing];
|
||||
return description.description;
|
||||
}
|
||||
|
||||
+ (instancetype)stringDescription
|
||||
{
|
||||
return [[HCStringDescription alloc] init];
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
_accumulator = [[NSMutableString alloc] init];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return self.accumulator;
|
||||
}
|
||||
|
||||
- (void)append:(NSString *)str
|
||||
{
|
||||
[self.accumulator appendString:str];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user