TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2016 |
Maintained by Ivan Shevelev.
Custom assert defines. Check for isKindOfClass: and conformsProtocol:.
Kind of class where waiting - NSMutableString and current - NSString instance:
NSString *string = @"test";
HRKindOfClassAssert(NSMutableString, string);
Kind of class where waiting - Class and current - Class:
Class stringClass = [NSString class];
Class mutableStringClass = [NSMutableString class];
HRKindOfClassAssert(mutableStringClass, stringClass);
Conforms to protocol where waiting - NSCopying and current NSString instance:
NSString *string = @"test";
HRConformsToProtocolAssert(NSCopying, string);
Conforms to protocol where waiting - Protocol and current NSString instance:
NSString *string = @"test";
Protocol *copyingProtocol = @protocol(NSCopying);
HRConformsToProtocolTypeAssert(copyingProtocol, string);
In case of HRKindOfClassAssert, arguments can be instance, Class type instance or class name(like NSString).
In case of HRConformsToProtocolAssert "waiting" argument must be protocol name(like NSCopying) and "current" argument can be instance, Class type instance or class name(like NSString).
In case of HRConformsToProtocolTypeAssert "waiting" argument must be Protocol type instance and "current" argument can be instance, Class type instance or class name(like NSString).
Objective-C and iOS 7.0 or higher.
HRAssert is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "HRAssert"
Ivan Shevelev, [email protected]
HRAssert is available under the MIT license. See the LICENSE file for more info.