Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/ocmock/ocmock_extensions.h

Issue 7004036: Added some enhancements to OCMock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up protocol stuff Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/ocmock/ocmock.gyp ('k') | third_party/ocmock/ocmock_extensions.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // Pointers to objects still have to be handled with
14 // - (id)andReturnValue:OCMOCK_VALUE(blah)
15 // to keep the types working correctly.
16 @interface OCMockRecorder(CrExtensions)
17 - (id)andReturnChar:(char)value;
18 - (id)andReturnUnsignedChar:(unsigned char)value;
19 - (id)andReturnShort:(short)value;
20 - (id)andReturnUnsignedShort:(unsigned short)value;
21 - (id)andReturnInt:(int)value;
22 - (id)andReturnUnsignedInt:(unsigned int)value;
23 - (id)andReturnLong:(long)value;
24 - (id)andReturnUnsignedLong:(unsigned long)value;
25 - (id)andReturnLongLong:(long long)value;
26 - (id)andReturnUnsignedLongLong:(unsigned long long)value;
27 - (id)andReturnFloat:(float)value;
28 - (id)andReturnDouble:(double)value;
29 - (id)andReturnBool:(BOOL)value;
30 - (id)andReturnInteger:(NSInteger)value;
31 - (id)andReturnUnsignedInteger:(NSUInteger)value;
32 - (id)andReturnNSRect:(NSRect)rect;
33 - (id)andReturnCGRect:(CGRect)rect;
34 - (id)andReturnNSPoint:(NSPoint)point;
35 - (id)andReturnCGPoint:(CGPoint)point;
36 @end
37
38 // A constraint for verifying that something conforms to a protocol.
39 @interface cr_OCMConformToProtocolConstraint : OCMConstraint {
40 @private
41 Protocol* protocol_;
42 }
43 - (id)initWithProtocol:(Protocol*)protocol;
44 @end
45
46 @interface OCMArg(CrExtensions)
47 + (id)conformsToProtocol:(Protocol*)protocol;
48 @end
49
50 #endif // THIRD_PARTY_OCMOCK_OCMOCK_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « third_party/ocmock/ocmock.gyp ('k') | third_party/ocmock/ocmock_extensions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698