| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <objc/runtime.h> | 5 #include <objc/runtime.h> |
| 6 | 6 |
| 7 #include "third_party/ocmock/ocmock_extensions.h" | 7 #include "third_party/ocmock/ocmock_extensions.h" |
| 8 | 8 |
| 9 #define CR_OCMOCK_RETURN_IMPL(type_name, type) \ | 9 #define CR_OCMOCK_RETURN_IMPL(type_name, type) \ |
| 10 - (id)andReturn##type_name:(type)value { \ | 10 - (id)andReturn##type_name:(type)value { \ |
| 11 return [self andReturnValue:OCMOCK_VALUE(value)]; \ | 11 return [self andReturnValue:OCMOCK_VALUE(value)]; \ |
| 12 } | 12 } |
| 13 | 13 |
| 14 @implementation OCMockRecorder(CrExtensions) | 14 @implementation OCMStubRecorder (CrExtensions) |
| 15 | 15 |
| 16 CR_OCMOCK_RETURN_IMPL(Char, char); | 16 CR_OCMOCK_RETURN_IMPL(Char, char); |
| 17 CR_OCMOCK_RETURN_IMPL(UnsignedChar, unsigned char); | 17 CR_OCMOCK_RETURN_IMPL(UnsignedChar, unsigned char); |
| 18 CR_OCMOCK_RETURN_IMPL(Short, short); | 18 CR_OCMOCK_RETURN_IMPL(Short, short); |
| 19 CR_OCMOCK_RETURN_IMPL(UnsignedShort, unsigned short); | 19 CR_OCMOCK_RETURN_IMPL(UnsignedShort, unsigned short); |
| 20 CR_OCMOCK_RETURN_IMPL(Int, int); | 20 CR_OCMOCK_RETURN_IMPL(Int, int); |
| 21 CR_OCMOCK_RETURN_IMPL(UnsignedInt, unsigned int); | 21 CR_OCMOCK_RETURN_IMPL(UnsignedInt, unsigned int); |
| 22 CR_OCMOCK_RETURN_IMPL(Long, long); | 22 CR_OCMOCK_RETURN_IMPL(Long, long); |
| 23 CR_OCMOCK_RETURN_IMPL(UnsignedLong, unsigned long); | 23 CR_OCMOCK_RETURN_IMPL(UnsignedLong, unsigned long); |
| 24 CR_OCMOCK_RETURN_IMPL(LongLong, long long); | 24 CR_OCMOCK_RETURN_IMPL(LongLong, long long); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 @end | 67 @end |
| 68 | 68 |
| 69 @implementation OCMArg(CrExtensions) | 69 @implementation OCMArg(CrExtensions) |
| 70 | 70 |
| 71 + (id)conformsToProtocol:(Protocol*)protocol { | 71 + (id)conformsToProtocol:(Protocol*)protocol { |
| 72 return [[[cr_OCMConformToProtocolConstraint alloc] initWithProtocol:protocol] | 72 return [[[cr_OCMConformToProtocolConstraint alloc] initWithProtocol:protocol] |
| 73 autorelease]; | 73 autorelease]; |
| 74 } | 74 } |
| 75 | 75 |
| 76 @end | 76 @end |
| OLD | NEW |