mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-19 10:46:35 +00:00
Add OCMock library for partial mocks
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1B98D4B61B9F80D000B8000B /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B98D4AB1B9F80D000B8000B /* libOCMock.a */; };
|
||||
1B98D4B71B9F80D000B8000B /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B98D4AB1B9F80D000B8000B /* libOCMock.a */; };
|
||||
1E0829001708F69A0073050E /* BITStoreUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E0828FF1708F69A0073050E /* BITStoreUpdateManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1E0FEE28173BDB260061331F /* BITKeychainUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E0FEE26173BDB260061331F /* BITKeychainUtils.h */; };
|
||||
1E0FEE29173BDB260061331F /* BITKeychainUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E0FEE27173BDB260061331F /* BITKeychainUtils.m */; };
|
||||
@@ -369,6 +371,16 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1B98D4AB1B9F80D000B8000B /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
|
||||
1B98D4AD1B9F80D000B8000B /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = "<group>"; };
|
||||
1B98D4AE1B9F80D000B8000B /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = "<group>"; };
|
||||
1B98D4AF1B9F80D000B8000B /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; };
|
||||
1B98D4B01B9F80D000B8000B /* OCMLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMLocation.h; sourceTree = "<group>"; };
|
||||
1B98D4B11B9F80D000B8000B /* OCMMacroState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMMacroState.h; sourceTree = "<group>"; };
|
||||
1B98D4B21B9F80D000B8000B /* OCMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = "<group>"; };
|
||||
1B98D4B31B9F80D000B8000B /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = "<group>"; };
|
||||
1B98D4B41B9F80D000B8000B /* OCMRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMRecorder.h; sourceTree = "<group>"; };
|
||||
1B98D4B51B9F80D000B8000B /* OCMStubRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMStubRecorder.h; sourceTree = "<group>"; };
|
||||
1E0828FF1708F69A0073050E /* BITStoreUpdateManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITStoreUpdateManagerDelegate.h; sourceTree = "<group>"; };
|
||||
1E0FEE26173BDB260061331F /* BITKeychainUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITKeychainUtils.h; sourceTree = "<group>"; };
|
||||
1E0FEE27173BDB260061331F /* BITKeychainUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITKeychainUtils.m; sourceTree = "<group>"; };
|
||||
@@ -594,6 +606,7 @@
|
||||
1EA1170016F4D32C001C015C /* libHockeySDK.a in Frameworks */,
|
||||
1EA1170116F4D354001C015C /* CrashReporter.framework in Frameworks */,
|
||||
1E5A459516F0DFC200B55C04 /* Foundation.framework in Frameworks */,
|
||||
1B98D4B61B9F80D000B8000B /* libOCMock.a in Frameworks */,
|
||||
1E7A45FC16F54FB5005B08F1 /* OCHamcrestIOS.framework in Frameworks */,
|
||||
1E7A45FD16F54FB5005B08F1 /* OCMockitoIOS.framework in Frameworks */,
|
||||
);
|
||||
@@ -624,6 +637,7 @@
|
||||
1EB617D51B0A36AE0035A986 /* Foundation.framework in Frameworks */,
|
||||
1EB6174A1B0A30480035A986 /* HockeySDK.framework in Frameworks */,
|
||||
1EB617CC1B0A34040035A986 /* CrashReporter.framework in Frameworks */,
|
||||
1B98D4B71B9F80D000B8000B /* libOCMock.a in Frameworks */,
|
||||
1EB617D31B0A34AB0035A986 /* OCHamcrestIOS.framework in Frameworks */,
|
||||
1EB617D41B0A34AF0035A986 /* OCMockitoIOS.framework in Frameworks */,
|
||||
);
|
||||
@@ -632,6 +646,22 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1B98D4AC1B9F80D000B8000B /* OCMock */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B98D4AD1B9F80D000B8000B /* NSNotificationCenter+OCMAdditions.h */,
|
||||
1B98D4AE1B9F80D000B8000B /* OCMArg.h */,
|
||||
1B98D4AF1B9F80D000B8000B /* OCMConstraint.h */,
|
||||
1B98D4B01B9F80D000B8000B /* OCMLocation.h */,
|
||||
1B98D4B11B9F80D000B8000B /* OCMMacroState.h */,
|
||||
1B98D4B21B9F80D000B8000B /* OCMock.h */,
|
||||
1B98D4B31B9F80D000B8000B /* OCMockObject.h */,
|
||||
1B98D4B41B9F80D000B8000B /* OCMRecorder.h */,
|
||||
1B98D4B51B9F80D000B8000B /* OCMStubRecorder.h */,
|
||||
);
|
||||
path = OCMock;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1E5955A415B71BDC00A03429 /* Images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -695,6 +725,8 @@
|
||||
1E5A459716F0DFC200B55C04 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B98D4AB1B9F80D000B8000B /* libOCMock.a */,
|
||||
1B98D4AC1B9F80D000B8000B /* OCMock */,
|
||||
1E7A45FA16F54FB5005B08F1 /* OCHamcrestIOS.framework */,
|
||||
1E7A45FB16F54FB5005B08F1 /* OCMockitoIOS.framework */,
|
||||
1E5A459816F0DFC200B55C04 /* HockeySDKTests-Info.plist */,
|
||||
@@ -1697,13 +1729,40 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "HockeySDKTests/HockeySDKTests-Prefix.pch";
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/HockeySDKTests/";
|
||||
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/HockeySDKTests\"",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -1758,6 +1817,7 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "HockeySDK Framework/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -1803,10 +1863,43 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/HockeySDKTests/",
|
||||
"-ObjC",
|
||||
);
|
||||
INFOPLIST_FILE = "HockeySDK FrameworkTests/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -1938,13 +2031,40 @@
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/HockeySDKTests/";
|
||||
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/HockeySDKTests\"",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -1969,13 +2089,40 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "HockeySDKTests/HockeySDKTests-Prefix.pch";
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/HockeySDKTests/";
|
||||
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/HockeySDKTests\"",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -2096,13 +2243,40 @@
|
||||
);
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GENERATE_PROFILING_CODE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/HockeySDKTests/";
|
||||
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/HockeySDKTests\"",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -2213,13 +2387,40 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "HockeySDKTests/HockeySDKTests-Prefix.pch";
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
HEADER_SEARCH_PATHS = "$(SRCROOT)/HockeySDKTests/";
|
||||
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/HockeySDKTests\"",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -2281,6 +2482,7 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "HockeySDK Framework/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2330,6 +2532,7 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "HockeySDK Framework/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2380,6 +2583,7 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "HockeySDK Framework/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2430,6 +2634,7 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "HockeySDK Framework/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
@@ -2478,10 +2683,43 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/HockeySDKTests/",
|
||||
"-ObjC",
|
||||
);
|
||||
INFOPLIST_FILE = "HockeySDK FrameworkTests/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -2516,10 +2754,43 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/HockeySDKTests/",
|
||||
"-ObjC",
|
||||
);
|
||||
INFOPLIST_FILE = "HockeySDK FrameworkTests/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -2555,10 +2826,43 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/HockeySDKTests/",
|
||||
"-ObjC",
|
||||
);
|
||||
INFOPLIST_FILE = "HockeySDK FrameworkTests/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
@@ -2594,10 +2898,43 @@
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/HockeySDKTests/",
|
||||
"-ObjC",
|
||||
);
|
||||
INFOPLIST_FILE = "HockeySDK FrameworkTests/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HockeySDKTests",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-framework",
|
||||
CoreText,
|
||||
"-framework",
|
||||
CoreGraphics,
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
QuartzCore,
|
||||
"-framework",
|
||||
SystemConfiguration,
|
||||
"-framework",
|
||||
UIKit,
|
||||
"-framework",
|
||||
Security,
|
||||
"-framework",
|
||||
AssetsLibrary,
|
||||
"-framework",
|
||||
MobileCoreServices,
|
||||
"-framework",
|
||||
QuickLook,
|
||||
"-lc++",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "net.hockeyapp.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2015 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>
|
||||
|
||||
@class OCObserverMockObject;
|
||||
|
||||
|
||||
@interface NSNotificationCenter(OCMAdditions)
|
||||
|
||||
- (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender;
|
||||
|
||||
@end
|
||||
53
Support/HockeySDKTests/OCMock/OCMArg.h
Normal file
53
Support/HockeySDKTests/OCMock/OCMArg.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2015 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>
|
||||
|
||||
@interface OCMArg : NSObject
|
||||
|
||||
// constraining arguments
|
||||
|
||||
+ (id)any;
|
||||
+ (SEL)anySelector;
|
||||
+ (void *)anyPointer;
|
||||
+ (id __autoreleasing *)anyObjectRef;
|
||||
+ (id)isNil;
|
||||
+ (id)isNotNil;
|
||||
+ (id)isEqual:(id)value;
|
||||
+ (id)isNotEqual:(id)value;
|
||||
+ (id)isKindOfClass:(Class)cls;
|
||||
+ (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
|
||||
+ (id)checkWithBlock:(BOOL (^)(id obj))block;
|
||||
|
||||
// manipulating arguments
|
||||
|
||||
+ (id *)setTo:(id)value;
|
||||
+ (void *)setToValue:(NSValue *)value;
|
||||
|
||||
// internal use only
|
||||
|
||||
+ (id)resolveSpecialValues:(NSValue *)value;
|
||||
|
||||
@end
|
||||
|
||||
#define OCMOCK_ANY [OCMArg any]
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
#define OCMOCK_VALUE(variable) \
|
||||
({ __typeof__(variable) __v = (variable); [NSValue value:&__v withObjCType:@encode(__typeof__(__v))]; })
|
||||
#else
|
||||
#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
|
||||
#endif
|
||||
71
Support/HockeySDKTests/OCMock/OCMConstraint.h
Normal file
71
Support/HockeySDKTests/OCMock/OCMConstraint.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2015 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>
|
||||
|
||||
|
||||
@interface OCMConstraint : NSObject
|
||||
|
||||
+ (instancetype)constraint;
|
||||
- (BOOL)evaluate:(id)value;
|
||||
|
||||
// if you are looking for any, isNil, etc, they have moved to OCMArg
|
||||
|
||||
// try to use [OCMArg checkWith...] instead of the constraintWith... methods below
|
||||
|
||||
+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
|
||||
+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface OCMAnyConstraint : OCMConstraint
|
||||
@end
|
||||
|
||||
@interface OCMIsNilConstraint : OCMConstraint
|
||||
@end
|
||||
|
||||
@interface OCMIsNotNilConstraint : OCMConstraint
|
||||
@end
|
||||
|
||||
@interface OCMIsNotEqualConstraint : OCMConstraint
|
||||
{
|
||||
@public
|
||||
id testValue;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface OCMInvocationConstraint : OCMConstraint
|
||||
{
|
||||
@public
|
||||
NSInvocation *invocation;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface OCMBlockConstraint : OCMConstraint
|
||||
{
|
||||
BOOL (^block)(id);
|
||||
}
|
||||
|
||||
- (instancetype)initWithConstraintBlock:(BOOL (^)(id))block;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
|
||||
#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
|
||||
36
Support/HockeySDKTests/OCMock/OCMLocation.h
Normal file
36
Support/HockeySDKTests/OCMock/OCMLocation.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 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>
|
||||
|
||||
@interface OCMLocation : NSObject
|
||||
{
|
||||
id testCase;
|
||||
NSString *file;
|
||||
NSUInteger line;
|
||||
}
|
||||
|
||||
+ (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
|
||||
|
||||
- (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
|
||||
|
||||
- (id)testCase;
|
||||
- (NSString *)file;
|
||||
- (NSUInteger)line;
|
||||
|
||||
@end
|
||||
|
||||
extern OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
|
||||
45
Support/HockeySDKTests/OCMock/OCMMacroState.h
Normal file
45
Support/HockeySDKTests/OCMock/OCMMacroState.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 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>
|
||||
|
||||
@class OCMLocation;
|
||||
@class OCMRecorder;
|
||||
@class OCMStubRecorder;
|
||||
@class OCMockObject;
|
||||
|
||||
|
||||
@interface OCMMacroState : NSObject
|
||||
{
|
||||
OCMRecorder *recorder;
|
||||
}
|
||||
|
||||
+ (void)beginStubMacro;
|
||||
+ (OCMStubRecorder *)endStubMacro;
|
||||
|
||||
+ (void)beginExpectMacro;
|
||||
+ (OCMStubRecorder *)endExpectMacro;
|
||||
|
||||
+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
|
||||
+ (void)endVerifyMacro;
|
||||
|
||||
+ (OCMMacroState *)globalState;
|
||||
|
||||
- (OCMRecorder *)recorder;
|
||||
|
||||
- (void)switchToClassMethod;
|
||||
|
||||
@end
|
||||
39
Support/HockeySDKTests/OCMock/OCMRecorder.h
Normal file
39
Support/HockeySDKTests/OCMock/OCMRecorder.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2015 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>
|
||||
|
||||
@class OCMockObject;
|
||||
@class OCMInvocationMatcher;
|
||||
|
||||
|
||||
@interface OCMRecorder : NSProxy
|
||||
{
|
||||
OCMockObject *mockObject;
|
||||
OCMInvocationMatcher *invocationMatcher;
|
||||
}
|
||||
|
||||
- (instancetype)init;
|
||||
- (instancetype)initWithMockObject:(OCMockObject *)aMockObject;
|
||||
|
||||
- (void)setMockObject:(OCMockObject *)aMockObject;
|
||||
|
||||
- (OCMInvocationMatcher *)invocationMatcher;
|
||||
|
||||
- (id)classMethod;
|
||||
- (id)ignoringNonObjectArgs;
|
||||
|
||||
@end
|
||||
63
Support/HockeySDKTests/OCMock/OCMStubRecorder.h
Normal file
63
Support/HockeySDKTests/OCMock/OCMStubRecorder.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2015 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 "OCMRecorder.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@interface OCMStubRecorder : OCMRecorder
|
||||
|
||||
- (id)andReturn:(id)anObject;
|
||||
- (id)andReturnValue:(NSValue *)aValue;
|
||||
- (id)andThrow:(NSException *)anException;
|
||||
- (id)andPost:(NSNotification *)aNotification;
|
||||
- (id)andCall:(SEL)selector onObject:(id)anObject;
|
||||
- (id)andDo:(void (^)(NSInvocation *invocation))block;
|
||||
- (id)andForwardToRealObject;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface OCMStubRecorder (Properties)
|
||||
|
||||
#define andReturn(aValue) _andReturn(({ \
|
||||
__typeof__(aValue) _val = (aValue); \
|
||||
NSValue *_nsval = [NSValue value:&_val withObjCType:@encode(__typeof__(_val))]; \
|
||||
if (__builtin_types_compatible_p(__typeof__(_val), id)) { \
|
||||
objc_setAssociatedObject(_nsval, "OCMAssociatedBoxedValue", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \
|
||||
} \
|
||||
_nsval; \
|
||||
}))
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *);
|
||||
|
||||
#define andThrow(anException) _andThrow(anException)
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andThrow)(NSException *);
|
||||
|
||||
#define andPost(aNotification) _andPost(aNotification)
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andPost)(NSNotification *);
|
||||
|
||||
#define andCall(anObject, aSelector) _andCall(anObject, aSelector)
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andCall)(id, SEL);
|
||||
|
||||
#define andDo(aBlock) _andDo(aBlock)
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andDo)(void (^)(NSInvocation *));
|
||||
|
||||
#define andForwardToRealObject() _andForwardToRealObject()
|
||||
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
85
Support/HockeySDKTests/OCMock/OCMock.h
Normal file
85
Support/HockeySDKTests/OCMock/OCMock.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2015 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 <OCMock/OCMockObject.h>
|
||||
#import <OCMock/OCMRecorder.h>
|
||||
#import <OCMock/OCMStubRecorder.h>
|
||||
#import <OCMock/OCMConstraint.h>
|
||||
#import <OCMock/OCMArg.h>
|
||||
#import <OCMock/OCMLocation.h>
|
||||
#import <OCMock/OCMMacroState.h>
|
||||
#import <OCMock/NSNotificationCenter+OCMAdditions.h>
|
||||
|
||||
|
||||
#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]; \
|
||||
invocation; \
|
||||
[OCMMacroState endStubMacro]; \
|
||||
); \
|
||||
})
|
||||
|
||||
#define OCMExpect(invocation) \
|
||||
({ \
|
||||
_OCMSilenceWarnings( \
|
||||
[OCMMacroState beginExpectMacro]; \
|
||||
invocation; \
|
||||
[OCMMacroState endExpectMacro]; \
|
||||
); \
|
||||
})
|
||||
|
||||
#define ClassMethod(invocation) \
|
||||
_OCMSilenceWarnings( \
|
||||
[[OCMMacroState globalState] switchToClassMethod]; \
|
||||
invocation; \
|
||||
);
|
||||
|
||||
|
||||
#define OCMVerifyAll(mock) [mock verifyAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]
|
||||
|
||||
#define OCMVerifyAllWithDelay(mock, delay) [mock verifyWithDelay:delay atLocation:OCMMakeLocation(self, __FILE__, __LINE__)]
|
||||
|
||||
#define OCMVerify(invocation) \
|
||||
({ \
|
||||
_OCMSilenceWarnings( \
|
||||
[OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \
|
||||
invocation; \
|
||||
[OCMMacroState endVerifyMacro]; \
|
||||
); \
|
||||
})
|
||||
|
||||
#define _OCMSilenceWarnings(macro) \
|
||||
({ \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wunused-value\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wunused-getter-return-value\"") \
|
||||
macro \
|
||||
_Pragma("clang diagnostic pop") \
|
||||
})
|
||||
74
Support/HockeySDKTests/OCMock/OCMockObject.h
Normal file
74
Support/HockeySDKTests/OCMock/OCMockObject.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2015 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>
|
||||
|
||||
@class OCMLocation;
|
||||
@class OCMInvocationStub;
|
||||
@class OCMStubRecorder;
|
||||
@class OCMInvocationMatcher;
|
||||
@class OCMInvocationExpectation;
|
||||
|
||||
|
||||
@interface OCMockObject : NSProxy
|
||||
{
|
||||
BOOL isNice;
|
||||
BOOL expectationOrderMatters;
|
||||
NSMutableArray *stubs;
|
||||
NSMutableArray *expectations;
|
||||
NSMutableArray *exceptions;
|
||||
NSMutableArray *invocations;
|
||||
}
|
||||
|
||||
+ (id)mockForClass:(Class)aClass;
|
||||
+ (id)mockForProtocol:(Protocol *)aProtocol;
|
||||
+ (id)partialMockForObject:(NSObject *)anObject;
|
||||
|
||||
+ (id)niceMockForClass:(Class)aClass;
|
||||
+ (id)niceMockForProtocol:(Protocol *)aProtocol;
|
||||
|
||||
+ (id)observerMock;
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
- (void)setExpectationOrderMatters:(BOOL)flag;
|
||||
|
||||
- (id)stub;
|
||||
- (id)expect;
|
||||
- (id)reject;
|
||||
|
||||
- (id)verify;
|
||||
- (id)verifyAtLocation:(OCMLocation *)location;
|
||||
|
||||
- (void)verifyWithDelay:(NSTimeInterval)delay;
|
||||
- (void)verifyWithDelay:(NSTimeInterval)delay atLocation:(OCMLocation *)location;
|
||||
|
||||
- (void)stopMocking;
|
||||
|
||||
// internal use only
|
||||
|
||||
- (void)addStub:(OCMInvocationStub *)aStub;
|
||||
- (void)addExpectation:(OCMInvocationExpectation *)anExpectation;
|
||||
|
||||
- (BOOL)handleInvocation:(NSInvocation *)anInvocation;
|
||||
- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation;
|
||||
- (BOOL)handleSelector:(SEL)sel;
|
||||
|
||||
- (void)verifyInvocation:(OCMInvocationMatcher *)matcher;
|
||||
- (void)verifyInvocation:(OCMInvocationMatcher *)matcher atLocation:(OCMLocation *)location;
|
||||
|
||||
@end
|
||||
|
||||
BIN
Support/HockeySDKTests/libOCMock.a
Normal file
BIN
Support/HockeySDKTests/libOCMock.a
Normal file
Binary file not shown.
Reference in New Issue
Block a user