// OCHamcrest by Jon Reid, https://qualitycoding.org/ // Copyright 2019 hamcrest.org. See LICENSE.txt #import NS_ASSUME_NONNULL_BEGIN /*! * @abstract Tests if a string is equal to another string, when whitespace differences are (mostly) ignored. */ @interface HCIsEqualCompressingWhiteSpace : HCBaseMatcher - (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @end FOUNDATION_EXPORT id HC_equalToCompressingWhiteSpace(NSString *expectedString); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher for NSStrings that matches when the examined string is equal to the * specified expected string, when whitespace differences are (mostly) ignored. * @param expectedString The expected value of matched strings. (Must not be nil.) * @discussion To be exact, the following whitespace rules are applied: * * * Example
*
assertThat(\@"   my\tfoo  bar ", equalToCompressingWhiteSpace(\@" my  foo bar"))
* * Name Clash
* In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym * HC_equalToCompressingWhiteSpace instead. */ static inline id equalToCompressingWhiteSpace(NSString *expectedString) { return HC_equalToCompressingWhiteSpace(expectedString); } #endif NS_ASSUME_NONNULL_END