Support for iOS in OCMock

Added ifdefs around NSRect, added iOS to gyp.

BUG=None.


Review URL: https://chromiumcodereview.appspot.com/10834362

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151989 0039d316-1c4b-4281-b951-d872f2087c98
parent a8e2cb8e
......@@ -6,7 +6,7 @@
'targets': [
],
'conditions': [
['OS=="mac"', {
['OS=="mac" or OS=="ios"', {
'targets' : [
{
'target_name' : 'ocmock',
......
......@@ -29,10 +29,12 @@
- (id)andReturnBool:(BOOL)value;
- (id)andReturnInteger:(NSInteger)value;
- (id)andReturnUnsignedInteger:(NSUInteger)value;
#if !TARGET_OS_IPHONE
- (id)andReturnNSRect:(NSRect)rect;
- (id)andReturnCGRect:(CGRect)rect;
- (id)andReturnNSPoint:(NSPoint)point;
- (id)andReturnCGPoint:(CGPoint)point;
#endif
@end
// A constraint for verifying that something conforms to a protocol.
......
......@@ -29,6 +29,7 @@ CR_OCMOCK_RETURN_IMPL(Bool, BOOL);
CR_OCMOCK_RETURN_IMPL(Integer, NSInteger);
CR_OCMOCK_RETURN_IMPL(UnsignedInteger, NSUInteger);
#if !TARGET_OS_IPHONE
- (id)andReturnNSRect:(NSRect)rect {
return [self andReturnValue:[NSValue valueWithRect:rect]];
}
......@@ -44,6 +45,7 @@ CR_OCMOCK_RETURN_IMPL(UnsignedInteger, NSUInteger);
- (id)andReturnCGPoint:(CGPoint)point {
return [self andReturnNSPoint:NSPointFromCGPoint(point)];
}
#endif // !TARGET_OS_IPHONE
@end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment