mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-29 09:01:05 +00:00
45 lines
1.3 KiB
Objective-C
45 lines
1.3 KiB
Objective-C
//
|
|
// OCHamcrest - HCHasDescription.h
|
|
// Copyright 2013 hamcrest.org. See LICENSE.txt
|
|
//
|
|
// Created by: Jon Reid, http://qualitycoding.org/
|
|
// Docs: http://hamcrest.github.com/OCHamcrest/
|
|
// Source: https://github.com/hamcrest/OCHamcrest
|
|
//
|
|
|
|
#import <OCHamcrestIOS/HCInvocationMatcher.h>
|
|
|
|
|
|
@interface HCHasDescription : HCInvocationMatcher
|
|
|
|
+ (instancetype)hasDescription:(id<HCMatcher>)descriptionMatcher;
|
|
- (instancetype)initWithDescription:(id<HCMatcher>)descriptionMatcher;
|
|
|
|
@end
|
|
|
|
|
|
OBJC_EXPORT id<HCMatcher> HC_hasDescription(id match);
|
|
|
|
/**
|
|
hasDescription(aMatcher) -
|
|
Matches if object's @c -description satisfies a given matcher.
|
|
|
|
@param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching.
|
|
|
|
This matcher invokes @c -description on the evaluated object to get its description, passing the
|
|
result to a given matcher for evaluation. If the @a aMatcher argument is not a matcher, it is
|
|
implicitly wrapped in an @ref equalTo matcher to check for equality.
|
|
|
|
Examples:
|
|
@li @ref hasDescription(@ref startsWith(\@"foo"))
|
|
@li @ref hasDescription(\@"bar")
|
|
|
|
(In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
|
|
@c HC_hasDescription instead.)
|
|
|
|
@ingroup object_matchers
|
|
*/
|
|
#ifdef HC_SHORTHAND
|
|
#define hasDescription HC_hasDescription
|
|
#endif
|