OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_ |
| 6 #define THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 #import "third_party/ocmock/OCMock/OCMock.h" |
| 11 |
| 12 // Some enhancements to OCMock to make it easier to write mocks. |
| 13 @interface OCMockRecorder(CrExtensions) |
| 14 - (id)andReturnPointer:(const void*)value; |
| 15 - (id)andReturnChar:(char)value; |
| 16 - (id)andReturnUnsignedChar:(unsigned char)value; |
| 17 - (id)andReturnShort:(short)value; |
| 18 - (id)andReturnUnsignedShort:(unsigned short)value; |
| 19 - (id)andReturnInt:(int)value; |
| 20 - (id)andReturnUnsignedInt:(unsigned int)value; |
| 21 - (id)andReturnLong:(long)value; |
| 22 - (id)andReturnUnsignedLong:(unsigned long)value; |
| 23 - (id)andReturnLongLong:(long long)value; |
| 24 - (id)andReturnUnsignedLongLong:(unsigned long long)value; |
| 25 - (id)andReturnFloat:(float)value; |
| 26 - (id)andReturnDouble:(double)value; |
| 27 - (id)andReturnBool:(BOOL)value; |
| 28 - (id)andReturnInteger:(NSInteger)value; |
| 29 - (id)andReturnUnsignedInteger:(NSUInteger)value; |
| 30 - (id)andReturnNSRect:(NSRect)rect; |
| 31 - (id)andReturnCGRect:(CGRect)rect; |
| 32 - (id)andReturnNSPoint:(NSPoint)point; |
| 33 - (id)andReturnCGPoint:(CGPoint)point; |
| 34 @end |
| 35 |
| 36 // A constraint for verifying that something conforms to a protocol. |
| 37 @interface cr_OCMConformToProtocolConstraint : OCMConstraint { |
| 38 @private |
| 39 Protocol* protocol_; |
| 40 } |
| 41 - (id)initWithProtocol:(Protocol*)protocol; |
| 42 @end |
| 43 |
| 44 @interface OCMArg(CrExtensions) |
| 45 + (id)conformsToProtocol:(Protocol*)protocol; |
| 46 @end |
| 47 |
| 48 #endif // THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_ |
OLD | NEW |