-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
HCIsCollectionContainingInOrder.h
43 lines (30 loc) · 1.12 KB
/
HCIsCollectionContainingInOrder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// OCHamcrest - HCIsCollectionContainingInOrder.h
// Copyright 2011 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid
//
#import <OCHamcrest/HCBaseMatcher.h>
@interface HCIsCollectionContainingInOrder : HCBaseMatcher
{
NSArray *matchers;
}
+ (id)isCollectionContainingInOrder:(NSArray *)itemMatchers;
- (id)initWithMatchers:(NSArray *)itemMatchers;
@end
OBJC_EXPORT id<HCMatcher> HC_contains(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION;
/**
contains(firstMatcher, ...) -
Matches if collection's elements satisfy a given list of matchers, in order.
@param firstMatcher,... A comma-separated list of matchers ending with @c nil.
This matcher iterates the evaluated collection and a given list of matchers, seeing if each
element satisfies its corresponding matcher.
Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for
equality.
(In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
@c HC_contains instead.)
@ingroup collection_matchers
*/
#ifdef HC_SHORTHAND
#define contains HC_contains
#endif