From 401afb41dfa34f63cf23737ecc47886b1100ac68 Mon Sep 17 00:00:00 2001 From: Erik Doernenburg Date: Sat, 22 Aug 2020 00:01:33 +0200 Subject: [PATCH] Tidied up imports in tests. --- Source/OCMockTests/NSInvocationOCMAdditionsTests.m | 1 + .../NSMethodSignatureOCMAdditionsTests.m | 1 + .../OCMockTests/OCMBoxedReturnValueProviderTests.m | 1 + Source/OCMockTests/OCMCPlusPlus11Tests.mm | 2 +- Source/OCMockTests/OCMCPlusPlus98Tests.mm | 2 +- Source/OCMockTests/OCMConstraintTests.m | 2 +- Source/OCMockTests/OCMInvocationMatcherTests.m | 3 +-- Source/OCMockTests/OCMNoEscapeBlockTests.m | 3 ++- Source/OCMockTests/OCMQuantifierTests.m | 3 +-- Source/OCMockTests/OCMStubRecorderTests.m | 5 ++--- .../OCMockObjectClassMethodMockingTests.m | 2 +- .../OCMockObjectDynamicPropertyMockingTests.m | 3 ++- .../OCMockTests/OCMockObjectForwardingTargetTests.m | 3 ++- Source/OCMockTests/OCMockObjectHamcrestTests.m | 2 +- Source/OCMockTests/OCMockObjectInternalTests.m | 2 +- Source/OCMockTests/OCMockObjectMacroTests.m | 2 +- Source/OCMockTests/OCMockObjectPartialMocksTests.m | 3 ++- Source/OCMockTests/OCMockObjectProtocolMocksTests.m | 2 +- Source/OCMockTests/OCMockObjectRuntimeTests.m | 2 +- Source/OCMockTests/OCMockObjectTests.m | 13 ++++++------- .../OCMockTests/OCMockObjectVerifyAfterRunTests.m | 4 ++-- Source/OCMockTests/OCObserverMockObjectTests.m | 3 ++- .../TestClassWithCustomReferenceCounting.m | 1 + 23 files changed, 35 insertions(+), 30 deletions(-) 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 c4a24080..1fd2154d 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 3a9b8dcb..5f0f3d11 100644 --- a/Source/OCMockTests/OCMockObjectTests.m +++ b/Source/OCMockTests/OCMockObjectTests.m @@ -15,8 +15,7 @@ */ #import -#import -#import "OCMBoxedReturnValueProvider.h" +#import "OCMock/OCMock.h" #pragma mark Helper classes and protocols for testing @@ -91,13 +90,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 } @@ -157,13 +156,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 } @@ -868,7 +867,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__