Skip to content

Commit

Permalink
Revert "* f Change matcher definitions from id to id<HCMatcher> to im…
Browse files Browse the repository at this point in the history
…prove Swift use"

This reverts commit 7883e4d.
  • Loading branch information
jonreid committed Jul 19, 2024
1 parent 5e2b02c commit cf8cdb9
Show file tree
Hide file tree
Showing 41 changed files with 141 additions and 141 deletions.
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCEvery.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_everyItem(id <HCMatcher> itemMatcher);
FOUNDATION_EXPORT id HC_everyItem(id <HCMatcher> itemMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -37,7 +37,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_everyItem(id <HCMatcher> itemMatcher);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_everyItem instead.
*/
static inline id<HCMatcher> everyItem(id <HCMatcher> itemMatcher)
static inline id everyItem(id <HCMatcher> itemMatcher)
{
return HC_everyItem(itemMatcher);
}
Expand Down
8 changes: 4 additions & 4 deletions Source/Library/Collection/HCHasCount.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_hasCount(id <HCMatcher> countMatcher);
FOUNDATION_EXPORT id HC_hasCount(id <HCMatcher> countMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -33,14 +33,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasCount(id <HCMatcher> countMatcher);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasCount instead.
*/
static inline id<HCMatcher> hasCount(id <HCMatcher> countMatcher)
static inline id hasCount(id <HCMatcher> countMatcher)
{
return HC_hasCount(countMatcher);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_hasCountOf(NSUInteger count);
FOUNDATION_EXPORT id HC_hasCountOf(NSUInteger count);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -55,7 +55,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasCountOf(NSUInteger count);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasCountOf instead.
*/
static inline id<HCMatcher> hasCountOf(NSUInteger value)
static inline id hasCountOf(NSUInteger value)
{
return HC_hasCountOf(value);
}
Expand Down
8 changes: 4 additions & 4 deletions Source/Library/Collection/HCIsCollectionContaining.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_hasItem(id itemMatcher);
FOUNDATION_EXPORT id HC_hasItem(id itemMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down Expand Up @@ -46,7 +46,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasItem(id itemMatcher);
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_hasItemsIn(NSArray *itemMatchers);
FOUNDATION_EXPORT id HC_hasItemsIn(NSArray *itemMatchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -64,14 +64,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasItemsIn(NSArray *itemMatchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasItemsIn instead.
*/
static inline id<HCMatcher> hasItemsIn(NSArray *itemMatchers)
static inline id hasItemsIn(NSArray *itemMatchers)
{
return HC_hasItemsIn(itemMatchers);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_hasItems(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_hasItems(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_containsInAnyOrderIn(NSArray *itemMatchers);
FOUNDATION_EXPORT id HC_containsInAnyOrderIn(NSArray *itemMatchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -42,14 +42,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_containsInAnyOrderIn(NSArray *itemMatchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_containsInAnyOrderIn instead.
*/
static inline id<HCMatcher> containsInAnyOrderIn(NSArray *itemMatchers)
static inline id containsInAnyOrderIn(NSArray *itemMatchers)
{
return HC_containsInAnyOrderIn(itemMatchers);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_containsInAnyOrder(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_containsInAnyOrder(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Collection/HCIsCollectionContainingInOrder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_containsIn(NSArray *itemMatchers);
FOUNDATION_EXPORT id HC_containsIn(NSArray *itemMatchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -38,14 +38,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_containsIn(NSArray *itemMatchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_containsIn instead.)
*/
static inline id<HCMatcher> containsIn(NSArray *itemMatchers)
static inline id containsIn(NSArray *itemMatchers)
{
return HC_containsIn(itemMatchers);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_contains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_contains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_containsInRelativeOrder(NSArray *itemMatchers);
FOUNDATION_EXPORT id HC_containsInRelativeOrder(NSArray *itemMatchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -40,7 +40,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_containsInRelativeOrder(NSArray *itemMatchers
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_containsInRelativeOrder instead.
*/
static inline id<HCMatcher> containsInRelativeOrder(NSArray *itemMatchers)
static inline id containsInRelativeOrder(NSArray *itemMatchers)
{
return HC_containsInRelativeOrder(itemMatchers);
}
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Collection/HCIsCollectionOnlyContaining.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface HCIsCollectionOnlyContaining : HCEvery
@end

FOUNDATION_EXPORT id<HCMatcher> HC_onlyContainsIn(NSArray *itemMatchers);
FOUNDATION_EXPORT id HC_onlyContainsIn(NSArray *itemMatchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -31,14 +31,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_onlyContainsIn(NSArray *itemMatchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_onlyContainsIn instead.
*/
static inline id<HCMatcher> onlyContainsIn(NSArray *itemMatchers)
static inline id onlyContainsIn(NSArray *itemMatchers)
{
return HC_onlyContainsIn(itemMatchers);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_onlyContains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_onlyContains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCIsDictionaryContaining.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_hasEntry(id keyMatcher, id valueMatcher);
FOUNDATION_EXPORT id HC_hasEntry(id keyMatcher, id valueMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -39,7 +39,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasEntry(id keyMatcher, id valueMatcher);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasEntry instead.
*/
static inline id<HCMatcher> hasEntry(id keyMatcher, id valueMatcher)
static inline id hasEntry(id keyMatcher, id valueMatcher)
{
return HC_hasEntry(keyMatcher, valueMatcher);
}
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Collection/HCIsDictionaryContainingEntries.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN

@end

FOUNDATION_EXPORT id<HCMatcher> HC_hasEntriesIn(NSDictionary *valueMatchersForKeys);
FOUNDATION_EXPORT id HC_hasEntriesIn(NSDictionary *valueMatchersForKeys);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -37,13 +37,13 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasEntriesIn(NSDictionary *valueMatchersForKe
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasEntryIn instead.
*/
static inline id<HCMatcher> hasEntriesIn(NSDictionary *valueMatchersForKeys)
static inline id hasEntriesIn(NSDictionary *valueMatchersForKeys)
{
return HC_hasEntriesIn(valueMatchersForKeys);
}
#endif

FOUNDATION_EXPORT id<HCMatcher> HC_hasEntries(id keysAndValueMatchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_hasEntries(id keysAndValueMatchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCIsDictionaryContainingKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_hasKey(id keyMatcher);
FOUNDATION_EXPORT id HC_hasKey(id keyMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -36,7 +36,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasKey(id keyMatcher);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasKey instead.
*/
static inline id<HCMatcher> hasKey(id keyMatcher)
static inline id hasKey(id keyMatcher)
{
return HC_hasKey(keyMatcher);
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCIsDictionaryContainingValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_hasValue(id valueMatcher);
FOUNDATION_EXPORT id HC_hasValue(id valueMatcher);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -38,7 +38,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_hasValue(id valueMatcher);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_hasValue instead.
*/
static inline id<HCMatcher> hasValue(id valueMatcher)
static inline id hasValue(id valueMatcher)
{
return HC_hasValue(valueMatcher);
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCIsEmptyCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_isEmpty(void);
FOUNDATION_EXPORT id HC_isEmpty(void);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -31,7 +31,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_isEmpty(void);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_isEmpty instead.
*/
static inline id<HCMatcher> isEmpty(void)
static inline id isEmpty(void)
{
return HC_isEmpty();
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Library/Collection/HCIsEmptyCollection.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ - (void)describeTo:(id <HCDescription>)description
@end


FOUNDATION_EXPORT id<HCMatcher> HC_isEmpty(void)
FOUNDATION_EXPORT id HC_isEmpty(void)
{
return [[HCIsEmptyCollection alloc] init];
}
4 changes: 2 additions & 2 deletions Source/Library/Collection/HCIsIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_isIn(id aCollection);
FOUNDATION_EXPORT id HC_isIn(id aCollection);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -35,7 +35,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_isIn(id aCollection);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_isIn instead.
*/
static inline id<HCMatcher> isIn(id aCollection)
static inline id isIn(id aCollection)
{
return HC_isIn(aCollection);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Library/Decorator/HCDescribedAs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_describedAs(NSString *description, id <HCMatcher> matcher, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_describedAs(NSString *description, id <HCMatcher> matcher, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
4 changes: 2 additions & 2 deletions Source/Library/Decorator/HCIs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_is(_Nullable id value);
FOUNDATION_EXPORT id HC_is(_Nullable id value);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down Expand Up @@ -47,7 +47,7 @@ FOUNDATION_EXPORT id<HCMatcher> HC_is(_Nullable id value);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_is instead.
*/
static inline id<HCMatcher> is(_Nullable id value)
static inline id is(_Nullable id value)
{
return HC_is(value);
}
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Logical/HCAllOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@end


FOUNDATION_EXPORT id<HCMatcher> HC_allOfIn(NSArray<id <HCMatcher>> *matchers);
FOUNDATION_EXPORT id HC_allOfIn(NSArray<id <HCMatcher>> *matchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -36,14 +36,14 @@ FOUNDATION_EXPORT id<HCMatcher> HC_allOfIn(NSArray<id <HCMatcher>> *matchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_allOfIn instead.
*/
static inline id<HCMatcher> allOfIn(NSArray *matchers)
static inline id allOfIn(NSArray *matchers)
{
return HC_allOfIn(matchers);
}
#endif


FOUNDATION_EXPORT id<HCMatcher> HC_allOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_allOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Logical/HCAnyOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN

@end

FOUNDATION_EXPORT id<HCMatcher> HC_anyOfIn(NSArray *matchers);
FOUNDATION_EXPORT id HC_anyOfIn(NSArray *matchers);

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand All @@ -35,13 +35,13 @@ FOUNDATION_EXPORT id<HCMatcher> HC_anyOfIn(NSArray *matchers);
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_anyOf instead.
*/
static inline id<HCMatcher> anyOfIn(NSArray *matchers)
static inline id anyOfIn(NSArray *matchers)
{
return HC_anyOfIn(matchers);
}
#endif

FOUNDATION_EXPORT id<HCMatcher> HC_anyOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION;
FOUNDATION_EXPORT id HC_anyOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION;

#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
Expand Down
Loading

0 comments on commit cf8cdb9

Please sign in to comment.