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

Side by Side Diff: third_party/ocmock/OCMock/OCMArg.h

Issue 2626723004: Update OCMock to 3e193f3c2d4ea4ada63df54c8ce98e7ea4cf768f (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/ocmock/OCMock/OCClassMockObject.m ('k') | third_party/ocmock/OCMock/OCMArg.m » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //------------------------------------------------------------------------------ --------- 1 /*
2 // $Id$ 2 * Copyright (c) 2009-2015 Erik Doernenburg and contributors
3 // Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details. 3 *
4 //------------------------------------------------------------------------------ --------- 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 * not use these files except in compliance with the License. You may obtain
6 * a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations
14 * under the License.
15 */
5 16
6 #import <Foundation/Foundation.h> 17 #import <Foundation/Foundation.h>
7 18
8 @interface OCMArg : NSObject 19 @interface OCMArg : NSObject
9 20
10 // constraining arguments 21 // constraining arguments
11 22
12 + (id)any; 23 + (id)any;
24 + (SEL)anySelector;
13 + (void *)anyPointer; 25 + (void *)anyPointer;
26 + (id __autoreleasing *)anyObjectRef;
14 + (id)isNil; 27 + (id)isNil;
15 + (id)isNotNil; 28 + (id)isNotNil;
29 + (id)isEqual:(id)value;
16 + (id)isNotEqual:(id)value; 30 + (id)isNotEqual:(id)value;
31 + (id)isKindOfClass:(Class)cls;
17 + (id)checkWithSelector:(SEL)selector onObject:(id)anObject; 32 + (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
18 #if NS_BLOCKS_AVAILABLE 33 + (id)checkWithBlock:(BOOL (^)(id obj))block;
19 + (id)checkWithBlock:(BOOL (^)(id))block;
20 #endif
21 34
22 // manipulating arguments 35 // manipulating arguments
23 36
24 + (id *)setTo:(id)value; 37 + (id *)setTo:(id)value;
38 + (void *)setToValue:(NSValue *)value;
39 + (id)invokeBlock;
25 40
26 // internal use only 41 // internal use only
27 42
28 + (id)resolveSpecialValues:(NSValue *)value; 43 + (id)resolveSpecialValues:(NSValue *)value;
29 44
30 @end 45 @end
31 46
32 #define OCMOCK_ANY [OCMArg any] 47 #define OCMOCK_ANY [OCMArg any]
33 #define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__t ypeof__(variable))] 48
49 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
50 #define OCMOCK_VALUE(variable) \
51 ({ __typeof__(variable) __v = (variable); [NSValue value:&__v withObjCType:@ encode(__typeof__(__v))]; })
52 #else
53 #define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(_ _typeof__(variable))]
54 #endif
OLDNEW
« no previous file with comments | « third_party/ocmock/OCMock/OCClassMockObject.m ('k') | third_party/ocmock/OCMock/OCMArg.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698