Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ShareFileSDK/ShareFileSDK.xcodeproj/project.xcworkspace/xcuserdata
ShareFileSDK/ShareFileSDK.xcodeproj/xcuserdata
Binary file removed ShareFileSDK/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2014 Erik Doernenburg and contributors
* Copyright (c) 2009-2019 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
Expand Down
7 changes: 6 additions & 1 deletion ShareFileSDK/External/OCMock/OCMArg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2014 Erik Doernenburg and contributors
* Copyright (c) 2009-2019 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
Expand Down Expand Up @@ -36,6 +36,10 @@

+ (id *)setTo:(id)value;
+ (void *)setToValue:(NSValue *)value;
+ (id)invokeBlock;
+ (id)invokeBlockWithArgs:(id)first,... NS_REQUIRES_NIL_TERMINATION;

+ (id)defaultValue;

// internal use only

Expand All @@ -51,3 +55,4 @@
#else
#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
#endif

2 changes: 1 addition & 1 deletion ShareFileSDK/External/OCMock/OCMConstraint.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007-2014 Erik Doernenburg and contributors
* Copyright (c) 2007-2019 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
Expand Down
27 changes: 27 additions & 0 deletions ShareFileSDK/External/OCMock/OCMFunctions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2014-2019 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.
*/

#import <Foundation/Foundation.h>


#if defined(__cplusplus)
#define OCMOCK_EXTERN extern "C"
#else
#define OCMOCK_EXTERN extern
#endif


OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType);
6 changes: 4 additions & 2 deletions ShareFileSDK/External/OCMock/OCMLocation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -15,6 +15,8 @@
*/

#import <Foundation/Foundation.h>
#import "OCMFunctions.h"


@interface OCMLocation : NSObject
{
Expand All @@ -33,4 +35,4 @@

@end

extern OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
10 changes: 7 additions & 3 deletions ShareFileSDK/External/OCMock/OCMMacroState.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -24,7 +24,7 @@

@interface OCMMacroState : NSObject
{
OCMRecorder *recorder;
id recorder;
}

+ (void)beginStubMacro;
Expand All @@ -33,12 +33,16 @@
+ (void)beginExpectMacro;
+ (OCMStubRecorder *)endExpectMacro;

+ (void)beginRejectMacro;
+ (OCMStubRecorder *)endRejectMacro;

+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
+ (void)endVerifyMacro;

+ (OCMMacroState *)globalState;

- (OCMRecorder *)recorder;
- (void)setRecorder:(id)aRecorder;
- (id)recorder;

- (void)switchToClassMethod;

Expand Down
11 changes: 10 additions & 1 deletion ShareFileSDK/External/OCMock/OCMRecorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -24,6 +24,7 @@
{
OCMockObject *mockObject;
OCMInvocationMatcher *invocationMatcher;
BOOL wasUsed;
}

- (instancetype)init;
Expand All @@ -32,8 +33,16 @@
- (void)setMockObject:(OCMockObject *)aMockObject;

- (OCMInvocationMatcher *)invocationMatcher;
- (BOOL)wasUsed;

- (id)classMethod;
- (id)ignoringNonObjectArgs;

@end

@interface OCMRecorder (Properties)

#define ignoringNonObjectArgs() _ignoringNonObjectArgs()
@property (nonatomic, readonly) OCMRecorder *(^ _ignoringNonObjectArgs)(void);

@end
18 changes: 14 additions & 4 deletions ShareFileSDK/External/OCMock/OCMStubRecorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2014 Erik Doernenburg and contributors
* Copyright (c) 2004-2019 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
Expand All @@ -14,8 +14,9 @@
* under the License.
*/

#import "OCMRecorder.h"

#import <OCMock/OCMRecorder.h>
#import <OCMock/OCMFunctions.h>
#import <objc/runtime.h>

@interface OCMStubRecorder : OCMRecorder

Expand All @@ -32,7 +33,14 @@

@interface OCMStubRecorder (Properties)

#define andReturn(aValue) _andReturn(({ typeof(aValue) _v = (aValue); [NSValue value:&_v withObjCType:@encode(typeof(_v))]; }))
#define andReturn(aValue) _andReturn(({ \
__typeof__(aValue) _val = (aValue); \
NSValue *_nsval = [NSValue value:&_val withObjCType:@encode(__typeof__(_val))]; \
if (OCMIsObjectType(@encode(__typeof(_val)))) { \
objc_setAssociatedObject(_nsval, "OCMAssociatedBoxedValue", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \
} \
_nsval; \
}))
@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *);

#define andThrow(anException) _andThrow(anException)
Expand All @@ -50,6 +58,8 @@
#define andForwardToRealObject() _andForwardToRealObject()
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);

@property (nonatomic, readonly) OCMStubRecorder *(^ _ignoringNonObjectArgs)(void);

@end


Expand Down
1 change: 1 addition & 0 deletions ShareFileSDK/External/OCMock/OCMock.framework/Modules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2014 Erik Doernenburg and contributors
* Copyright (c) 2009-2019 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2014 Erik Doernenburg and contributors
* Copyright (c) 2009-2019 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
Expand Down Expand Up @@ -36,6 +36,10 @@

+ (id *)setTo:(id)value;
+ (void *)setToValue:(NSValue *)value;
+ (id)invokeBlock;
+ (id)invokeBlockWithArgs:(id)first,... NS_REQUIRES_NIL_TERMINATION;

+ (id)defaultValue;

// internal use only

Expand All @@ -51,3 +55,4 @@
#else
#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
#endif

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007-2014 Erik Doernenburg and contributors
* Copyright (c) 2007-2019 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2014-2019 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.
*/

#import <Foundation/Foundation.h>


#if defined(__cplusplus)
#define OCMOCK_EXTERN extern "C"
#else
#define OCMOCK_EXTERN extern
#endif


OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -15,6 +15,8 @@
*/

#import <Foundation/Foundation.h>
#import "OCMFunctions.h"


@interface OCMLocation : NSObject
{
Expand All @@ -33,4 +35,4 @@

@end

extern OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -24,7 +24,7 @@

@interface OCMMacroState : NSObject
{
OCMRecorder *recorder;
id recorder;
}

+ (void)beginStubMacro;
Expand All @@ -33,12 +33,16 @@
+ (void)beginExpectMacro;
+ (OCMStubRecorder *)endExpectMacro;

+ (void)beginRejectMacro;
+ (OCMStubRecorder *)endRejectMacro;

+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
+ (void)endVerifyMacro;

+ (OCMMacroState *)globalState;

- (OCMRecorder *)recorder;
- (void)setRecorder:(id)aRecorder;
- (id)recorder;

- (void)switchToClassMethod;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Erik Doernenburg and contributors
* Copyright (c) 2014-2019 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
Expand All @@ -24,6 +24,7 @@
{
OCMockObject *mockObject;
OCMInvocationMatcher *invocationMatcher;
BOOL wasUsed;
}

- (instancetype)init;
Expand All @@ -32,8 +33,16 @@
- (void)setMockObject:(OCMockObject *)aMockObject;

- (OCMInvocationMatcher *)invocationMatcher;
- (BOOL)wasUsed;

- (id)classMethod;
- (id)ignoringNonObjectArgs;

@end

@interface OCMRecorder (Properties)

#define ignoringNonObjectArgs() _ignoringNonObjectArgs()
@property (nonatomic, readonly) OCMRecorder *(^ _ignoringNonObjectArgs)(void);

@end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2014 Erik Doernenburg and contributors
* Copyright (c) 2004-2019 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
Expand All @@ -14,8 +14,9 @@
* under the License.
*/

#import "OCMRecorder.h"

#import <OCMock/OCMRecorder.h>
#import <OCMock/OCMFunctions.h>
#import <objc/runtime.h>

@interface OCMStubRecorder : OCMRecorder

Expand All @@ -32,7 +33,14 @@

@interface OCMStubRecorder (Properties)

#define andReturn(aValue) _andReturn(({ typeof(aValue) _v = (aValue); [NSValue value:&_v withObjCType:@encode(typeof(_v))]; }))
#define andReturn(aValue) _andReturn(({ \
__typeof__(aValue) _val = (aValue); \
NSValue *_nsval = [NSValue value:&_val withObjCType:@encode(__typeof__(_val))]; \
if (OCMIsObjectType(@encode(__typeof(_val)))) { \
objc_setAssociatedObject(_nsval, "OCMAssociatedBoxedValue", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \
} \
_nsval; \
}))
@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *);

#define andThrow(anException) _andThrow(anException)
Expand All @@ -50,6 +58,8 @@
#define andForwardToRealObject() _andForwardToRealObject()
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);

@property (nonatomic, readonly) OCMStubRecorder *(^ _ignoringNonObjectArgs)(void);

@end


Expand Down
Loading