// OCHamcrest by Jon Reid, https://qualitycoding.org/ // Copyright 2019 hamcrest.org. See LICENSE.txt #import NS_ASSUME_NONNULL_BEGIN /*! * @abstract Tests if string that contains a substring. */ @interface HCStringContains : HCSubstringMatcher @end FOUNDATION_EXPORT id HC_containsSubstring(NSString *substring); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher that matches when the examined object is a string containing the * specified substring anywhere. * @param substring The string to search for. (Must not be nil.) * @discussion The matcher invokes -rangeOfString: on the examined object, passing the * specified substring and matching if it is found. * * Example
*
assertThat(\@"myStringOfNote", containsSubstring(\@"ring"))
* * Name Clash
* In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym * HC_containsSubstring instead. */ static inline id containsSubstring(NSString *substring) { return HC_containsSubstring(substring); } #endif NS_ASSUME_NONNULL_END