/
HCIsInstanceOf.h
45 lines (32 loc) · 1.06 KB
/
HCIsInstanceOf.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
44
45
//
// OCHamcrest - HCIsInstanceOf.h
// Copyright 2012 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#import <OCHamcrestIOS/HCBaseMatcher.h>
@interface HCIsInstanceOf : HCBaseMatcher
{
Class theClass;
}
+ (id)isInstanceOf:(Class)type;
- (id)initWithType:(Class)type;
@end
OBJC_EXPORT id<HCMatcher> HC_instanceOf(Class aClass);
/**
instanceOf(aClass) -
Matches if object is an instance of, or inherits from, a given class.
@param aClass The class to compare against as the expected class.
This matcher checks whether the evaluated object is an instance of @a aClass or an instance of
any class that inherits from @a aClass.
Example:
@li @ref instanceOf([NSString class])
(In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
@c HC_instanceOf instead.)
@ingroup object_matchers
*/
#ifdef HC_SHORTHAND
#define instanceOf HC_instanceOf
#endif