// OCHamcrest by Jon Reid, https://qualitycoding.org/ // Copyright 2019 hamcrest.org. See LICENSE.txt #import NS_ASSUME_NONNULL_BEGIN /*! * @abstract Matches if examined object is contained within the nested collection. */ @interface HCIsIn : HCBaseMatcher - (instancetype)initWithCollection:(id)collection NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @end FOUNDATION_EXPORT id HC_isIn(id aCollection); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher that matches when the examined object is found within the specified * collection. * @param aCollection The collection to search. * @discussion Invokes -containsObject: on aCollection to determine if the * examined object is an element of the collection. * * Example
*
assertThat(\@"foo", isIn(\@@[\@"bar", \@"foo"]))
* * Name Clash
* In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym * HC_isIn instead. */ static inline id isIn(id aCollection) { return HC_isIn(aCollection); } #endif NS_ASSUME_NONNULL_END