diff --git a/OCMock.podspec b/OCMock.podspec index 22dfc3b3..0705ec82 100644 --- a/OCMock.podspec +++ b/OCMock.podspec @@ -29,7 +29,8 @@ Pod::Spec.new do |s| s.public_header_files = ["OCMock.h", "OCMockObject.h", "OCMArg.h", "OCMConstraint.h", "OCMLocation.h", "OCMMacroState.h", "OCMRecorder.h", "OCMStubRecorder.h", "NSNotificationCenter+OCMAdditions.h", - "OCMFunctions.h", "OCMVerifier.h", "OCMQuantifier.h" ] + "OCMFunctions.h", "OCMVerifier.h", "OCMQuantifier.h", + "OCMockMacros.h" ] .map { |file| "Source/OCMock/" + file } end diff --git a/Source/OCMock.xcodeproj/project.pbxproj b/Source/OCMock.xcodeproj/project.pbxproj index dfaa8cbf..c4164646 100644 --- a/Source/OCMock.xcodeproj/project.pbxproj +++ b/Source/OCMock.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 030EF0B614632FD000B04273 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 030EF0B414632FD000B04273 /* InfoPlist.strings */; }; 031E50581BB4A56300E257C3 /* OCMBoxedReturnValueProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 031E50571BB4A56300E257C3 /* OCMBoxedReturnValueProviderTests.m */; }; 031E50591BB4A56300E257C3 /* OCMBoxedReturnValueProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 031E50571BB4A56300E257C3 /* OCMBoxedReturnValueProviderTests.m */; }; 0322DA65191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */; }; @@ -16,8 +15,12 @@ 0322DA6A19118B4600CACAF1 /* OCMVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0322DA6719118B4600CACAF1 /* OCMVerifier.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0322DA6B19118B4600CACAF1 /* OCMVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA6819118B4600CACAF1 /* OCMVerifier.m */; }; 0322DA6C19118B4600CACAF1 /* OCMVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA6819118B4600CACAF1 /* OCMVerifier.m */; }; + 033AB1FA24F046C7002014AE /* OCMockMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 033AB1F924F046C7002014AE /* OCMockMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 033AB1FB24F046C7002014AE /* OCMockMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 033AB1F924F046C7002014AE /* OCMockMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 033AB1FC24F046C7002014AE /* OCMockMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 033AB1F924F046C7002014AE /* OCMockMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 033AB1FD24F046C7002014AE /* OCMockMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 033AB1F924F046C7002014AE /* OCMockMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 033AB1FE24F046C7002014AE /* OCMockMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 033AB1F924F046C7002014AE /* OCMockMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; 033E1FF414FEF5E0004456B0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 033E1FF314FEF5E0004456B0 /* Foundation.framework */; }; - 03565A3818F0566F003AE91E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03565A3618F0566F003AE91E /* InfoPlist.strings */; }; 03565A4218F05721003AE91E /* OCMockObjectPartialMocksTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03AC5C1416DF9FA500D82ECD /* OCMockObjectPartialMocksTests.m */; }; 03565A4318F05721003AE91E /* OCMockObjectClassMethodMockingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 039F91C516EFB493006C3D70 /* OCMockObjectClassMethodMockingTests.m */; }; 03565A4418F05721003AE91E /* OCMockObjectProtocolMocksTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA286BFBD8B9D068B41E7EF /* OCMockObjectProtocolMocksTests.m */; }; @@ -356,7 +359,6 @@ 8DE97C9B22B43EE60098C63F /* OCMArgAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA2833B48908EAD36444671 /* OCMArgAction.h */; }; A02926821CA0725A00594AAF /* TestObjects.xcdatamodeld in Resources */ = {isa = PBXBuildFile; fileRef = A02926801CA0725A00594AAF /* TestObjects.xcdatamodeld */; }; A06930951CA1BFC900513023 /* TestObjects.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A02926801CA0725A00594AAF /* TestObjects.xcdatamodeld */; }; - D31108BA1828DB8700737925 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D31108B81828DB8700737925 /* InfoPlist.strings */; }; D31108C41828DBD600737925 /* OCMockObjectPartialMocksTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03AC5C1416DF9FA500D82ECD /* OCMockObjectPartialMocksTests.m */; }; D31108C51828DBD600737925 /* OCMockObjectClassMethodMockingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 039F91C516EFB493006C3D70 /* OCMockObjectClassMethodMockingTests.m */; }; D31108C61828DBD600737925 /* OCMockObjectForwardingTargetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0354D71F16F23AF5001766BB /* OCMockObjectForwardingTargetTests.m */; }; @@ -465,7 +467,6 @@ /* Begin PBXFileReference section */ 030EF0A814632FD000B04273 /* OCMock.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCMock.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 030EF0B314632FD000B04273 /* OCMock-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OCMock-Info.plist"; sourceTree = ""; }; - 030EF0B514632FD000B04273 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 030EF0B714632FD000B04273 /* OCMock-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMock-Prefix.pch"; sourceTree = ""; }; 030EF0B814632FD000B04273 /* OCMock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = ""; }; 030EF0DC14632FF700B04273 /* libOCMock.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOCMock.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -474,12 +475,12 @@ 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectVerifyAfterRunTests.m; sourceTree = ""; }; 0322DA6719118B4600CACAF1 /* OCMVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMVerifier.h; sourceTree = ""; }; 0322DA6819118B4600CACAF1 /* OCMVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMVerifier.m; sourceTree = ""; }; + 033AB1F924F046C7002014AE /* OCMockMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCMockMacros.h; sourceTree = ""; }; 033E1FF314FEF5E0004456B0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 0354D71F16F23AF5001766BB /* OCMockObjectForwardingTargetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectForwardingTargetTests.m; sourceTree = ""; }; 03565A1D18F05626003AE91E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 03565A3118F0566E003AE91E /* OCMockTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OCMockTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 03565A3518F0566F003AE91E /* OCMockTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OCMockTests-Info.plist"; sourceTree = ""; }; - 03565A3718F0566F003AE91E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 03565A3B18F0566F003AE91E /* OCMockTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMockTests-Prefix.pch"; sourceTree = ""; }; 03618D81195B553400389166 /* OCMRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMRecorder.h; sourceTree = ""; }; 03618D82195B553400389166 /* OCMRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMRecorder.m; sourceTree = ""; }; @@ -582,10 +583,8 @@ A02926811CA0725A00594AAF /* TestObjects.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = TestObjects.xcdatamodel; sourceTree = ""; }; D31108AD1828DB8700737925 /* OCMockLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OCMockLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; D31108B71828DB8700737925 /* OCMockLibTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OCMockLibTests-Info.plist"; sourceTree = ""; }; - D31108B91828DB8700737925 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; D31108BD1828DB8700737925 /* OCMockLibTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMockLibTests-Prefix.pch"; sourceTree = ""; }; F0B950F11B0080BE00942C38 /* OCMock.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCMock.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F0B950F41B0080BE00942C38 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "OCMock iOS/Info.plist"; sourceTree = SOURCE_ROOT; }; F0B9510A1B0080D500942C38 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; /* End PBXFileReference section */ @@ -695,9 +694,7 @@ 030EF0B214632FD000B04273 /* Supporting Files */ = { isa = PBXGroup; children = ( - F0B950F41B0080BE00942C38 /* Info.plist */, 030EF0B314632FD000B04273 /* OCMock-Info.plist */, - 030EF0B414632FD000B04273 /* InfoPlist.strings */, 030EF0B714632FD000B04273 /* OCMock-Prefix.pch */, ); name = "Supporting Files"; @@ -774,7 +771,6 @@ 03565A3418F0566F003AE91E /* Supporting Files */ = { isa = PBXGroup; children = ( - 03565A3618F0566F003AE91E /* InfoPlist.strings */, 03565A3518F0566F003AE91E /* OCMockTests-Info.plist */, 03565A3B18F0566F003AE91E /* OCMockTests-Prefix.pch */, A02926801CA0725A00594AAF /* TestObjects.xcdatamodeld */, @@ -805,6 +801,7 @@ 03B315841463334E0052CD09 /* Core Mocks */ = { isa = PBXGroup; children = ( + 033AB1F924F046C7002014AE /* OCMockMacros.h */, 03B3159D146333BF0052CD09 /* OCMockObject.h */, 03B3159E146333BF0052CD09 /* OCMockObject.m */, 03B3158B146333BF0052CD09 /* OCClassMockObject.h */, @@ -934,7 +931,6 @@ isa = PBXGroup; children = ( D31108B71828DB8700737925 /* OCMockLibTests-Info.plist */, - D31108B81828DB8700737925 /* InfoPlist.strings */, D31108BD1828DB8700737925 /* OCMockLibTests-Prefix.pch */, ); name = "Supporting Files"; @@ -982,6 +978,7 @@ 2FA2821C9066C5E439288C76 /* OCMMacroState.h in Headers */, 2FA28F090622C9DF868CCA8C /* NSValue+OCMAdditions.h in Headers */, 2FA28DC9A2D732666124D640 /* OCMBlockArgCaller.h in Headers */, + 033AB1FA24F046C7002014AE /* OCMockMacros.h in Headers */, 2FA28BCF08C1CBC133E8E84E /* OCMArgAction.h in Headers */, 2FA28C1FE2E8E2C114E3FA54 /* OCMNonRetainingObjectReturnValueProvider.h in Headers */, ); @@ -1003,6 +1000,7 @@ 03C7BF0B195DA2F200A545DD /* OCMInvocationStub.h in Headers */, 03B315BF146333BF0052CD09 /* OCClassMockObject.h in Headers */, 03B315C9146333BF0052CD09 /* OCMBlockCaller.h in Headers */, + 033AB1FB24F046C7002014AE /* OCMockMacros.h in Headers */, 03E0FAD81B93C00B000C5096 /* OCMBlockArgCaller.h in Headers */, 03C7BF11195DAB5300A545DD /* OCMExpectationRecorder.h in Headers */, 03B315CE146333BF0052CD09 /* OCMBoxedReturnValueProvider.h in Headers */, @@ -1069,6 +1067,7 @@ 817EB15A1BD765130047E85A /* NSValue+OCMAdditions.h in Headers */, 817EB15B1BD765130047E85A /* OCMFunctions.h in Headers */, 817EB15C1BD765130047E85A /* OCMBlockArgCaller.h in Headers */, + 033AB1FD24F046C7002014AE /* OCMockMacros.h in Headers */, 817EB15D1BD765130047E85A /* OCMArgAction.h in Headers */, 2FA28806443827E286F12F6F /* OCMNonRetainingObjectReturnValueProvider.h in Headers */, ); @@ -1113,6 +1112,7 @@ 8DE97C9822B43EE60098C63F /* NSValue+OCMAdditions.h in Headers */, 8DE97C9922B43EE60098C63F /* OCMFunctions.h in Headers */, 8DE97C9A22B43EE60098C63F /* OCMBlockArgCaller.h in Headers */, + 033AB1FE24F046C7002014AE /* OCMockMacros.h in Headers */, 8DE97C9B22B43EE60098C63F /* OCMArgAction.h in Headers */, 2FA2883A0BD4BF6A03AAB49C /* OCMNonRetainingObjectReturnValueProvider.h in Headers */, ); @@ -1157,6 +1157,7 @@ F0B951491B00810C00942C38 /* NSValue+OCMAdditions.h in Headers */, F0B9514A1B00810C00942C38 /* OCMFunctions.h in Headers */, 2FA28B7BDB3319A499E90525 /* OCMBlockArgCaller.h in Headers */, + 033AB1FC24F046C7002014AE /* OCMockMacros.h in Headers */, 2FA280E60213BA09F007C173 /* OCMArgAction.h in Headers */, 2FA28AFBD67EAB9DD1F23BF5 /* OCMNonRetainingObjectReturnValueProvider.h in Headers */, ); @@ -1342,7 +1343,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 030EF0B614632FD000B04273 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1352,7 +1352,6 @@ files = ( A02926821CA0725A00594AAF /* TestObjects.xcdatamodeld in Resources */, 03CED2E22390770C001845CC /* OCHamcrest.framework.dSYM in Resources */, - 03565A3818F0566F003AE91E /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1374,7 +1373,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D31108BA1828DB8700737925 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1691,33 +1689,6 @@ }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 030EF0B414632FD000B04273 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 030EF0B514632FD000B04273 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 03565A3618F0566F003AE91E /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 03565A3718F0566F003AE91E /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - D31108B81828DB8700737925 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - D31108B91828DB8700737925 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 030EF0D014632FD000B04273 /* Debug */ = { isa = XCBuildConfiguration; diff --git a/Source/OCMock/NSInvocation+OCMAdditions.m b/Source/OCMock/NSInvocation+OCMAdditions.m index ac907a2e..8f44a9f2 100644 --- a/Source/OCMock/NSInvocation+OCMAdditions.m +++ b/Source/OCMock/NSInvocation+OCMAdditions.m @@ -15,12 +15,10 @@ */ #import -#import -#import #import "NSInvocation+OCMAdditions.h" +#import "OCMArg.h" #import "OCMFunctionsPrivate.h" #import "NSMethodSignature+OCMAdditions.h" -#import "OCMArg.h" #if (TARGET_OS_OSX && (!defined(__MAC_10_10) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_10)) || \ (TARGET_OS_IPHONE && (!defined(__IPHONE_8_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0)) diff --git a/Source/OCMock/NSMethodSignature+OCMAdditions.m b/Source/OCMock/NSMethodSignature+OCMAdditions.m index 10031516..25986034 100644 --- a/Source/OCMock/NSMethodSignature+OCMAdditions.m +++ b/Source/OCMock/NSMethodSignature+OCMAdditions.m @@ -14,9 +14,9 @@ * under the License. */ +#import #import "NSMethodSignature+OCMAdditions.h" #import "OCMFunctionsPrivate.h" -#import @implementation NSMethodSignature(OCMAdditions) diff --git a/Source/OCMock/NSObject+OCMAdditions.m b/Source/OCMock/NSObject+OCMAdditions.m index 3879c806..b2a65ea2 100644 --- a/Source/OCMock/NSObject+OCMAdditions.m +++ b/Source/OCMock/NSObject+OCMAdditions.m @@ -14,9 +14,10 @@ * under the License. */ +#import #import "NSObject+OCMAdditions.h" #import "NSMethodSignature+OCMAdditions.h" -#import + @implementation NSObject(OCMAdditions) diff --git a/Source/OCMock/NSValue+OCMAdditions.m b/Source/OCMock/NSValue+OCMAdditions.m index daa418c6..aab0a50b 100644 --- a/Source/OCMock/NSValue+OCMAdditions.m +++ b/Source/OCMock/NSValue+OCMAdditions.m @@ -17,6 +17,7 @@ #import "NSValue+OCMAdditions.h" #import "OCMFunctionsPrivate.h" + @implementation NSValue(OCMAdditions) static NSNumber *OCMNumberForValue(NSValue *value) diff --git a/Source/OCMock/OCClassMockObject.h b/Source/OCMock/OCClassMockObject.h index 1130cd15..552b4219 100644 --- a/Source/OCMock/OCClassMockObject.h +++ b/Source/OCMock/OCClassMockObject.h @@ -14,7 +14,7 @@ * under the License. */ -#import +#import "OCMockObject.h" @interface OCClassMockObject : OCMockObject diff --git a/Source/OCMock/OCClassMockObject.m b/Source/OCMock/OCClassMockObject.m index 96bb41a7..dbacbae0 100644 --- a/Source/OCMock/OCClassMockObject.m +++ b/Source/OCMock/OCClassMockObject.m @@ -16,10 +16,11 @@ #import #import "OCClassMockObject.h" -#import "NSObject+OCMAdditions.h" -#import "OCMFunctionsPrivate.h" #import "OCMInvocationStub.h" +#import "OCMFunctionsPrivate.h" #import "NSMethodSignature+OCMAdditions.h" +#import "NSObject+OCMAdditions.h" + @interface OCClassMockObjectInstanceVars : NSObject @property (nonatomic) Class mockedClass; diff --git a/Source/OCMock/OCMArg.m b/Source/OCMock/OCMArg.m index dbe3be07..2a656584 100644 --- a/Source/OCMock/OCMArg.m +++ b/Source/OCMock/OCMArg.m @@ -15,10 +15,11 @@ */ #import -#import -#import -#import "OCMPassByRefSetter.h" +#import "OCMArg.h" #import "OCMBlockArgCaller.h" +#import "OCMConstraint.h" +#import "OCMPassByRefSetter.h" + @implementation OCMArg diff --git a/Source/OCMock/OCMBlockCaller.h b/Source/OCMock/OCMBlockCaller.h index 51118196..44b582f7 100644 --- a/Source/OCMock/OCMBlockCaller.h +++ b/Source/OCMock/OCMBlockCaller.h @@ -16,7 +16,6 @@ #import - @interface OCMBlockCaller : NSObject { void (^block)(NSInvocation *); diff --git a/Source/OCMock/OCMConstraint.h b/Source/OCMock/OCMConstraint.h index b0aee230..76235be9 100644 --- a/Source/OCMock/OCMConstraint.h +++ b/Source/OCMock/OCMConstraint.h @@ -16,7 +16,6 @@ #import - @interface OCMConstraint : NSObject + (instancetype)constraint; diff --git a/Source/OCMock/OCMConstraint.m b/Source/OCMock/OCMConstraint.m index 9b51866b..dccc6c92 100644 --- a/Source/OCMock/OCMConstraint.m +++ b/Source/OCMock/OCMConstraint.m @@ -1,3 +1,4 @@ +#import /* * Copyright (c) 2007-2020 Erik Doernenburg and contributors * @@ -14,7 +15,7 @@ * under the License. */ -#import +#import "OCMConstraint.h" @implementation OCMConstraint @@ -29,7 +30,7 @@ - (BOOL)evaluate:(id)value return NO; } -- (id)copyWithZone:(struct _NSZone *)zone +- (id)copyWithZone:(struct _NSZone *)zone __unused { return [self retain]; } diff --git a/Source/OCMock/OCMExpectationRecorder.h b/Source/OCMock/OCMExpectationRecorder.h index 405aaa43..8243146d 100644 --- a/Source/OCMock/OCMExpectationRecorder.h +++ b/Source/OCMock/OCMExpectationRecorder.h @@ -14,7 +14,7 @@ * under the License. */ -#import +#import "OCMStubRecorder.h" @interface OCMExpectationRecorder : OCMStubRecorder diff --git a/Source/OCMock/OCMExpectationRecorder.m b/Source/OCMock/OCMExpectationRecorder.m index 38701d15..c5001e26 100644 --- a/Source/OCMock/OCMExpectationRecorder.m +++ b/Source/OCMock/OCMExpectationRecorder.m @@ -15,8 +15,10 @@ */ #import "OCMExpectationRecorder.h" +#import "OCMockObject.h" #import "OCMInvocationExpectation.h" + @implementation OCMExpectationRecorder #pragma mark Initialisers, description, accessors, etc. diff --git a/Source/OCMock/OCMFunctions.m b/Source/OCMock/OCMFunctions.m index d552b0fc..51a553a7 100644 --- a/Source/OCMock/OCMFunctions.m +++ b/Source/OCMock/OCMFunctions.m @@ -16,9 +16,9 @@ #import #import "OCMFunctionsPrivate.h" -#import "OCMLocation.h" #import "OCClassMockObject.h" #import "OCPartialMockObject.h" +#import "OCMLocation.h" #pragma mark Known private API diff --git a/Source/OCMock/OCMInvocationMatcher.m b/Source/OCMock/OCMInvocationMatcher.m index 247f51d8..fb621e6e 100644 --- a/Source/OCMock/OCMInvocationMatcher.m +++ b/Source/OCMock/OCMInvocationMatcher.m @@ -15,12 +15,12 @@ */ #import -#import -#import -#import "OCMPassByRefSetter.h" -#import "NSInvocation+OCMAdditions.h" #import "OCMInvocationMatcher.h" +#import "OCMArg.h" +#import "OCMConstraint.h" +#import "OCMPassByRefSetter.h" #import "OCMFunctionsPrivate.h" +#import "NSInvocation+OCMAdditions.h" @interface NSObject(HCMatcherDummy) diff --git a/Source/OCMock/OCMInvocationStub.m b/Source/OCMock/OCMInvocationStub.m index 7beff987..fd8ecafc 100644 --- a/Source/OCMock/OCMInvocationStub.m +++ b/Source/OCMock/OCMInvocationStub.m @@ -21,6 +21,7 @@ #define UNSET_RETURN_VALUE_MARKER ((id)0x01234567) + @implementation OCMInvocationStub - (id)init diff --git a/Source/OCMock/OCMLocation.h b/Source/OCMock/OCMLocation.h index 318aff24..52f440cc 100644 --- a/Source/OCMock/OCMLocation.h +++ b/Source/OCMock/OCMLocation.h @@ -17,7 +17,6 @@ #import #import "OCMFunctions.h" - @interface OCMLocation : NSObject { id testCase; diff --git a/Source/OCMock/OCMLocation.m b/Source/OCMock/OCMLocation.m index 17173253..959bc198 100644 --- a/Source/OCMock/OCMLocation.m +++ b/Source/OCMock/OCMLocation.m @@ -16,6 +16,7 @@ #import "OCMLocation.h" + @implementation OCMLocation + (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine diff --git a/Source/OCMock/OCMMacroState.m b/Source/OCMock/OCMMacroState.m index 4cbe244d..a40667cc 100644 --- a/Source/OCMock/OCMMacroState.m +++ b/Source/OCMock/OCMMacroState.m @@ -15,8 +15,8 @@ */ #import "OCMMacroState.h" -#import "OCMStubRecorder.h" #import "OCMExpectationRecorder.h" +#import "OCMVerifier.h" @implementation OCMMacroState diff --git a/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m b/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m index 7278ff4a..b3f18288 100644 --- a/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m +++ b/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m @@ -14,10 +14,11 @@ * under the License. */ -#import "OCMFunctions.h" #import "OCMNonRetainingObjectReturnValueProvider.h" +#import "OCMFunctions.h" #import "NSInvocation+OCMAdditions.h" + @implementation OCMNonRetainingObjectReturnValueProvider - (instancetype)initWithValue:(id)aValue diff --git a/Source/OCMock/OCMObserverRecorder.m b/Source/OCMock/OCMObserverRecorder.m index a3f35c57..140d17f6 100644 --- a/Source/OCMock/OCMObserverRecorder.m +++ b/Source/OCMock/OCMObserverRecorder.m @@ -15,11 +15,9 @@ */ #import -#import -#import "NSInvocation+OCMAdditions.h" #import "OCMObserverRecorder.h" -#import "OCMMacroState.h" -#import "OCMStubRecorder.h" +#import "OCMConstraint.h" + @interface NSObject(HCMatcherDummy) - (BOOL)matches:(id)item; diff --git a/Source/OCMock/OCMRealObjectForwarder.m b/Source/OCMock/OCMRealObjectForwarder.m index 8f5a643d..e84f5e35 100644 --- a/Source/OCMock/OCMRealObjectForwarder.m +++ b/Source/OCMock/OCMRealObjectForwarder.m @@ -15,8 +15,8 @@ */ #import -#import "OCPartialMockObject.h" #import "OCMRealObjectForwarder.h" +#import "OCPartialMockObject.h" #import "OCMFunctionsPrivate.h" diff --git a/Source/OCMock/OCMRecorder.m b/Source/OCMock/OCMRecorder.m index a611db72..7f4ad869 100644 --- a/Source/OCMock/OCMRecorder.m +++ b/Source/OCMock/OCMRecorder.m @@ -17,11 +17,11 @@ #import #import "OCMRecorder.h" -#import "OCMockObject.h" -#import "OCMInvocationMatcher.h" #import "OCClassMockObject.h" +#import "OCMInvocationMatcher.h" #import "NSInvocation+OCMAdditions.h" + @implementation OCMRecorder - (instancetype)init diff --git a/Source/OCMock/OCMStubRecorder.h b/Source/OCMock/OCMStubRecorder.h index 16557fe3..d735fb68 100644 --- a/Source/OCMock/OCMStubRecorder.h +++ b/Source/OCMock/OCMStubRecorder.h @@ -14,8 +14,8 @@ * under the License. */ -#import -#import +#import "OCMRecorder.h" +#import "OCMFunctions.h" #import @interface OCMStubRecorder : OCMRecorder diff --git a/Source/OCMock/OCMStubRecorder.m b/Source/OCMock/OCMStubRecorder.m index 9756129f..c0752839 100644 --- a/Source/OCMock/OCMStubRecorder.m +++ b/Source/OCMock/OCMStubRecorder.m @@ -16,14 +16,13 @@ #import "OCMStubRecorder.h" #import "OCClassMockObject.h" -#import "OCMObjectReturnValueProvider.h" +#import "OCMInvocationStub.h" +#import "OCMBlockCaller.h" #import "OCMBoxedReturnValueProvider.h" #import "OCMExceptionReturnValueProvider.h" #import "OCMIndirectReturnValueProvider.h" #import "OCMNotificationPoster.h" -#import "OCMBlockCaller.h" #import "OCMRealObjectForwarder.h" -#import "OCMInvocationStub.h" @implementation OCMStubRecorder diff --git a/Source/OCMock/OCMock.h b/Source/OCMock/OCMock.h index 548e2147..0235e811 100644 --- a/Source/OCMock/OCMock.h +++ b/Source/OCMock/OCMock.h @@ -14,150 +14,15 @@ * under the License. */ -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - - -#ifdef OCM_DISABLE_SHORT_SYNTAX -#define OCM_DISABLE_SHORT_QSYNTAX -#endif - - -#define OCMClassMock(cls) [OCMockObject niceMockForClass:cls] - -#define OCMStrictClassMock(cls) [OCMockObject mockForClass:cls] - -#define OCMProtocolMock(protocol) [OCMockObject niceMockForProtocol:protocol] - -#define OCMStrictProtocolMock(protocol) [OCMockObject mockForProtocol:protocol] - -#define OCMPartialMock(obj) [OCMockObject partialMockForObject:obj] - -#define OCMObserverMock() [OCMockObject observerMock] - - -#define OCMStub(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginStubMacro]; \ - OCMStubRecorder *recorder = nil; \ - @try{ \ - invocation; \ - }@catch(...){ \ - [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ - @throw; \ - }@finally{ \ - recorder = [OCMMacroState endStubMacro]; \ - } \ - recorder; \ - ); \ -}) - -#define OCMExpect(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginExpectMacro]; \ - OCMStubRecorder *recorder = nil; \ - @try{ \ - invocation; \ - }@catch(...){ \ - [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ - @throw; \ - }@finally{ \ - recorder = [OCMMacroState endExpectMacro]; \ - } \ - recorder; \ - ); \ -}) - -#define OCMReject(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginRejectMacro]; \ - OCMStubRecorder *recorder = nil; \ - @try{ \ - invocation; \ - }@catch(...){ \ - [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ - @throw; \ - }@finally{ \ - recorder = [OCMMacroState endRejectMacro]; \ - } \ - recorder; \ - ); \ -}) - - - -#define OCMClassMethod(invocation) \ - _OCMSilenceWarnings( \ - [[OCMMacroState globalState] switchToClassMethod]; \ - invocation; \ - ); - - -#ifndef OCM_DISABLE_SHORT_SYNTAX -#define ClassMethod(invocation) OCMClassMethod(invocation) -#endif - - -#define OCMVerifyAll(mock) [(OCMockObject *)mock verifyAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)] - -#define OCMVerifyAllWithDelay(mock, delay) [(OCMockObject *)mock verifyWithDelay:delay atLocation:OCMMakeLocation(self, __FILE__, __LINE__)] - -#define _OCMVerify(invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \ - @try{ \ - invocation; \ - }@catch(...){ \ - [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ - @throw; \ - }@finally{ \ - [OCMMacroState endVerifyMacro]; \ - } \ - ); \ -}) - -#define _OCMVerifyWithQuantifier(quantifier, invocation) \ -({ \ - _OCMSilenceWarnings( \ - [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__) withQuantifier:quantifier]; \ - @try{ \ - invocation; \ - }@catch(...){ \ - [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ - @throw; \ - }@finally{ \ - [OCMMacroState endVerifyMacro]; \ - } \ - ); \ -}) - -// explanation for macros below here: https://stackoverflow.com/questions/3046889/optional-parameters-with-c-macros - -#define _OCMVerify_1(A) _OCMVerify(A) -#define _OCMVerify_2(A,B) _OCMVerifyWithQuantifier(A, B) -#define _OCMVerify_X(x,A,B,FUNC, ...) FUNC -#define OCMVerify(...) _OCMVerify_X(,##__VA_ARGS__, _OCMVerify_2(__VA_ARGS__), _OCMVerify_1(__VA_ARGS__)) - - -#define _OCMSilenceWarnings(macro) \ -({ \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wunused-value\"") \ - _Pragma("clang diagnostic ignored \"-Wunused-getter-return-value\"") \ - _Pragma("clang diagnostic ignored \"-Wstrict-selector-match\"") \ - macro \ - _Pragma("clang diagnostic pop") \ -}) +#import "OCMockObject.h" +#import "OCMockMacros.h" +#import "OCMRecorder.h" +#import "OCMVerifier.h" +#import "OCMStubRecorder.h" +#import "OCMConstraint.h" +#import "OCMArg.h" +#import "OCMLocation.h" +#import "OCMQuantifier.h" +#import "OCMMacroState.h" +#import "NSNotificationCenter+OCMAdditions.h" +#import "OCMFunctions.h" diff --git a/Source/OCMock/OCMockMacros.h b/Source/OCMock/OCMockMacros.h new file mode 100644 index 00000000..bdcac41e --- /dev/null +++ b/Source/OCMock/OCMockMacros.h @@ -0,0 +1,151 @@ +/* +* Copyright (c) 2014-2020 Erik Doernenburg and contributors +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may +* not use these files except in compliance with the License. You may obtain +* a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +* License for the specific language governing permissions and limitations +* under the License. +*/ + + +#ifdef OCM_DISABLE_SHORT_SYNTAX +#define OCM_DISABLE_SHORT_QSYNTAX +#endif + + +#define OCMClassMock(cls) [OCMockObject niceMockForClass:cls] + +#define OCMStrictClassMock(cls) [OCMockObject mockForClass:cls] + +#define OCMProtocolMock(protocol) [OCMockObject niceMockForProtocol:protocol] + +#define OCMStrictProtocolMock(protocol) [OCMockObject mockForProtocol:protocol] + +#define OCMPartialMock(obj) [OCMockObject partialMockForObject:obj] + +#define OCMObserverMock() [OCMockObject observerMock] + + +#define OCMStub(invocation) \ +({ \ + _OCMSilenceWarnings( \ + [OCMMacroState beginStubMacro]; \ + OCMStubRecorder *recorder = nil; \ + @try{ \ + invocation; \ + }@catch(...){ \ + [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ + @throw; \ + }@finally{ \ + recorder = [OCMMacroState endStubMacro]; \ + } \ + recorder; \ + ); \ +}) + +#define OCMExpect(invocation) \ +({ \ + _OCMSilenceWarnings( \ + [OCMMacroState beginExpectMacro]; \ + OCMStubRecorder *recorder = nil; \ + @try{ \ + invocation; \ + }@catch(...){ \ + [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ + @throw; \ + }@finally{ \ + recorder = [OCMMacroState endExpectMacro]; \ + } \ + recorder; \ + ); \ +}) + +#define OCMReject(invocation) \ +({ \ + _OCMSilenceWarnings( \ + [OCMMacroState beginRejectMacro]; \ + OCMStubRecorder *recorder = nil; \ + @try{ \ + invocation; \ + }@catch(...){ \ + [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ + @throw; \ + }@finally{ \ + recorder = [OCMMacroState endRejectMacro]; \ + } \ + recorder; \ + ); \ +}) + + + +#define OCMClassMethod(invocation) \ + _OCMSilenceWarnings( \ + [[OCMMacroState globalState] switchToClassMethod]; \ + invocation; \ + ); + + +#ifndef OCM_DISABLE_SHORT_SYNTAX +#define ClassMethod(invocation) OCMClassMethod(invocation) +#endif + + +#define OCMVerifyAll(mock) [(OCMockObject *)mock verifyAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)] + +#define OCMVerifyAllWithDelay(mock, delay) [(OCMockObject *)mock verifyWithDelay:delay atLocation:OCMMakeLocation(self, __FILE__, __LINE__)] + +#define _OCMVerify(invocation) \ +({ \ + _OCMSilenceWarnings( \ + [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \ + @try{ \ + invocation; \ + }@catch(...){ \ + [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ + @throw; \ + }@finally{ \ + [OCMMacroState endVerifyMacro]; \ + } \ + ); \ +}) + +#define _OCMVerifyWithQuantifier(quantifier, invocation) \ +({ \ + _OCMSilenceWarnings( \ + [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__) withQuantifier:quantifier]; \ + @try{ \ + invocation; \ + }@catch(...){ \ + [[OCMMacroState globalState] setInvocationDidThrow:YES]; \ + @throw; \ + }@finally{ \ + [OCMMacroState endVerifyMacro]; \ + } \ + ); \ +}) + +// explanation for macros below here: https://stackoverflow.com/questions/3046889/optional-parameters-with-c-macros + +#define _OCMVerify_1(A) _OCMVerify(A) +#define _OCMVerify_2(A,B) _OCMVerifyWithQuantifier(A, B) +#define _OCMVerify_X(x,A,B,FUNC, ...) FUNC +#define OCMVerify(...) _OCMVerify_X(,##__VA_ARGS__, _OCMVerify_2(__VA_ARGS__), _OCMVerify_1(__VA_ARGS__)) + + +#define _OCMSilenceWarnings(macro) \ +({ \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wunused-value\"") \ + _Pragma("clang diagnostic ignored \"-Wunused-getter-return-value\"") \ + _Pragma("clang diagnostic ignored \"-Wstrict-selector-match\"") \ + macro \ + _Pragma("clang diagnostic pop") \ +}) diff --git a/Source/OCMock/OCMockObject.m b/Source/OCMock/OCMockObject.m index c373a7b1..ef5eb56b 100644 --- a/Source/OCMock/OCMockObject.m +++ b/Source/OCMock/OCMockObject.m @@ -14,21 +14,20 @@ * under the License. */ -#import +#import "OCMockObject.h" #import "OCClassMockObject.h" #import "OCProtocolMockObject.h" #import "OCPartialMockObject.h" #import "OCObserverMockObject.h" -#import "OCMStubRecorder.h" -#import -#import "NSInvocation+OCMAdditions.h" -#import "OCMInvocationMatcher.h" -#import "OCMMacroState.h" -#import "OCMFunctionsPrivate.h" -#import "OCMVerifier.h" -#import "OCMInvocationExpectation.h" #import "OCMExceptionReturnValueProvider.h" #import "OCMExpectationRecorder.h" +#import "OCMInvocationExpectation.h" +#import "OCMLocation.h" +#import "OCMMacroState.h" +#import "OCMQuantifier.h" +#import "OCMVerifier.h" +#import "OCMFunctionsPrivate.h" +#import "NSInvocation+OCMAdditions.h" @interface OCMockObjectInstanceVars : NSObject @property (nonatomic) BOOL isNice; diff --git a/Source/OCMock/OCObserverMockObject.m b/Source/OCMock/OCObserverMockObject.m index e613b191..c5c3f6cf 100644 --- a/Source/OCMock/OCObserverMockObject.m +++ b/Source/OCMock/OCObserverMockObject.m @@ -15,11 +15,10 @@ */ #import "OCObserverMockObject.h" -#import "OCMObserverRecorder.h" #import "OCMLocation.h" -#import "OCMFunctionsPrivate.h" #import "OCMMacroState.h" -#import "OCMRecorder.h" +#import "OCMObserverRecorder.h" +#import "OCMFunctionsPrivate.h" @implementation OCObserverMockObject diff --git a/Source/OCMock/OCPartialMockObject.m b/Source/OCMock/OCPartialMockObject.m index bc2e167a..ca218d6a 100644 --- a/Source/OCMock/OCPartialMockObject.m +++ b/Source/OCMock/OCPartialMockObject.m @@ -15,13 +15,12 @@ */ #import -#import "OCMockObject.h" #import "OCPartialMockObject.h" -#import "NSMethodSignature+OCMAdditions.h" #import "NSObject+OCMAdditions.h" #import "OCMFunctionsPrivate.h" #import "OCMInvocationStub.h" #import "NSInvocation+OCMAdditions.h" +#import "NSMethodSignature+OCMAdditions.h" @interface OCPartialMockObjectInstanceVars : NSObject @property (nonatomic, assign) NSObject *realObject; diff --git a/Source/OCMock/OCProtocolMockObject.h b/Source/OCMock/OCProtocolMockObject.h index f45caca0..016c885f 100644 --- a/Source/OCMock/OCProtocolMockObject.h +++ b/Source/OCMock/OCProtocolMockObject.h @@ -14,7 +14,7 @@ * under the License. */ -#import +#import "OCMockObject.h" @interface OCProtocolMockObject : OCMockObject diff --git a/Source/OCMock/OCProtocolMockObject.m b/Source/OCMock/OCProtocolMockObject.m index 8aa8bdc6..d9ea2bca 100644 --- a/Source/OCMock/OCProtocolMockObject.m +++ b/Source/OCMock/OCProtocolMockObject.m @@ -15,9 +15,9 @@ */ #import -#import "NSMethodSignature+OCMAdditions.h" #import "OCProtocolMockObject.h" + @implementation OCProtocolMockObject { Protocol *mockedProtocol; diff --git a/Source/OCMock/en.lproj/InfoPlist.strings b/Source/OCMock/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Source/OCMock/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Source/OCMockLibTests/en.lproj/InfoPlist.strings b/Source/OCMockLibTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Source/OCMockLibTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Source/OCMockTests/NSInvocationOCMAdditionsTests.m b/Source/OCMockTests/NSInvocationOCMAdditionsTests.m index d1cd96c6..526269f5 100644 --- a/Source/OCMockTests/NSInvocationOCMAdditionsTests.m +++ b/Source/OCMockTests/NSInvocationOCMAdditionsTests.m @@ -18,6 +18,7 @@ #import "NSInvocation+OCMAdditions.h" #import "OCMArg.h" + @implementation NSValue(OCMTestAdditions) - (id)initialValue diff --git a/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m b/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m index 82aa550a..43ed432f 100644 --- a/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m +++ b/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m @@ -17,6 +17,7 @@ #import #import "NSMethodSignature+OCMAdditions.h" + #if TARGET_OS_IPHONE #define NSPoint CGPoint #define NSSize CGSize diff --git a/Source/OCMockTests/OCMBoxedReturnValueProviderTests.m b/Source/OCMockTests/OCMBoxedReturnValueProviderTests.m index 288b3b68..e647065b 100644 --- a/Source/OCMockTests/OCMBoxedReturnValueProviderTests.m +++ b/Source/OCMockTests/OCMBoxedReturnValueProviderTests.m @@ -17,6 +17,7 @@ #import #import "OCMBoxedReturnValueProvider.h" + @interface OCMBoxedReturnValueProvider(Private) - (BOOL)isMethodReturnType:(const char *)returnType compatibleWithValueType:(const char *)valueType value:(const char*)value valueSize:(size_t)valueSize; @end diff --git a/Source/OCMockTests/OCMCPlusPlus11Tests.mm b/Source/OCMockTests/OCMCPlusPlus11Tests.mm index 58c09349..f441b64d 100644 --- a/Source/OCMockTests/OCMCPlusPlus11Tests.mm +++ b/Source/OCMockTests/OCMCPlusPlus11Tests.mm @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" #if !defined(__cplusplus) #error This file must be compiled with C++ diff --git a/Source/OCMockTests/OCMCPlusPlus98Tests.mm b/Source/OCMockTests/OCMCPlusPlus98Tests.mm index 891149b0..0a6e715f 100644 --- a/Source/OCMockTests/OCMCPlusPlus98Tests.mm +++ b/Source/OCMockTests/OCMCPlusPlus98Tests.mm @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" #if !defined(__cplusplus) #error This file must be compiled with C++ diff --git a/Source/OCMockTests/OCMConstraintTests.m b/Source/OCMockTests/OCMConstraintTests.m index dde0fc90..06718dbc 100644 --- a/Source/OCMockTests/OCMConstraintTests.m +++ b/Source/OCMockTests/OCMConstraintTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMConstraint.h" @interface OCMConstraintTests : XCTestCase diff --git a/Source/OCMockTests/OCMInvocationMatcherTests.m b/Source/OCMockTests/OCMInvocationMatcherTests.m index 6eac96c5..bb01e324 100644 --- a/Source/OCMockTests/OCMInvocationMatcherTests.m +++ b/Source/OCMockTests/OCMInvocationMatcherTests.m @@ -15,9 +15,8 @@ */ #import -#import +#import "OCMock.h" #import "OCMInvocationMatcher.h" -#import "OCClassMockObject.h" #import "OCMFunctionsPrivate.h" diff --git a/Source/OCMockTests/OCMNoEscapeBlockTests.m b/Source/OCMockTests/OCMNoEscapeBlockTests.m index 6ebdeea1..5b0ff998 100644 --- a/Source/OCMockTests/OCMNoEscapeBlockTests.m +++ b/Source/OCMockTests/OCMNoEscapeBlockTests.m @@ -15,9 +15,10 @@ */ #import -#import +#import "OCMock.h" #import "OCMFunctionsPrivate.h" + @interface NSString(NoEscapeBlock) @end diff --git a/Source/OCMockTests/OCMQuantifierTests.m b/Source/OCMockTests/OCMQuantifierTests.m index 44a55595..06086639 100644 --- a/Source/OCMockTests/OCMQuantifierTests.m +++ b/Source/OCMockTests/OCMQuantifierTests.m @@ -15,8 +15,7 @@ */ #import -#import -#import "OCMQuantifier.h" +#import "OCMock.h" @interface TestClassForQuantifiers : NSObject diff --git a/Source/OCMockTests/OCMStubRecorderTests.m b/Source/OCMockTests/OCMStubRecorderTests.m index 2334dffb..b15db803 100644 --- a/Source/OCMockTests/OCMStubRecorderTests.m +++ b/Source/OCMockTests/OCMStubRecorderTests.m @@ -15,13 +15,12 @@ */ #import -#import "OCMStubRecorder.h" -#import +#import "OCMock.h" #import "OCMObjectReturnValueProvider.h" #import "OCMExceptionReturnValueProvider.h" -#import "OCMInvocationMatcher.h" #import "OCMInvocationStub.h" + @interface OCMStubRecorderTests : XCTestCase @end diff --git a/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m b/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m index 7ea2ebf2..ef26fef6 100644 --- a/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m +++ b/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" #import "OCClassMockObject.h" #import "OCPartialMockObject.h" diff --git a/Source/OCMockTests/OCMockObjectDynamicPropertyMockingTests.m b/Source/OCMockTests/OCMockObjectDynamicPropertyMockingTests.m index 6f8cf8b9..904ce339 100644 --- a/Source/OCMockTests/OCMockObjectDynamicPropertyMockingTests.m +++ b/Source/OCMockTests/OCMockObjectDynamicPropertyMockingTests.m @@ -15,7 +15,8 @@ */ #import -#import +#import "OCMock.h" + #pragma mark Helper classes diff --git a/Source/OCMockTests/OCMockObjectForwardingTargetTests.m b/Source/OCMockTests/OCMockObjectForwardingTargetTests.m index b9f53675..2bc13546 100644 --- a/Source/OCMockTests/OCMockObjectForwardingTargetTests.m +++ b/Source/OCMockTests/OCMockObjectForwardingTargetTests.m @@ -15,8 +15,9 @@ */ #import -#import #import +#import "OCMock.h" + #pragma mark Helper classes diff --git a/Source/OCMockTests/OCMockObjectHamcrestTests.m b/Source/OCMockTests/OCMockObjectHamcrestTests.m index c2b98e95..dee620e9 100644 --- a/Source/OCMockTests/OCMockObjectHamcrestTests.m +++ b/Source/OCMockTests/OCMockObjectHamcrestTests.m @@ -16,7 +16,7 @@ #import #import -#import +#import "OCMock.h" @interface OCMockObjectHamcrestTests : XCTestCase diff --git a/Source/OCMockTests/OCMockObjectInternalTests.m b/Source/OCMockTests/OCMockObjectInternalTests.m index e8000dc0..22418e39 100644 --- a/Source/OCMockTests/OCMockObjectInternalTests.m +++ b/Source/OCMockTests/OCMockObjectInternalTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" #pragma mark Helper classes diff --git a/Source/OCMockTests/OCMockObjectMacroTests.m b/Source/OCMockTests/OCMockObjectMacroTests.m index e5526c17..43e3e5a4 100644 --- a/Source/OCMockTests/OCMockObjectMacroTests.m +++ b/Source/OCMockTests/OCMockObjectMacroTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" @protocol TestProtocolForMacroTesting diff --git a/Source/OCMockTests/OCMockObjectPartialMocksTests.m b/Source/OCMockTests/OCMockObjectPartialMocksTests.m index 19813e5c..54ded4f3 100644 --- a/Source/OCMockTests/OCMockObjectPartialMocksTests.m +++ b/Source/OCMockTests/OCMockObjectPartialMocksTests.m @@ -16,7 +16,7 @@ #import #import -#import +#import "OCMock.h" #import "OCPartialMockObject.h" #import "TestClassWithCustomReferenceCounting.h" @@ -27,6 +27,7 @@ #define valueWithRect valueWithCGRect #endif + #pragma mark Helper classes @interface TestClassWithSimpleMethod : NSObject diff --git a/Source/OCMockTests/OCMockObjectProtocolMocksTests.m b/Source/OCMockTests/OCMockObjectProtocolMocksTests.m index 5a6d1d61..d11dfec9 100644 --- a/Source/OCMockTests/OCMockObjectProtocolMocksTests.m +++ b/Source/OCMockTests/OCMockObjectProtocolMocksTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" // -------------------------------------------------------------------------------------- diff --git a/Source/OCMockTests/OCMockObjectRuntimeTests.m b/Source/OCMockTests/OCMockObjectRuntimeTests.m index 4f95e953..1c0b8b91 100644 --- a/Source/OCMockTests/OCMockObjectRuntimeTests.m +++ b/Source/OCMockTests/OCMockObjectRuntimeTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock.h" #pragma mark Helper classes diff --git a/Source/OCMockTests/OCMockObjectTests.m b/Source/OCMockTests/OCMockObjectTests.m index 833ddffc..7d837c60 100644 --- a/Source/OCMockTests/OCMockObjectTests.m +++ b/Source/OCMockTests/OCMockObjectTests.m @@ -15,7 +15,7 @@ */ #import -#import +#import "OCMock/OCMock.h" #import "OCMBoxedReturnValueProvider.h" #import "OCPartialMockObject.h" #import "OCClassMockObject.h" @@ -92,13 +92,13 @@ @implementation TestClassWithProperty @interface TestClassWithBlockArgMethod : NSObject -- (void)doStuffWithBlock:(void (^)(void))block andString:(id)aString; +- (void)doStuffWithBlock:(__unused void (^)(void))block andString:(id)aString; @end @implementation TestClassWithBlockArgMethod -- (void)doStuffWithBlock:(void (^)(void))block andString:(id)aString; +- (void)doStuffWithBlock:(__unused void (^)(void))block andString:(id)aString; { // stubbed out anyway } @@ -158,13 +158,13 @@ - (id)objectValue; @interface TestClassWithProtocolBlockArgMethod : NSObject -- (void)doStuffWithBlock:(void (^)(id arg))block; +- (void)doStuffWithBlock:(__unused void (^)(id arg))block; @end @implementation TestClassWithProtocolBlockArgMethod -- (void)doStuffWithBlock:(void (^)(id arg))block; +- (void)doStuffWithBlock:(__unused void (^)(id arg))block; { // stubbed out anyway } @@ -885,7 +885,7 @@ - (void)testInvokesBlockWithProtocolMockArgs __block BOOL wasCalled = NO; __block id firstParam; - void (^block)(id arg) = ^(id arg) { + void (^block)(id) = ^(id arg) { wasCalled = YES; firstParam = arg; }; diff --git a/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m b/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m index be0899f1..56e1d62f 100644 --- a/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m +++ b/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m @@ -15,8 +15,8 @@ */ #import -#import "OCMockObject.h" -#import "OCMStubRecorder.h" +#import "OCMock.h" + @interface TestBaseClassForVerifyAfterRun : NSObject diff --git a/Source/OCMockTests/OCObserverMockObjectTests.m b/Source/OCMockTests/OCObserverMockObjectTests.m index d61a5a27..dab74bc8 100644 --- a/Source/OCMockTests/OCObserverMockObjectTests.m +++ b/Source/OCMockTests/OCObserverMockObjectTests.m @@ -15,7 +15,8 @@ */ #import -#import +#import "OCMock.h" + static NSString *TestNotificationOne = @"TestNotificationOne"; diff --git a/Source/OCMockTests/TestClassWithCustomReferenceCounting.m b/Source/OCMockTests/TestClassWithCustomReferenceCounting.m index b13046fb..7a4139cf 100644 --- a/Source/OCMockTests/TestClassWithCustomReferenceCounting.m +++ b/Source/OCMockTests/TestClassWithCustomReferenceCounting.m @@ -17,6 +17,7 @@ #import #import "TestClassWithCustomReferenceCounting.h" + @implementation TestClassWithCustomReferenceCounting { #if __LP64__ diff --git a/Source/OCMockTests/en.lproj/InfoPlist.strings b/Source/OCMockTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/Source/OCMockTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ -