Project import
diff --git a/Examples/ArcExample/ArcExample.xcodeproj/project.pbxproj b/Examples/ArcExample/ArcExample.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..94a959a
--- /dev/null
+++ b/Examples/ArcExample/ArcExample.xcodeproj/project.pbxproj
@@ -0,0 +1,244 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 0351A22A152F65DA005B52FE /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0351A229152F65DA005B52FE /* OCMock.framework */; };
+ 035F7F1E14CDBBBC00D21121 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 035F7F1D14CDBBBC00D21121 /* Foundation.framework */; };
+ 035F7F2114CDBBBC00D21121 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 035F7F2014CDBBBC00D21121 /* main.m */; };
+ 035F7F2514CDBBBC00D21121 /* ArcExample.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 035F7F2414CDBBBC00D21121 /* ArcExample.1 */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 035F7F1714CDBBBC00D21121 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ 035F7F2514CDBBBC00D21121 /* ArcExample.1 in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 0351A229152F65DA005B52FE /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMock.framework; path = /Library/Frameworks/OCMock.framework; sourceTree = "<absolute>"; };
+ 035F7F1914CDBBBC00D21121 /* ArcExample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ArcExample; sourceTree = BUILT_PRODUCTS_DIR; };
+ 035F7F1D14CDBBBC00D21121 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 035F7F2014CDBBBC00D21121 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 035F7F2314CDBBBC00D21121 /* ArcExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ArcExample-Prefix.pch"; sourceTree = "<group>"; };
+ 035F7F2414CDBBBC00D21121 /* ArcExample.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = ArcExample.1; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 035F7F1614CDBBBC00D21121 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 035F7F1E14CDBBBC00D21121 /* Foundation.framework in Frameworks */,
+ 0351A22A152F65DA005B52FE /* OCMock.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 035F7F0E14CDBBBC00D21121 = {
+ isa = PBXGroup;
+ children = (
+ 035F7F1F14CDBBBC00D21121 /* ArcExample */,
+ 035F7F1C14CDBBBC00D21121 /* Frameworks */,
+ 035F7F1A14CDBBBC00D21121 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 035F7F1A14CDBBBC00D21121 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 035F7F1914CDBBBC00D21121 /* ArcExample */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 035F7F1C14CDBBBC00D21121 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0351A229152F65DA005B52FE /* OCMock.framework */,
+ 035F7F1D14CDBBBC00D21121 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 035F7F1F14CDBBBC00D21121 /* ArcExample */ = {
+ isa = PBXGroup;
+ children = (
+ 035F7F2014CDBBBC00D21121 /* main.m */,
+ 035F7F2414CDBBBC00D21121 /* ArcExample.1 */,
+ 035F7F2214CDBBBC00D21121 /* Supporting Files */,
+ );
+ path = ArcExample;
+ sourceTree = "<group>";
+ };
+ 035F7F2214CDBBBC00D21121 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 035F7F2314CDBBBC00D21121 /* ArcExample-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 035F7F1814CDBBBC00D21121 /* ArcExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 035F7F2814CDBBBC00D21121 /* Build configuration list for PBXNativeTarget "ArcExample" */;
+ buildPhases = (
+ 035F7F1514CDBBBC00D21121 /* Sources */,
+ 035F7F1614CDBBBC00D21121 /* Frameworks */,
+ 035F7F1714CDBBBC00D21121 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ArcExample;
+ productName = ArcExample;
+ productReference = 035F7F1914CDBBBC00D21121 /* ArcExample */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 035F7F1014CDBBBC00D21121 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ ORGANIZATIONNAME = ThoughtWorks;
+ };
+ buildConfigurationList = 035F7F1314CDBBBC00D21121 /* Build configuration list for PBXProject "ArcExample" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 035F7F0E14CDBBBC00D21121;
+ productRefGroup = 035F7F1A14CDBBBC00D21121 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 035F7F1814CDBBBC00D21121 /* ArcExample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 035F7F1514CDBBBC00D21121 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 035F7F2114CDBBBC00D21121 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 035F7F2614CDBBBC00D21121 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_OBJCPP_ARC_ABI = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx10.7;
+ };
+ name = Debug;
+ };
+ 035F7F2714CDBBBC00D21121 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_OBJCPP_ARC_ABI = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ SDKROOT = macosx10.7;
+ };
+ name = Release;
+ };
+ 035F7F2914CDBBBC00D21121 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "ArcExample/ArcExample-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 035F7F2A14CDBBBC00D21121 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "ArcExample/ArcExample-Prefix.pch";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 035F7F1314CDBBBC00D21121 /* Build configuration list for PBXProject "ArcExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 035F7F2614CDBBBC00D21121 /* Debug */,
+ 035F7F2714CDBBBC00D21121 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 035F7F2814CDBBBC00D21121 /* Build configuration list for PBXNativeTarget "ArcExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 035F7F2914CDBBBC00D21121 /* Debug */,
+ 035F7F2A14CDBBBC00D21121 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 035F7F1014CDBBBC00D21121 /* Project object */;
+}
diff --git a/Examples/ArcExample/ArcExample/ArcExample-Prefix.pch b/Examples/ArcExample/ArcExample/ArcExample-Prefix.pch
new file mode 100644
index 0000000..ad04264
--- /dev/null
+++ b/Examples/ArcExample/ArcExample/ArcExample-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'ArcExample' target in the 'ArcExample' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Examples/ArcExample/ArcExample/ArcExample.1 b/Examples/ArcExample/ArcExample/ArcExample.1
new file mode 100644
index 0000000..1568cef
--- /dev/null
+++ b/Examples/ArcExample/ArcExample/ArcExample.1
@@ -0,0 +1,79 @@
+.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
+.\"See Also:
+.\"man mdoc.samples for a complete listing of options
+.\"man mdoc for the short list of editing options
+.\"/usr/share/misc/mdoc.template
+.Dd 23/01/12 \" DATE
+.Dt ArcExample 1 \" Program name and manual section number
+.Os Darwin
+.Sh NAME \" Section Header - required - don't modify
+.Nm ArcExample,
+.\" The following lines are read in generating the apropos(man -k) database. Use only key
+.\" words here as the database is built based on the words here and in the .ND line.
+.Nm Other_name_for_same_program(),
+.Nm Yet another name for the same program.
+.\" Use .Nm macro to designate other names for the documented program.
+.Nd This line parsed for whatis database.
+.Sh SYNOPSIS \" Section Header - required - don't modify
+.Nm
+.Op Fl abcd \" [-abcd]
+.Op Fl a Ar path \" [-a path]
+.Op Ar file \" [file]
+.Op Ar \" [file ...]
+.Ar arg0 \" Underlined argument - use .Ar anywhere to underline
+arg2 ... \" Arguments
+.Sh DESCRIPTION \" Section Header - required - don't modify
+Use the .Nm macro to refer to your program throughout the man page like such:
+.Nm
+Underlining is accomplished with the .Ar macro like this:
+.Ar underlined text .
+.Pp \" Inserts a space
+A list of items with descriptions:
+.Bl -tag -width -indent \" Begins a tagged list
+.It item a \" Each item preceded by .It macro
+Description of item a
+.It item b
+Description of item b
+.El \" Ends the list
+.Pp
+A list of flags and their descriptions:
+.Bl -tag -width -indent \" Differs from above in tag removed
+.It Fl a \"-a flag as a list item
+Description of -a flag
+.It Fl b
+Description of -b flag
+.El \" Ends the list
+.Pp
+.\" .Sh ENVIRONMENT \" May not be needed
+.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
+.\" .It Ev ENV_VAR_1
+.\" Description of ENV_VAR_1
+.\" .It Ev ENV_VAR_2
+.\" Description of ENV_VAR_2
+.\" .El
+.Sh FILES \" File used or created by the topic of the man page
+.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
+.It Pa /usr/share/file_name
+FILE_1 description
+.It Pa /Users/joeuser/Library/really_long_file_name
+FILE_2 description
+.El \" Ends the list
+.\" .Sh DIAGNOSTICS \" May not be needed
+.\" .Bl -diag
+.\" .It Diagnostic Tag
+.\" Diagnostic informtion here.
+.\" .It Diagnostic Tag
+.\" Diagnostic informtion here.
+.\" .El
+.Sh SEE ALSO
+.\" List links in ascending order by section, alphabetically within a section.
+.\" Please do not reference files that do not exist without filing a bug report
+.Xr a 1 ,
+.Xr b 1 ,
+.Xr c 1 ,
+.Xr a 2 ,
+.Xr b 2 ,
+.Xr a 3 ,
+.Xr b 3
+.\" .Sh BUGS \" Document known, unremedied bugs
+.\" .Sh HISTORY \" Document history if command behaves in a unique manner
\ No newline at end of file
diff --git a/Examples/ArcExample/ArcExample/main.m b/Examples/ArcExample/ArcExample/main.m
new file mode 100644
index 0000000..aecc32d
--- /dev/null
+++ b/Examples/ArcExample/ArcExample/main.m
@@ -0,0 +1,34 @@
+
+#import <Foundation/Foundation.h>
+#import <OCMock/OCMock.h>
+
+@protocol SomeDelegateProtocol
+- (void)doStuff;
+@end
+
+@interface SomeClass : NSObject
+@property (nonatomic, weak) id<SomeDelegateProtocol> delegate;
+@end
+
+@implementation SomeClass
+
+@synthesize delegate;
+
+@end
+
+
+int main (int argc, const char * argv[])
+{
+
+ @autoreleasepool {
+
+ SomeClass *someObject = [[SomeClass alloc] init];
+ id delegate = [OCMockObject mockForProtocol:@protocol(SomeDelegateProtocol)];
+ someObject.delegate = delegate;
+ NSLog(@"delegate = %@", delegate);
+ NSLog(@"someObject = %@", someObject.delegate);
+
+ }
+ return 0;
+}
+
diff --git a/Examples/SwiftExamples/SwiftExamples.xcodeproj/project.pbxproj b/Examples/SwiftExamples/SwiftExamples.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..cf831c2
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples.xcodeproj/project.pbxproj
@@ -0,0 +1,499 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 03151B301948E756009A27B8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03151B2F1948E756009A27B8 /* AppDelegate.swift */; };
+ 03151B321948E756009A27B8 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03151B311948E756009A27B8 /* MasterViewController.swift */; };
+ 03151B341948E756009A27B8 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03151B331948E756009A27B8 /* DetailViewController.swift */; };
+ 03151B371948E756009A27B8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03151B351948E756009A27B8 /* Main.storyboard */; };
+ 03151B391948E756009A27B8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03151B381948E756009A27B8 /* Images.xcassets */; };
+ 03151B451948E757009A27B8 /* SwiftExamplesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03151B441948E757009A27B8 /* SwiftExamplesTests.swift */; };
+ 03151B531948E7FF009A27B8 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03151B521948E7FF009A27B8 /* libOCMock.a */; };
+ 03151B561948E891009A27B8 /* MockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03151B551948E891009A27B8 /* MockTests.m */; };
+ 032E56391948EAE4000CEB43 /* Connection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032E56371948EAE4000CEB43 /* Connection.swift */; };
+ 032E563A1948EAE4000CEB43 /* Controller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032E56381948EAE4000CEB43 /* Controller.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 03151B3F1948E757009A27B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 03151B221948E756009A27B8 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03151B291948E756009A27B8;
+ remoteInfo = SwiftExamples;
+ };
+ 03151B4E1948E7E9009A27B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 03151B221948E756009A27B8 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03151B291948E756009A27B8;
+ remoteInfo = SwiftExamples;
+ };
+ 03151B501948E7EA009A27B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 03151B221948E756009A27B8 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03151B291948E756009A27B8;
+ remoteInfo = SwiftExamples;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 03151B2A1948E756009A27B8 /* SwiftExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftExamples.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03151B2E1948E756009A27B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 03151B2F1948E756009A27B8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+ 03151B311948E756009A27B8 /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
+ 03151B331948E756009A27B8 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
+ 03151B361948E756009A27B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+ 03151B381948E756009A27B8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+ 03151B3E1948E757009A27B8 /* SwiftExamplesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03151B431948E757009A27B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 03151B441948E757009A27B8 /* SwiftExamplesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftExamplesTests.swift; sourceTree = "<group>"; };
+ 03151B521948E7FF009A27B8 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOCMock.a; path = usr/lib/libOCMock.a; sourceTree = "<group>"; };
+ 03151B541948E890009A27B8 /* SwiftExamplesTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwiftExamplesTests-Bridging-Header.h"; sourceTree = "<group>"; };
+ 03151B551948E891009A27B8 /* MockTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockTests.m; sourceTree = "<group>"; };
+ 032E56371948EAE4000CEB43 /* Connection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Connection.swift; path = SwiftExamples/Connection.swift; sourceTree = SOURCE_ROOT; };
+ 032E56381948EAE4000CEB43 /* Controller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Controller.swift; path = SwiftExamples/Controller.swift; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 03151B271948E756009A27B8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03151B3B1948E757009A27B8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03151B531948E7FF009A27B8 /* libOCMock.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 03151B211948E756009A27B8 = {
+ isa = PBXGroup;
+ children = (
+ 03151B521948E7FF009A27B8 /* libOCMock.a */,
+ 03151B2C1948E756009A27B8 /* SwiftExamples */,
+ 03151B411948E757009A27B8 /* SwiftExamplesTests */,
+ 03151B2B1948E756009A27B8 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 03151B2B1948E756009A27B8 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 03151B2A1948E756009A27B8 /* SwiftExamples.app */,
+ 03151B3E1948E757009A27B8 /* SwiftExamplesTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 03151B2C1948E756009A27B8 /* SwiftExamples */ = {
+ isa = PBXGroup;
+ children = (
+ 03151B2F1948E756009A27B8 /* AppDelegate.swift */,
+ 03151B311948E756009A27B8 /* MasterViewController.swift */,
+ 03151B331948E756009A27B8 /* DetailViewController.swift */,
+ 03151B351948E756009A27B8 /* Main.storyboard */,
+ 03151B381948E756009A27B8 /* Images.xcassets */,
+ 03151B2D1948E756009A27B8 /* Supporting Files */,
+ );
+ path = SwiftExamples;
+ sourceTree = "<group>";
+ };
+ 03151B2D1948E756009A27B8 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 03151B2E1948E756009A27B8 /* Info.plist */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 03151B411948E757009A27B8 /* SwiftExamplesTests */ = {
+ isa = PBXGroup;
+ children = (
+ 032E56371948EAE4000CEB43 /* Connection.swift */,
+ 032E56381948EAE4000CEB43 /* Controller.swift */,
+ 03151B441948E757009A27B8 /* SwiftExamplesTests.swift */,
+ 03151B551948E891009A27B8 /* MockTests.m */,
+ 03151B421948E757009A27B8 /* Supporting Files */,
+ 03151B541948E890009A27B8 /* SwiftExamplesTests-Bridging-Header.h */,
+ );
+ path = SwiftExamplesTests;
+ sourceTree = "<group>";
+ };
+ 03151B421948E757009A27B8 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 03151B431948E757009A27B8 /* Info.plist */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 03151B291948E756009A27B8 /* SwiftExamples */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03151B481948E757009A27B8 /* Build configuration list for PBXNativeTarget "SwiftExamples" */;
+ buildPhases = (
+ 03151B261948E756009A27B8 /* Sources */,
+ 03151B271948E756009A27B8 /* Frameworks */,
+ 03151B281948E756009A27B8 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SwiftExamples;
+ productName = SwiftExamples;
+ productReference = 03151B2A1948E756009A27B8 /* SwiftExamples.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 03151B3D1948E757009A27B8 /* SwiftExamplesTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03151B4B1948E757009A27B8 /* Build configuration list for PBXNativeTarget "SwiftExamplesTests" */;
+ buildPhases = (
+ 03151B3A1948E757009A27B8 /* Sources */,
+ 03151B3B1948E757009A27B8 /* Frameworks */,
+ 03151B3C1948E757009A27B8 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 03151B401948E757009A27B8 /* PBXTargetDependency */,
+ 03151B4F1948E7E9009A27B8 /* PBXTargetDependency */,
+ 03151B511948E7EA009A27B8 /* PBXTargetDependency */,
+ );
+ name = SwiftExamplesTests;
+ productName = SwiftExamplesTests;
+ productReference = 03151B3E1948E757009A27B8 /* SwiftExamplesTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 03151B221948E756009A27B8 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0600;
+ ORGANIZATIONNAME = "Mulle Kybernetik";
+ TargetAttributes = {
+ 03151B291948E756009A27B8 = {
+ CreatedOnToolsVersion = 6.0;
+ };
+ 03151B3D1948E757009A27B8 = {
+ CreatedOnToolsVersion = 6.0;
+ TestTargetID = 03151B291948E756009A27B8;
+ };
+ };
+ };
+ buildConfigurationList = 03151B251948E756009A27B8 /* Build configuration list for PBXProject "SwiftExamples" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 03151B211948E756009A27B8;
+ productRefGroup = 03151B2B1948E756009A27B8 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 03151B291948E756009A27B8 /* SwiftExamples */,
+ 03151B3D1948E757009A27B8 /* SwiftExamplesTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 03151B281948E756009A27B8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03151B371948E756009A27B8 /* Main.storyboard in Resources */,
+ 03151B391948E756009A27B8 /* Images.xcassets in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03151B3C1948E757009A27B8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 03151B261948E756009A27B8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03151B341948E756009A27B8 /* DetailViewController.swift in Sources */,
+ 03151B321948E756009A27B8 /* MasterViewController.swift in Sources */,
+ 03151B301948E756009A27B8 /* AppDelegate.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03151B3A1948E757009A27B8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03151B451948E757009A27B8 /* SwiftExamplesTests.swift in Sources */,
+ 032E56391948EAE4000CEB43 /* Connection.swift in Sources */,
+ 03151B561948E891009A27B8 /* MockTests.m in Sources */,
+ 032E563A1948EAE4000CEB43 /* Controller.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 03151B401948E757009A27B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03151B291948E756009A27B8 /* SwiftExamples */;
+ targetProxy = 03151B3F1948E757009A27B8 /* PBXContainerItemProxy */;
+ };
+ 03151B4F1948E7E9009A27B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03151B291948E756009A27B8 /* SwiftExamples */;
+ targetProxy = 03151B4E1948E7E9009A27B8 /* PBXContainerItemProxy */;
+ };
+ 03151B511948E7EA009A27B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03151B291948E756009A27B8 /* SwiftExamples */;
+ targetProxy = 03151B501948E7EA009A27B8 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 03151B351948E756009A27B8 /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03151B361948E756009A27B8 /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 03151B461948E757009A27B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ METAL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 03151B471948E757009A27B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ METAL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 03151B491948E757009A27B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ INFOPLIST_FILE = SwiftExamples/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 03151B4A1948E757009A27B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ INFOPLIST_FILE = SwiftExamples/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 03151B4C1948E757009A27B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SwiftExamples.app/SwiftExamples";
+ CLANG_ENABLE_MODULES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
+ "$(PROJECT_DIR)/usr/include",
+ );
+ INFOPLIST_FILE = SwiftExamplesTests/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/usr/lib",
+ );
+ METAL_ENABLE_DEBUG_INFO = YES;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ XCTest,
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "SwiftExamplesTests/SwiftExamplesTests-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ };
+ name = Debug;
+ };
+ 03151B4D1948E757009A27B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SwiftExamples.app/SwiftExamples";
+ CLANG_ENABLE_MODULES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
+ "$(PROJECT_DIR)/usr/include",
+ );
+ INFOPLIST_FILE = SwiftExamplesTests/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/usr/lib",
+ );
+ METAL_ENABLE_DEBUG_INFO = NO;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ XCTest,
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "SwiftExamplesTests/SwiftExamplesTests-Bridging-Header.h";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 03151B251948E756009A27B8 /* Build configuration list for PBXProject "SwiftExamples" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03151B461948E757009A27B8 /* Debug */,
+ 03151B471948E757009A27B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03151B481948E757009A27B8 /* Build configuration list for PBXNativeTarget "SwiftExamples" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03151B491948E757009A27B8 /* Debug */,
+ 03151B4A1948E757009A27B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03151B4B1948E757009A27B8 /* Build configuration list for PBXNativeTarget "SwiftExamplesTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03151B4C1948E757009A27B8 /* Debug */,
+ 03151B4D1948E757009A27B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 03151B221948E756009A27B8 /* Project object */;
+}
diff --git a/Examples/SwiftExamples/SwiftExamples/AppDelegate.swift b/Examples/SwiftExamples/SwiftExamples/AppDelegate.swift
new file mode 100644
index 0000000..5030958
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/AppDelegate.swift
@@ -0,0 +1,46 @@
+//
+// AppDelegate.swift
+// SwiftExamples
+//
+// Created by Erik Doernenburg on 11/06/2014.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import UIKit
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+ var window: UIWindow?
+
+
+ func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
+ // Override point for customization after application launch.
+ return true
+ }
+
+ func applicationWillResignActive(application: UIApplication) {
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ }
+
+ func applicationDidEnterBackground(application: UIApplication) {
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ }
+
+ func applicationWillEnterForeground(application: UIApplication) {
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ }
+
+ func applicationDidBecomeActive(application: UIApplication) {
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ }
+
+ func applicationWillTerminate(application: UIApplication) {
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+ }
+
+
+}
+
diff --git a/Examples/SwiftExamples/SwiftExamples/Base.lproj/Main.storyboard b/Examples/SwiftExamples/SwiftExamples/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..24781fe
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Base.lproj/Main.storyboard
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6162" systemVersion="14A238h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="H1p-Uh-vWS">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6160"/>
+ </dependencies>
+ <scenes>
+ <!--Navigation Controller-->
+ <scene sceneID="pY4-Hu-kfo">
+ <objects>
+ <navigationController id="RMx-3f-FxP" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="Pmd-2v-anx">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="7bK-jq-Zjz" kind="relationship" relationship="rootViewController" id="tsl-Nk-0bq"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="8fS-aE-onr" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-38" y="-630"/>
+ </scene>
+ <!--Detail View Controller - Detail-->
+ <scene sceneID="yUG-lL-AsK">
+ <objects>
+ <viewController title="Detail" id="JEX-9P-axG" customClass="DetailViewController" customModuleProvider="target" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="SYR-Wa-9uf"/>
+ <viewControllerLayoutGuide type="bottom" id="GAO-Cl-Wes"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="svH-Pt-448">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="0XM-y9-sOw">
+ <rect key="frame" x="20" y="232" width="440" height="17"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" type="system" size="system"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstItem="0XM-y9-sOw" firstAttribute="leading" secondItem="svH-Pt-448" secondAttribute="leading" constant="20" symbolic="YES" id="Tsc-yG-G1q"/>
+ <constraint firstItem="0XM-y9-sOw" firstAttribute="centerY" secondItem="svH-Pt-448" secondAttribute="centerY" id="jWN-iV-94e"/>
+ <constraint firstAttribute="trailing" secondItem="0XM-y9-sOw" secondAttribute="trailing" constant="20" symbolic="YES" id="tHV-ZD-HQj"/>
+ </constraints>
+ </view>
+ <toolbarItems/>
+ <navigationItem key="navigationItem" title="Detail" id="mOI-FS-AaM"/>
+ <connections>
+ <outlet property="detailDescriptionLabel" destination="0XM-y9-sOw" id="deQ-Na-JPF"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="FJe-Yq-33r" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="604" y="30"/>
+ </scene>
+ <!--Split View Controller-->
+ <scene sceneID="Nki-YV-4Qg">
+ <objects>
+ <splitViewController id="H1p-Uh-vWS" sceneMemberID="viewController">
+ <toolbarItems/>
+ <connections>
+ <segue destination="RMx-3f-FxP" kind="relationship" relationship="masterViewController" id="BlO-5A-QYV"/>
+ <segue destination="vC3-pB-5Vb" kind="relationship" relationship="detailViewController" id="Tll-UG-LXB"/>
+ </connections>
+ </splitViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="cZU-Oi-B1e" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-687" y="-322"/>
+ </scene>
+ <!--Master View Controller - Master-->
+ <scene sceneID="smW-Zh-WAh">
+ <objects>
+ <tableViewController title="Master" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterViewController" customModuleProvider="target" sceneMemberID="viewController">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="r7i-6Z-zg0">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <prototypes>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
+ <rect key="frame" x="0.0" y="86" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="37f-cq-3Eg">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
+ <rect key="frame" x="15" y="0.0" width="290" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ </tableViewCellContentView>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <connections>
+ <segue destination="vC3-pB-5Vb" kind="showDetail" identifier="showDetail" id="6S0-TO-JiA"/>
+ </connections>
+ </tableViewCell>
+ </prototypes>
+ <sections/>
+ <connections>
+ <outlet property="dataSource" destination="7bK-jq-Zjz" id="Gho-Na-rnu"/>
+ <outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" title="Master" id="Zdf-7t-Un8"/>
+ </tableViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="604" y="-630"/>
+ </scene>
+ <!--Navigation Controller-->
+ <scene sceneID="r7l-gg-dq7">
+ <objects>
+ <navigationController id="vC3-pB-5Vb" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="DjV-YW-jjY">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="JEX-9P-axG" kind="relationship" relationship="rootViewController" id="GKi-kA-LjT"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="SLD-UC-DBI" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-38" y="30"/>
+ </scene>
+ </scenes>
+ <inferredMetricsTieBreakers>
+ <segue reference="6S0-TO-JiA"/>
+ </inferredMetricsTieBreakers>
+</document>
diff --git a/Examples/SwiftExamples/SwiftExamples/Connection.swift b/Examples/SwiftExamples/SwiftExamples/Connection.swift
new file mode 100644
index 0000000..c1a1657
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Connection.swift
@@ -0,0 +1,20 @@
+//
+// Connection.swift
+// SwiftExperiments
+//
+// Created by Erik D on 05/06/14.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import Foundation
+
+@objc
+protocol Connection {
+ func fetchData() -> String
+}
+
+class ServerConnection : NSObject, Connection {
+ func fetchData() -> String {
+ return "real data returned from other system"
+ }
+}
diff --git a/Examples/SwiftExamples/SwiftExamples/Controller.swift b/Examples/SwiftExamples/SwiftExamples/Controller.swift
new file mode 100644
index 0000000..bf57142
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Controller.swift
@@ -0,0 +1,28 @@
+//
+// Controller.swift
+// SwiftExperiments
+//
+// Created by Erik D on 05/06/14.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import Foundation
+
+@objc
+class Controller {
+ var connection: Connection;
+ var data: String;
+
+ class func newController() -> Controller {
+ return Controller()
+ }
+
+ init() {
+ self.connection = ServerConnection();
+ self.data = "";
+ }
+
+ func redisplay() {
+ data = connection.fetchData();
+ }
+}
diff --git a/Examples/SwiftExamples/SwiftExamples/DetailViewController.swift b/Examples/SwiftExamples/SwiftExamples/DetailViewController.swift
new file mode 100644
index 0000000..5674c78
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/DetailViewController.swift
@@ -0,0 +1,46 @@
+//
+// DetailViewController.swift
+// SwiftExamples
+//
+// Created by Erik Doernenburg on 11/06/2014.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import UIKit
+
+class DetailViewController: UIViewController {
+
+ @IBOutlet weak var detailDescriptionLabel: UILabel!
+
+
+ var detailItem: AnyObject? {
+ didSet {
+ // Update the view.
+ self.configureView()
+ }
+ }
+
+ func configureView() {
+ // Update the user interface for the detail item.
+ if let detail: AnyObject = self.detailItem {
+ if let label = self.detailDescriptionLabel {
+ label.text = detail.description
+ }
+ }
+ }
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view, typically from a nib.
+ self.configureView()
+ }
+
+ override func didReceiveMemoryWarning() {
+ super.didReceiveMemoryWarning()
+ // Dispose of any resources that can be recreated.
+ }
+
+
+}
+
+
diff --git a/Examples/SwiftExamples/SwiftExamples/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/SwiftExamples/SwiftExamples/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..91bf9c1
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,53 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Examples/SwiftExamples/SwiftExamples/Images.xcassets/LaunchImage.launchimage/Contents.json b/Examples/SwiftExamples/SwiftExamples/Images.xcassets/LaunchImage.launchimage/Contents.json
new file mode 100644
index 0000000..6f870a4
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,51 @@
+{
+ "images" : [
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "subtype" : "retina4",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "1x"
+ },
+ {
+ "orientation" : "landscape",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "1x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "landscape",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Examples/SwiftExamples/SwiftExamples/Info.plist b/Examples/SwiftExamples/SwiftExamples/Info.plist
new file mode 100644
index 0000000..5304abd
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/Info.plist
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UIStatusBarTintParameters</key>
+ <dict>
+ <key>UINavigationBar</key>
+ <dict>
+ <key>Style</key>
+ <string>UIBarStyleDefault</string>
+ <key>Translucent</key>
+ <false/>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/Examples/SwiftExamples/SwiftExamples/MasterViewController.swift b/Examples/SwiftExamples/SwiftExamples/MasterViewController.swift
new file mode 100644
index 0000000..a284d7d
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamples/MasterViewController.swift
@@ -0,0 +1,87 @@
+//
+// MasterViewController.swift
+// SwiftExamples
+//
+// Created by Erik Doernenburg on 11/06/2014.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import UIKit
+
+class MasterViewController: UITableViewController {
+
+ var objects = NSMutableArray()
+
+
+ override func awakeFromNib() {
+ super.awakeFromNib()
+ }
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view, typically from a nib.
+ self.navigationItem.leftBarButtonItem = self.editButtonItem()
+
+ let addButton = UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: "insertNewObject:")
+ self.navigationItem.rightBarButtonItem = addButton
+ }
+
+ override func didReceiveMemoryWarning() {
+ super.didReceiveMemoryWarning()
+ // Dispose of any resources that can be recreated.
+ }
+
+ func insertNewObject(sender: AnyObject) {
+ objects.insertObject(NSDate(), atIndex: 0)
+ let indexPath = NSIndexPath(forRow: 0, inSection: 0)
+ self.tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: .Automatic)
+ }
+
+ // MARK: - Segues
+
+ override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
+ if segue.identifier == "showDetail" {
+ if let indexPath = self.tableView.indexPathForSelectedRow() {
+ let object = objects[indexPath.row] as NSDate
+ (segue.destinationViewController as DetailViewController).detailItem = object
+ }
+ }
+ }
+
+ // MARK: - Table View
+
+ override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
+ return 1
+ }
+
+ override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return objects.count
+ }
+
+ override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
+ let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
+
+ let object = objects[indexPath.row] as NSDate
+ cell.textLabel!.text = object.description
+ return cell
+ }
+
+ override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+
+ override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
+ if editingStyle == .Delete {
+ objects.removeObjectAtIndex(indexPath.row)
+ tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
+ } else if editingStyle == .Insert {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
+ }
+ }
+
+
+}
+
+
+
diff --git a/Examples/SwiftExamples/SwiftExamplesTests/Info.plist b/Examples/SwiftExamples/SwiftExamplesTests/Info.plist
new file mode 100644
index 0000000..6faa334
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamplesTests/Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Examples/SwiftExamples/SwiftExamplesTests/MockTests.m b/Examples/SwiftExamples/SwiftExamplesTests/MockTests.m
new file mode 100644
index 0000000..748a242
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamplesTests/MockTests.m
@@ -0,0 +1,71 @@
+//
+// MockTests.m
+// SwiftExamples
+//
+// Created by Erik Doernenburg on 11/06/2014.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+#import <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import "SwiftExamplesTests-Swift.h"
+
+
+@interface MockTests : XCTestCase
+
+@end
+
+@implementation MockTests
+
+- (void)testThatOCMockWorksInSwiftProject
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [mock lowercaseString];
+
+ OCMVerify([mock lowercaseString]);
+}
+
+- (void)testMockingAnObject
+{
+ id mock = OCMClassMock([ServerConnection class]);
+ OCMStub([mock fetchData]).andReturn(@"stubbed!");
+
+ Controller *controller = [Controller newController];
+ controller.connection = mock;
+
+ [controller redisplay];
+
+ OCMVerify([mock fetchData]);
+ XCTAssertEqualObjects(@"stubbed!", controller.data, @"Excpected stubbed data in controller.");
+}
+
+- (void)testPartiallyMockingAnObject
+{
+ ServerConnection *testConnection = [ServerConnection new];
+ id mock = OCMPartialMock(testConnection);
+ OCMStub([mock fetchData]).andReturn(@"stubbed!");
+
+ Controller *controller = [Controller newController];
+ controller.connection = testConnection;
+
+ [controller redisplay];
+
+ OCMVerify([mock fetchData]);
+ XCTAssertEqualObjects(@"stubbed!", controller.data, @"Excpected stubbed data in controller.");
+}
+
+- (void)testPartiallyMockingAnObject2
+{
+ Controller *controller = [Controller newController];
+
+ id mock = OCMPartialMock((NSObject *)controller.connection); // we know connection is derived from NSObject...
+ OCMStub([mock fetchData]).andReturn(@"stubbed!");
+
+ [controller redisplay];
+
+ OCMVerify([mock fetchData]);
+ XCTAssertEqualObjects(@"stubbed!", controller.data, @"Excpected stubbed data in controller.");
+}
+
+@end
diff --git a/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests-Bridging-Header.h b/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests-Bridging-Header.h
new file mode 100644
index 0000000..1b2cb5d
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests-Bridging-Header.h
@@ -0,0 +1,4 @@
+//
+// Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
diff --git a/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests.swift b/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests.swift
new file mode 100644
index 0000000..462c68b
--- /dev/null
+++ b/Examples/SwiftExamples/SwiftExamplesTests/SwiftExamplesTests.swift
@@ -0,0 +1,35 @@
+//
+// SwiftExamplesTests.swift
+// SwiftExamplesTests
+//
+// Created by Erik Doernenburg on 11/06/2014.
+// Copyright (c) 2014 Mulle Kybernetik. All rights reserved.
+//
+
+import XCTest
+
+class SwiftExamplesTests: XCTestCase {
+
+ override func setUp() {
+ super.setUp()
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+ }
+
+ override func tearDown() {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+ super.tearDown()
+ }
+
+ func testExample() {
+ // This is an example of a functional test case.
+ XCTAssert(true, "Pass")
+ }
+
+ func testPerformanceExample() {
+ // This is an example of a performance test case.
+ self.measureBlock() {
+ // Put the code you want to measure the time of here.
+ }
+ }
+
+}
diff --git a/Examples/SwiftExamples/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h b/Examples/SwiftExamples/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 0000000..c20a9c2
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009-2014 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
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMArg.h b/Examples/SwiftExamples/usr/include/OCMock/OCMArg.h
new file mode 100644
index 0000000..14fb161
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMArg.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2009-2014 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)isNotEqual:(id)value;
++ (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
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMConstraint.h b/Examples/SwiftExamples/usr/include/OCMock/OCMConstraint.h
new file mode 100644
index 0000000..b606a54
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMConstraint.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2007-2014 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
+
++ (id)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
+
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
++ (id)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);
+}
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))block;
+
+@end
+
+
+#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
+#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMLocation.h b/Examples/SwiftExamples/usr/include/OCMock/OCMLocation.h
new file mode 100644
index 0000000..136d9c9
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMLocation.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014 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;
+}
+
++ (id)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
+
+- (id)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);
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMMacroState.h b/Examples/SwiftExamples/usr/include/OCMock/OCMMacroState.h
new file mode 100644
index 0000000..81820b2
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMMacroState.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 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 OCMockRecorder;
+
+
+@interface OCMMacroState : NSObject
+{
+}
+
++ (void)beginStubMacro;
++ (OCMockRecorder *)endStubMacro;
+
++ (void)beginExpectMacro;
++ (OCMockRecorder *)endExpectMacro;
+
++ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
++ (void)endVerifyMacro;
+
++ (OCMMacroState *)globalState;
+
+- (void)switchToClassMethod;
+- (BOOL)hasSwitchedToClassMethod;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMock.h b/Examples/SwiftExamples/usr/include/OCMock/OCMock.h
new file mode 100644
index 0000000..eaaf51a
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMock.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2004-2014 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/OCMockRecorder.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) \
+({ \
+ [OCMMacroState beginStubMacro]; \
+ invocation; \
+ [OCMMacroState endStubMacro]; \
+})
+
+#define OCMExpect(invocation) \
+({ \
+ [OCMMacroState beginExpectMacro]; \
+ invocation; \
+ [OCMMacroState endExpectMacro]; \
+})
+
+#define ClassMethod(invocation) \
+ [[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) \
+({ \
+ [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \
+ invocation; \
+ [OCMMacroState endVerifyMacro]; \
+})
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMockObject.h b/Examples/SwiftExamples/usr/include/OCMock/OCMockObject.h
new file mode 100644
index 0000000..9ef1c78
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMockObject.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2004-2014 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 OCMockRecorder;
+@class OCMInvocationMatcher;
+
+
+@interface OCMockObject : NSProxy
+{
+ BOOL isNice;
+ BOOL expectationOrderMatters;
+ NSMutableArray *recorders;
+ NSMutableArray *expectations;
+ NSMutableArray *rejections;
+ 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;
+
+- (id)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)prepareForMockingMethod:(__unused SEL)aSelector;
+- (void)prepareForMockingClassMethod:(__unused SEL)aSelector;
+
+- (BOOL)handleInvocation:(NSInvocation *)anInvocation;
+- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation;
+- (BOOL)handleSelector:(SEL)sel;
+
+- (void)verifyInvocation:(OCMInvocationMatcher *)matcher;
+- (void)verifyInvocation:(OCMInvocationMatcher *)matcher atLocation:(OCMLocation *)location;
+
+@end
+
diff --git a/Examples/SwiftExamples/usr/include/OCMock/OCMockRecorder.h b/Examples/SwiftExamples/usr/include/OCMock/OCMockRecorder.h
new file mode 100644
index 0000000..ba066f9
--- /dev/null
+++ b/Examples/SwiftExamples/usr/include/OCMock/OCMockRecorder.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2004-2014 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 OCMockRecorder : NSProxy
+{
+ OCMockObject *mockObject;
+ OCMInvocationMatcher *invocationMatcher;
+ NSMutableArray *invocationHandlers;
+}
+
+- (id)initWithMockObject:(OCMockObject *)aMockObject;
+
+//- (void)releaseInvocation;
+
+- (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;
+
+- (id)classMethod;
+- (id)ignoringNonObjectArgs;
+
+- (OCMInvocationMatcher *)invocationMatcher;
+
+- (void)addInvocationHandler:(id)aHandler;
+- (NSArray *)invocationHandlers;
+
+@end
+
+
+@interface OCMockRecorder(Properties)
+
+#define andReturn(aValue) _andReturn(({ typeof(aValue) _v = (aValue); [NSValue value:&_v withObjCType:@encode(typeof(_v))]; }))
+@property (nonatomic, readonly) OCMockRecorder *(^ _andReturn)(NSValue *);
+
+#define andThrow(anException) _andThrow(anException)
+@property (nonatomic, readonly) OCMockRecorder *(^ _andThrow)(NSException *);
+
+#define andPost(aNotification) _andPost(aNotification)
+@property (nonatomic, readonly) OCMockRecorder *(^ _andPost)(NSNotification *);
+
+#define andCall(anObject, aSelector) _andCall(anObject, aSelector)
+@property (nonatomic, readonly) OCMockRecorder *(^ _andCall)(id, SEL);
+
+#define andDo(aBlock) _andDo(aBlock)
+@property (nonatomic, readonly) OCMockRecorder *(^ _andDo)(void (^)(NSInvocation *));
+
+#define andForwardToRealObject() _andForwardToRealObject()
+@property (nonatomic, readonly) OCMockRecorder *(^ _andForwardToRealObject)(void);
+
+@end
+
+
+
diff --git a/Examples/SwiftExamples/usr/lib/libOCMock.a b/Examples/SwiftExamples/usr/lib/libOCMock.a
new file mode 100644
index 0000000..df3c5c4
--- /dev/null
+++ b/Examples/SwiftExamples/usr/lib/libOCMock.a
Binary files differ
diff --git a/Examples/iOS5Example/iOS5Example.xcodeproj/project.pbxproj b/Examples/iOS5Example/iOS5Example.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..c87b976
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example.xcodeproj/project.pbxproj
@@ -0,0 +1,505 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 0395293E15043C7A00D25639 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395293D15043C7A00D25639 /* UIKit.framework */; };
+ 0395294015043C7A00D25639 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395293F15043C7A00D25639 /* Foundation.framework */; };
+ 0395294215043C7A00D25639 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395294115043C7A00D25639 /* CoreGraphics.framework */; };
+ 0395294815043C7A00D25639 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0395294615043C7A00D25639 /* InfoPlist.strings */; };
+ 0395294A15043C7A00D25639 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395294915043C7A00D25639 /* main.m */; };
+ 0395294E15043C7A00D25639 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395294D15043C7A00D25639 /* AppDelegate.m */; };
+ 0395295115043C7A00D25639 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0395294F15043C7A00D25639 /* MainStoryboard_iPhone.storyboard */; };
+ 0395295415043C7A00D25639 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0395295215043C7A00D25639 /* MainStoryboard_iPad.storyboard */; };
+ 0395295715043C7A00D25639 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395295615043C7A00D25639 /* MasterViewController.m */; };
+ 0395295A15043C7A00D25639 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395295915043C7A00D25639 /* DetailViewController.m */; };
+ 0395296215043C7A00D25639 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395296115043C7A00D25639 /* SenTestingKit.framework */; };
+ 0395296315043C7A00D25639 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395293D15043C7A00D25639 /* UIKit.framework */; };
+ 0395296415043C7A00D25639 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395293F15043C7A00D25639 /* Foundation.framework */; };
+ 0395296C15043C7A00D25639 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0395296A15043C7A00D25639 /* InfoPlist.strings */; };
+ 0395296F15043C7A00D25639 /* iOS5ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395296E15043C7A00D25639 /* iOS5ExampleTests.m */; };
+ 0395297915043CF000D25639 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395297815043CF000D25639 /* libOCMock.a */; };
+ 03FA415E1614FCFD00F9324F /* ProtocolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03FA415D1614FCFD00F9324F /* ProtocolTests.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 0395296515043C7A00D25639 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0395293015043C7A00D25639 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 0395293815043C7A00D25639;
+ remoteInfo = iOS5Example;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 0395293915043C7A00D25639 /* iOS5Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS5Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0395293D15043C7A00D25639 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 0395293F15043C7A00D25639 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 0395294115043C7A00D25639 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 0395294515043C7A00D25639 /* iOS5Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS5Example-Info.plist"; sourceTree = "<group>"; };
+ 0395294715043C7A00D25639 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 0395294915043C7A00D25639 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 0395294B15043C7A00D25639 /* iOS5Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS5Example-Prefix.pch"; sourceTree = "<group>"; };
+ 0395294C15043C7A00D25639 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 0395294D15043C7A00D25639 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 0395295015043C7A00D25639 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+ 0395295315043C7A00D25639 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
+ 0395295515043C7A00D25639 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
+ 0395295615043C7A00D25639 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
+ 0395295815043C7A00D25639 /* DetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
+ 0395295915043C7A00D25639 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
+ 0395296015043C7A00D25639 /* iOS5ExampleTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOS5ExampleTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0395296115043C7A00D25639 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 0395296915043C7A00D25639 /* iOS5ExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS5ExampleTests-Info.plist"; sourceTree = "<group>"; };
+ 0395296B15043C7A00D25639 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 0395296D15043C7A00D25639 /* iOS5ExampleTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = iOS5ExampleTests.h; sourceTree = "<group>"; };
+ 0395296E15043C7A00D25639 /* iOS5ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iOS5ExampleTests.m; sourceTree = "<group>"; };
+ 0395297815043CF000D25639 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOCMock.a; path = usr/lib/libOCMock.a; sourceTree = "<group>"; };
+ 03FA415C1614FCFD00F9324F /* ProtocolTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtocolTests.h; sourceTree = "<group>"; };
+ 03FA415D1614FCFD00F9324F /* ProtocolTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProtocolTests.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 0395293615043C7A00D25639 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395293E15043C7A00D25639 /* UIKit.framework in Frameworks */,
+ 0395294015043C7A00D25639 /* Foundation.framework in Frameworks */,
+ 0395294215043C7A00D25639 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0395295C15043C7A00D25639 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395297915043CF000D25639 /* libOCMock.a in Frameworks */,
+ 0395296215043C7A00D25639 /* SenTestingKit.framework in Frameworks */,
+ 0395296315043C7A00D25639 /* UIKit.framework in Frameworks */,
+ 0395296415043C7A00D25639 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0395292E15043C7A00D25639 = {
+ isa = PBXGroup;
+ children = (
+ 0395294315043C7A00D25639 /* iOS5Example */,
+ 0395296715043C7A00D25639 /* iOS5ExampleTests */,
+ 0395297A15043D8600D25639 /* Libraries */,
+ 0395293C15043C7A00D25639 /* Frameworks */,
+ 0395293A15043C7A00D25639 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 0395293A15043C7A00D25639 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 0395293915043C7A00D25639 /* iOS5Example.app */,
+ 0395296015043C7A00D25639 /* iOS5ExampleTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0395293C15043C7A00D25639 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0395293D15043C7A00D25639 /* UIKit.framework */,
+ 0395293F15043C7A00D25639 /* Foundation.framework */,
+ 0395294115043C7A00D25639 /* CoreGraphics.framework */,
+ 0395296115043C7A00D25639 /* SenTestingKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 0395294315043C7A00D25639 /* iOS5Example */ = {
+ isa = PBXGroup;
+ children = (
+ 0395294C15043C7A00D25639 /* AppDelegate.h */,
+ 0395294D15043C7A00D25639 /* AppDelegate.m */,
+ 0395294F15043C7A00D25639 /* MainStoryboard_iPhone.storyboard */,
+ 0395295215043C7A00D25639 /* MainStoryboard_iPad.storyboard */,
+ 0395295515043C7A00D25639 /* MasterViewController.h */,
+ 0395295615043C7A00D25639 /* MasterViewController.m */,
+ 0395295815043C7A00D25639 /* DetailViewController.h */,
+ 0395295915043C7A00D25639 /* DetailViewController.m */,
+ 0395294415043C7A00D25639 /* Supporting Files */,
+ );
+ path = iOS5Example;
+ sourceTree = "<group>";
+ };
+ 0395294415043C7A00D25639 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 0395294515043C7A00D25639 /* iOS5Example-Info.plist */,
+ 0395294615043C7A00D25639 /* InfoPlist.strings */,
+ 0395294915043C7A00D25639 /* main.m */,
+ 0395294B15043C7A00D25639 /* iOS5Example-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 0395296715043C7A00D25639 /* iOS5ExampleTests */ = {
+ isa = PBXGroup;
+ children = (
+ 0395296D15043C7A00D25639 /* iOS5ExampleTests.h */,
+ 0395296E15043C7A00D25639 /* iOS5ExampleTests.m */,
+ 03FA415C1614FCFD00F9324F /* ProtocolTests.h */,
+ 03FA415D1614FCFD00F9324F /* ProtocolTests.m */,
+ 0395296815043C7A00D25639 /* Supporting Files */,
+ );
+ path = iOS5ExampleTests;
+ sourceTree = "<group>";
+ };
+ 0395296815043C7A00D25639 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 0395296915043C7A00D25639 /* iOS5ExampleTests-Info.plist */,
+ 0395296A15043C7A00D25639 /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 0395297A15043D8600D25639 /* Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 0395297815043CF000D25639 /* libOCMock.a */,
+ );
+ name = Libraries;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 0395293815043C7A00D25639 /* iOS5Example */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0395297215043C7A00D25639 /* Build configuration list for PBXNativeTarget "iOS5Example" */;
+ buildPhases = (
+ 0395293515043C7A00D25639 /* Sources */,
+ 0395293615043C7A00D25639 /* Frameworks */,
+ 0395293715043C7A00D25639 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = iOS5Example;
+ productName = iOS5Example;
+ productReference = 0395293915043C7A00D25639 /* iOS5Example.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 0395295F15043C7A00D25639 /* iOS5ExampleTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0395297515043C7A00D25639 /* Build configuration list for PBXNativeTarget "iOS5ExampleTests" */;
+ buildPhases = (
+ 0395295B15043C7A00D25639 /* Sources */,
+ 0395295C15043C7A00D25639 /* Frameworks */,
+ 0395295D15043C7A00D25639 /* Resources */,
+ 0395295E15043C7A00D25639 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 0395296615043C7A00D25639 /* PBXTargetDependency */,
+ );
+ name = iOS5ExampleTests;
+ productName = iOS5ExampleTests;
+ productReference = 0395296015043C7A00D25639 /* iOS5ExampleTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0395293015043C7A00D25639 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ ORGANIZATIONNAME = ThoughtWorks;
+ };
+ buildConfigurationList = 0395293315043C7A00D25639 /* Build configuration list for PBXProject "iOS5Example" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 0395292E15043C7A00D25639;
+ productRefGroup = 0395293A15043C7A00D25639 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 0395293815043C7A00D25639 /* iOS5Example */,
+ 0395295F15043C7A00D25639 /* iOS5ExampleTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 0395293715043C7A00D25639 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395294815043C7A00D25639 /* InfoPlist.strings in Resources */,
+ 0395295115043C7A00D25639 /* MainStoryboard_iPhone.storyboard in Resources */,
+ 0395295415043C7A00D25639 /* MainStoryboard_iPad.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0395295D15043C7A00D25639 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395296C15043C7A00D25639 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 0395295E15043C7A00D25639 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 0395293515043C7A00D25639 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395294A15043C7A00D25639 /* main.m in Sources */,
+ 0395294E15043C7A00D25639 /* AppDelegate.m in Sources */,
+ 0395295715043C7A00D25639 /* MasterViewController.m in Sources */,
+ 0395295A15043C7A00D25639 /* DetailViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0395295B15043C7A00D25639 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0395296F15043C7A00D25639 /* iOS5ExampleTests.m in Sources */,
+ 03FA415E1614FCFD00F9324F /* ProtocolTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 0395296615043C7A00D25639 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 0395293815043C7A00D25639 /* iOS5Example */;
+ targetProxy = 0395296515043C7A00D25639 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 0395294615043C7A00D25639 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0395294715043C7A00D25639 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 0395294F15043C7A00D25639 /* MainStoryboard_iPhone.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0395295015043C7A00D25639 /* en */,
+ );
+ name = MainStoryboard_iPhone.storyboard;
+ sourceTree = "<group>";
+ };
+ 0395295215043C7A00D25639 /* MainStoryboard_iPad.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0395295315043C7A00D25639 /* en */,
+ );
+ name = MainStoryboard_iPad.storyboard;
+ sourceTree = "<group>";
+ };
+ 0395296A15043C7A00D25639 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0395296B15043C7A00D25639 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 0395297015043C7A00D25639 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 0395297115043C7A00D25639 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 0395297315043C7A00D25639 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS5Example/iOS5Example-Prefix.pch";
+ INFOPLIST_FILE = "iOS5Example/iOS5Example-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 0395297415043C7A00D25639 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS5Example/iOS5Example-Prefix.pch";
+ INFOPLIST_FILE = "iOS5Example/iOS5Example-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ 0395297615043C7A00D25639 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS5Example.app/iOS5Example";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS5Example/iOS5Example-Prefix.pch";
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/usr/include\"";
+ INFOPLIST_FILE = "iOS5ExampleTests/iOS5ExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/usr/lib\"",
+ );
+ OTHER_LDFLAGS = (
+ "-force_load",
+ "\"$(SRCROOT)/usr/lib/libOCMock.a\"",
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 0395297715043C7A00D25639 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS5Example.app/iOS5Example";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS5Example/iOS5Example-Prefix.pch";
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/usr/include\"";
+ INFOPLIST_FILE = "iOS5ExampleTests/iOS5ExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/usr/lib\"",
+ );
+ OTHER_LDFLAGS = (
+ "-force_load",
+ "\"$(SRCROOT)/usr/lib/libOCMock.a\"",
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 0395293315043C7A00D25639 /* Build configuration list for PBXProject "iOS5Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0395297015043C7A00D25639 /* Debug */,
+ 0395297115043C7A00D25639 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0395297215043C7A00D25639 /* Build configuration list for PBXNativeTarget "iOS5Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0395297315043C7A00D25639 /* Debug */,
+ 0395297415043C7A00D25639 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0395297515043C7A00D25639 /* Build configuration list for PBXNativeTarget "iOS5ExampleTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0395297615043C7A00D25639 /* Debug */,
+ 0395297715043C7A00D25639 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0395293015043C7A00D25639 /* Project object */;
+}
diff --git a/Examples/iOS5Example/iOS5Example/AppDelegate.h b/Examples/iOS5Example/iOS5Example/AppDelegate.h
new file mode 100644
index 0000000..3d820df
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/AppDelegate.h
@@ -0,0 +1,12 @@
+//
+// AppDelegate.h
+// iOS5Example
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/AppDelegate.m b/Examples/iOS5Example/iOS5Example/AppDelegate.m
new file mode 100644
index 0000000..74663ab
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/AppDelegate.m
@@ -0,0 +1,62 @@
+//
+// AppDelegate.m
+// iOS5Example
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
+ UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
+ splitViewController.delegate = (id)navigationController.topViewController;
+ }
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/DetailViewController.h b/Examples/iOS5Example/iOS5Example/DetailViewController.h
new file mode 100644
index 0000000..c313806
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/DetailViewController.h
@@ -0,0 +1,14 @@
+//
+// DetailViewController.h
+// iOS5Example
+//
+
+#import <UIKit/UIKit.h>
+
+@interface DetailViewController : UIViewController <UISplitViewControllerDelegate>
+
+@property (strong, nonatomic) id detailItem;
+
+@property (strong, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/DetailViewController.m b/Examples/iOS5Example/iOS5Example/DetailViewController.m
new file mode 100644
index 0000000..606f9dc
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/DetailViewController.m
@@ -0,0 +1,112 @@
+//
+// DetailViewController.m
+// iOS5Example
+//
+
+#import "DetailViewController.h"
+
+@interface DetailViewController ()
+@property (strong, nonatomic) UIPopoverController *masterPopoverController;
+- (void)configureView;
+@end
+
+@implementation DetailViewController
+
+@synthesize detailItem = _detailItem;
+@synthesize detailDescriptionLabel = _detailDescriptionLabel;
+@synthesize masterPopoverController = _masterPopoverController;
+
+#pragma mark - Managing the detail item
+
+- (void)setDetailItem:(id)newDetailItem
+{
+ if (_detailItem != newDetailItem) {
+ _detailItem = newDetailItem;
+
+ // Update the view.
+ [self configureView];
+ }
+
+ if (self.masterPopoverController != nil) {
+ [self.masterPopoverController dismissPopoverAnimated:YES];
+ }
+}
+
+- (void)configureView
+{
+ // Update the user interface for the detail item.
+
+ if (self.detailItem) {
+ self.detailDescriptionLabel.text = [self.detailItem description];
+ }
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+ [self configureView];
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+ [super viewDidAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+ [super viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated
+{
+ [super viewDidDisappear:animated];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+ } else {
+ return YES;
+ }
+}
+
+#pragma mark - Split view
+
+- (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController
+{
+ barButtonItem.title = NSLocalizedString(@"Master", @"Master");
+ [self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
+ self.masterPopoverController = popoverController;
+}
+
+- (void)splitViewController:(UISplitViewController *)splitController willShowViewController:(UIViewController *)viewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
+{
+ // Called when the view is shown again in the split view, invalidating the button and popover controller.
+ [self.navigationItem setLeftBarButtonItem:nil animated:YES];
+ self.masterPopoverController = nil;
+}
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/MasterViewController.h b/Examples/iOS5Example/iOS5Example/MasterViewController.h
new file mode 100644
index 0000000..44e95c6
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/MasterViewController.h
@@ -0,0 +1,14 @@
+//
+// MasterViewController.h
+// iOS5Example
+//
+
+#import <UIKit/UIKit.h>
+
+@class DetailViewController;
+
+@interface MasterViewController : UITableViewController
+
+@property (strong, nonatomic) DetailViewController *detailViewController;
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/MasterViewController.m b/Examples/iOS5Example/iOS5Example/MasterViewController.m
new file mode 100644
index 0000000..0a9934b
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/MasterViewController.m
@@ -0,0 +1,116 @@
+//
+// MasterViewController.m
+// iOS5Example
+//
+
+#import "MasterViewController.h"
+
+#import "DetailViewController.h"
+
+@implementation MasterViewController
+
+@synthesize detailViewController = _detailViewController;
+
+- (void)awakeFromNib
+{
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ self.clearsSelectionOnViewWillAppear = NO;
+ self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
+ }
+ [super awakeFromNib];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+ self.detailViewController = (DetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController];
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UITableViewScrollPositionMiddle];
+ }
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+ [super viewDidAppear:animated];
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+ [super viewWillDisappear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated
+{
+ [super viewDidDisappear:animated];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+ } else {
+ return YES;
+ }
+}
+
+/*
+// Override to support conditional editing of the table view.
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ // Return NO if you do not want the specified item to be editable.
+ return YES;
+}
+*/
+
+
+// Override to support editing the table view.
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if (editingStyle == UITableViewCellEditingStyleDelete) {
+ // Delete the row from the data source.
+ [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
+ }
+}
+
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
+{
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ // Return NO if you do not want the item to be re-orderable.
+ return YES;
+}
+*/
+
+@end
diff --git a/Examples/iOS5Example/iOS5Example/en.lproj/InfoPlist.strings b/Examples/iOS5Example/iOS5Example/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPad.storyboard b/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPad.storyboard
new file mode 100644
index 0000000..5d5deaf
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPad.storyboard
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1926" systemVersion="11C36" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="5">
+ <dependencies>
+ <development defaultVersion="4200" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="922"/>
+ </dependencies>
+ <scenes>
+ <scene sceneID="14">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="13" sceneMemberID="firstResponder"/>
+ <navigationController id="3" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="6">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="19" kind="relationship" relationship="rootViewController" id="25"/>
+ </connections>
+ </navigationController>
+ </objects>
+ <point key="canvasLocation" x="432" y="-178"/>
+ </scene>
+ <scene sceneID="16">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="15" sceneMemberID="firstResponder"/>
+ <viewController storyboardIdentifier="" title="Detail" id="4" customClass="DetailViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="26">
+ <rect key="frame" x="0.0" y="64" width="703" height="704"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="27">
+ <rect key="frame" x="20" y="341" width="663" height="21"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" type="system" size="system"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ </view>
+ <toolbarItems/>
+ <navigationItem key="navigationItem" title="Detail" id="52"/>
+ <connections>
+ <outlet property="detailDescriptionLabel" destination="27" id="29"/>
+ </connections>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="432" y="686"/>
+ </scene>
+ <scene sceneID="18">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="17" sceneMemberID="firstResponder"/>
+ <splitViewController id="5" sceneMemberID="viewController">
+ <toolbarItems/>
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="blackTranslucent"/>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ <connections>
+ <segue destination="3" kind="relationship" relationship="masterViewController" id="9"/>
+ <segue destination="42" kind="relationship" relationship="detailViewController" id="53"/>
+ </connections>
+ </splitViewController>
+ </objects>
+ <point key="canvasLocation" x="-711" y="-178"/>
+ </scene>
+ <scene sceneID="24">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/>
+ <tableViewController storyboardIdentifier="" title="Master" clearsSelectionOnViewWillAppear="NO" id="19" customClass="MasterViewController" sceneMemberID="viewController">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="20">
+ <rect key="frame" x="0.0" y="64" width="320" height="704"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ <sections>
+ <tableViewSection id="33">
+ <cells>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="z13-93-fbN" style="IBUITableViewCellStyleDefault" id="34">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+ <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="z13-93-fbN">
+ <rect key="frame" x="10" y="0.0" width="748" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </view>
+ </tableViewCell>
+ </cells>
+ </tableViewSection>
+ </sections>
+ <connections>
+ <outlet property="dataSource" destination="19" id="22"/>
+ <outlet property="delegate" destination="19" id="21"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" title="Master" id="39"/>
+ </tableViewController>
+ </objects>
+ <point key="canvasLocation" x="843" y="-179"/>
+ </scene>
+ <scene sceneID="50">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="49" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <navigationController id="42" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="43">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="4" kind="relationship" relationship="rootViewController" id="51"/>
+ </connections>
+ </navigationController>
+ </objects>
+ <point key="canvasLocation" x="-390" y="686"/>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
\ No newline at end of file
diff --git a/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPhone.storyboard b/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPhone.storyboard
new file mode 100644
index 0000000..fa1b905
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/en.lproj/MainStoryboard_iPhone.storyboard
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1926" systemVersion="11C36" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="3">
+ <dependencies>
+ <development defaultVersion="4200" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="922"/>
+ </dependencies>
+ <scenes>
+ <scene sceneID="11">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="10" sceneMemberID="firstResponder"/>
+ <navigationController id="3" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="4">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="12" kind="relationship" relationship="rootViewController" id="19"/>
+ </connections>
+ </navigationController>
+ </objects>
+ <point key="canvasLocation" x="-1" y="64"/>
+ </scene>
+ <scene sceneID="18">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="17" sceneMemberID="firstResponder"/>
+ <tableViewController storyboardIdentifier="" title="Master" id="12" customClass="MasterViewController" sceneMemberID="viewController">
+ <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="13">
+ <rect key="frame" x="0.0" y="64" width="320" height="416"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <sections>
+ <tableViewSection id="29">
+ <cells>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="CZe-l0-5K6" style="IBUITableViewCellStyleDefault" id="30">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+ <rect key="frame" x="0.0" y="0.0" width="300" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CZe-l0-5K6">
+ <rect key="frame" x="10" y="0.0" width="280" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </view>
+ <connections>
+ <segue destination="21" kind="push" id="33"/>
+ </connections>
+ </tableViewCell>
+ </cells>
+ </tableViewSection>
+ </sections>
+ <connections>
+ <outlet property="dataSource" destination="12" id="16"/>
+ <outlet property="delegate" destination="12" id="15"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" title="Master" id="35"/>
+ </tableViewController>
+ </objects>
+ <point key="canvasLocation" x="455" y="64"/>
+ </scene>
+ <scene sceneID="24">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/>
+ <viewController storyboardIdentifier="" title="Detail" id="21" customClass="DetailViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="22">
+ <rect key="frame" x="0.0" y="64" width="320" height="416"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="27">
+ <rect key="frame" x="20" y="199" width="280" height="18"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" type="system" size="system"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" title="Detail" id="26"/>
+ <connections>
+ <outlet property="detailDescriptionLabel" destination="27" id="28"/>
+ </connections>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="924" y="64"/>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
\ No newline at end of file
diff --git a/Examples/iOS5Example/iOS5Example/iOS5Example-Info.plist b/Examples/iOS5Example/iOS5Example/iOS5Example-Info.plist
new file mode 100644
index 0000000..7f6794d
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/iOS5Example-Info.plist
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.ocmock.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard_iPhone</string>
+ <key>UIMainStoryboardFile~ipad</key>
+ <string>MainStoryboard_iPad</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/Examples/iOS5Example/iOS5Example/iOS5Example-Prefix.pch b/Examples/iOS5Example/iOS5Example/iOS5Example-Prefix.pch
new file mode 100644
index 0000000..a52d8b5
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/iOS5Example-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'iOS5Example' target in the 'iOS5Example' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Examples/iOS5Example/iOS5Example/main.m b/Examples/iOS5Example/iOS5Example/main.m
new file mode 100644
index 0000000..bf2dfbd
--- /dev/null
+++ b/Examples/iOS5Example/iOS5Example/main.m
@@ -0,0 +1,15 @@
+//
+// main.m
+// iOS5Example
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.h b/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.h
new file mode 100644
index 0000000..3d4b89f
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.h
@@ -0,0 +1,10 @@
+//
+// ProtocolTests.h
+// iOS5Example
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface ProtocolTests : SenTestCase
+
+@end
diff --git a/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.m b/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.m
new file mode 100644
index 0000000..4a3dd1d
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/ProtocolTests.m
@@ -0,0 +1,56 @@
+//
+// ProtocolTests.m
+// iOS5Example
+//
+
+#import <OCMock/OCMock.h>
+#import "ProtocolTests.h"
+
+
+@protocol AuthenticationServiceProtocol
+
+- (void)loginWithEmail:(NSString *)email andPassword:(NSString *)password;
+
+@end
+
+@interface Foo : NSObject
+{
+ id<AuthenticationServiceProtocol> authService;
+}
+
+- (id)initWithAuthenticationService:(id<AuthenticationServiceProtocol>)anAuthService;
+- (void)doStuff;
+
+@end
+
+@implementation Foo
+
+- (id)initWithAuthenticationService:(id<AuthenticationServiceProtocol>)anAuthService
+{
+ self = [super init];
+ authService = anAuthService;
+ return self;
+}
+
+- (void)doStuff
+{
+ [authService loginWithEmail:@"x" andPassword:@"y"];
+}
+
+@end
+
+@implementation ProtocolTests
+
+- (void)testTheProtocol
+{
+ id authService = [OCMockObject mockForProtocol:@protocol(AuthenticationServiceProtocol)];
+ id foo = [[Foo alloc] initWithAuthenticationService:authService];
+
+ [[authService expect] loginWithEmail:[OCMArg any] andPassword:[OCMArg any]];
+
+ [foo doStuff];
+
+ [authService verify];
+}
+
+@end
diff --git a/Examples/iOS5Example/iOS5ExampleTests/en.lproj/InfoPlist.strings b/Examples/iOS5Example/iOS5ExampleTests/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests-Info.plist b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests-Info.plist
new file mode 100644
index 0000000..b066986
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.ocmock.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.h b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.h
new file mode 100644
index 0000000..4012ffd
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.h
@@ -0,0 +1,10 @@
+//
+// iOS5ExampleTests.h
+// iOS5ExampleTests
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface iOS5ExampleTests : SenTestCase
+
+@end
diff --git a/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.m b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.m
new file mode 100644
index 0000000..eeab0ec
--- /dev/null
+++ b/Examples/iOS5Example/iOS5ExampleTests/iOS5ExampleTests.m
@@ -0,0 +1,47 @@
+//
+// iOS5ExampleTests.m
+// iOS5ExampleTests
+//
+
+#import <OCMock/OCMock.h>
+#import "MasterViewController.h"
+#import "iOS5ExampleTests.h"
+
+@implementation iOS5ExampleTests
+
+- (void)setUp
+{
+ [super setUp];
+
+ // Set-up code here.
+}
+
+- (void)tearDown
+{
+ // Tear-down code here.
+
+ [super tearDown];
+}
+
+- (void)testMasterViewControllerDeletesItemsFromTableView
+{
+ // Test set-up
+
+ MasterViewController *controller = [[MasterViewController alloc] init];
+ NSIndexPath *dummyIndexPath = [NSIndexPath indexPathWithIndex:3];
+ id tableViewMock = [OCMockObject mockForClass:[UITableView class]];
+ [[tableViewMock expect] deleteRowsAtIndexPaths:[NSArray arrayWithObject:dummyIndexPath] withRowAnimation:UITableViewRowAnimationFade];
+
+ // Invoke functionality to be tested
+ // If you want to see the test fail you can, for example, change the editing style to UITableViewCellEditingStyleNone. In
+ // that case the method in the controller does not make a call to the table view and the mock will raise an exception when
+ // verify is called further down.
+
+ [controller tableView:tableViewMock commitEditingStyle:UITableViewCellEditingStyleDelete forRowAtIndexPath:dummyIndexPath];
+
+ // Verify that expectations were met
+
+ [tableViewMock verify];
+}
+
+@end
diff --git a/Examples/iOS5Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h b/Examples/iOS5Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 0000000..ab4832b
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -0,0 +1,15 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@class OCMockObserver;
+
+
+@interface NSNotificationCenter(OCMAdditions)
+
+- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender;
+
+@end
diff --git a/Examples/iOS5Example/usr/include/OCMock/OCMArg.h b/Examples/iOS5Example/usr/include/OCMock/OCMArg.h
new file mode 100644
index 0000000..669c094
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/OCMArg.h
@@ -0,0 +1,33 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMArg : NSObject
+
+// constraining arguments
+
++ (id)any;
++ (void *)anyPointer;
++ (id)isNil;
++ (id)isNotNil;
++ (id)isNotEqual:(id)value;
++ (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
++ (id)checkWithBlock:(BOOL (^)(id))block;
+#endif
+
+// manipulating arguments
+
++ (id *)setTo:(id)value;
+
+// internal use only
+
++ (id)resolveSpecialValues:(NSValue *)value;
+
+@end
+
+#define OCMOCK_ANY [OCMArg any]
+#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
diff --git a/Examples/iOS5Example/usr/include/OCMock/OCMConstraint.h b/Examples/iOS5Example/usr/include/OCMock/OCMConstraint.h
new file mode 100644
index 0000000..3ae1264
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/OCMConstraint.h
@@ -0,0 +1,64 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+
+@interface OCMConstraint : NSObject
+
++ (id)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
+
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
++ (id)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
+
+#if NS_BLOCKS_AVAILABLE
+
+@interface OCMBlockConstraint : OCMConstraint
+{
+ BOOL (^block)(id);
+}
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))block;
+
+@end
+
+#endif
+
+
+#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
+#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/Examples/iOS5Example/usr/include/OCMock/OCMock.h b/Examples/iOS5Example/usr/include/OCMock/OCMock.h
new file mode 100644
index 0000000..e18de58
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/OCMock.h
@@ -0,0 +1,10 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <OCMock/OCMockObject.h>
+#import <OCMock/OCMockRecorder.h>
+#import <OCMock/OCMConstraint.h>
+#import <OCMock/OCMArg.h>
+#import <OCMock/NSNotificationCenter+OCMAdditions.h>
diff --git a/Examples/iOS5Example/usr/include/OCMock/OCMockObject.h b/Examples/iOS5Example/usr/include/OCMock/OCMockObject.h
new file mode 100644
index 0000000..ebd2ba3
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/OCMockObject.h
@@ -0,0 +1,43 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMockObject : NSProxy
+{
+ BOOL isNice;
+ BOOL expectationOrderMatters;
+ NSMutableArray *recorders;
+ NSMutableArray *expectations;
+ NSMutableArray *rejections;
+ NSMutableArray *exceptions;
+}
+
++ (id)mockForClass:(Class)aClass;
++ (id)mockForProtocol:(Protocol *)aProtocol;
++ (id)partialMockForObject:(NSObject *)anObject;
+
++ (id)niceMockForClass:(Class)aClass;
++ (id)niceMockForProtocol:(Protocol *)aProtocol;
+
++ (id)observerMock;
+
+- (id)init;
+
+- (void)setExpectationOrderMatters:(BOOL)flag;
+
+- (id)stub;
+- (id)expect;
+- (id)reject;
+
+- (void)verify;
+
+// internal use only
+
+- (id)getNewRecorder;
+- (BOOL)handleInvocation:(NSInvocation *)anInvocation;
+- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Examples/iOS5Example/usr/include/OCMock/OCMockRecorder.h b/Examples/iOS5Example/usr/include/OCMock/OCMockRecorder.h
new file mode 100644
index 0000000..b11a253
--- /dev/null
+++ b/Examples/iOS5Example/usr/include/OCMock/OCMockRecorder.h
@@ -0,0 +1,32 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMockRecorder : NSProxy
+{
+ id signatureResolver;
+ NSInvocation *recordedInvocation;
+ NSMutableArray *invocationHandlers;
+}
+
+- (id)initWithSignatureResolver:(id)anObject;
+
+- (BOOL)matchesInvocation:(NSInvocation *)anInvocation;
+- (void)releaseInvocation;
+
+- (id)andReturn:(id)anObject;
+- (id)andReturnValue:(NSValue *)aValue;
+- (id)andThrow:(NSException *)anException;
+- (id)andPost:(NSNotification *)aNotification;
+- (id)andCall:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
+- (id)andDo:(void (^)(NSInvocation *))block;
+#endif
+- (id)andForwardToRealObject;
+
+- (NSArray *)invocationHandlers;
+
+@end
diff --git a/Examples/iOS5Example/usr/lib/libOCMock.a b/Examples/iOS5Example/usr/lib/libOCMock.a
new file mode 100644
index 0000000..dae5ac1
--- /dev/null
+++ b/Examples/iOS5Example/usr/lib/libOCMock.a
Binary files differ
diff --git a/Examples/iOS7Example/iOS7Example.xcodeproj/project.pbxproj b/Examples/iOS7Example/iOS7Example.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..a1ae51d
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example.xcodeproj/project.pbxproj
@@ -0,0 +1,533 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 03C231581946D3CC00F90643 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C231571946D3CC00F90643 /* Foundation.framework */; };
+ 03C2315C1946D3CC00F90643 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C2315B1946D3CC00F90643 /* UIKit.framework */; };
+ 03C231621946D3CC00F90643 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03C231601946D3CC00F90643 /* InfoPlist.strings */; };
+ 03C231641946D3CC00F90643 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C231631946D3CC00F90643 /* main.m */; };
+ 03C231681946D3CC00F90643 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C231671946D3CC00F90643 /* AppDelegate.m */; };
+ 03C2316B1946D3CC00F90643 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03C231691946D3CC00F90643 /* Main_iPhone.storyboard */; };
+ 03C2316E1946D3CC00F90643 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03C2316C1946D3CC00F90643 /* Main_iPad.storyboard */; };
+ 03C231711946D3CC00F90643 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C231701946D3CC00F90643 /* MasterViewController.m */; };
+ 03C231741946D3CC00F90643 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C231731946D3CC00F90643 /* DetailViewController.m */; };
+ 03C231761946D3CC00F90643 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03C231751946D3CC00F90643 /* Images.xcassets */; };
+ 03C2317D1946D3CC00F90643 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C2317C1946D3CC00F90643 /* XCTest.framework */; };
+ 03C2317E1946D3CC00F90643 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C231571946D3CC00F90643 /* Foundation.framework */; };
+ 03C2317F1946D3CC00F90643 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C2315B1946D3CC00F90643 /* UIKit.framework */; };
+ 03C231871946D3CC00F90643 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03C231851946D3CC00F90643 /* InfoPlist.strings */; };
+ 03C231891946D3CC00F90643 /* iOS7ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C231881946D3CC00F90643 /* iOS7ExampleTests.m */; };
+ 03C231951946D56100F90643 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C231921946D45200F90643 /* libOCMock.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 03C231801946D3CC00F90643 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 03C2314C1946D3CC00F90643 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03C231531946D3CC00F90643;
+ remoteInfo = iOS7Example;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 03C231541946D3CC00F90643 /* iOS7Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS7Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03C231571946D3CC00F90643 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 03C2315B1946D3CC00F90643 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 03C2315F1946D3CC00F90643 /* iOS7Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS7Example-Info.plist"; sourceTree = "<group>"; };
+ 03C231611946D3CC00F90643 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 03C231631946D3CC00F90643 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 03C231651946D3CC00F90643 /* iOS7Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS7Example-Prefix.pch"; sourceTree = "<group>"; };
+ 03C231661946D3CC00F90643 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 03C231671946D3CC00F90643 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 03C2316A1946D3CC00F90643 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
+ 03C2316D1946D3CC00F90643 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
+ 03C2316F1946D3CC00F90643 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
+ 03C231701946D3CC00F90643 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
+ 03C231721946D3CC00F90643 /* DetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
+ 03C231731946D3CC00F90643 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
+ 03C231751946D3CC00F90643 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+ 03C2317B1946D3CC00F90643 /* iOS7ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOS7ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03C2317C1946D3CC00F90643 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+ 03C231841946D3CC00F90643 /* iOS7ExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS7ExampleTests-Info.plist"; sourceTree = "<group>"; };
+ 03C231861946D3CC00F90643 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 03C231881946D3CC00F90643 /* iOS7ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iOS7ExampleTests.m; sourceTree = "<group>"; };
+ 03C231921946D45200F90643 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOCMock.a; path = usr/lib/libOCMock.a; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 03C231511946D3CC00F90643 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C2315C1946D3CC00F90643 /* UIKit.framework in Frameworks */,
+ 03C231581946D3CC00F90643 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03C231781946D3CC00F90643 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C231951946D56100F90643 /* libOCMock.a in Frameworks */,
+ 03C2317D1946D3CC00F90643 /* XCTest.framework in Frameworks */,
+ 03C2317F1946D3CC00F90643 /* UIKit.framework in Frameworks */,
+ 03C2317E1946D3CC00F90643 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 03C2314B1946D3CC00F90643 = {
+ isa = PBXGroup;
+ children = (
+ 03C2315D1946D3CC00F90643 /* iOS7Example */,
+ 03C231821946D3CC00F90643 /* iOS7ExampleTests */,
+ 03C231561946D3CC00F90643 /* Frameworks */,
+ 03C231551946D3CC00F90643 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 03C231551946D3CC00F90643 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 03C231541946D3CC00F90643 /* iOS7Example.app */,
+ 03C2317B1946D3CC00F90643 /* iOS7ExampleTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 03C231561946D3CC00F90643 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 03C231921946D45200F90643 /* libOCMock.a */,
+ 03C231571946D3CC00F90643 /* Foundation.framework */,
+ 03C2315B1946D3CC00F90643 /* UIKit.framework */,
+ 03C2317C1946D3CC00F90643 /* XCTest.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 03C2315D1946D3CC00F90643 /* iOS7Example */ = {
+ isa = PBXGroup;
+ children = (
+ 03C231661946D3CC00F90643 /* AppDelegate.h */,
+ 03C231671946D3CC00F90643 /* AppDelegate.m */,
+ 03C231691946D3CC00F90643 /* Main_iPhone.storyboard */,
+ 03C2316C1946D3CC00F90643 /* Main_iPad.storyboard */,
+ 03C2316F1946D3CC00F90643 /* MasterViewController.h */,
+ 03C231701946D3CC00F90643 /* MasterViewController.m */,
+ 03C231721946D3CC00F90643 /* DetailViewController.h */,
+ 03C231731946D3CC00F90643 /* DetailViewController.m */,
+ 03C231751946D3CC00F90643 /* Images.xcassets */,
+ 03C2315E1946D3CC00F90643 /* Supporting Files */,
+ );
+ path = iOS7Example;
+ sourceTree = "<group>";
+ };
+ 03C2315E1946D3CC00F90643 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 03C2315F1946D3CC00F90643 /* iOS7Example-Info.plist */,
+ 03C231601946D3CC00F90643 /* InfoPlist.strings */,
+ 03C231631946D3CC00F90643 /* main.m */,
+ 03C231651946D3CC00F90643 /* iOS7Example-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 03C231821946D3CC00F90643 /* iOS7ExampleTests */ = {
+ isa = PBXGroup;
+ children = (
+ 03C231881946D3CC00F90643 /* iOS7ExampleTests.m */,
+ 03C231831946D3CC00F90643 /* Supporting Files */,
+ );
+ path = iOS7ExampleTests;
+ sourceTree = "<group>";
+ };
+ 03C231831946D3CC00F90643 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 03C231841946D3CC00F90643 /* iOS7ExampleTests-Info.plist */,
+ 03C231851946D3CC00F90643 /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 03C231531946D3CC00F90643 /* iOS7Example */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03C2318C1946D3CC00F90643 /* Build configuration list for PBXNativeTarget "iOS7Example" */;
+ buildPhases = (
+ 03C231501946D3CC00F90643 /* Sources */,
+ 03C231511946D3CC00F90643 /* Frameworks */,
+ 03C231521946D3CC00F90643 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = iOS7Example;
+ productName = iOS7Example;
+ productReference = 03C231541946D3CC00F90643 /* iOS7Example.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 03C2317A1946D3CC00F90643 /* iOS7ExampleTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03C2318F1946D3CC00F90643 /* Build configuration list for PBXNativeTarget "iOS7ExampleTests" */;
+ buildPhases = (
+ 03C231771946D3CC00F90643 /* Sources */,
+ 03C231781946D3CC00F90643 /* Frameworks */,
+ 03C231791946D3CC00F90643 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 03C231811946D3CC00F90643 /* PBXTargetDependency */,
+ );
+ name = iOS7ExampleTests;
+ productName = iOS7ExampleTests;
+ productReference = 03C2317B1946D3CC00F90643 /* iOS7ExampleTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 03C2314C1946D3CC00F90643 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0510;
+ ORGANIZATIONNAME = "Erik Doernenburg";
+ TargetAttributes = {
+ 03C2317A1946D3CC00F90643 = {
+ TestTargetID = 03C231531946D3CC00F90643;
+ };
+ };
+ };
+ buildConfigurationList = 03C2314F1946D3CC00F90643 /* Build configuration list for PBXProject "iOS7Example" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 03C2314B1946D3CC00F90643;
+ productRefGroup = 03C231551946D3CC00F90643 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 03C231531946D3CC00F90643 /* iOS7Example */,
+ 03C2317A1946D3CC00F90643 /* iOS7ExampleTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 03C231521946D3CC00F90643 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C2316E1946D3CC00F90643 /* Main_iPad.storyboard in Resources */,
+ 03C231761946D3CC00F90643 /* Images.xcassets in Resources */,
+ 03C2316B1946D3CC00F90643 /* Main_iPhone.storyboard in Resources */,
+ 03C231621946D3CC00F90643 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03C231791946D3CC00F90643 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C231871946D3CC00F90643 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 03C231501946D3CC00F90643 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C231681946D3CC00F90643 /* AppDelegate.m in Sources */,
+ 03C231711946D3CC00F90643 /* MasterViewController.m in Sources */,
+ 03C231641946D3CC00F90643 /* main.m in Sources */,
+ 03C231741946D3CC00F90643 /* DetailViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03C231771946D3CC00F90643 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C231891946D3CC00F90643 /* iOS7ExampleTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 03C231811946D3CC00F90643 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03C231531946D3CC00F90643 /* iOS7Example */;
+ targetProxy = 03C231801946D3CC00F90643 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 03C231601946D3CC00F90643 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03C231611946D3CC00F90643 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 03C231691946D3CC00F90643 /* Main_iPhone.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03C2316A1946D3CC00F90643 /* Base */,
+ );
+ name = Main_iPhone.storyboard;
+ sourceTree = "<group>";
+ };
+ 03C2316C1946D3CC00F90643 /* Main_iPad.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03C2316D1946D3CC00F90643 /* Base */,
+ );
+ name = Main_iPad.storyboard;
+ sourceTree = "<group>";
+ };
+ 03C231851946D3CC00F90643 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03C231861946D3CC00F90643 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 03C2318A1946D3CC00F90643 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 7.1;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 03C2318B1946D3CC00F90643 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 7.1;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 03C2318D1946D3CC00F90643 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS7Example/iOS7Example-Prefix.pch";
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ );
+ INFOPLIST_FILE = "iOS7Example/iOS7Example-Info.plist";
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 03C2318E1946D3CC00F90643 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS7Example/iOS7Example-Prefix.pch";
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ );
+ INFOPLIST_FILE = "iOS7Example/iOS7Example-Info.plist";
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ 03C231901946D3CC00F90643 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS7Example.app/iOS7Example";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS7Example/iOS7Example-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ "$(PROJECT_DIR)/usr/include",
+ );
+ INFOPLIST_FILE = "iOS7ExampleTests/iOS7ExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/usr/lib",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ XCTest,
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Debug;
+ };
+ 03C231911946D3CC00F90643 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS7Example.app/iOS7Example";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "iOS7Example/iOS7Example-Prefix.pch";
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+ "$(PROJECT_DIR)/usr/include",
+ );
+ INFOPLIST_FILE = "iOS7ExampleTests/iOS7ExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/usr/lib",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ XCTest,
+ "-ObjC",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 03C2314F1946D3CC00F90643 /* Build configuration list for PBXProject "iOS7Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03C2318A1946D3CC00F90643 /* Debug */,
+ 03C2318B1946D3CC00F90643 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03C2318C1946D3CC00F90643 /* Build configuration list for PBXNativeTarget "iOS7Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03C2318D1946D3CC00F90643 /* Debug */,
+ 03C2318E1946D3CC00F90643 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03C2318F1946D3CC00F90643 /* Build configuration list for PBXNativeTarget "iOS7ExampleTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03C231901946D3CC00F90643 /* Debug */,
+ 03C231911946D3CC00F90643 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 03C2314C1946D3CC00F90643 /* Project object */;
+}
diff --git a/Examples/iOS7Example/iOS7Example/AppDelegate.h b/Examples/iOS7Example/iOS7Example/AppDelegate.h
new file mode 100644
index 0000000..dda1da6
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/AppDelegate.h
@@ -0,0 +1,15 @@
+//
+// AppDelegate.h
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
diff --git a/Examples/iOS7Example/iOS7Example/AppDelegate.m b/Examples/iOS7Example/iOS7Example/AppDelegate.m
new file mode 100644
index 0000000..c37cf65
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/AppDelegate.m
@@ -0,0 +1,51 @@
+//
+// AppDelegate.m
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
+ UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
+ splitViewController.delegate = (id)navigationController.topViewController;
+ }
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
diff --git a/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPad.storyboard b/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPad.storyboard
new file mode 100644
index 0000000..abb693c
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPad.storyboard
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5023" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="H1p-Uh-vWS">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
+ </dependencies>
+ <scenes>
+ <!--Navigation Controller-->
+ <scene sceneID="pY4-Hu-kfo">
+ <objects>
+ <navigationController id="RMx-3f-FxP" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="Pmd-2v-anx">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="7bK-jq-Zjz" kind="relationship" relationship="rootViewController" id="tsl-Nk-0bq"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="8fS-aE-onr" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="448" y="-630"/>
+ </scene>
+ <!--class Prefix:identifier Detail View Controller - Detail-->
+ <scene sceneID="yUG-lL-AsK">
+ <objects>
+ <viewController title="Detail" id="JEX-9P-axG" customClass="DetailViewController" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="SYR-Wa-9uf"/>
+ <viewControllerLayoutGuide type="bottom" id="GAO-Cl-Wes"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="svH-Pt-448">
+ <rect key="frame" x="0.0" y="0.0" width="703" height="768"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="0XM-y9-sOw">
+ <rect key="frame" x="20" y="376" width="663" height="17"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" type="system" size="system"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstItem="0XM-y9-sOw" firstAttribute="leading" secondItem="svH-Pt-448" secondAttribute="leading" constant="20" symbolic="YES" id="Tsc-yG-G1q"/>
+ <constraint firstItem="0XM-y9-sOw" firstAttribute="centerY" secondItem="svH-Pt-448" secondAttribute="centerY" id="jWN-iV-94e"/>
+ <constraint firstAttribute="trailing" secondItem="0XM-y9-sOw" secondAttribute="trailing" constant="20" symbolic="YES" id="tHV-ZD-HQj"/>
+ </constraints>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ </view>
+ <toolbarItems/>
+ <navigationItem key="navigationItem" title="Detail" id="mOI-FS-AaM"/>
+ <connections>
+ <outlet property="detailDescriptionLabel" destination="0XM-y9-sOw" id="deQ-Na-JPF"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="FJe-Yq-33r" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="448" y="248"/>
+ </scene>
+ <!--Split View Controller-->
+ <scene sceneID="Nki-YV-4Qg">
+ <objects>
+ <splitViewController id="H1p-Uh-vWS" sceneMemberID="viewController">
+ <toolbarItems/>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ <connections>
+ <segue destination="RMx-3f-FxP" kind="relationship" relationship="masterViewController" id="BlO-5A-QYV"/>
+ <segue destination="vC3-pB-5Vb" kind="relationship" relationship="detailViewController" id="Tll-UG-LXB"/>
+ </connections>
+ </splitViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="cZU-Oi-B1e" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-687" y="-630"/>
+ </scene>
+ <!--class Prefix:identifier Master View Controller - Master-->
+ <scene sceneID="smW-Zh-WAh">
+ <objects>
+ <tableViewController title="Master" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterViewController" sceneMemberID="viewController">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="r7i-6Z-zg0">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="768"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
+ <prototypes>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
+ <rect key="frame" x="0.0" y="86" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="37f-cq-3Eg">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
+ <rect key="frame" x="15" y="0.0" width="290" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ </tableViewCellContentView>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </tableViewCell>
+ </prototypes>
+ <sections/>
+ <connections>
+ <outlet property="dataSource" destination="7bK-jq-Zjz" id="Gho-Na-rnu"/>
+ <outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" title="Master" id="Zdf-7t-Un8"/>
+ </tableViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="859" y="-631"/>
+ </scene>
+ <!--Navigation Controller-->
+ <scene sceneID="r7l-gg-dq7">
+ <objects>
+ <navigationController id="vC3-pB-5Vb" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="DjV-YW-jjY">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="JEX-9P-axG" kind="relationship" relationship="rootViewController" id="GKi-kA-LjT"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="SLD-UC-DBI" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-366" y="248"/>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
diff --git a/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPhone.storyboard b/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPhone.storyboard
new file mode 100644
index 0000000..fa901eb
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/Base.lproj/Main_iPhone.storyboard
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5023" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
+ </dependencies>
+ <scenes>
+ <!--Navigation Controller-->
+ <scene sceneID="cUi-kZ-frf">
+ <objects>
+ <navigationController id="rS3-R9-Ivy" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="yXu-0R-QUA">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="pGg-6v-bdr" kind="relationship" relationship="rootViewController" id="RxB-wf-QIq"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="eq9-QA-ai8" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-1" y="64"/>
+ </scene>
+ <!--class Prefix:identifier Master View Controller - Master-->
+ <scene sceneID="VgW-fR-Quf">
+ <objects>
+ <tableViewController title="Master" id="pGg-6v-bdr" customClass="MasterViewController" sceneMemberID="viewController">
+ <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="mLL-gJ-YKr">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <prototypes>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2pz-XF-uhl" style="IBUITableViewCellStyleDefault" id="m0d-ak-lc9">
+ <rect key="frame" x="0.0" y="86" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="m0d-ak-lc9" id="d3P-M7-ByW">
+ <rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2pz-XF-uhl">
+ <rect key="frame" x="15" y="0.0" width="270" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ </tableViewCellContentView>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <connections>
+ <segue destination="Ah7-4n-0Wa" kind="push" identifier="showDetail" id="jUr-3t-vfg"/>
+ </connections>
+ </tableViewCell>
+ </prototypes>
+ <sections/>
+ <connections>
+ <outlet property="dataSource" destination="pGg-6v-bdr" id="P41-gY-KXY"/>
+ <outlet property="delegate" destination="pGg-6v-bdr" id="Y6K-Cp-Qkv"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" title="Master" id="tQt-TN-PWz"/>
+ </tableViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="6Cn-md-YlS" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="459" y="64"/>
+ </scene>
+ <!--class Prefix:identifier Detail View Controller - Detail-->
+ <scene sceneID="Cn3-H9-jdl">
+ <objects>
+ <viewController title="Detail" id="Ah7-4n-0Wa" customClass="DetailViewController" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="cIm-e0-J51"/>
+ <viewControllerLayoutGuide type="bottom" id="a0L-h9-sNL"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="MMQ-IT-qOo">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Lei-5M-9Gs">
+ <rect key="frame" x="20" y="276" width="280" height="17"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" type="system" size="system"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstItem="Lei-5M-9Gs" firstAttribute="leading" secondItem="MMQ-IT-qOo" secondAttribute="leading" constant="20" symbolic="YES" id="62x-JV-TTJ"/>
+ <constraint firstItem="Lei-5M-9Gs" firstAttribute="centerY" secondItem="MMQ-IT-qOo" secondAttribute="centerY" id="JzS-HC-Rnl"/>
+ <constraint firstAttribute="trailing" secondItem="Lei-5M-9Gs" secondAttribute="trailing" constant="20" symbolic="YES" id="pXB-RP-Zz6"/>
+ </constraints>
+ </view>
+ <navigationItem key="navigationItem" title="Detail" id="cra-N8-TIN"/>
+ <connections>
+ <outlet property="detailDescriptionLabel" destination="Lei-5M-9Gs" id="sCT-F7-F6f"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="lrm-kH-fPn" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="902" y="64"/>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination" type="retina4"/>
+ </simulatedMetricsContainer>
+</document>
diff --git a/Examples/iOS7Example/iOS7Example/DetailViewController.h b/Examples/iOS7Example/iOS7Example/DetailViewController.h
new file mode 100644
index 0000000..9567997
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/DetailViewController.h
@@ -0,0 +1,16 @@
+//
+// DetailViewController.h
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface DetailViewController : UIViewController <UISplitViewControllerDelegate>
+
+@property (strong, nonatomic) id detailItem;
+
+@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
+@end
diff --git a/Examples/iOS7Example/iOS7Example/DetailViewController.m b/Examples/iOS7Example/iOS7Example/DetailViewController.m
new file mode 100644
index 0000000..81c78d8
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/DetailViewController.m
@@ -0,0 +1,72 @@
+//
+// DetailViewController.m
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import "DetailViewController.h"
+
+@interface DetailViewController ()
+@property (strong, nonatomic) UIPopoverController *masterPopoverController;
+- (void)configureView;
+@end
+
+@implementation DetailViewController
+
+#pragma mark - Managing the detail item
+
+- (void)setDetailItem:(id)newDetailItem
+{
+ if (_detailItem != newDetailItem) {
+ _detailItem = newDetailItem;
+
+ // Update the view.
+ [self configureView];
+ }
+
+ if (self.masterPopoverController != nil) {
+ [self.masterPopoverController dismissPopoverAnimated:YES];
+ }
+}
+
+- (void)configureView
+{
+ // Update the user interface for the detail item.
+
+ if (self.detailItem) {
+ self.detailDescriptionLabel.text = [self.detailItem description];
+ }
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+ [self configureView];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+#pragma mark - Split view
+
+- (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController
+{
+ barButtonItem.title = NSLocalizedString(@"Master", @"Master");
+ [self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
+ self.masterPopoverController = popoverController;
+}
+
+- (void)splitViewController:(UISplitViewController *)splitController willShowViewController:(UIViewController *)viewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
+{
+ // Called when the view is shown again in the split view, invalidating the button and popover controller.
+ [self.navigationItem setLeftBarButtonItem:nil animated:YES];
+ self.masterPopoverController = nil;
+}
+
+@end
diff --git a/Examples/iOS7Example/iOS7Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/iOS7Example/iOS7Example/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..91bf9c1
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,53 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Examples/iOS7Example/iOS7Example/Images.xcassets/LaunchImage.launchimage/Contents.json b/Examples/iOS7Example/iOS7Example/Images.xcassets/LaunchImage.launchimage/Contents.json
new file mode 100644
index 0000000..6f870a4
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,51 @@
+{
+ "images" : [
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "iphone",
+ "subtype" : "retina4",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "1x"
+ },
+ {
+ "orientation" : "landscape",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "1x"
+ },
+ {
+ "orientation" : "portrait",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ },
+ {
+ "orientation" : "landscape",
+ "idiom" : "ipad",
+ "extent" : "full-screen",
+ "minimum-system-version" : "7.0",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Examples/iOS7Example/iOS7Example/MasterViewController.h b/Examples/iOS7Example/iOS7Example/MasterViewController.h
new file mode 100644
index 0000000..a1a9183
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/MasterViewController.h
@@ -0,0 +1,17 @@
+//
+// MasterViewController.h
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class DetailViewController;
+
+@interface MasterViewController : UITableViewController
+
+@property (strong, nonatomic) DetailViewController *detailViewController;
+
+@end
diff --git a/Examples/iOS7Example/iOS7Example/MasterViewController.m b/Examples/iOS7Example/iOS7Example/MasterViewController.m
new file mode 100644
index 0000000..bfcf96a
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/MasterViewController.m
@@ -0,0 +1,126 @@
+//
+// MasterViewController.m
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import "MasterViewController.h"
+
+#import "DetailViewController.h"
+
+@interface MasterViewController () {
+ NSMutableArray *_objects;
+}
+@end
+
+@implementation MasterViewController
+
+- (void)awakeFromNib
+{
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ self.clearsSelectionOnViewWillAppear = NO;
+ self.preferredContentSize = CGSizeMake(320.0, 600.0);
+ }
+ [super awakeFromNib];
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+ self.navigationItem.leftBarButtonItem = self.editButtonItem;
+
+ UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
+ self.navigationItem.rightBarButtonItem = addButton;
+ self.detailViewController = (DetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+- (void)insertNewObject:(id)sender
+{
+ if (!_objects) {
+ _objects = [[NSMutableArray alloc] init];
+ }
+ [_objects insertObject:[NSDate date] atIndex:0];
+ NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
+ [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
+}
+
+#pragma mark - Table View
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+ return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+ return _objects.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
+
+ NSDate *object = _objects[indexPath.row];
+ cell.textLabel.text = [object description];
+ return cell;
+}
+
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ // Return NO if you do not want the specified item to be editable.
+ return YES;
+}
+
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if (editingStyle == UITableViewCellEditingStyleDelete) {
+ [_objects removeObjectAtIndex:indexPath.row];
+ [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
+ }
+}
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
+{
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ // Return NO if you do not want the item to be re-orderable.
+ return YES;
+}
+*/
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
+ NSDate *object = _objects[indexPath.row];
+ self.detailViewController.detailItem = object;
+ }
+}
+
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
+{
+ if ([[segue identifier] isEqualToString:@"showDetail"]) {
+ NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
+ NSDate *object = _objects[indexPath.row];
+ [[segue destinationViewController] setDetailItem:object];
+ }
+}
+
+@end
diff --git a/Examples/iOS7Example/iOS7Example/en.lproj/InfoPlist.strings b/Examples/iOS7Example/iOS7Example/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Examples/iOS7Example/iOS7Example/iOS7Example-Info.plist b/Examples/iOS7Example/iOS7Example/iOS7Example-Info.plist
new file mode 100644
index 0000000..504587f
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/iOS7Example-Info.plist
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>Main_iPhone</string>
+ <key>UIMainStoryboardFile~ipad</key>
+ <string>Main_iPad</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UIStatusBarTintParameters</key>
+ <dict>
+ <key>UINavigationBar</key>
+ <dict>
+ <key>Style</key>
+ <string>UIBarStyleDefault</string>
+ <key>Translucent</key>
+ <false/>
+ </dict>
+ </dict>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/Examples/iOS7Example/iOS7Example/iOS7Example-Prefix.pch b/Examples/iOS7Example/iOS7Example/iOS7Example-Prefix.pch
new file mode 100644
index 0000000..82a2bb4
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/iOS7Example-Prefix.pch
@@ -0,0 +1,16 @@
+//
+// Prefix header
+//
+// The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Examples/iOS7Example/iOS7Example/main.m b/Examples/iOS7Example/iOS7Example/main.m
new file mode 100644
index 0000000..947145e
--- /dev/null
+++ b/Examples/iOS7Example/iOS7Example/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// iOS7Example
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/Examples/iOS7Example/iOS7ExampleTests/en.lproj/InfoPlist.strings b/Examples/iOS7Example/iOS7ExampleTests/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Examples/iOS7Example/iOS7ExampleTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests-Info.plist b/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests-Info.plist
new file mode 100644
index 0000000..a409125
--- /dev/null
+++ b/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests.m b/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests.m
new file mode 100644
index 0000000..8428e57
--- /dev/null
+++ b/Examples/iOS7Example/iOS7ExampleTests/iOS7ExampleTests.m
@@ -0,0 +1,54 @@
+//
+// iOS7ExampleTests.m
+// iOS7ExampleTests
+//
+// Created by Erik Doernenburg on 10/06/2014.
+// Copyright (c) 2014 Erik Doernenburg. All rights reserved.
+//
+
+#import <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import <UIKit/UIKit.h>
+#import "MasterViewController.h"
+
+@interface iOS7ExampleTests : XCTestCase
+
+@end
+
+@implementation iOS7ExampleTests
+
+- (void)setUp
+{
+ [super setUp];
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown
+{
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+ [super tearDown];
+}
+
+- (void)testMasterViewControllerDeletesItemsFromTableView
+{
+ // Test set-up
+
+ MasterViewController *controller = [[MasterViewController alloc] init];
+ NSIndexPath *dummyIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
+
+ id tableViewMock = OCMClassMock([UITableView class]);
+
+ // Invoke functionality to be tested
+ // If you want to see the test fail you can, for example, change the editing style to
+ // UITableViewCellEditingStyleNone. In that case the method in the controller does not
+ // make a call to the table view and the mock will raise an exception when verify is
+ // called further down.
+
+ [controller tableView:tableViewMock commitEditingStyle:UITableViewCellEditingStyleDelete forRowAtIndexPath:dummyIndexPath];
+
+ // Verify that expected methods were called
+
+ OCMVerify([tableViewMock deleteRowsAtIndexPaths:[NSArray arrayWithObject:dummyIndexPath] withRowAnimation:UITableViewRowAnimationFade]);
+}
+
+@end
diff --git a/Examples/iOS7Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h b/Examples/iOS7Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 0000000..c20a9c2
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2009-2014 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
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMArg.h b/Examples/iOS7Example/usr/include/OCMock/OCMArg.h
new file mode 100644
index 0000000..14fb161
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMArg.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2009-2014 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)isNotEqual:(id)value;
++ (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
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMConstraint.h b/Examples/iOS7Example/usr/include/OCMock/OCMConstraint.h
new file mode 100644
index 0000000..b606a54
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMConstraint.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2007-2014 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
+
++ (id)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
+
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
++ (id)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);
+}
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))block;
+
+@end
+
+
+#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
+#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMLocation.h b/Examples/iOS7Example/usr/include/OCMock/OCMLocation.h
new file mode 100644
index 0000000..136d9c9
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMLocation.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014 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;
+}
+
++ (id)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
+
+- (id)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);
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMMacroState.h b/Examples/iOS7Example/usr/include/OCMock/OCMMacroState.h
new file mode 100644
index 0000000..4b2d635
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMMacroState.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 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
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMRecorder.h b/Examples/iOS7Example/usr/include/OCMock/OCMRecorder.h
new file mode 100644
index 0000000..aa1f401
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMRecorder.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014 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;
+}
+
+- (id)init;
+- (id)initWithMockObject:(OCMockObject *)aMockObject;
+
+- (void)setMockObject:(OCMockObject *)aMockObject;
+
+- (OCMInvocationMatcher *)invocationMatcher;
+
+- (id)classMethod;
+- (id)ignoringNonObjectArgs;
+
+@end
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMStubRecorder.h b/Examples/iOS7Example/usr/include/OCMock/OCMStubRecorder.h
new file mode 100644
index 0000000..73b401f
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMStubRecorder.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2004-2014 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"
+
+
+@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) _v = (aValue); [NSValue value:&_v withObjCType:@encode(typeof(_v))]; }))
+@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
+
+
+
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMock.h b/Examples/iOS7Example/usr/include/OCMock/OCMock.h
new file mode 100644
index 0000000..f0083b3
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMock.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2004-2014 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\"") \
+ macro \
+ _Pragma("clang diagnostic pop") \
+})
diff --git a/Examples/iOS7Example/usr/include/OCMock/OCMockObject.h b/Examples/iOS7Example/usr/include/OCMock/OCMockObject.h
new file mode 100644
index 0000000..ff62bb5
--- /dev/null
+++ b/Examples/iOS7Example/usr/include/OCMock/OCMockObject.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2004-2014 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;
+
+- (id)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
+
diff --git a/Examples/iOS7Example/usr/lib/libOCMock.a b/Examples/iOS7Example/usr/lib/libOCMock.a
new file mode 100644
index 0000000..c96cbf0
--- /dev/null
+++ b/Examples/iOS7Example/usr/lib/libOCMock.a
Binary files differ
diff --git a/Examples/iPhoneExample/Classes/RootViewController.h b/Examples/iPhoneExample/Classes/RootViewController.h
new file mode 100644
index 0000000..feed5fe
--- /dev/null
+++ b/Examples/iPhoneExample/Classes/RootViewController.h
@@ -0,0 +1,14 @@
+//
+// RootViewController.h
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright Mulle Kybernetik 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface RootViewController : UITableViewController {
+}
+
+@end
diff --git a/Examples/iPhoneExample/Classes/RootViewController.m b/Examples/iPhoneExample/Classes/RootViewController.m
new file mode 100644
index 0000000..436b91a
--- /dev/null
+++ b/Examples/iPhoneExample/Classes/RootViewController.m
@@ -0,0 +1,62 @@
+//
+// RootViewController.m
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright Mulle Kybernetik 2010. All rights reserved.
+//
+
+#import "RootViewController.h"
+
+
+@implementation RootViewController
+
+
+#pragma mark -
+#pragma mark Table view data source
+
+// Customize the number of sections in the table view.
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ return 1;
+}
+
+
+// Customize the number of rows in the table view.
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ return 1;
+}
+
+
+// Customize the appearance of table view cells.
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ static NSString *CellIdentifier = @"HelloWorldCell";
+
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (cell == nil) {
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ }
+
+ cell.textLabel.text = @"Hello World!";
+
+ return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ /*
+ <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
+ // ...
+ // Pass the selected object to the new view controller.
+ [self.navigationController pushViewController:detailViewController animated:YES];
+ [detailViewController release];
+ */
+}
+
+
+@end
+
diff --git a/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.h b/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.h
new file mode 100644
index 0000000..f97a649
--- /dev/null
+++ b/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.h
@@ -0,0 +1,21 @@
+//
+// iPhoneExampleAppDelegate.h
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright Mulle Kybernetik 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface iPhoneExampleAppDelegate : NSObject <UIApplicationDelegate> {
+
+ UIWindow *window;
+ UINavigationController *navigationController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
+
+@end
+
diff --git a/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.m b/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.m
new file mode 100644
index 0000000..5be22d9
--- /dev/null
+++ b/Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.m
@@ -0,0 +1,90 @@
+//
+// iPhoneExampleAppDelegate.m
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright Mulle Kybernetik 2010. All rights reserved.
+//
+
+#import "iPhoneExampleAppDelegate.h"
+#import "RootViewController.h"
+
+
+@implementation iPhoneExampleAppDelegate
+
+@synthesize window;
+@synthesize navigationController;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the navigation controller's view to the window and display.
+ [window addSubview:navigationController.view];
+ [window makeKeyAndVisible];
+
+ return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+ */
+}
+
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ /*
+ Called when the application is about to terminate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+}
+
+
+- (void)dealloc {
+ [navigationController release];
+ [window release];
+ [super dealloc];
+}
+
+
+@end
+
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/NSNotificationCenter+OCMAdditions.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 0000000..7d5d6d1
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -0,0 +1,15 @@
+//---------------------------------------------------------------------------------------
+// $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@class OCMockObserver;
+
+
+@interface NSNotificationCenter(OCMAdditions)
+
+- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender;
+
+@end
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMArg.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMArg.h
new file mode 100644
index 0000000..e174a33
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMArg.h
@@ -0,0 +1,33 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMArg.h 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMArg : NSObject
+
+// constraining arguments
+
++ (id)any;
++ (void *)anyPointer;
++ (id)isNil;
++ (id)isNotNil;
++ (id)isNotEqual:(id)value;
++ (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
++ (id)checkWithBlock:(BOOL (^)(id))block;
+#endif
+
+// manipulating arguments
+
++ (id *)setTo:(id)value;
+
+// internal use only
+
++ (id)resolveSpecialValues:(NSValue *)value;
+
+@end
+
+#define OCMOCK_ANY [OCMArg any]
+#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(typeof(variable))]
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMConstraint.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMConstraint.h
new file mode 100644
index 0000000..72b23e8
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMConstraint.h
@@ -0,0 +1,64 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMConstraint.h 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+
+@interface OCMConstraint : NSObject
+
++ (id)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
+
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
++ (id)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
+
+#if NS_BLOCKS_AVAILABLE
+
+@interface OCMBlockConstraint : OCMConstraint
+{
+ BOOL (^block)(id);
+}
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))block;
+
+@end
+
+#endif
+
+
+#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
+#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMock.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMock.h
new file mode 100644
index 0000000..892b3cc
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMock.h
@@ -0,0 +1,10 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMock.h 39 2009-04-09 05:31:28Z erik $
+// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <OCMock/OCMockObject.h>
+#import <OCMock/OCMockRecorder.h>
+#import <OCMock/OCMConstraint.h>
+#import <OCMock/OCMArg.h>
+#import <OCMock/NSNotificationCenter+OCMAdditions.h>
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockObject.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockObject.h
new file mode 100644
index 0000000..a334b57
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockObject.h
@@ -0,0 +1,41 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMockObject.h 52 2009-08-14 07:21:10Z erik $
+// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMockObject : NSProxy
+{
+ BOOL isNice;
+ BOOL expectationOrderMatters;
+ NSMutableArray *recorders;
+ NSMutableArray *expectations;
+ NSMutableArray *exceptions;
+}
+
++ (id)mockForClass:(Class)aClass;
++ (id)mockForProtocol:(Protocol *)aProtocol;
++ (id)partialMockForObject:(NSObject *)anObject;
+
++ (id)niceMockForClass:(Class)aClass;
++ (id)niceMockForProtocol:(Protocol *)aProtocol;
+
++ (id)observerMock;
+
+- (id)init;
+
+- (void)setExpectationOrderMatters:(BOOL)flag;
+
+- (id)stub;
+- (id)expect;
+
+- (void)verify;
+
+// internal use only
+
+- (id)getNewRecorder;
+- (BOOL)handleInvocation:(NSInvocation *)anInvocation;
+- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockRecorder.h b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockRecorder.h
new file mode 100644
index 0000000..7302f7f
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/Headers/OCMock/OCMockRecorder.h
@@ -0,0 +1,31 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMockRecorder.h 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMockRecorder : NSProxy
+{
+ id signatureResolver;
+ NSInvocation *recordedInvocation;
+ NSMutableArray *invocationHandlers;
+}
+
+- (id)initWithSignatureResolver:(id)anObject;
+
+- (BOOL)matchesInvocation:(NSInvocation *)anInvocation;
+- (void)releaseInvocation;
+
+- (id)andReturn:(id)anObject;
+- (id)andReturnValue:(NSValue *)aValue;
+- (id)andThrow:(NSException *)anException;
+- (id)andPost:(NSNotification *)aNotification;
+- (id)andCall:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
+- (id)andDo:(void (^)(NSInvocation *))block;
+#endif
+
+- (NSArray *)invocationHandlers;
+
+@end
diff --git a/Examples/iPhoneExample/Libraries/libOCMock.a b/Examples/iPhoneExample/Libraries/libOCMock.a
new file mode 100644
index 0000000..813d8a5
--- /dev/null
+++ b/Examples/iPhoneExample/Libraries/libOCMock.a
Binary files differ
diff --git a/Examples/iPhoneExample/MainWindow.xib b/Examples/iPhoneExample/MainWindow.xib
new file mode 100644
index 0000000..64262ef
--- /dev/null
+++ b/Examples/iPhoneExample/MainWindow.xib
@@ -0,0 +1,542 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10D571</string>
+ <string key="IBDocument.InterfaceBuilderVersion">786</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">112</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="13"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="302016328">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ <object class="IBUINavigationController" id="701001926">
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ <object class="IBUINavigationBar" key="IBUINavigationBar" id="207850653">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{0, 0}</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="NSMutableArray" key="IBUIViewControllers">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIViewController" id="619226028">
+ <object class="IBUINavigationItem" key="IBUINavigationItem" id="394667715">
+ <reference key="IBUINavigationBar"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIParentViewController" ref="701001926"/>
+ <string key="IBUINibName">RootViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">navigationController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="701001926"/>
+ </object>
+ <int key="connectionID">15</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="302016328"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="701001926"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="207850653"/>
+ <reference ref="619226028"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="207850653"/>
+ <reference key="parent" ref="701001926"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="619226028"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="394667715"/>
+ </object>
+ <reference key="parent" ref="701001926"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="394667715"/>
+ <reference key="parent" ref="619226028"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>11.IBPluginDependency</string>
+ <string>13.CustomClassName</string>
+ <string>13.IBPluginDependency</string>
+ <string>2.IBAttributePlaceholdersKey</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ <string>9.IBEditorWindowLastContentRect</string>
+ <string>9.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>RootViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string>{{673, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>iPhoneExampleAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{186, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">16</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">RootViewController</string>
+ <string key="superclassName">UITableViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/RootViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">iPhoneExampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>navigationController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UINavigationController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>navigationController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">navigationController</string>
+ <string key="candidateClassName">UINavigationController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/iPhoneExampleAppDelegate.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="48103097">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarButtonItem</string>
+ <string key="superclassName">UIBarItem</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarItem</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="193736137">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="720195805">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationItem</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="193736137"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="48103097"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITableViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <reference key="sourceIdentifier" ref="720195805"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">iPhoneExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">112</string>
+ </data>
+</archive>
diff --git a/Examples/iPhoneExample/OCMockLogo.png b/Examples/iPhoneExample/OCMockLogo.png
new file mode 100644
index 0000000..c5a2109
--- /dev/null
+++ b/Examples/iPhoneExample/OCMockLogo.png
Binary files differ
diff --git a/Examples/iPhoneExample/RootViewController.xib b/Examples/iPhoneExample/RootViewController.xib
new file mode 100644
index 0000000..9b23075
--- /dev/null
+++ b/Examples/iPhoneExample/RootViewController.xib
@@ -0,0 +1,384 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">784</int>
+ <string key="IBDocument.SystemVersion">10D541</string>
+ <string key="IBDocument.InterfaceBuilderVersion">760</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">81</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="371349661">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUITableView" id="709618507">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 247}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIBouncesZoom">NO</bool>
+ <int key="IBUISeparatorStyle">1</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">44</float>
+ <float key="IBUISectionHeaderHeight">22</float>
+ <float key="IBUISectionFooterHeight">22</float>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="709618507"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="709618507"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="709618507"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="371349661"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="709618507"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>RootViewController</string>
+ <string>UIResponder</string>
+ <string>{{144, 609}, {320, 247}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">5</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">RootViewController</string>
+ <string key="superclassName">UITableViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/RootViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="654420027">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="654420027"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIScrollView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITableView</string>
+ <string key="superclassName">UIScrollView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITableViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="784" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">iPhoneExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">81</string>
+ </data>
+</archive>
diff --git a/Examples/iPhoneExample/Tests/RootViewControllerTests.h b/Examples/iPhoneExample/Tests/RootViewControllerTests.h
new file mode 100644
index 0000000..5601394
--- /dev/null
+++ b/Examples/iPhoneExample/Tests/RootViewControllerTests.h
@@ -0,0 +1,17 @@
+//
+// RootViewControllerTests.h
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright 2010 Mulle Kybernetik. All rights reserved.
+//
+// See Also: http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html
+
+
+#import <SenTestingKit/SenTestingKit.h>
+#import <UIKit/UIKit.h>
+
+
+@interface RootViewControllerTests : SenTestCase
+
+@end
diff --git a/Examples/iPhoneExample/Tests/RootViewControllerTests.m b/Examples/iPhoneExample/Tests/RootViewControllerTests.m
new file mode 100644
index 0000000..45ba525
--- /dev/null
+++ b/Examples/iPhoneExample/Tests/RootViewControllerTests.m
@@ -0,0 +1,75 @@
+//
+// RootViewControllerTests.m
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright 2010 Mulle Kybernetik. All rights reserved.
+//
+
+#import <OCMock/OCMock.h>
+#import "RootViewControllerTests.h"
+#import "RootViewController.h"
+
+/*
+
+ A simple test suite to test the RootViewController. It needs to be run as an "application test" as described
+ in the following Apple document. This project is set up following the steps outlined in the document.
+
+ http://developer.apple.com/iphone/library/documentation/xcode/conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html
+
+ The first test could be run as a "logic test" but the second test invokes functionality that sets a cell
+ label, which requires instantiation of a font, and that is not possible outside the device/simulator. The
+ following discussion has a bit more detail:
+
+ http://stackoverflow.com/questions/1689586/why-does-instantiating-a-uifont-in-an-iphone-unit-test-cause-a-crash
+
+ As far as I am aware you cannot run the tests in the simulator; at least when I try to run the tests in the
+ simulator, the app just launches but there is no output in the debugger window that would indicate the tests
+ were run.
+
+ The first test should pass but the second test should fail, and you should be able to see something like the
+ following in your device log:
+
+ Test Suite '/var/mobile/Applications/4CEA4E8D-069E-4363-A4B5-E01AF01176CE/iPhoneExample.app/iPhoneExampleTests.octest(Tests)' started at 2010-07-28 10:33:45 +1000
+ Test Suite 'RootViewControllerTests' started at 2010-07-28 10:33:45 +1000
+ Test Case '-[RootViewControllerTests testControllerReturnsCorrectNumberOfRows]' passed (0.000 seconds).
+ Unknown.m:0: error: -[RootViewControllerTests testControllerSetsUpCellCorrectly] : OCMockObject[UITableView]: unexpected method invoked: dequeueReusableCellWithIdentifier:@"Cell"
+ expected: dequeueReusableCellWithIdentifier:@"HelloWorldCell"
+ Test Case '-[RootViewControllerTests testControllerSetsUpCellCorrectly]' failed (0.002 seconds).
+ Test Suite 'RootViewControllerTests' finished at 2010-07-28 10:33:45 +1000.
+ Executed 2 tests, with 1 failure (1 unexpected) in 0.002 (0.006) seconds
+
+ The failure occurs when then RootViewController sends the dequeueReusableCellWithIdentifier: method to the mock
+ table view. The mock view is set up to expect that method call with the string "HelloWorldCell" as an argument,
+ but the RootViewController calls the method with just "Cell" as an argument. When you change the identifier in
+ line 75 of the RootViewController to "HelloWorldCell" and re-run the tests, they should both pass.
+
+ */
+
+
+@implementation RootViewControllerTests
+
+- (void)testControllerReturnsCorrectNumberOfRows
+{
+ RootViewController *controller = [[[RootViewController alloc] initWithStyle:UITableViewStylePlain] autorelease];
+
+ STAssertEquals(1, [controller tableView:nil numberOfRowsInSection:0], @"Should have returned correct number of rows.");
+}
+
+
+- (void)testControllerSetsUpCellCorrectly
+{
+ RootViewController *controller = [[[RootViewController alloc] initWithStyle:UITableViewStylePlain] autorelease];
+ id mockTableView = [OCMockObject mockForClass:[UITableView class]];
+ [[[mockTableView expect] andReturn:nil] dequeueReusableCellWithIdentifier:@"HelloWorldCell"];
+
+ UITableViewCell *cell = [controller tableView:mockTableView cellForRowAtIndexPath:nil];
+
+ STAssertNotNil(cell, @"Should have returned a cell");
+ STAssertEqualObjects(@"Hello World!", cell.textLabel.text, @"Should have set label");
+ [mockTableView verify];
+}
+
+
+
+@end
diff --git a/Examples/iPhoneExample/iPhoneExample-Info.plist b/Examples/iPhoneExample/iPhoneExample-Info.plist
new file mode 100644
index 0000000..104366e
--- /dev/null
+++ b/Examples/iPhoneExample/iPhoneExample-Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>OCMockLogo.png</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
diff --git a/Examples/iPhoneExample/iPhoneExample.xcodeproj/project.pbxproj b/Examples/iPhoneExample/iPhoneExample.xcodeproj/project.pbxproj
new file mode 100755
index 0000000..f1d8991
--- /dev/null
+++ b/Examples/iPhoneExample/iPhoneExample.xcodeproj/project.pbxproj
@@ -0,0 +1,538 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 036EF43D11F5BE7700A41604 /* RootViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E41EB011F5B0D100147791 /* RootViewControllerTests.m */; };
+ 036EF43E11F5BE7900A41604 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; };
+ 036EF43F11F5BE7900A41604 /* iPhoneExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iPhoneExampleAppDelegate.m */; };
+ 036EF4CC11F5D67600A41604 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03E41EBE11F5B13F00147791 /* libOCMock.a */; };
+ 03B85C4E11FFAF1100347AAD /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; };
+ 03B85C4F11FFAF1100347AAD /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* RootViewController.xib */; };
+ 03B85C5111FFAF1100347AAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 03B85C6311FFB03900347AAD /* iPhoneExampleTests.octest in Resources */ = {isa = PBXBuildFile; fileRef = 03E41F0811F5BE2F00147791 /* iPhoneExampleTests.octest */; };
+ 03B85C6B11FFB04A00347AAD /* OCMockLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 03B85C6A11FFB04A00347AAD /* OCMockLogo.png */; };
+ 03B85C6C11FFB04A00347AAD /* OCMockLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 03B85C6A11FFB04A00347AAD /* OCMockLogo.png */; };
+ 03B85CCF11FFB88E00347AAD /* iPhoneExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iPhoneExampleAppDelegate.m */; };
+ 03B85CD011FFB89000347AAD /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; };
+ 03DE954B12F2FFB0003852B7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03DE954A12F2FFB0003852B7 /* CoreGraphics.framework */; };
+ 03DE954D12F2FFB0003852B7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03DE954C12F2FFB0003852B7 /* Foundation.framework */; };
+ 03DE954F12F2FFB0003852B7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03DE954E12F2FFB0003852B7 /* UIKit.framework */; };
+ 1D3623260D0F684500981E51 /* iPhoneExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iPhoneExampleAppDelegate.m */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; };
+ 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; };
+ 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* RootViewController.xib */; };
+ 5E2E834C197735D5006E5062 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03DE954E12F2FFB0003852B7 /* UIKit.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 03B85C5E11FFB03100347AAD /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03E41F0711F5BE2F00147791;
+ remoteInfo = iPhoneExampleTests;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 03B85C5B11FFAF1100347AAD /* iPhoneExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iPhoneExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03B85C6A11FFB04A00347AAD /* OCMockLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = OCMockLogo.png; sourceTree = "<group>"; };
+ 03DE954A12F2FFB0003852B7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 03DE954C12F2FFB0003852B7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 03DE954E12F2FFB0003852B7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 03E41EAF11F5B0D100147791 /* RootViewControllerTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewControllerTests.h; sourceTree = "<group>"; };
+ 03E41EB011F5B0D100147791 /* RootViewControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewControllerTests.m; sourceTree = "<group>"; };
+ 03E41EBE11F5B13F00147791 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOCMock.a; path = Libraries/libOCMock.a; sourceTree = "<group>"; };
+ 03E41F0811F5BE2F00147791 /* iPhoneExampleTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iPhoneExampleTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 03E41F0911F5BE2F00147791 /* iPhoneExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iPhoneExampleTests-Info.plist"; sourceTree = "<group>"; };
+ 1D3623240D0F684500981E51 /* iPhoneExampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneExampleAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* iPhoneExampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iPhoneExampleAppDelegate.m; sourceTree = "<group>"; };
+ 1D6058910D05DD3D006BFB54 /* iPhoneExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iPhoneExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 28A0AAE50D9B0CCF005BE974 /* iPhoneExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneExample_Prefix.pch; sourceTree = "<group>"; };
+ 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
+ 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
+ 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = "<group>"; };
+ 28F335F01007B36200424DE2 /* RootViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* iPhoneExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iPhoneExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 03B85C5411FFAF1100347AAD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03DE954B12F2FFB0003852B7 /* CoreGraphics.framework in Frameworks */,
+ 03DE954D12F2FFB0003852B7 /* Foundation.framework in Frameworks */,
+ 03DE954F12F2FFB0003852B7 /* UIKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03E41F0511F5BE2F00147791 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 036EF4CC11F5D67600A41604 /* libOCMock.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5E2E834C197735D5006E5062 /* UIKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 03E41E8311F5AF0400147791 /* Tests */ = {
+ isa = PBXGroup;
+ children = (
+ 03E41EAF11F5B0D100147791 /* RootViewControllerTests.h */,
+ 03E41EB011F5B0D100147791 /* RootViewControllerTests.m */,
+ );
+ path = Tests;
+ sourceTree = "<group>";
+ };
+ 03E41EBC11F5B12100147791 /* Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 03E41EBE11F5B13F00147791 /* libOCMock.a */,
+ );
+ name = Libraries;
+ sourceTree = "<group>";
+ };
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 28C286DF0D94DF7D0034E888 /* RootViewController.h */,
+ 28C286E00D94DF7D0034E888 /* RootViewController.m */,
+ 1D3623240D0F684500981E51 /* iPhoneExampleAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* iPhoneExampleAppDelegate.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* iPhoneExample.app */,
+ 03E41F0811F5BE2F00147791 /* iPhoneExampleTests.octest */,
+ 03B85C5B11FFAF1100347AAD /* iPhoneExample.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 03E41E8311F5AF0400147791 /* Tests */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 03E41EBC11F5B12100147791 /* Libraries */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 28A0AAE50D9B0CCF005BE974 /* iPhoneExample_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 28F335F01007B36200424DE2 /* RootViewController.xib */,
+ 28AD735F0D9D9599002E5188 /* MainWindow.xib */,
+ 8D1107310486CEB800E47090 /* iPhoneExample-Info.plist */,
+ 03E41F0911F5BE2F00147791 /* iPhoneExampleTests-Info.plist */,
+ 03B85C6A11FFB04A00347AAD /* OCMockLogo.png */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 03DE954A12F2FFB0003852B7 /* CoreGraphics.framework */,
+ 03DE954C12F2FFB0003852B7 /* Foundation.framework */,
+ 03DE954E12F2FFB0003852B7 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 03B85C4C11FFAF1100347AAD /* iPhoneExampleTesting */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03B85C5811FFAF1100347AAD /* Build configuration list for PBXNativeTarget "iPhoneExampleTesting" */;
+ buildPhases = (
+ 03B85C4D11FFAF1100347AAD /* Resources */,
+ 03B85C5011FFAF1100347AAD /* Sources */,
+ 03B85C5411FFAF1100347AAD /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 03B85C5F11FFB03100347AAD /* PBXTargetDependency */,
+ );
+ name = iPhoneExampleTesting;
+ productName = iPhoneExample;
+ productReference = 03B85C5B11FFAF1100347AAD /* iPhoneExample.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 03E41F0711F5BE2F00147791 /* iPhoneExampleTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03E41F0F11F5BE3000147791 /* Build configuration list for PBXNativeTarget "iPhoneExampleTests" */;
+ buildPhases = (
+ 03E41F0311F5BE2F00147791 /* Resources */,
+ 03E41F0411F5BE2F00147791 /* Sources */,
+ 03E41F0511F5BE2F00147791 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = iPhoneExampleTests;
+ productName = iPhoneExampleTests;
+ productReference = 03E41F0811F5BE2F00147791 /* iPhoneExampleTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+ 1D6058900D05DD3D006BFB54 /* iPhoneExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneExample" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = iPhoneExample;
+ productName = iPhoneExample;
+ productReference = 1D6058910D05DD3D006BFB54 /* iPhoneExample.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ ORGANIZATIONNAME = "Mulle Kybernetik";
+ };
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneExample" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ en,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* iPhoneExample */,
+ 03E41F0711F5BE2F00147791 /* iPhoneExampleTests */,
+ 03B85C4C11FFAF1100347AAD /* iPhoneExampleTesting */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 03B85C4D11FFAF1100347AAD /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B85C6C11FFB04A00347AAD /* OCMockLogo.png in Resources */,
+ 03B85C4E11FFAF1100347AAD /* MainWindow.xib in Resources */,
+ 03B85C4F11FFAF1100347AAD /* RootViewController.xib in Resources */,
+ 03B85C6311FFB03900347AAD /* iPhoneExampleTests.octest in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03E41F0311F5BE2F00147791 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */,
+ 28F335F11007B36200424DE2 /* RootViewController.xib in Resources */,
+ 03B85C6B11FFB04A00347AAD /* OCMockLogo.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 03B85C5011FFAF1100347AAD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B85C5111FFAF1100347AAD /* main.m in Sources */,
+ 03B85CCF11FFB88E00347AAD /* iPhoneExampleAppDelegate.m in Sources */,
+ 03B85CD011FFB89000347AAD /* RootViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03E41F0411F5BE2F00147791 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 036EF43D11F5BE7700A41604 /* RootViewControllerTests.m in Sources */,
+ 036EF43E11F5BE7900A41604 /* RootViewController.m in Sources */,
+ 036EF43F11F5BE7900A41604 /* iPhoneExampleAppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* iPhoneExampleAppDelegate.m in Sources */,
+ 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 03B85C5F11FFB03100347AAD /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03E41F0711F5BE2F00147791 /* iPhoneExampleTests */;
+ targetProxy = 03B85C5E11FFB03100347AAD /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 03B85C5911FFAF1100347AAD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = iPhoneExample_Prefix.pch;
+ INFOPLIST_FILE = "iPhoneExample-Info.plist";
+ PRODUCT_NAME = iPhoneExample;
+ };
+ name = Debug;
+ };
+ 03B85C5A11FFAF1100347AAD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = iPhoneExample_Prefix.pch;
+ INFOPLIST_FILE = "iPhoneExample-Info.plist";
+ PRODUCT_NAME = iPhoneExample;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 03E41F0D11F5BE3000147791 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Libraries/Headers";
+ INFOPLIST_FILE = "iPhoneExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(PROJECT_DIR)/Libraries\"",
+ );
+ OTHER_LDFLAGS = (
+ "-ObjC",
+ "-force_load",
+ "$(PROJECT_DIR)/Libraries/libOCMock.a",
+ "-framework",
+ Foundation,
+ "-framework",
+ SenTestingKit,
+ "-framework",
+ UIKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = iPhoneExampleTests;
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 03E41F0E11F5BE3000147791 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Libraries/Headers";
+ INFOPLIST_FILE = "iPhoneExampleTests-Info.plist";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(PROJECT_DIR)/Libraries\"",
+ );
+ OTHER_LDFLAGS = (
+ "-ObjC",
+ "-force_load",
+ "$(PROJECT_DIR)/Libraries/libOCMock.a",
+ "-framework",
+ Foundation,
+ "-framework",
+ SenTestingKit,
+ "-framework",
+ UIKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = iPhoneExampleTests;
+ WRAPPER_EXTENSION = octest;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = iPhoneExample_Prefix.pch;
+ INFOPLIST_FILE = "iPhoneExample-Info.plist";
+ PRODUCT_NAME = iPhoneExample;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = iPhoneExample_Prefix.pch;
+ INFOPLIST_FILE = "iPhoneExample-Info.plist";
+ PRODUCT_NAME = iPhoneExample;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 03B85C5811FFAF1100347AAD /* Build configuration list for PBXNativeTarget "iPhoneExampleTesting" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03B85C5911FFAF1100347AAD /* Debug */,
+ 03B85C5A11FFAF1100347AAD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03E41F0F11F5BE3000147791 /* Build configuration list for PBXNativeTarget "iPhoneExampleTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03E41F0D11F5BE3000147791 /* Debug */,
+ 03E41F0E11F5BE3000147791 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iPhoneExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/Examples/iPhoneExample/iPhoneExampleTests-Info.plist b/Examples/iPhoneExample/iPhoneExampleTests-Info.plist
new file mode 100644
index 0000000..94eb7f4
--- /dev/null
+++ b/Examples/iPhoneExample/iPhoneExampleTests-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/Examples/iPhoneExample/iPhoneExample_Prefix.pch b/Examples/iPhoneExample/iPhoneExample_Prefix.pch
new file mode 100644
index 0000000..7832bac
--- /dev/null
+++ b/Examples/iPhoneExample/iPhoneExample_Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'iPhoneExample' target in the 'iPhoneExample' project
+//
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
diff --git a/Examples/iPhoneExample/main.m b/Examples/iPhoneExample/main.m
new file mode 100644
index 0000000..f5826a3
--- /dev/null
+++ b/Examples/iPhoneExample/main.m
@@ -0,0 +1,17 @@
+//
+// main.m
+// iPhoneExample
+//
+// Created by Erik Doernenburg on 20/07/10.
+// Copyright Mulle Kybernetik 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}
diff --git a/License.txt b/License.txt
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/License.txt
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ed37c13
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+# This makefile is mainly intended for use on the CI server (Travis). It
+# requires xcpretty to be installed.
+
+# If you are trying to build a release locally consider using the build.rb
+# script in the Tools directory instead.
+
+
+BUILD_DIR = OBJROOT="$(CURDIR)/build" SYMROOT="$(CURDIR)/build"
+SHELL = /bin/bash -e -o pipefail
+IOS32 = -scheme OCMockLib -sdk iphonesimulator -destination 'name=iPhone 5' $(BUILD_DIR)
+IOS64 = -scheme OCMockLib -sdk iphonesimulator -destination 'name=iPhone 5s' $(BUILD_DIR)
+MACOSX = -scheme OCMock -sdk macosx $(BUILD_DIR)
+XCODEBUILD = xcodebuild -project "$(CURDIR)/Source/OCMock.xcodeproj"
+
+ci: clean test
+
+clean:
+ $(XCODEBUILD) clean
+ rm -rf "$(CURDIR)/build"
+
+test: test-ios test-macosx
+
+test-ios: test-ios32 test-ios64
+
+test-ios32:
+ @echo "Running 32-bit iOS tests..."
+ $(XCODEBUILD) $(IOS32) test | xcpretty -c
+
+test-ios64:
+ @echo "Running 64-bit iOS tests..."
+ $(XCODEBUILD) $(IOS64) test | xcpretty -c
+
+test-macosx:
+ @echo "Running OS X tests..."
+ $(XCODEBUILD) $(MACOSX) test | xcpretty -c
diff --git a/OCMock.podspec b/OCMock.podspec
new file mode 100644
index 0000000..f86bca3
--- /dev/null
+++ b/OCMock.podspec
@@ -0,0 +1,27 @@
+Pod::Spec.new do |s|
+ s.name = "OCMock"
+ s.version = "3.1.3"
+
+ s.summary = "Mock objects for Objective-C"
+ s.description = <<-DESC
+ OCMock is an Objective-C implementation of mock objects. It provides
+ stubs that return pre-determined values for specific method invocations,
+ dynamic mocks that can be used to verify interaction patterns, and
+ partial mocks to overwrite selected methods of existing objects.
+ DESC
+
+ s.homepage = "http://ocmock.org"
+ s.license = { :type => "Apache 2.0", :file => "License.txt" }
+
+ s.author = { "Erik Doernenburg" => "erik@doernenburg.com" }
+ s.social_media_url = "http://twitter.com/erikdoe"
+
+ s.source = { :git => "https://github.com/erikdoe/ocmock.git", :tag => "v3.1.3" }
+ s.source_files = "Source/OCMock/*.{h,m}"
+
+ s.public_header_files = ["OCMock.h", "OCMockObject.h", "OCMArg.h", "OCMConstraint.h", "OCMLocation.h", "OCMMacroState.h", "OCMRecorder.h", "OCMStubRecorder.h", "NSNotificationCenter+OCMAdditions.h"].map { |file|
+ "Source/OCMock/" + file
+ }
+
+ s.requires_arc = false
+end
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..948822e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+OCMock
+======
+
+OCMock is an Objective-C implementation of mock objects.
+
+For downloads, documentation, and support please visit [ocmock.org][].
+
+[](https://travis-ci.org/erikdoe/ocmock)
+
+ [ocmock.org]: http://ocmock.org/
diff --git a/Source/Changes.txt b/Source/Changes.txt
new file mode 100644
index 0000000..20ab860
--- /dev/null
+++ b/Source/Changes.txt
@@ -0,0 +1,251 @@
+Listing of notable changes by release. More detail is usually found in the Git
+commit messages and/or the pull requests.
+
+OCMock 3.1.3 (2015-08-12)
+
+* Now throwing exception when trying to create mocks for nil (Nick Gravelyn)
+* Fixed ARC related bug when boxing macro args (Richard Ross)
+* Added target for dynamic iOS framework, which makes OCMock compatible with
+ Carthage (Piet Brauer)
+* Memory management and other small bug fixes
+
+
+OCMock 3.1.2 (2015-01-08)
+
+* Fixed bugs around reject and expectation orders (Mason Glidden, Ben Asher)
+* Small adjustments to build file and dependencies
+
+
+OCMock 3.1.1 (2014-08-23)
+
+* Fixed a recently introduced bug that resulted in class arguments and return
+ values not to be considered objects (Patrick Hartling, Max Shcheglov)
+
+
+OCMock 3.1 (2014-08-22)
+
+* Converting number types to make andReturn more intuitive (Carl Lindberg)
+* Macros now silence warnings about unused return values (Gordon Fontenot)
+* Added isKindOfClass constraint (Ash Furrow)
+* Performance and stability improvements. As a result it is no longer possible
+ use verify-after-running to verify certain methods:
+ - All methods implemented by NSObject and categories on it
+ - Private methods in core Apple classes, ie. the class name has an NS or UI
+ prefix and the method has an underscore prefix and/or suffix.
+
+
+OCMock 3.0.2 (2014-07-07)
+
+* Fixed podspec
+
+
+OCMock 3.0.1 (2014-07-06)
+
+* Fixed bug that prevented stubs from returning nil
+* Fixed bug related to handling of weak references
+* Improved error message when trying to mock undefined method
+* Added support for matching of char* arguments
+
+
+OCMock 3.0 (2014-06-12)
+
+* Added macro for verify with delay
+* Fixed several critical bugs
+* Allowing nil as block in stub action. With partial mocks this makes it
+ possible to overwrite a method to do nothing (Sam Stigler)
+* More descriptive messages when trying to verify unknown method
+
+
+OCMock 3.0.M3 (2014-05-31)
+
+* Changed license to Apache 2 license
+* Added support for verify-after-run for class methods and for methods sent
+ directly to the real object covered by a partial mock.
+* Using a temporary meta class subclass for mocking class methods, enabling
+ full clean-up. As a consequence class methods mocked on a given class are no
+ longer mocked in all subclasses.
+* Throwing descriptive exception when attempting to create partial mock on
+ toll-free bridged classes and tagged pointers (Mark Larsen)
+
+
+OCMock 3.0.M2 (2014-05-07)
+
+* Added support from verify-after-run. Only works for methods that are sent
+ to a mock object. Does not work for classes and methods sent directly to
+ the real object covered by a partial mock.
+* Failures without location are now thrown as OCMockTestFailure exception,
+ not as NSInternalInconsistencyException
+
+
+OCMock 3.0.M1 (2014-04-26)
+
+* Added macros for modern syntax
+* Automatic deregistration of observer mocks
+
+
+
+
+OCMock 2.2.4 (2014-04-04)
+
+2014-04-05
+
+* Switched unit test for OCMock itself to XCTest.
+* Added andForwardToRealObject support for class methods (Carl Lindberg)
+* Extended OCMockObject with verifyWithDelay (Charles Harley, Daniel
+ Doubrovkine)
+
+
+OCMock 2.2.2 (2013-12-19)
+
+* Added implementation for Apple-interal NSIsKind informal protocol (Brian
+ Gerstle)
+* Various fixes for method with structure returns (Carl Lindberg)
+* Added a specially typed method for object references to OCMArg.
+* Fixed bug that caused matching to be aborted on first ignored non-object arg.
+* Fixed a bug where partial mocks wouldn't clean up mocked class methods.
+ (we7teck)
+* Improved value macro so it can take constant arguments and expressions. (Carl
+ Lindberg)
+* Fixed a bug that caused crashes when methods that require "special" struct
+ returns were mocked in partial mocks. (Carl Lindberg)
+
+
+OCMock 2.2.1 (2013-07-24)
+
+* Fixed several bugs regarding class method mocking in class hierarchies.
+* Fixed bug preventing the same class method to be expected more than once.
+
+
+OCMock 2.2 (2013-07-02)
+
+* Can ignore non-object arguments on a per-invocation basis.
+* Added constraint for any selector.
+
+
+OCMock 2.1.2 (2013-06-19)
+
+* Constraints implement NSCopying for OS X 10.9 SDK compatibility.
+
+
+OCMock 2.1 (2013-03-15)
+
+* Stubbing an object creation method now handles retain count correctly.
+* Added support for forwardingTagetForSelector: (thanks to Jeff Watkins)
+* Added class method mocking capability to class mock objects
+* Added implementation of isKindOfClass: to class mock objects
+* Allowing to set non-object pass-by-ref args (thanks to Glenn L. Austin)
+* Calling a previously expected method on a partial mock is no longer an error.
+
+
+OCMock 2.0 (2012-03-02)
+
+* Avoiding deprecated method to convert to a C string (thanks to Kushal
+ Pisavadia)
+* Recreated project from scratch with new conventions in Xcode 4.2 (thanks to
+ Matt Di Pasquale)
+* Arguments only need to be equal, don't have to have same class
+
+
+
+
+OCMock 1.77 (2011-02-15)
+
+* Added feature to explicitly disable a partial mock
+* Updated example to work with iOS 4.2.
+
+
+OCMock 1.70 (2010-08-21)
+
+* Added feature to explicitly reject methods on nice mocks (thanks to Heath
+ Borders)
+* Added feature to forward method to real object from partial mock (thanks to
+ Marco Sandrini)
+* Fix to allow block arguments (thanks to Justin DeWind)
+* Now building OCMock library for simulator (i386) and device (armv7)
+* Updated example to run tests on device
+* Changed OCMOCK_VALUE macro to be iOS compatible (thanks to Derek Clarkson)
+* Added a new target to build a static library for iOS use
+* Created an example showing how to use OCMock in an iOS project
+* Various small clean-ups; no change in functionality (thanks to Jonah Williams)
+* Added block constraints and invocation handler (thanks to Justin DeWind)
+
+
+OCMock 1.55 (2009-10-16)
+
+* Fixed broken test for array argument descciptions (Craig Beck)
+* Disambiguated mock table method name to avoid compiler warning
+* Renamed some variables to avoid warnings when using -Wshadow
+* Partial mocks are now deallocated as they should
+* Fixed problems that occured when using mocks as arguments
+* OnCall methods now have same signature as replaced ones.
+* Fixed possible retain bug (Daniel Eggert)
+* Added feature that allows to verify expectations are called in sequence.
+* Improved detection of unqualified method return type.
+* Fixed bug that caused crash when using method swizzling with void return type.
+* Added support for calling arbitrary methods when stubbed methods are invoked.
+* Added support for posting notifications (based on Jean-Francois Dontigny's
+ code)
+* Fixed bug around complex type encodings (Jean-Francois Dontigny)
+* Partial mocks now work on object reference and self (thanks to Mike Mangino)
+* Added partial mocks (calls to the original object reference cannot be mocked)
+
+
+OCMock 1.42 (2009-05-19)
+
+* Mock observers now handle user infos on notifications.
+* Added inital support for mock observers (loosely based on Dave Dribbin's idea)
+* Moved factory methods from OCMConstraint to OCMArg
+* Added pass by ref argument setters
+* Linked install name now uses @rpath (Dave Dribbin)
+* Added support for respondsToSelector (Dave Dribin)
+* Added constraint for any pointer
+* Now comparing selectors as strings (Dado Colussi)
+
+
+OCMock 1.29 (2008-07-07)
+
+* Resetting invocation target in recorder to avoid retain cycles.
+* Added optional integration with hamcrest for constraints
+* Now building quad-fat; the 64-bit versions are somewhat experimental though
+* Using new functions to deal with protocols (Evan Doll)
+* Added support for void* parameters (Tuukka Norri)
+* Fixed a bug that could caused crashes when non-char const pointers were
+ described
+* Fixed bug to allow mocking of methods with type qualifieres (Nikita Zhuk)
+* Added a simple constraint implementation.
+
+
+OCMock 1.17 (2007-06-04)
+
+* Now re-throwing fail-fast exceptions, for unexpected invocations for example,
+ when verify is called; in case the first throw is ignored by a framework.
+* Added nice mocks, i.e. mocks that don't raise on unknown methods (Mark Thomas)
+* Fixed bug that prevented expectations after invocations (M. Scott Ford)
+* Added possibility to throw an exception, based on code by Justin DeWind
+* Added Evan Doll's bugfix, which forwards conformsToProtocol: methods when
+ necessary
+* Added the ability to match struct arguments, based on code contributed by
+ Daniel Eggert
+* Better description of arguments, based on code contributed by Jeremy Higgs
+* Added the ability to create multiple identical expectations on the mock
+ object (Jeremy Higgs)
+* Added the ability to mock out nil arguments (Jeremy Higgs)
+* Added slightly modified version of Jon Reid's contribution, which adds the
+ possibility to stub primitive return values.
+* Added Jon Reid's bugfix that prevents a crash when trying to stub an unknown
+ method on a protocol.
+
+
+OCMock 1.10 (2005-10-03)
+
+* Upgraded to build and run tests using the OCUnit that is now part of XCode.
+* Added XCode 2.1 project
+* Added Richard Clark's contribution, which provides support for scalar
+ arguments.
+* Added support for mocking formal protocols
+
+
+OCMock 1.6 (2004-08-30)
+
+* MockObject and Recorder now inherit from NSProxy.
+
diff --git a/Source/Frameworks/OCHamcrest.tar.bz2 b/Source/Frameworks/OCHamcrest.tar.bz2
new file mode 100644
index 0000000..1a9578a
--- /dev/null
+++ b/Source/Frameworks/OCHamcrest.tar.bz2
Binary files differ
diff --git a/Source/OCMock iOS/Info.plist b/Source/OCMock iOS/Info.plist
new file mode 100644
index 0000000..7c48008
--- /dev/null
+++ b/Source/OCMock iOS/Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>$(CURRENT_PROJECT_VERSION)</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/Source/OCMock.xcodeproj/project.pbxproj b/Source/OCMock.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..00dcf20
--- /dev/null
+++ b/Source/OCMock.xcodeproj/project.pbxproj
@@ -0,0 +1,1577 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 030EF0B614632FD000B04273 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 030EF0B414632FD000B04273 /* InfoPlist.strings */; };
+ 0322DA65191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */; };
+ 0322DA66191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */; };
+ 0322DA6919118B4600CACAF1 /* OCMVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0322DA6719118B4600CACAF1 /* OCMVerifier.h */; };
+ 0322DA6A19118B4600CACAF1 /* OCMVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0322DA6719118B4600CACAF1 /* OCMVerifier.h */; };
+ 0322DA6B19118B4600CACAF1 /* OCMVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA6819118B4600CACAF1 /* OCMVerifier.m */; };
+ 0322DA6C19118B4600CACAF1 /* OCMVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA6819118B4600CACAF1 /* OCMVerifier.m */; };
+ 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 */; };
+ 03565A4518F05721003AE91E /* OCMockObjectForwardingTargetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0354D71F16F23AF5001766BB /* OCMockObjectForwardingTargetTests.m */; };
+ 03565A4618F05721003AE91E /* OCMockObjectHamcrestTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 03B316231463350E0052CD09 /* OCMockObjectHamcrestTests.mm */; };
+ 03565A4718F05721003AE91E /* OCMConstraintTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316211463350E0052CD09 /* OCMConstraintTests.m */; };
+ 03565A4818F05721003AE91E /* OCMStubRecorderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316271463350E0052CD09 /* OCMStubRecorderTests.m */; };
+ 03565A4918F05721003AE91E /* OCMArgTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28EDBF243639C57F88A1B /* OCMArgTests.m */; };
+ 03565A4A18F05721003AE91E /* OCObserverMockObjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316291463350E0052CD09 /* OCObserverMockObjectTests.m */; };
+ 03565A4B18F05721003AE91E /* NSInvocationOCMAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3161F1463350E0052CD09 /* NSInvocationOCMAdditionsTests.m */; };
+ 03565A4C18F05721003AE91E /* NSMethodSignatureOCMAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28DEDB9163597B7C49F3D /* NSMethodSignatureOCMAdditionsTests.m */; };
+ 03565A4E18F05877003AE91E /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03565A4D18F05877003AE91E /* OCHamcrest.framework */; };
+ 03618D83195B553400389166 /* OCMRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03618D81195B553400389166 /* OCMRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03618D84195B553400389166 /* OCMRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03618D81195B553400389166 /* OCMRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03618D85195B553400389166 /* OCMRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03618D82195B553400389166 /* OCMRecorder.m */; };
+ 03618D86195B553400389166 /* OCMRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03618D82195B553400389166 /* OCMRecorder.m */; };
+ 037ECD5418FAD84100AF0E4C /* OCMInvocationMatcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 037ECD5318FAD84100AF0E4C /* OCMInvocationMatcherTests.m */; };
+ 037ECD5518FAD84100AF0E4C /* OCMInvocationMatcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 037ECD5318FAD84100AF0E4C /* OCMInvocationMatcherTests.m */; };
+ 03B315AF146333BF0052CD09 /* NSInvocation+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31585146333BF0052CD09 /* NSInvocation+OCMAdditions.h */; };
+ 03B315B0146333BF0052CD09 /* NSInvocation+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31585146333BF0052CD09 /* NSInvocation+OCMAdditions.h */; };
+ 03B315B1146333BF0052CD09 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31586146333BF0052CD09 /* NSInvocation+OCMAdditions.m */; };
+ 03B315B3146333BF0052CD09 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31586146333BF0052CD09 /* NSInvocation+OCMAdditions.m */; };
+ 03B315B4146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31587146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h */; };
+ 03B315B5146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31587146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h */; };
+ 03B315B6146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31588146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m */; };
+ 03B315B8146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31588146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m */; };
+ 03B315B9146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31589146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315BA146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31589146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315BB146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158A146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m */; };
+ 03B315BD146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158A146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m */; };
+ 03B315BE146333BF0052CD09 /* OCClassMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158B146333BF0052CD09 /* OCClassMockObject.h */; };
+ 03B315BF146333BF0052CD09 /* OCClassMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158B146333BF0052CD09 /* OCClassMockObject.h */; };
+ 03B315C0146333BF0052CD09 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158C146333BF0052CD09 /* OCClassMockObject.m */; };
+ 03B315C2146333BF0052CD09 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158C146333BF0052CD09 /* OCClassMockObject.m */; };
+ 03B315C3146333BF0052CD09 /* OCMArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158D146333BF0052CD09 /* OCMArg.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315C4146333BF0052CD09 /* OCMArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158D146333BF0052CD09 /* OCMArg.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315C5146333BF0052CD09 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158E146333BF0052CD09 /* OCMArg.m */; };
+ 03B315C7146333BF0052CD09 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158E146333BF0052CD09 /* OCMArg.m */; };
+ 03B315C8146333BF0052CD09 /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158F146333BF0052CD09 /* OCMBlockCaller.h */; };
+ 03B315C9146333BF0052CD09 /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158F146333BF0052CD09 /* OCMBlockCaller.h */; };
+ 03B315CA146333BF0052CD09 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31590146333BF0052CD09 /* OCMBlockCaller.m */; };
+ 03B315CC146333BF0052CD09 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31590146333BF0052CD09 /* OCMBlockCaller.m */; };
+ 03B315CD146333BF0052CD09 /* OCMBoxedReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31591146333BF0052CD09 /* OCMBoxedReturnValueProvider.h */; };
+ 03B315CE146333BF0052CD09 /* OCMBoxedReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31591146333BF0052CD09 /* OCMBoxedReturnValueProvider.h */; };
+ 03B315CF146333BF0052CD09 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31592146333BF0052CD09 /* OCMBoxedReturnValueProvider.m */; };
+ 03B315D1146333BF0052CD09 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31592146333BF0052CD09 /* OCMBoxedReturnValueProvider.m */; };
+ 03B315D2146333BF0052CD09 /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31593146333BF0052CD09 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315D3146333BF0052CD09 /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31593146333BF0052CD09 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315D4146333BF0052CD09 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31594146333BF0052CD09 /* OCMConstraint.m */; };
+ 03B315D6146333BF0052CD09 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31594146333BF0052CD09 /* OCMConstraint.m */; };
+ 03B315D7146333BF0052CD09 /* OCMExceptionReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31595146333BF0052CD09 /* OCMExceptionReturnValueProvider.h */; };
+ 03B315D8146333BF0052CD09 /* OCMExceptionReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31595146333BF0052CD09 /* OCMExceptionReturnValueProvider.h */; };
+ 03B315D9146333BF0052CD09 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31596146333BF0052CD09 /* OCMExceptionReturnValueProvider.m */; };
+ 03B315DB146333BF0052CD09 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31596146333BF0052CD09 /* OCMExceptionReturnValueProvider.m */; };
+ 03B315DC146333BF0052CD09 /* OCMIndirectReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31597146333BF0052CD09 /* OCMIndirectReturnValueProvider.h */; };
+ 03B315DD146333BF0052CD09 /* OCMIndirectReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31597146333BF0052CD09 /* OCMIndirectReturnValueProvider.h */; };
+ 03B315DE146333BF0052CD09 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31598146333BF0052CD09 /* OCMIndirectReturnValueProvider.m */; };
+ 03B315E0146333BF0052CD09 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31598146333BF0052CD09 /* OCMIndirectReturnValueProvider.m */; };
+ 03B315E1146333BF0052CD09 /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31599146333BF0052CD09 /* OCMNotificationPoster.h */; };
+ 03B315E2146333BF0052CD09 /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31599146333BF0052CD09 /* OCMNotificationPoster.h */; };
+ 03B315E3146333BF0052CD09 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159A146333BF0052CD09 /* OCMNotificationPoster.m */; };
+ 03B315E5146333BF0052CD09 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159A146333BF0052CD09 /* OCMNotificationPoster.m */; };
+ 03B315E6146333BF0052CD09 /* OCMObserverRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159B146333BF0052CD09 /* OCMObserverRecorder.h */; };
+ 03B315E7146333BF0052CD09 /* OCMObserverRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159B146333BF0052CD09 /* OCMObserverRecorder.h */; };
+ 03B315E8146333BF0052CD09 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159C146333BF0052CD09 /* OCMObserverRecorder.m */; };
+ 03B315EA146333BF0052CD09 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159C146333BF0052CD09 /* OCMObserverRecorder.m */; };
+ 03B315EB146333C00052CD09 /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159D146333BF0052CD09 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315EC146333C00052CD09 /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159D146333BF0052CD09 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315ED146333C00052CD09 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159E146333BF0052CD09 /* OCMockObject.m */; };
+ 03B315EF146333C00052CD09 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159E146333BF0052CD09 /* OCMockObject.m */; };
+ 03B315F0146333C00052CD09 /* OCMStubRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159F146333BF0052CD09 /* OCMStubRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315F1146333C00052CD09 /* OCMStubRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159F146333BF0052CD09 /* OCMStubRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B315F2146333C00052CD09 /* OCMStubRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A0146333BF0052CD09 /* OCMStubRecorder.m */; };
+ 03B315F4146333C00052CD09 /* OCMStubRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A0146333BF0052CD09 /* OCMStubRecorder.m */; };
+ 03B315F5146333C00052CD09 /* OCMPassByRefSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A1146333BF0052CD09 /* OCMPassByRefSetter.h */; };
+ 03B315F6146333C00052CD09 /* OCMPassByRefSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A1146333BF0052CD09 /* OCMPassByRefSetter.h */; };
+ 03B315F7146333C00052CD09 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A2146333BF0052CD09 /* OCMPassByRefSetter.m */; };
+ 03B315F9146333C00052CD09 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A2146333BF0052CD09 /* OCMPassByRefSetter.m */; };
+ 03B315FA146333C00052CD09 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A3146333BF0052CD09 /* OCMRealObjectForwarder.h */; };
+ 03B315FB146333C00052CD09 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A3146333BF0052CD09 /* OCMRealObjectForwarder.h */; };
+ 03B315FC146333C00052CD09 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A4146333BF0052CD09 /* OCMRealObjectForwarder.m */; };
+ 03B315FE146333C00052CD09 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A4146333BF0052CD09 /* OCMRealObjectForwarder.m */; };
+ 03B315FF146333C00052CD09 /* OCMReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A5146333BF0052CD09 /* OCMReturnValueProvider.h */; };
+ 03B31600146333C00052CD09 /* OCMReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A5146333BF0052CD09 /* OCMReturnValueProvider.h */; };
+ 03B31601146333C00052CD09 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A6146333BF0052CD09 /* OCMReturnValueProvider.m */; };
+ 03B31603146333C00052CD09 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A6146333BF0052CD09 /* OCMReturnValueProvider.m */; };
+ 03B31604146333C00052CD09 /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A7146333BF0052CD09 /* OCObserverMockObject.h */; };
+ 03B31605146333C00052CD09 /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A7146333BF0052CD09 /* OCObserverMockObject.h */; };
+ 03B31606146333C00052CD09 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A8146333BF0052CD09 /* OCObserverMockObject.m */; };
+ 03B31608146333C00052CD09 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A8146333BF0052CD09 /* OCObserverMockObject.m */; };
+ 03B31609146333C00052CD09 /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A9146333BF0052CD09 /* OCPartialMockObject.h */; };
+ 03B3160A146333C00052CD09 /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A9146333BF0052CD09 /* OCPartialMockObject.h */; };
+ 03B3160B146333C00052CD09 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AA146333BF0052CD09 /* OCPartialMockObject.m */; };
+ 03B3160D146333C00052CD09 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AA146333BF0052CD09 /* OCPartialMockObject.m */; };
+ 03B31613146333C00052CD09 /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315AD146333BF0052CD09 /* OCProtocolMockObject.h */; };
+ 03B31614146333C00052CD09 /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315AD146333BF0052CD09 /* OCProtocolMockObject.h */; };
+ 03B31615146333C00052CD09 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AE146333BF0052CD09 /* OCProtocolMockObject.m */; };
+ 03B31617146333C00052CD09 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AE146333BF0052CD09 /* OCProtocolMockObject.m */; };
+ 03B3168B14633A4F0052CD09 /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 030EF0B814632FD000B04273 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03B3168E14633D9C0052CD09 /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 030EF0B814632FD000B04273 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03C7BF0A195DA2F200A545DD /* OCMInvocationStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF08195DA2F200A545DD /* OCMInvocationStub.h */; };
+ 03C7BF0B195DA2F200A545DD /* OCMInvocationStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF08195DA2F200A545DD /* OCMInvocationStub.h */; };
+ 03C7BF0C195DA2F200A545DD /* OCMInvocationStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF09195DA2F200A545DD /* OCMInvocationStub.m */; };
+ 03C7BF0D195DA2F200A545DD /* OCMInvocationStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF09195DA2F200A545DD /* OCMInvocationStub.m */; };
+ 03C7BF10195DAB5300A545DD /* OCMExpectationRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF0E195DAB5300A545DD /* OCMExpectationRecorder.h */; };
+ 03C7BF11195DAB5300A545DD /* OCMExpectationRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF0E195DAB5300A545DD /* OCMExpectationRecorder.h */; };
+ 03C7BF12195DAB5300A545DD /* OCMExpectationRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF0F195DAB5300A545DD /* OCMExpectationRecorder.m */; };
+ 03C7BF13195DAB5300A545DD /* OCMExpectationRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF0F195DAB5300A545DD /* OCMExpectationRecorder.m */; };
+ 03C7BF1619606E7A00A545DD /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03565A1D18F05626003AE91E /* XCTest.framework */; };
+ 03C7BF1719606EFD00A545DD /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 030EF0A814632FD000B04273 /* OCMock.framework */; };
+ 03C9CA1D18F05A75006DF94D /* OCMockObjectProtocolMocksTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA286BFBD8B9D068B41E7EF /* OCMockObjectProtocolMocksTests.m */; };
+ 03C9CA1E18F05A84006DF94D /* OCMArgTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28EDBF243639C57F88A1B /* OCMArgTests.m */; };
+ 03C9CA1F18F05A8E006DF94D /* NSMethodSignatureOCMAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28DEDB9163597B7C49F3D /* NSMethodSignatureOCMAdditionsTests.m */; };
+ 03DCED6D183406BC0059089E /* NSObject+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28991BEFD67DEF2CCF7D2 /* NSObject+OCMAdditions.m */; };
+ 03DCED6F183406DA0059089E /* NSObject+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28C5F4A475BEC0C28BDC3 /* NSObject+OCMAdditions.h */; };
+ 03E98D4B18F308B400522D42 /* OCMLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 03E98D4918F308B400522D42 /* OCMLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E98D4C18F308B400522D42 /* OCMLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 03E98D4918F308B400522D42 /* OCMLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E98D4D18F308B400522D42 /* OCMLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E98D4A18F308B400522D42 /* OCMLocation.m */; };
+ 03E98D4E18F308B400522D42 /* OCMLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E98D4A18F308B400522D42 /* OCMLocation.m */; };
+ 03E98D5018F310EE00522D42 /* OCMockObjectMacroTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E98D4F18F310EE00522D42 /* OCMockObjectMacroTests.m */; };
+ 03E98D5118F310EE00522D42 /* OCMockObjectMacroTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E98D4F18F310EE00522D42 /* OCMockObjectMacroTests.m */; };
+ 2FA2800D12E95D5ABC965753 /* OCMMacroState.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA280987F4EA8A4D79000D0 /* OCMMacroState.m */; };
+ 2FA2805AB1944A206EEE383B /* NSValue+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28896E5EEFD7C2F12C2F8 /* NSValue+OCMAdditions.m */; };
+ 2FA28209EB1F41964DF3031A /* OCMMacroState.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA280987F4EA8A4D79000D0 /* OCMMacroState.m */; };
+ 2FA2821C9066C5E439288C76 /* OCMMacroState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28006D043CBDBBAEF6E3F /* OCMMacroState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2FA28246CD449A01717B1CEC /* OCMockObjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2822E19948FC997965267 /* OCMockObjectTests.m */; };
+ 2FA28295E1F58F40A77D7448 /* OCMockObjectRuntimeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2813F93050582D83E1499 /* OCMockObjectRuntimeTests.m */; };
+ 2FA282F0C0A4CABE4E2C7646 /* OCMInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28CB1EB14C6B2BE9A20C6 /* OCMInvocationMatcher.m */; };
+ 2FA2839F33289795284C32FB /* OCMockObjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2822E19948FC997965267 /* OCMockObjectTests.m */; };
+ 2FA283C39309951ED4DA2969 /* NSValue+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA286EAC1682979C696D4D6 /* NSValue+OCMAdditions.h */; };
+ 2FA284EBCD82935B4F8A5A2C /* OCMInvocationExpectation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA288509D545BDBE094BCC8 /* OCMInvocationExpectation.h */; };
+ 2FA28598D23EC190EE19F3AE /* OCMFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28EC49F6C59B940AE6D00 /* OCMFunctions.h */; };
+ 2FA28641AAD0AC2F876C9E48 /* OCMInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28CCC33B99D6B658E7AF8 /* OCMInvocationMatcher.h */; };
+ 2FA286C7B8862280E6C1A585 /* OCMInvocationExpectation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2875564A6AD0510A847A6 /* OCMInvocationExpectation.m */; };
+ 2FA286F90395E317F983A20A /* OCMFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28C8717BE4B7A89119BA2 /* OCMFunctions.m */; };
+ 2FA287ACE547BB41937BDEC3 /* NSObject+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28C5F4A475BEC0C28BDC3 /* NSObject+OCMAdditions.h */; };
+ 2FA288447C48241BE2CAA63D /* OCMFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28EC49F6C59B940AE6D00 /* OCMFunctions.h */; };
+ 2FA288B20FB3A42BA0B7BAB8 /* OCMInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28CB1EB14C6B2BE9A20C6 /* OCMInvocationMatcher.m */; };
+ 2FA28B6CEF4CC6FD5E7D09B5 /* OCMMacroState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28006D043CBDBBAEF6E3F /* OCMMacroState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2FA28BA90F0D55E4CF6787F0 /* OCMFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28C8717BE4B7A89119BA2 /* OCMFunctions.m */; };
+ 2FA28D38ED9D83A3E0A620B3 /* NSObject+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28991BEFD67DEF2CCF7D2 /* NSObject+OCMAdditions.m */; };
+ 2FA28E1EB6B8536785258DF5 /* OCMInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28CCC33B99D6B658E7AF8 /* OCMInvocationMatcher.h */; };
+ 2FA28E506BE0D91A95A20243 /* OCMInvocationExpectation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2875564A6AD0510A847A6 /* OCMInvocationExpectation.m */; };
+ 2FA28F090622C9DF868CCA8C /* NSValue+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA286EAC1682979C696D4D6 /* NSValue+OCMAdditions.h */; };
+ 2FA28FA53C57236B6DD64E82 /* OCMockObjectRuntimeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2813F93050582D83E1499 /* OCMockObjectRuntimeTests.m */; };
+ 2FA28FE116284C3E4A7FF179 /* OCMInvocationExpectation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA288509D545BDBE094BCC8 /* OCMInvocationExpectation.h */; };
+ 2FA28FEAEF9333D2C214DF53 /* NSValue+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28896E5EEFD7C2F12C2F8 /* NSValue+OCMAdditions.m */; };
+ 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 */; };
+ D31108C71828DBD600737925 /* OCMConstraintTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316211463350E0052CD09 /* OCMConstraintTests.m */; };
+ D31108C81828DBD600737925 /* OCMStubRecorderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316271463350E0052CD09 /* OCMStubRecorderTests.m */; };
+ D31108C91828DBD600737925 /* OCObserverMockObjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B316291463350E0052CD09 /* OCObserverMockObjectTests.m */; };
+ D31108CA1828DBD600737925 /* NSInvocationOCMAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3161F1463350E0052CD09 /* NSInvocationOCMAdditionsTests.m */; };
+ D31108CB1828DC1300737925 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 030EF0DC14632FF700B04273 /* libOCMock.a */; };
+ F0B9510B1B0080D500942C38 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0B9510A1B0080D500942C38 /* Foundation.framework */; };
+ F0B9510C1B0080EC00942C38 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159E146333BF0052CD09 /* OCMockObject.m */; };
+ F0B9510D1B0080EC00942C38 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158C146333BF0052CD09 /* OCClassMockObject.m */; };
+ F0B9510E1B0080EC00942C38 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AA146333BF0052CD09 /* OCPartialMockObject.m */; };
+ F0B9510F1B0080EC00942C38 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315AE146333BF0052CD09 /* OCProtocolMockObject.m */; };
+ F0B951101B0080EC00942C38 /* OCMRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03618D82195B553400389166 /* OCMRecorder.m */; };
+ F0B951111B0080EC00942C38 /* OCMStubRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A0146333BF0052CD09 /* OCMStubRecorder.m */; };
+ F0B951121B0080EC00942C38 /* OCMExpectationRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF0F195DAB5300A545DD /* OCMExpectationRecorder.m */; };
+ F0B951131B0080EC00942C38 /* OCMVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 0322DA6819118B4600CACAF1 /* OCMVerifier.m */; };
+ F0B951141B0080EC00942C38 /* OCMInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28CB1EB14C6B2BE9A20C6 /* OCMInvocationMatcher.m */; };
+ F0B951151B0080EC00942C38 /* OCMInvocationStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C7BF09195DA2F200A545DD /* OCMInvocationStub.m */; };
+ F0B951161B0080EC00942C38 /* OCMInvocationExpectation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA2875564A6AD0510A847A6 /* OCMInvocationExpectation.m */; };
+ F0B951171B0080EC00942C38 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A4146333BF0052CD09 /* OCMRealObjectForwarder.m */; };
+ F0B951181B0080EC00942C38 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31590146333BF0052CD09 /* OCMBlockCaller.m */; };
+ F0B951191B0080EC00942C38 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31592146333BF0052CD09 /* OCMBoxedReturnValueProvider.m */; };
+ F0B9511A1B0080EC00942C38 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31596146333BF0052CD09 /* OCMExceptionReturnValueProvider.m */; };
+ F0B9511B1B0080EC00942C38 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31598146333BF0052CD09 /* OCMIndirectReturnValueProvider.m */; };
+ F0B9511C1B0080EC00942C38 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159A146333BF0052CD09 /* OCMNotificationPoster.m */; };
+ F0B9511D1B0080EC00942C38 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A6146333BF0052CD09 /* OCMReturnValueProvider.m */; };
+ F0B9511E1B0080EC00942C38 /* OCMLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 03E98D4A18F308B400522D42 /* OCMLocation.m */; };
+ F0B9511F1B0080EC00942C38 /* OCMMacroState.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA280987F4EA8A4D79000D0 /* OCMMacroState.m */; };
+ F0B951201B0080EC00942C38 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A8146333BF0052CD09 /* OCObserverMockObject.m */; };
+ F0B951211B0080EC00942C38 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3159C146333BF0052CD09 /* OCMObserverRecorder.m */; };
+ F0B951221B0080EC00942C38 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158E146333BF0052CD09 /* OCMArg.m */; };
+ F0B951231B0080EC00942C38 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31594146333BF0052CD09 /* OCMConstraint.m */; };
+ F0B951241B0080EC00942C38 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B315A2146333BF0052CD09 /* OCMPassByRefSetter.m */; };
+ F0B951251B0080EC00942C38 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31586146333BF0052CD09 /* NSInvocation+OCMAdditions.m */; };
+ F0B951261B0080EC00942C38 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B31588146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m */; };
+ F0B951271B0080EC00942C38 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B3158A146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m */; };
+ F0B951281B0080EC00942C38 /* NSObject+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28991BEFD67DEF2CCF7D2 /* NSObject+OCMAdditions.m */; };
+ F0B951291B0080EC00942C38 /* NSValue+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28896E5EEFD7C2F12C2F8 /* NSValue+OCMAdditions.m */; };
+ F0B9512A1B0080EC00942C38 /* OCMFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FA28C8717BE4B7A89119BA2 /* OCMFunctions.m */; };
+ F0B9512B1B00810C00942C38 /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 030EF0B814632FD000B04273 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B9512C1B00810C00942C38 /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159D146333BF0052CD09 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B9512D1B00810C00942C38 /* OCClassMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158B146333BF0052CD09 /* OCClassMockObject.h */; };
+ F0B9512E1B00810C00942C38 /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A9146333BF0052CD09 /* OCPartialMockObject.h */; };
+ F0B9512F1B00810C00942C38 /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315AD146333BF0052CD09 /* OCProtocolMockObject.h */; };
+ F0B951301B00810C00942C38 /* OCMRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03618D81195B553400389166 /* OCMRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951311B00810C00942C38 /* OCMStubRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159F146333BF0052CD09 /* OCMStubRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951321B00810C00942C38 /* OCMExpectationRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF0E195DAB5300A545DD /* OCMExpectationRecorder.h */; };
+ F0B951331B00810C00942C38 /* OCMVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 0322DA6719118B4600CACAF1 /* OCMVerifier.h */; };
+ F0B951341B00810C00942C38 /* OCMInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28CCC33B99D6B658E7AF8 /* OCMInvocationMatcher.h */; };
+ F0B951351B00810C00942C38 /* OCMInvocationStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C7BF08195DA2F200A545DD /* OCMInvocationStub.h */; };
+ F0B951361B00810C00942C38 /* OCMInvocationExpectation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA288509D545BDBE094BCC8 /* OCMInvocationExpectation.h */; };
+ F0B951371B00810C00942C38 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A3146333BF0052CD09 /* OCMRealObjectForwarder.h */; };
+ F0B951381B00810C00942C38 /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158F146333BF0052CD09 /* OCMBlockCaller.h */; };
+ F0B951391B00810C00942C38 /* OCMBoxedReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31591146333BF0052CD09 /* OCMBoxedReturnValueProvider.h */; };
+ F0B9513A1B00810C00942C38 /* OCMExceptionReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31595146333BF0052CD09 /* OCMExceptionReturnValueProvider.h */; };
+ F0B9513B1B00810C00942C38 /* OCMIndirectReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31597146333BF0052CD09 /* OCMIndirectReturnValueProvider.h */; };
+ F0B9513C1B00810C00942C38 /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31599146333BF0052CD09 /* OCMNotificationPoster.h */; };
+ F0B9513D1B00810C00942C38 /* OCMReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A5146333BF0052CD09 /* OCMReturnValueProvider.h */; };
+ F0B9513E1B00810C00942C38 /* OCMLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 03E98D4918F308B400522D42 /* OCMLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B9513F1B00810C00942C38 /* OCMMacroState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28006D043CBDBBAEF6E3F /* OCMMacroState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951401B00810C00942C38 /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A7146333BF0052CD09 /* OCObserverMockObject.h */; };
+ F0B951411B00810C00942C38 /* OCMObserverRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3159B146333BF0052CD09 /* OCMObserverRecorder.h */; };
+ F0B951421B00810C00942C38 /* OCMArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B3158D146333BF0052CD09 /* OCMArg.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951431B00810C00942C38 /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31593146333BF0052CD09 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951441B00810C00942C38 /* OCMPassByRefSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B315A1146333BF0052CD09 /* OCMPassByRefSetter.h */; };
+ F0B951451B00810C00942C38 /* NSInvocation+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31585146333BF0052CD09 /* NSInvocation+OCMAdditions.h */; };
+ F0B951461B00810C00942C38 /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31587146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h */; };
+ F0B951471B00810C00942C38 /* NSNotificationCenter+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03B31589146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ F0B951481B00810C00942C38 /* NSObject+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28C5F4A475BEC0C28BDC3 /* NSObject+OCMAdditions.h */; };
+ F0B951491B00810C00942C38 /* NSValue+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA286EAC1682979C696D4D6 /* NSValue+OCMAdditions.h */; };
+ F0B9514A1B00810C00942C38 /* OCMFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FA28EC49F6C59B940AE6D00 /* OCMFunctions.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 03565A3C18F0566F003AE91E /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 030EF09E14632FD000B04273 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 030EF0A714632FD000B04273;
+ remoteInfo = OCMock;
+ };
+ D31108BE1828DB8700737925 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 030EF09E14632FD000B04273 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 030EF0DB14632FF700B04273;
+ remoteInfo = OCMockLib;
+ };
+/* End PBXContainerItemProxy section */
+
+/* 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 = "<group>"; };
+ 030EF0B514632FD000B04273 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 030EF0B714632FD000B04273 /* OCMock-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMock-Prefix.pch"; sourceTree = "<group>"; };
+ 030EF0B814632FD000B04273 /* OCMock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCMock.h; sourceTree = "<group>"; };
+ 030EF0DC14632FF700B04273 /* libOCMock.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOCMock.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 030EF0E114632FF700B04273 /* OCMockLib-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMockLib-Prefix.pch"; sourceTree = "<group>"; };
+ 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectVerifyAfterRunTests.m; sourceTree = "<group>"; };
+ 0322DA6719118B4600CACAF1 /* OCMVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMVerifier.h; sourceTree = "<group>"; };
+ 0322DA6819118B4600CACAF1 /* OCMVerifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMVerifier.m; sourceTree = "<group>"; };
+ 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 = "<group>"; };
+ 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 = "<group>"; };
+ 03565A3718F0566F003AE91E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 03565A3B18F0566F003AE91E /* OCMockTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMockTests-Prefix.pch"; sourceTree = "<group>"; };
+ 03565A4D18F05877003AE91E /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCHamcrest.framework; path = "../../../../../Library/Developer/Xcode/DerivedData/OCMock-eolppnbannkelbekssbvglkcoyjl/Build/Products/Debug/Frameworks/OCHamcrest.framework"; sourceTree = "<group>"; };
+ 03618D81195B553400389166 /* OCMRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMRecorder.h; sourceTree = "<group>"; };
+ 03618D82195B553400389166 /* OCMRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMRecorder.m; sourceTree = "<group>"; };
+ 037ECD5318FAD84100AF0E4C /* OCMInvocationMatcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMInvocationMatcherTests.m; sourceTree = "<group>"; };
+ 039F91C516EFB493006C3D70 /* OCMockObjectClassMethodMockingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectClassMethodMockingTests.m; sourceTree = "<group>"; };
+ 03AC5C1416DF9FA500D82ECD /* OCMockObjectPartialMocksTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectPartialMocksTests.m; sourceTree = "<group>"; };
+ 03B31585146333BF0052CD09 /* NSInvocation+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSInvocation+OCMAdditions.h"; sourceTree = "<group>"; };
+ 03B31586146333BF0052CD09 /* NSInvocation+OCMAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSInvocation+OCMAdditions.m"; sourceTree = "<group>"; };
+ 03B31587146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMethodSignature+OCMAdditions.h"; sourceTree = "<group>"; };
+ 03B31588146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMethodSignature+OCMAdditions.m"; sourceTree = "<group>"; };
+ 03B31589146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = "<group>"; };
+ 03B3158A146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNotificationCenter+OCMAdditions.m"; sourceTree = "<group>"; };
+ 03B3158B146333BF0052CD09 /* OCClassMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCClassMockObject.h; sourceTree = "<group>"; };
+ 03B3158C146333BF0052CD09 /* OCClassMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCClassMockObject.m; sourceTree = "<group>"; };
+ 03B3158D146333BF0052CD09 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = "<group>"; };
+ 03B3158E146333BF0052CD09 /* OCMArg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMArg.m; sourceTree = "<group>"; };
+ 03B3158F146333BF0052CD09 /* OCMBlockCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMBlockCaller.h; sourceTree = "<group>"; };
+ 03B31590146333BF0052CD09 /* OCMBlockCaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMBlockCaller.m; sourceTree = "<group>"; };
+ 03B31591146333BF0052CD09 /* OCMBoxedReturnValueProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMBoxedReturnValueProvider.h; sourceTree = "<group>"; };
+ 03B31592146333BF0052CD09 /* OCMBoxedReturnValueProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMBoxedReturnValueProvider.m; sourceTree = "<group>"; };
+ 03B31593146333BF0052CD09 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; };
+ 03B31594146333BF0052CD09 /* OCMConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMConstraint.m; sourceTree = "<group>"; };
+ 03B31595146333BF0052CD09 /* OCMExceptionReturnValueProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMExceptionReturnValueProvider.h; sourceTree = "<group>"; };
+ 03B31596146333BF0052CD09 /* OCMExceptionReturnValueProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMExceptionReturnValueProvider.m; sourceTree = "<group>"; };
+ 03B31597146333BF0052CD09 /* OCMIndirectReturnValueProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMIndirectReturnValueProvider.h; sourceTree = "<group>"; };
+ 03B31598146333BF0052CD09 /* OCMIndirectReturnValueProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMIndirectReturnValueProvider.m; sourceTree = "<group>"; };
+ 03B31599146333BF0052CD09 /* OCMNotificationPoster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMNotificationPoster.h; sourceTree = "<group>"; };
+ 03B3159A146333BF0052CD09 /* OCMNotificationPoster.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMNotificationPoster.m; sourceTree = "<group>"; };
+ 03B3159B146333BF0052CD09 /* OCMObserverRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMObserverRecorder.h; sourceTree = "<group>"; };
+ 03B3159C146333BF0052CD09 /* OCMObserverRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMObserverRecorder.m; sourceTree = "<group>"; };
+ 03B3159D146333BF0052CD09 /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = "<group>"; };
+ 03B3159E146333BF0052CD09 /* OCMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObject.m; sourceTree = "<group>"; };
+ 03B3159F146333BF0052CD09 /* OCMStubRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMStubRecorder.h; sourceTree = "<group>"; };
+ 03B315A0146333BF0052CD09 /* OCMStubRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMStubRecorder.m; sourceTree = "<group>"; };
+ 03B315A1146333BF0052CD09 /* OCMPassByRefSetter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMPassByRefSetter.h; sourceTree = "<group>"; };
+ 03B315A2146333BF0052CD09 /* OCMPassByRefSetter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMPassByRefSetter.m; sourceTree = "<group>"; };
+ 03B315A3146333BF0052CD09 /* OCMRealObjectForwarder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMRealObjectForwarder.h; sourceTree = "<group>"; };
+ 03B315A4146333BF0052CD09 /* OCMRealObjectForwarder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMRealObjectForwarder.m; sourceTree = "<group>"; };
+ 03B315A5146333BF0052CD09 /* OCMReturnValueProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMReturnValueProvider.h; sourceTree = "<group>"; };
+ 03B315A6146333BF0052CD09 /* OCMReturnValueProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMReturnValueProvider.m; sourceTree = "<group>"; };
+ 03B315A7146333BF0052CD09 /* OCObserverMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCObserverMockObject.h; sourceTree = "<group>"; };
+ 03B315A8146333BF0052CD09 /* OCObserverMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCObserverMockObject.m; sourceTree = "<group>"; };
+ 03B315A9146333BF0052CD09 /* OCPartialMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCPartialMockObject.h; sourceTree = "<group>"; };
+ 03B315AA146333BF0052CD09 /* OCPartialMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCPartialMockObject.m; sourceTree = "<group>"; };
+ 03B315AD146333BF0052CD09 /* OCProtocolMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCProtocolMockObject.h; sourceTree = "<group>"; };
+ 03B315AE146333BF0052CD09 /* OCProtocolMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCProtocolMockObject.m; sourceTree = "<group>"; };
+ 03B3161F1463350E0052CD09 /* NSInvocationOCMAdditionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSInvocationOCMAdditionsTests.m; sourceTree = "<group>"; };
+ 03B316211463350E0052CD09 /* OCMConstraintTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMConstraintTests.m; sourceTree = "<group>"; };
+ 03B316231463350E0052CD09 /* OCMockObjectHamcrestTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCMockObjectHamcrestTests.mm; sourceTree = "<group>"; };
+ 03B316271463350E0052CD09 /* OCMStubRecorderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMStubRecorderTests.m; sourceTree = "<group>"; };
+ 03B316291463350E0052CD09 /* OCObserverMockObjectTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCObserverMockObjectTests.m; sourceTree = "<group>"; };
+ 03B3168F14633FAB0052CD09 /* Changes.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Changes.txt; sourceTree = "<group>"; };
+ 03B3169014633FAB0052CD09 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = "<group>"; };
+ 03C7BF08195DA2F200A545DD /* OCMInvocationStub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMInvocationStub.h; sourceTree = "<group>"; };
+ 03C7BF09195DA2F200A545DD /* OCMInvocationStub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMInvocationStub.m; sourceTree = "<group>"; };
+ 03C7BF0E195DAB5300A545DD /* OCMExpectationRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMExpectationRecorder.h; sourceTree = "<group>"; };
+ 03C7BF0F195DAB5300A545DD /* OCMExpectationRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMExpectationRecorder.m; sourceTree = "<group>"; };
+ 03E98D4918F308B400522D42 /* OCMLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMLocation.h; sourceTree = "<group>"; };
+ 03E98D4A18F308B400522D42 /* OCMLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMLocation.m; sourceTree = "<group>"; };
+ 03E98D4F18F310EE00522D42 /* OCMockObjectMacroTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectMacroTests.m; sourceTree = "<group>"; };
+ 2FA28006D043CBDBBAEF6E3F /* OCMMacroState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMMacroState.h; sourceTree = "<group>"; };
+ 2FA280987F4EA8A4D79000D0 /* OCMMacroState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMMacroState.m; sourceTree = "<group>"; };
+ 2FA2813F93050582D83E1499 /* OCMockObjectRuntimeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectRuntimeTests.m; sourceTree = "<group>"; };
+ 2FA2822E19948FC997965267 /* OCMockObjectTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectTests.m; sourceTree = "<group>"; };
+ 2FA286BFBD8B9D068B41E7EF /* OCMockObjectProtocolMocksTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMockObjectProtocolMocksTests.m; sourceTree = "<group>"; };
+ 2FA286EAC1682979C696D4D6 /* NSValue+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+OCMAdditions.h"; sourceTree = "<group>"; };
+ 2FA2875564A6AD0510A847A6 /* OCMInvocationExpectation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMInvocationExpectation.m; sourceTree = "<group>"; };
+ 2FA288509D545BDBE094BCC8 /* OCMInvocationExpectation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMInvocationExpectation.h; sourceTree = "<group>"; };
+ 2FA28896E5EEFD7C2F12C2F8 /* NSValue+OCMAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValue+OCMAdditions.m"; sourceTree = "<group>"; };
+ 2FA28991BEFD67DEF2CCF7D2 /* NSObject+OCMAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+OCMAdditions.m"; sourceTree = "<group>"; };
+ 2FA28C5F4A475BEC0C28BDC3 /* NSObject+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+OCMAdditions.h"; sourceTree = "<group>"; };
+ 2FA28C8717BE4B7A89119BA2 /* OCMFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMFunctions.m; sourceTree = "<group>"; };
+ 2FA28CB1EB14C6B2BE9A20C6 /* OCMInvocationMatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMInvocationMatcher.m; sourceTree = "<group>"; };
+ 2FA28CCC33B99D6B658E7AF8 /* OCMInvocationMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMInvocationMatcher.h; sourceTree = "<group>"; };
+ 2FA28DEDB9163597B7C49F3D /* NSMethodSignatureOCMAdditionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSMethodSignatureOCMAdditionsTests.m; sourceTree = "<group>"; };
+ 2FA28EC49F6C59B940AE6D00 /* OCMFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMFunctions.h; sourceTree = "<group>"; };
+ 2FA28EDBF243639C57F88A1B /* OCMArgTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMArgTests.m; sourceTree = "<group>"; };
+ 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 = "<group>"; };
+ D31108B91828DB8700737925 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ D31108BD1828DB8700737925 /* OCMockLibTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OCMockLibTests-Prefix.pch"; sourceTree = "<group>"; };
+ 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 */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 030EF0A414632FD000B04273 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 033E1FF414FEF5E0004456B0 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 030EF0D914632FF700B04273 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03565A2E18F0566E003AE91E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C7BF1619606E7A00A545DD /* XCTest.framework in Frameworks */,
+ 03C7BF1719606EFD00A545DD /* OCMock.framework in Frameworks */,
+ 03565A4E18F05877003AE91E /* OCHamcrest.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D31108AA1828DB8700737925 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D31108CB1828DC1300737925 /* libOCMock.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F0B950ED1B0080BE00942C38 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F0B9510B1B0080D500942C38 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 030EF09C14632FD000B04273 = {
+ isa = PBXGroup;
+ children = (
+ 03B3168F14633FAB0052CD09 /* Changes.txt */,
+ 03B3169014633FAB0052CD09 /* License.txt */,
+ 030EF0B114632FD000B04273 /* OCMock */,
+ 03565A3318F0566F003AE91E /* OCMockTests */,
+ 030EF0DF14632FF700B04273 /* OCMockLib */,
+ D31108B51828DB8700737925 /* OCMockLibTests */,
+ 03565A1C18F05626003AE91E /* Frameworks */,
+ 030EF0A914632FD000B04273 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 030EF0A914632FD000B04273 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 030EF0A814632FD000B04273 /* OCMock.framework */,
+ 030EF0DC14632FF700B04273 /* libOCMock.a */,
+ D31108AD1828DB8700737925 /* OCMockLibTests.xctest */,
+ 03565A3118F0566E003AE91E /* OCMockTests.xctest */,
+ F0B950F11B0080BE00942C38 /* OCMock.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 030EF0B114632FD000B04273 /* OCMock */ = {
+ isa = PBXGroup;
+ children = (
+ 030EF0B814632FD000B04273 /* OCMock.h */,
+ 03B315841463334E0052CD09 /* Core Mocks */,
+ 03B3161B146334530052CD09 /* Observer Mocks */,
+ 03B3161A146334320052CD09 /* Argument Handling */,
+ 03B31618146333CA0052CD09 /* Foundation Additions */,
+ 030EF0B214632FD000B04273 /* Supporting Files */,
+ 033E1FF914FEF724004456B0 /* Frameworks */,
+ );
+ path = OCMock;
+ sourceTree = "<group>";
+ };
+ 030EF0B214632FD000B04273 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ F0B950F41B0080BE00942C38 /* Info.plist */,
+ 030EF0B314632FD000B04273 /* OCMock-Info.plist */,
+ 030EF0B414632FD000B04273 /* InfoPlist.strings */,
+ 030EF0B714632FD000B04273 /* OCMock-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 030EF0DF14632FF700B04273 /* OCMockLib */ = {
+ isa = PBXGroup;
+ children = (
+ 030EF0E014632FF700B04273 /* Supporting Files */,
+ );
+ path = OCMockLib;
+ sourceTree = "<group>";
+ };
+ 030EF0E014632FF700B04273 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 030EF0E114632FF700B04273 /* OCMockLib-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 033E1FF914FEF724004456B0 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 033E1FF314FEF5E0004456B0 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 03565A1C18F05626003AE91E /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ F0B9510A1B0080D500942C38 /* Foundation.framework */,
+ 03565A4D18F05877003AE91E /* OCHamcrest.framework */,
+ 03565A1D18F05626003AE91E /* XCTest.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 03565A3318F0566F003AE91E /* OCMockTests */ = {
+ isa = PBXGroup;
+ children = (
+ 03AC5C1416DF9FA500D82ECD /* OCMockObjectPartialMocksTests.m */,
+ 039F91C516EFB493006C3D70 /* OCMockObjectClassMethodMockingTests.m */,
+ 2FA286BFBD8B9D068B41E7EF /* OCMockObjectProtocolMocksTests.m */,
+ 03E98D4F18F310EE00522D42 /* OCMockObjectMacroTests.m */,
+ 0354D71F16F23AF5001766BB /* OCMockObjectForwardingTargetTests.m */,
+ 0322DA64191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m */,
+ 03B316231463350E0052CD09 /* OCMockObjectHamcrestTests.mm */,
+ 03B316211463350E0052CD09 /* OCMConstraintTests.m */,
+ 03B316271463350E0052CD09 /* OCMStubRecorderTests.m */,
+ 2FA28EDBF243639C57F88A1B /* OCMArgTests.m */,
+ 03B316291463350E0052CD09 /* OCObserverMockObjectTests.m */,
+ 03B3161F1463350E0052CD09 /* NSInvocationOCMAdditionsTests.m */,
+ 2FA28DEDB9163597B7C49F3D /* NSMethodSignatureOCMAdditionsTests.m */,
+ 037ECD5318FAD84100AF0E4C /* OCMInvocationMatcherTests.m */,
+ 03565A3418F0566F003AE91E /* Supporting Files */,
+ 2FA2813F93050582D83E1499 /* OCMockObjectRuntimeTests.m */,
+ 2FA2822E19948FC997965267 /* OCMockObjectTests.m */,
+ );
+ path = OCMockTests;
+ sourceTree = "<group>";
+ };
+ 03565A3418F0566F003AE91E /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 03565A3518F0566F003AE91E /* OCMockTests-Info.plist */,
+ 03565A3618F0566F003AE91E /* InfoPlist.strings */,
+ 03565A3B18F0566F003AE91E /* OCMockTests-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 037ECD5618FB0D2E00AF0E4C /* Helper */ = {
+ isa = PBXGroup;
+ children = (
+ 03E98D4918F308B400522D42 /* OCMLocation.h */,
+ 03E98D4A18F308B400522D42 /* OCMLocation.m */,
+ 2FA28006D043CBDBBAEF6E3F /* OCMMacroState.h */,
+ 2FA280987F4EA8A4D79000D0 /* OCMMacroState.m */,
+ );
+ name = Helper;
+ sourceTree = "<group>";
+ };
+ 03B315841463334E0052CD09 /* Core Mocks */ = {
+ isa = PBXGroup;
+ children = (
+ 03B3159D146333BF0052CD09 /* OCMockObject.h */,
+ 03B3159E146333BF0052CD09 /* OCMockObject.m */,
+ 03B3158B146333BF0052CD09 /* OCClassMockObject.h */,
+ 03B3158C146333BF0052CD09 /* OCClassMockObject.m */,
+ 03B315A9146333BF0052CD09 /* OCPartialMockObject.h */,
+ 03B315AA146333BF0052CD09 /* OCPartialMockObject.m */,
+ 03B315AD146333BF0052CD09 /* OCProtocolMockObject.h */,
+ 03B315AE146333BF0052CD09 /* OCProtocolMockObject.m */,
+ 03C7BF14195DAB7900A545DD /* Recorder */,
+ 03C7BF15195DAB8500A545DD /* Matcher */,
+ 03B31619146334040052CD09 /* Actions */,
+ 037ECD5618FB0D2E00AF0E4C /* Helper */,
+ );
+ name = "Core Mocks";
+ sourceTree = "<group>";
+ };
+ 03B31618146333CA0052CD09 /* Foundation Additions */ = {
+ isa = PBXGroup;
+ children = (
+ 03B31585146333BF0052CD09 /* NSInvocation+OCMAdditions.h */,
+ 03B31586146333BF0052CD09 /* NSInvocation+OCMAdditions.m */,
+ 03B31587146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h */,
+ 03B31588146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m */,
+ 03B31589146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h */,
+ 03B3158A146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m */,
+ 2FA28C5F4A475BEC0C28BDC3 /* NSObject+OCMAdditions.h */,
+ 2FA28991BEFD67DEF2CCF7D2 /* NSObject+OCMAdditions.m */,
+ 2FA286EAC1682979C696D4D6 /* NSValue+OCMAdditions.h */,
+ 2FA28896E5EEFD7C2F12C2F8 /* NSValue+OCMAdditions.m */,
+ 2FA28C8717BE4B7A89119BA2 /* OCMFunctions.m */,
+ 2FA28EC49F6C59B940AE6D00 /* OCMFunctions.h */,
+ );
+ name = "Foundation Additions";
+ sourceTree = "<group>";
+ };
+ 03B31619146334040052CD09 /* Actions */ = {
+ isa = PBXGroup;
+ children = (
+ 03B315A3146333BF0052CD09 /* OCMRealObjectForwarder.h */,
+ 03B315A4146333BF0052CD09 /* OCMRealObjectForwarder.m */,
+ 03B3158F146333BF0052CD09 /* OCMBlockCaller.h */,
+ 03B31590146333BF0052CD09 /* OCMBlockCaller.m */,
+ 03B31591146333BF0052CD09 /* OCMBoxedReturnValueProvider.h */,
+ 03B31592146333BF0052CD09 /* OCMBoxedReturnValueProvider.m */,
+ 03B31595146333BF0052CD09 /* OCMExceptionReturnValueProvider.h */,
+ 03B31596146333BF0052CD09 /* OCMExceptionReturnValueProvider.m */,
+ 03B31597146333BF0052CD09 /* OCMIndirectReturnValueProvider.h */,
+ 03B31598146333BF0052CD09 /* OCMIndirectReturnValueProvider.m */,
+ 03B31599146333BF0052CD09 /* OCMNotificationPoster.h */,
+ 03B3159A146333BF0052CD09 /* OCMNotificationPoster.m */,
+ 03B315A5146333BF0052CD09 /* OCMReturnValueProvider.h */,
+ 03B315A6146333BF0052CD09 /* OCMReturnValueProvider.m */,
+ );
+ name = Actions;
+ sourceTree = "<group>";
+ };
+ 03B3161A146334320052CD09 /* Argument Handling */ = {
+ isa = PBXGroup;
+ children = (
+ 03B3158D146333BF0052CD09 /* OCMArg.h */,
+ 03B3158E146333BF0052CD09 /* OCMArg.m */,
+ 03B31593146333BF0052CD09 /* OCMConstraint.h */,
+ 03B31594146333BF0052CD09 /* OCMConstraint.m */,
+ 03B315A1146333BF0052CD09 /* OCMPassByRefSetter.h */,
+ 03B315A2146333BF0052CD09 /* OCMPassByRefSetter.m */,
+ );
+ name = "Argument Handling";
+ sourceTree = "<group>";
+ };
+ 03B3161B146334530052CD09 /* Observer Mocks */ = {
+ isa = PBXGroup;
+ children = (
+ 03B315A7146333BF0052CD09 /* OCObserverMockObject.h */,
+ 03B315A8146333BF0052CD09 /* OCObserverMockObject.m */,
+ 03B3159B146333BF0052CD09 /* OCMObserverRecorder.h */,
+ 03B3159C146333BF0052CD09 /* OCMObserverRecorder.m */,
+ );
+ name = "Observer Mocks";
+ sourceTree = "<group>";
+ };
+ 03C7BF14195DAB7900A545DD /* Recorder */ = {
+ isa = PBXGroup;
+ children = (
+ 03618D81195B553400389166 /* OCMRecorder.h */,
+ 03618D82195B553400389166 /* OCMRecorder.m */,
+ 03B3159F146333BF0052CD09 /* OCMStubRecorder.h */,
+ 03B315A0146333BF0052CD09 /* OCMStubRecorder.m */,
+ 03C7BF0E195DAB5300A545DD /* OCMExpectationRecorder.h */,
+ 03C7BF0F195DAB5300A545DD /* OCMExpectationRecorder.m */,
+ 0322DA6719118B4600CACAF1 /* OCMVerifier.h */,
+ 0322DA6819118B4600CACAF1 /* OCMVerifier.m */,
+ );
+ name = Recorder;
+ sourceTree = "<group>";
+ };
+ 03C7BF15195DAB8500A545DD /* Matcher */ = {
+ isa = PBXGroup;
+ children = (
+ 2FA28CCC33B99D6B658E7AF8 /* OCMInvocationMatcher.h */,
+ 2FA28CB1EB14C6B2BE9A20C6 /* OCMInvocationMatcher.m */,
+ 03C7BF08195DA2F200A545DD /* OCMInvocationStub.h */,
+ 03C7BF09195DA2F200A545DD /* OCMInvocationStub.m */,
+ 2FA288509D545BDBE094BCC8 /* OCMInvocationExpectation.h */,
+ 2FA2875564A6AD0510A847A6 /* OCMInvocationExpectation.m */,
+ );
+ name = Matcher;
+ sourceTree = "<group>";
+ };
+ D31108B51828DB8700737925 /* OCMockLibTests */ = {
+ isa = PBXGroup;
+ children = (
+ D31108B61828DB8700737925 /* Supporting Files */,
+ );
+ path = OCMockLibTests;
+ sourceTree = "<group>";
+ };
+ D31108B61828DB8700737925 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ D31108B71828DB8700737925 /* OCMockLibTests-Info.plist */,
+ D31108B81828DB8700737925 /* InfoPlist.strings */,
+ D31108BD1828DB8700737925 /* OCMockLibTests-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 030EF0A514632FD000B04273 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B3168B14633A4F0052CD09 /* OCMock.h in Headers */,
+ 03B315EB146333C00052CD09 /* OCMockObject.h in Headers */,
+ 03B315F0146333C00052CD09 /* OCMStubRecorder.h in Headers */,
+ 03B315C3146333BF0052CD09 /* OCMArg.h in Headers */,
+ 03B315D2146333BF0052CD09 /* OCMConstraint.h in Headers */,
+ 03618D83195B553400389166 /* OCMRecorder.h in Headers */,
+ 03B315B9146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h in Headers */,
+ 03B315AF146333BF0052CD09 /* NSInvocation+OCMAdditions.h in Headers */,
+ 03B315B4146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h in Headers */,
+ 03C7BF0A195DA2F200A545DD /* OCMInvocationStub.h in Headers */,
+ 03B315BE146333BF0052CD09 /* OCClassMockObject.h in Headers */,
+ 03B315C8146333BF0052CD09 /* OCMBlockCaller.h in Headers */,
+ 03C7BF10195DAB5300A545DD /* OCMExpectationRecorder.h in Headers */,
+ 03B315CD146333BF0052CD09 /* OCMBoxedReturnValueProvider.h in Headers */,
+ 03B315D7146333BF0052CD09 /* OCMExceptionReturnValueProvider.h in Headers */,
+ 03B315DC146333BF0052CD09 /* OCMIndirectReturnValueProvider.h in Headers */,
+ 03E98D4B18F308B400522D42 /* OCMLocation.h in Headers */,
+ 03B315E1146333BF0052CD09 /* OCMNotificationPoster.h in Headers */,
+ 03B315E6146333BF0052CD09 /* OCMObserverRecorder.h in Headers */,
+ 03B315F5146333C00052CD09 /* OCMPassByRefSetter.h in Headers */,
+ 03B315FA146333C00052CD09 /* OCMRealObjectForwarder.h in Headers */,
+ 03B315FF146333C00052CD09 /* OCMReturnValueProvider.h in Headers */,
+ 03B31604146333C00052CD09 /* OCObserverMockObject.h in Headers */,
+ 03B31609146333C00052CD09 /* OCPartialMockObject.h in Headers */,
+ 03B31613146333C00052CD09 /* OCProtocolMockObject.h in Headers */,
+ 2FA287ACE547BB41937BDEC3 /* NSObject+OCMAdditions.h in Headers */,
+ 2FA28641AAD0AC2F876C9E48 /* OCMInvocationMatcher.h in Headers */,
+ 0322DA6919118B4600CACAF1 /* OCMVerifier.h in Headers */,
+ 2FA288447C48241BE2CAA63D /* OCMFunctions.h in Headers */,
+ 2FA28FE116284C3E4A7FF179 /* OCMInvocationExpectation.h in Headers */,
+ 2FA2821C9066C5E439288C76 /* OCMMacroState.h in Headers */,
+ 2FA28F090622C9DF868CCA8C /* NSValue+OCMAdditions.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 030EF0DA14632FF700B04273 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B3168E14633D9C0052CD09 /* OCMock.h in Headers */,
+ 03B315EC146333C00052CD09 /* OCMockObject.h in Headers */,
+ 03B315F1146333C00052CD09 /* OCMStubRecorder.h in Headers */,
+ 03B315C4146333BF0052CD09 /* OCMArg.h in Headers */,
+ 03B315D3146333BF0052CD09 /* OCMConstraint.h in Headers */,
+ 03618D84195B553400389166 /* OCMRecorder.h in Headers */,
+ 03B315BA146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.h in Headers */,
+ 03B315B0146333BF0052CD09 /* NSInvocation+OCMAdditions.h in Headers */,
+ 03B315B5146333BF0052CD09 /* NSMethodSignature+OCMAdditions.h in Headers */,
+ 03C7BF0B195DA2F200A545DD /* OCMInvocationStub.h in Headers */,
+ 03B315BF146333BF0052CD09 /* OCClassMockObject.h in Headers */,
+ 03B315C9146333BF0052CD09 /* OCMBlockCaller.h in Headers */,
+ 03C7BF11195DAB5300A545DD /* OCMExpectationRecorder.h in Headers */,
+ 03B315CE146333BF0052CD09 /* OCMBoxedReturnValueProvider.h in Headers */,
+ 03B315D8146333BF0052CD09 /* OCMExceptionReturnValueProvider.h in Headers */,
+ 03B315DD146333BF0052CD09 /* OCMIndirectReturnValueProvider.h in Headers */,
+ 03E98D4C18F308B400522D42 /* OCMLocation.h in Headers */,
+ 03B315E2146333BF0052CD09 /* OCMNotificationPoster.h in Headers */,
+ 03B315E7146333BF0052CD09 /* OCMObserverRecorder.h in Headers */,
+ 03B315F6146333C00052CD09 /* OCMPassByRefSetter.h in Headers */,
+ 03B315FB146333C00052CD09 /* OCMRealObjectForwarder.h in Headers */,
+ 03DCED6F183406DA0059089E /* NSObject+OCMAdditions.h in Headers */,
+ 03B31600146333C00052CD09 /* OCMReturnValueProvider.h in Headers */,
+ 03B31605146333C00052CD09 /* OCObserverMockObject.h in Headers */,
+ 03B3160A146333C00052CD09 /* OCPartialMockObject.h in Headers */,
+ 03B31614146333C00052CD09 /* OCProtocolMockObject.h in Headers */,
+ 2FA28E1EB6B8536785258DF5 /* OCMInvocationMatcher.h in Headers */,
+ 0322DA6A19118B4600CACAF1 /* OCMVerifier.h in Headers */,
+ 2FA28598D23EC190EE19F3AE /* OCMFunctions.h in Headers */,
+ 2FA284EBCD82935B4F8A5A2C /* OCMInvocationExpectation.h in Headers */,
+ 2FA28B6CEF4CC6FD5E7D09B5 /* OCMMacroState.h in Headers */,
+ 2FA283C39309951ED4DA2969 /* NSValue+OCMAdditions.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F0B950EE1B0080BE00942C38 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F0B9512B1B00810C00942C38 /* OCMock.h in Headers */,
+ F0B9512C1B00810C00942C38 /* OCMockObject.h in Headers */,
+ F0B951311B00810C00942C38 /* OCMStubRecorder.h in Headers */,
+ F0B951421B00810C00942C38 /* OCMArg.h in Headers */,
+ F0B951431B00810C00942C38 /* OCMConstraint.h in Headers */,
+ F0B951301B00810C00942C38 /* OCMRecorder.h in Headers */,
+ F0B951471B00810C00942C38 /* NSNotificationCenter+OCMAdditions.h in Headers */,
+ F0B9513E1B00810C00942C38 /* OCMLocation.h in Headers */,
+ F0B9513F1B00810C00942C38 /* OCMMacroState.h in Headers */,
+ F0B9512D1B00810C00942C38 /* OCClassMockObject.h in Headers */,
+ F0B9512E1B00810C00942C38 /* OCPartialMockObject.h in Headers */,
+ F0B9512F1B00810C00942C38 /* OCProtocolMockObject.h in Headers */,
+ F0B951321B00810C00942C38 /* OCMExpectationRecorder.h in Headers */,
+ F0B951331B00810C00942C38 /* OCMVerifier.h in Headers */,
+ F0B951341B00810C00942C38 /* OCMInvocationMatcher.h in Headers */,
+ F0B951351B00810C00942C38 /* OCMInvocationStub.h in Headers */,
+ F0B951361B00810C00942C38 /* OCMInvocationExpectation.h in Headers */,
+ F0B951371B00810C00942C38 /* OCMRealObjectForwarder.h in Headers */,
+ F0B951381B00810C00942C38 /* OCMBlockCaller.h in Headers */,
+ F0B951391B00810C00942C38 /* OCMBoxedReturnValueProvider.h in Headers */,
+ F0B9513A1B00810C00942C38 /* OCMExceptionReturnValueProvider.h in Headers */,
+ F0B9513B1B00810C00942C38 /* OCMIndirectReturnValueProvider.h in Headers */,
+ F0B9513C1B00810C00942C38 /* OCMNotificationPoster.h in Headers */,
+ F0B9513D1B00810C00942C38 /* OCMReturnValueProvider.h in Headers */,
+ F0B951401B00810C00942C38 /* OCObserverMockObject.h in Headers */,
+ F0B951411B00810C00942C38 /* OCMObserverRecorder.h in Headers */,
+ F0B951441B00810C00942C38 /* OCMPassByRefSetter.h in Headers */,
+ F0B951451B00810C00942C38 /* NSInvocation+OCMAdditions.h in Headers */,
+ F0B951461B00810C00942C38 /* NSMethodSignature+OCMAdditions.h in Headers */,
+ F0B951481B00810C00942C38 /* NSObject+OCMAdditions.h in Headers */,
+ F0B951491B00810C00942C38 /* NSValue+OCMAdditions.h in Headers */,
+ F0B9514A1B00810C00942C38 /* OCMFunctions.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 030EF0A714632FD000B04273 /* OCMock */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 030EF0D214632FD000B04273 /* Build configuration list for PBXNativeTarget "OCMock" */;
+ buildPhases = (
+ 030EF0A314632FD000B04273 /* Sources */,
+ 030EF0A414632FD000B04273 /* Frameworks */,
+ 030EF0A514632FD000B04273 /* Headers */,
+ 030EF0A614632FD000B04273 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = OCMock;
+ productName = OCMock;
+ productReference = 030EF0A814632FD000B04273 /* OCMock.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+ 030EF0DB14632FF700B04273 /* OCMockLib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 030EF0E514632FF700B04273 /* Build configuration list for PBXNativeTarget "OCMockLib" */;
+ buildPhases = (
+ 030EF0D814632FF700B04273 /* Sources */,
+ 030EF0D914632FF700B04273 /* Frameworks */,
+ 030EF0DA14632FF700B04273 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = OCMockLib;
+ productName = OCMockLib;
+ productReference = 030EF0DC14632FF700B04273 /* libOCMock.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 03565A3018F0566E003AE91E /* OCMockTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03565A3E18F0566F003AE91E /* Build configuration list for PBXNativeTarget "OCMockTests" */;
+ buildPhases = (
+ 03565A4F18F058A0003AE91E /* ShellScript */,
+ 03565A2D18F0566E003AE91E /* Sources */,
+ 03565A2E18F0566E003AE91E /* Frameworks */,
+ 03565A2F18F0566E003AE91E /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 03565A3D18F0566F003AE91E /* PBXTargetDependency */,
+ );
+ name = OCMockTests;
+ productName = OCMockTests;
+ productReference = 03565A3118F0566E003AE91E /* OCMockTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ D31108AC1828DB8700737925 /* OCMockLibTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D31108C01828DB8700737925 /* Build configuration list for PBXNativeTarget "OCMockLibTests" */;
+ buildPhases = (
+ D31108A91828DB8700737925 /* Sources */,
+ D31108AA1828DB8700737925 /* Frameworks */,
+ D31108AB1828DB8700737925 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ D31108BF1828DB8700737925 /* PBXTargetDependency */,
+ );
+ name = OCMockLibTests;
+ productName = OCMockLibTests;
+ productReference = D31108AD1828DB8700737925 /* OCMockLibTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ F0B950F01B0080BE00942C38 /* OCMock iOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F0B951041B0080BE00942C38 /* Build configuration list for PBXNativeTarget "OCMock iOS" */;
+ buildPhases = (
+ F0B950EC1B0080BE00942C38 /* Sources */,
+ F0B950ED1B0080BE00942C38 /* Frameworks */,
+ F0B950EE1B0080BE00942C38 /* Headers */,
+ F0B950EF1B0080BE00942C38 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "OCMock iOS";
+ productName = "OCMock iOS";
+ productReference = F0B950F11B0080BE00942C38 /* OCMock.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 030EF09E14632FD000B04273 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastTestingUpgradeCheck = 0510;
+ LastUpgradeCheck = 0510;
+ ORGANIZATIONNAME = "Mulle Kybernetik";
+ TargetAttributes = {
+ 03565A3018F0566E003AE91E = {
+ TestTargetID = 030EF0A714632FD000B04273;
+ };
+ D31108AC1828DB8700737925 = {
+ TestTargetID = 030EF0DB14632FF700B04273;
+ };
+ F0B950F01B0080BE00942C38 = {
+ CreatedOnToolsVersion = 6.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 030EF0A114632FD000B04273 /* Build configuration list for PBXProject "OCMock" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 030EF09C14632FD000B04273;
+ productRefGroup = 030EF0A914632FD000B04273 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 030EF0A714632FD000B04273 /* OCMock */,
+ 03565A3018F0566E003AE91E /* OCMockTests */,
+ 030EF0DB14632FF700B04273 /* OCMockLib */,
+ D31108AC1828DB8700737925 /* OCMockLibTests */,
+ F0B950F01B0080BE00942C38 /* OCMock iOS */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 030EF0A614632FD000B04273 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 030EF0B614632FD000B04273 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03565A2F18F0566E003AE91E /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03565A3818F0566F003AE91E /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D31108AB1828DB8700737925 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D31108BA1828DB8700737925 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F0B950EF1B0080BE00942C38 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 03565A4F18F058A0003AE91E /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Unpack frameworks required for this target\npushd \"${TARGET_BUILD_DIR}\"\n#if [ ! -d Frameworks ]; then\n#mkdir Frameworks\n#fi\n#cd Frameworks\nif [ ! -d OCHamcrest.framework ]; then\ntar xjf \"${PROJECT_DIR}/Frameworks/OCHamcrest.tar.bz2\"\nfi\npopd\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 030EF0A314632FD000B04273 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B315B1146333BF0052CD09 /* NSInvocation+OCMAdditions.m in Sources */,
+ 03B315B6146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m in Sources */,
+ 03618D85195B553400389166 /* OCMRecorder.m in Sources */,
+ 03C7BF0C195DA2F200A545DD /* OCMInvocationStub.m in Sources */,
+ 03B315BB146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m in Sources */,
+ 0322DA6B19118B4600CACAF1 /* OCMVerifier.m in Sources */,
+ 03B315C0146333BF0052CD09 /* OCClassMockObject.m in Sources */,
+ 03B315C5146333BF0052CD09 /* OCMArg.m in Sources */,
+ 03B315CA146333BF0052CD09 /* OCMBlockCaller.m in Sources */,
+ 03B315CF146333BF0052CD09 /* OCMBoxedReturnValueProvider.m in Sources */,
+ 03B315D4146333BF0052CD09 /* OCMConstraint.m in Sources */,
+ 03B315D9146333BF0052CD09 /* OCMExceptionReturnValueProvider.m in Sources */,
+ 03B315DE146333BF0052CD09 /* OCMIndirectReturnValueProvider.m in Sources */,
+ 03B315E3146333BF0052CD09 /* OCMNotificationPoster.m in Sources */,
+ 03B315E8146333BF0052CD09 /* OCMObserverRecorder.m in Sources */,
+ 03B315ED146333C00052CD09 /* OCMockObject.m in Sources */,
+ 03B315F2146333C00052CD09 /* OCMStubRecorder.m in Sources */,
+ 03B315F7146333C00052CD09 /* OCMPassByRefSetter.m in Sources */,
+ 03B315FC146333C00052CD09 /* OCMRealObjectForwarder.m in Sources */,
+ 03E98D4D18F308B400522D42 /* OCMLocation.m in Sources */,
+ 03B31601146333C00052CD09 /* OCMReturnValueProvider.m in Sources */,
+ 03B31606146333C00052CD09 /* OCObserverMockObject.m in Sources */,
+ 03C7BF12195DAB5300A545DD /* OCMExpectationRecorder.m in Sources */,
+ 03B3160B146333C00052CD09 /* OCPartialMockObject.m in Sources */,
+ 03B31615146333C00052CD09 /* OCProtocolMockObject.m in Sources */,
+ 2FA28D38ED9D83A3E0A620B3 /* NSObject+OCMAdditions.m in Sources */,
+ 2FA282F0C0A4CABE4E2C7646 /* OCMInvocationMatcher.m in Sources */,
+ 2FA28BA90F0D55E4CF6787F0 /* OCMFunctions.m in Sources */,
+ 2FA286C7B8862280E6C1A585 /* OCMInvocationExpectation.m in Sources */,
+ 2FA2800D12E95D5ABC965753 /* OCMMacroState.m in Sources */,
+ 2FA2805AB1944A206EEE383B /* NSValue+OCMAdditions.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 030EF0D814632FF700B04273 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03B315B3146333BF0052CD09 /* NSInvocation+OCMAdditions.m in Sources */,
+ 03B315B8146333BF0052CD09 /* NSMethodSignature+OCMAdditions.m in Sources */,
+ 03618D86195B553400389166 /* OCMRecorder.m in Sources */,
+ 03C7BF0D195DA2F200A545DD /* OCMInvocationStub.m in Sources */,
+ 03B315BD146333BF0052CD09 /* NSNotificationCenter+OCMAdditions.m in Sources */,
+ 0322DA6C19118B4600CACAF1 /* OCMVerifier.m in Sources */,
+ 03B315C2146333BF0052CD09 /* OCClassMockObject.m in Sources */,
+ 03B315C7146333BF0052CD09 /* OCMArg.m in Sources */,
+ 03B315CC146333BF0052CD09 /* OCMBlockCaller.m in Sources */,
+ 03B315D1146333BF0052CD09 /* OCMBoxedReturnValueProvider.m in Sources */,
+ 03DCED6D183406BC0059089E /* NSObject+OCMAdditions.m in Sources */,
+ 03B315D6146333BF0052CD09 /* OCMConstraint.m in Sources */,
+ 03B315DB146333BF0052CD09 /* OCMExceptionReturnValueProvider.m in Sources */,
+ 03B315E0146333BF0052CD09 /* OCMIndirectReturnValueProvider.m in Sources */,
+ 03B315E5146333BF0052CD09 /* OCMNotificationPoster.m in Sources */,
+ 03B315EA146333BF0052CD09 /* OCMObserverRecorder.m in Sources */,
+ 03B315EF146333C00052CD09 /* OCMockObject.m in Sources */,
+ 03B315F4146333C00052CD09 /* OCMStubRecorder.m in Sources */,
+ 03B315F9146333C00052CD09 /* OCMPassByRefSetter.m in Sources */,
+ 03E98D4E18F308B400522D42 /* OCMLocation.m in Sources */,
+ 03B315FE146333C00052CD09 /* OCMRealObjectForwarder.m in Sources */,
+ 03B31603146333C00052CD09 /* OCMReturnValueProvider.m in Sources */,
+ 03C7BF13195DAB5300A545DD /* OCMExpectationRecorder.m in Sources */,
+ 03B31608146333C00052CD09 /* OCObserverMockObject.m in Sources */,
+ 03B3160D146333C00052CD09 /* OCPartialMockObject.m in Sources */,
+ 03B31617146333C00052CD09 /* OCProtocolMockObject.m in Sources */,
+ 2FA288B20FB3A42BA0B7BAB8 /* OCMInvocationMatcher.m in Sources */,
+ 2FA286F90395E317F983A20A /* OCMFunctions.m in Sources */,
+ 2FA28E506BE0D91A95A20243 /* OCMInvocationExpectation.m in Sources */,
+ 2FA28209EB1F41964DF3031A /* OCMMacroState.m in Sources */,
+ 2FA28FEAEF9333D2C214DF53 /* NSValue+OCMAdditions.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03565A2D18F0566E003AE91E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 037ECD5418FAD84100AF0E4C /* OCMInvocationMatcherTests.m in Sources */,
+ 03565A4418F05721003AE91E /* OCMockObjectProtocolMocksTests.m in Sources */,
+ 03565A4B18F05721003AE91E /* NSInvocationOCMAdditionsTests.m in Sources */,
+ 03565A4618F05721003AE91E /* OCMockObjectHamcrestTests.mm in Sources */,
+ 03E98D5018F310EE00522D42 /* OCMockObjectMacroTests.m in Sources */,
+ 03565A4A18F05721003AE91E /* OCObserverMockObjectTests.m in Sources */,
+ 03565A4318F05721003AE91E /* OCMockObjectClassMethodMockingTests.m in Sources */,
+ 03565A4918F05721003AE91E /* OCMArgTests.m in Sources */,
+ 0322DA65191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m in Sources */,
+ 03565A4718F05721003AE91E /* OCMConstraintTests.m in Sources */,
+ 03565A4218F05721003AE91E /* OCMockObjectPartialMocksTests.m in Sources */,
+ 03565A4C18F05721003AE91E /* NSMethodSignatureOCMAdditionsTests.m in Sources */,
+ 03565A4818F05721003AE91E /* OCMStubRecorderTests.m in Sources */,
+ 03565A4518F05721003AE91E /* OCMockObjectForwardingTargetTests.m in Sources */,
+ 2FA28FA53C57236B6DD64E82 /* OCMockObjectRuntimeTests.m in Sources */,
+ 2FA2839F33289795284C32FB /* OCMockObjectTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D31108A91828DB8700737925 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03C9CA1E18F05A84006DF94D /* OCMArgTests.m in Sources */,
+ 0322DA66191188D100CACAF1 /* OCMockObjectVerifyAfterRunTests.m in Sources */,
+ D31108C51828DBD600737925 /* OCMockObjectClassMethodMockingTests.m in Sources */,
+ D31108C71828DBD600737925 /* OCMConstraintTests.m in Sources */,
+ D31108C91828DBD600737925 /* OCObserverMockObjectTests.m in Sources */,
+ 037ECD5518FAD84100AF0E4C /* OCMInvocationMatcherTests.m in Sources */,
+ D31108C41828DBD600737925 /* OCMockObjectPartialMocksTests.m in Sources */,
+ D31108C81828DBD600737925 /* OCMStubRecorderTests.m in Sources */,
+ D31108C61828DBD600737925 /* OCMockObjectForwardingTargetTests.m in Sources */,
+ D31108CA1828DBD600737925 /* NSInvocationOCMAdditionsTests.m in Sources */,
+ 03C9CA1F18F05A8E006DF94D /* NSMethodSignatureOCMAdditionsTests.m in Sources */,
+ 03C9CA1D18F05A75006DF94D /* OCMockObjectProtocolMocksTests.m in Sources */,
+ 03E98D5118F310EE00522D42 /* OCMockObjectMacroTests.m in Sources */,
+ 2FA28295E1F58F40A77D7448 /* OCMockObjectRuntimeTests.m in Sources */,
+ 2FA28246CD449A01717B1CEC /* OCMockObjectTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F0B950EC1B0080BE00942C38 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F0B9510C1B0080EC00942C38 /* OCMockObject.m in Sources */,
+ F0B9510D1B0080EC00942C38 /* OCClassMockObject.m in Sources */,
+ F0B9510E1B0080EC00942C38 /* OCPartialMockObject.m in Sources */,
+ F0B9510F1B0080EC00942C38 /* OCProtocolMockObject.m in Sources */,
+ F0B951101B0080EC00942C38 /* OCMRecorder.m in Sources */,
+ F0B951111B0080EC00942C38 /* OCMStubRecorder.m in Sources */,
+ F0B951121B0080EC00942C38 /* OCMExpectationRecorder.m in Sources */,
+ F0B951131B0080EC00942C38 /* OCMVerifier.m in Sources */,
+ F0B951141B0080EC00942C38 /* OCMInvocationMatcher.m in Sources */,
+ F0B951151B0080EC00942C38 /* OCMInvocationStub.m in Sources */,
+ F0B951161B0080EC00942C38 /* OCMInvocationExpectation.m in Sources */,
+ F0B951171B0080EC00942C38 /* OCMRealObjectForwarder.m in Sources */,
+ F0B951181B0080EC00942C38 /* OCMBlockCaller.m in Sources */,
+ F0B951191B0080EC00942C38 /* OCMBoxedReturnValueProvider.m in Sources */,
+ F0B9511A1B0080EC00942C38 /* OCMExceptionReturnValueProvider.m in Sources */,
+ F0B9511B1B0080EC00942C38 /* OCMIndirectReturnValueProvider.m in Sources */,
+ F0B9511C1B0080EC00942C38 /* OCMNotificationPoster.m in Sources */,
+ F0B9511D1B0080EC00942C38 /* OCMReturnValueProvider.m in Sources */,
+ F0B9511E1B0080EC00942C38 /* OCMLocation.m in Sources */,
+ F0B9511F1B0080EC00942C38 /* OCMMacroState.m in Sources */,
+ F0B951201B0080EC00942C38 /* OCObserverMockObject.m in Sources */,
+ F0B951211B0080EC00942C38 /* OCMObserverRecorder.m in Sources */,
+ F0B951221B0080EC00942C38 /* OCMArg.m in Sources */,
+ F0B951231B0080EC00942C38 /* OCMConstraint.m in Sources */,
+ F0B951241B0080EC00942C38 /* OCMPassByRefSetter.m in Sources */,
+ F0B951251B0080EC00942C38 /* NSInvocation+OCMAdditions.m in Sources */,
+ F0B951261B0080EC00942C38 /* NSMethodSignature+OCMAdditions.m in Sources */,
+ F0B951271B0080EC00942C38 /* NSNotificationCenter+OCMAdditions.m in Sources */,
+ F0B951281B0080EC00942C38 /* NSObject+OCMAdditions.m in Sources */,
+ F0B951291B0080EC00942C38 /* NSValue+OCMAdditions.m in Sources */,
+ F0B9512A1B0080EC00942C38 /* OCMFunctions.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 03565A3D18F0566F003AE91E /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 030EF0A714632FD000B04273 /* OCMock */;
+ targetProxy = 03565A3C18F0566F003AE91E /* PBXContainerItemProxy */;
+ };
+ D31108BF1828DB8700737925 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 030EF0DB14632FF700B04273 /* OCMockLib */;
+ targetProxy = D31108BE1828DB8700737925 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 030EF0B414632FD000B04273 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 030EF0B514632FD000B04273 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 03565A3618F0566F003AE91E /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 03565A3718F0566F003AE91E /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ D31108B81828DB8700737925 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D31108B91828DB8700737925 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 030EF0D014632FD000B04273 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 030EF0D114632FD000B04273 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 030EF0D314632FD000B04273 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COMBINE_HIDPI_IMAGES = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMock/OCMock-Prefix.pch";
+ INFOPLIST_FILE = "OCMock/OCMock-Info.plist";
+ LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Versions/C\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Debug;
+ };
+ 030EF0D414632FD000B04273 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COMBINE_HIDPI_IMAGES = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMock/OCMock-Prefix.pch";
+ INFOPLIST_FILE = "OCMock/OCMock-Info.plist";
+ LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Versions/C\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 030EF0E614632FF700B04273 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/OCMockLib.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockLib/OCMockLib-Prefix.pch";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ "IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Versions/C\"",
+ );
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = "$(PRODUCT_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
+ };
+ name = Debug;
+ };
+ 030EF0E714632FF700B04273 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/OCMockLib.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockLib/OCMockLib-Prefix.pch";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ "IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Foundation.framework/Versions/C\"",
+ );
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = "$(PRODUCT_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
+ };
+ name = Release;
+ };
+ 03565A3F18F0566F003AE91E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ COMBINE_HIDPI_IMAGES = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(inherited)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockTests/OCMockTests-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ INFOPLIST_FILE = "OCMockTests/OCMockTests-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Debug;
+ };
+ 03565A4018F0566F003AE91E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ COMBINE_HIDPI_IMAGES = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(inherited)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockTests/OCMockTests-Prefix.pch";
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ INFOPLIST_FILE = "OCMockTests/OCMockTests-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Release;
+ };
+ D31108C11828DB8700737925 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockLibTests/OCMockLibTests-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ INFOPLIST_FILE = "OCMockLibTests/OCMockLibTests-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ D31108C21828DB8700737925 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ ENABLE_NS_ASSERTIONS = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "OCMockLibTests/OCMockLibTests-Prefix.pch";
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ INFOPLIST_FILE = "OCMockLibTests/OCMockLibTests-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ F0B951051B0080BE00942C38 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CURRENT_PROJECT_VERSION = 1;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEFINES_MODULE = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ INFOPLIST_FILE = "OCMock iOS/Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = OCMock;
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Debug;
+ };
+ F0B951061B0080BE00942C38 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CURRENT_PROJECT_VERSION = 1;
+ DEFINES_MODULE = YES;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ DYLIB_INSTALL_NAME_BASE = "@rpath";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ INFOPLIST_FILE = "OCMock iOS/Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 8.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = NO;
+ PRODUCT_NAME = OCMock;
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ VERSION_INFO_PREFIX = "";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 030EF0A114632FD000B04273 /* Build configuration list for PBXProject "OCMock" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 030EF0D014632FD000B04273 /* Debug */,
+ 030EF0D114632FD000B04273 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 030EF0D214632FD000B04273 /* Build configuration list for PBXNativeTarget "OCMock" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 030EF0D314632FD000B04273 /* Debug */,
+ 030EF0D414632FD000B04273 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 030EF0E514632FF700B04273 /* Build configuration list for PBXNativeTarget "OCMockLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 030EF0E614632FF700B04273 /* Debug */,
+ 030EF0E714632FF700B04273 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03565A3E18F0566F003AE91E /* Build configuration list for PBXNativeTarget "OCMockTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03565A3F18F0566F003AE91E /* Debug */,
+ 03565A4018F0566F003AE91E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D31108C01828DB8700737925 /* Build configuration list for PBXNativeTarget "OCMockLibTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D31108C11828DB8700737925 /* Debug */,
+ D31108C21828DB8700737925 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F0B951041B0080BE00942C38 /* Build configuration list for PBXNativeTarget "OCMock iOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F0B951051B0080BE00942C38 /* Debug */,
+ F0B951061B0080BE00942C38 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 030EF09E14632FD000B04273 /* Project object */;
+}
diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme
new file mode 100644
index 0000000..9956137
--- /dev/null
+++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock iOS.xcscheme
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0630"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950F01B0080BE00942C38"
+ BuildableName = "OCMock.framework"
+ BlueprintName = "OCMock iOS"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950FA1B0080BE00942C38"
+ BuildableName = "OCMock iOSTests.xctest"
+ BlueprintName = "OCMock iOSTests"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950FA1B0080BE00942C38"
+ BuildableName = "OCMock iOSTests.xctest"
+ BlueprintName = "OCMock iOSTests"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950F01B0080BE00942C38"
+ BuildableName = "OCMock.framework"
+ BlueprintName = "OCMock iOS"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950F01B0080BE00942C38"
+ BuildableName = "OCMock.framework"
+ BlueprintName = "OCMock iOS"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F0B950F01B0080BE00942C38"
+ BuildableName = "OCMock.framework"
+ BlueprintName = "OCMock iOS"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme
new file mode 100644
index 0000000..d498509
--- /dev/null
+++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMock.xcscheme
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "030EF0A714632FD000B04273"
+ BuildableName = "OCMock.framework"
+ BlueprintName = "OCMock"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "03565A3018F0566E003AE91E"
+ BuildableName = "OCMockTests.xctest"
+ BlueprintName = "OCMockTests"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "03565A1A18F05626003AE91E"
+ BuildableName = "OCMock Tests.xctest"
+ BlueprintName = "OCMock Tests"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme
new file mode 100644
index 0000000..c6fd214
--- /dev/null
+++ b/Source/OCMock.xcodeproj/xcshareddata/xcschemes/OCMockLib.xcscheme
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "030EF0DB14632FF700B04273"
+ BuildableName = "libOCMock.a"
+ BlueprintName = "OCMockLib"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D31108AC1828DB8700737925"
+ BuildableName = "OCMockLibTests.xctest"
+ BlueprintName = "OCMockLibTests"
+ ReferencedContainer = "container:OCMock.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Source/OCMock/NSInvocation+OCMAdditions.h b/Source/OCMock/NSInvocation+OCMAdditions.h
new file mode 100644
index 0000000..302ac62
--- /dev/null
+++ b/Source/OCMock/NSInvocation+OCMAdditions.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2006-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 NSInvocation(OCMAdditions)
+
+- (BOOL)hasCharPointerArgument;
+
+- (id)getArgumentAtIndexAsObject:(NSInteger)argIndex;
+
+- (NSString *)invocationDescription;
+
+- (NSString *)argumentDescriptionAtIndex:(NSInteger)argIndex;
+
+- (NSString *)objectDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)charDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)unsignedCharDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)intDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)unsignedIntDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)shortDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)unsignedShortDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)longDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)unsignedLongDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)longLongDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)unsignedLongLongDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)doubleDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)floatDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)structDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)pointerDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)cStringDescriptionAtIndex:(NSInteger)anInt;
+- (NSString *)selectorDescriptionAtIndex:(NSInteger)anInt;
+
+@end
diff --git a/Source/OCMock/NSInvocation+OCMAdditions.m b/Source/OCMock/NSInvocation+OCMAdditions.m
new file mode 100644
index 0000000..398187a
--- /dev/null
+++ b/Source/OCMock/NSInvocation+OCMAdditions.m
@@ -0,0 +1,380 @@
+/*
+ * Copyright (c) 2006-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 "NSInvocation+OCMAdditions.h"
+#import "OCMFunctions.h"
+
+
+@implementation NSInvocation(OCMAdditions)
+
+- (BOOL)hasCharPointerArgument
+{
+ NSMethodSignature *signature = [self methodSignature];
+ for(NSUInteger i = 0; i < [signature numberOfArguments]; i++)
+ {
+ const char *argType = OCMTypeWithoutQualifiers([signature getArgumentTypeAtIndex:i]);
+ if(strcmp(argType, "*") == 0)
+ return YES;
+ }
+ return NO;
+}
+
+
+- (id)getArgumentAtIndexAsObject:(NSInteger)argIndex
+{
+ const char *argType = OCMTypeWithoutQualifiers([[self methodSignature] getArgumentTypeAtIndex:(NSUInteger)argIndex]);
+
+ if((strlen(argType) > 1) && (strchr("{^", argType[0]) == NULL) && (strcmp("@?", argType) != 0))
+ [NSException raise:NSInvalidArgumentException format:@"Cannot handle argument type '%s'.", argType];
+
+ if(OCMIsObjectType(argType))
+ {
+ id value;
+ [self getArgument:&value atIndex:argIndex];
+ return value;
+ }
+
+ switch(argType[0])
+ {
+ case ':':
+ {
+ SEL s = (SEL)0;
+ [self getArgument:&s atIndex:argIndex];
+ return [NSValue valueWithBytes:&s objCType:":"];
+ }
+ case 'i':
+ {
+ int value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 's':
+ {
+ short value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'l':
+ {
+ long value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'q':
+ {
+ long long value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'c':
+ {
+ char value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'C':
+ {
+ unsigned char value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'I':
+ {
+ unsigned int value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'S':
+ {
+ unsigned short value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'L':
+ {
+ unsigned long value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'Q':
+ {
+ unsigned long long value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'f':
+ {
+ float value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'd':
+ {
+ double value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case 'D':
+ {
+ long double value;
+ [self getArgument:&value atIndex:argIndex];
+ return [NSValue valueWithBytes:&value objCType:@encode(__typeof__(value))];
+ }
+ case 'B':
+ {
+ bool value;
+ [self getArgument:&value atIndex:argIndex];
+ return @(value);
+ }
+ case '^':
+ case '*':
+ {
+ void *value = NULL;
+ [self getArgument:&value atIndex:argIndex];
+ return [NSValue valueWithPointer:value];
+ }
+ case '{': // structure
+ {
+ NSUInteger argSize;
+ NSGetSizeAndAlignment([[self methodSignature] getArgumentTypeAtIndex:(NSUInteger)argIndex], &argSize, NULL);
+ if(argSize == 0) // TODO: Can this happen? Is frameLength a good choice in that case?
+ argSize = [[self methodSignature] frameLength];
+ NSMutableData *argumentData = [[[NSMutableData alloc] initWithLength:argSize] autorelease];
+ [self getArgument:[argumentData mutableBytes] atIndex:argIndex];
+ return [NSValue valueWithBytes:[argumentData bytes] objCType:argType];
+ }
+
+ }
+ [NSException raise:NSInvalidArgumentException format:@"Argument type '%s' not supported", argType];
+ return nil;
+}
+
+- (NSString *)invocationDescription
+{
+ NSMethodSignature *methodSignature = [self methodSignature];
+ NSUInteger numberOfArgs = [methodSignature numberOfArguments];
+
+ if (numberOfArgs == 2)
+ return NSStringFromSelector([self selector]);
+
+ NSArray *selectorParts = [NSStringFromSelector([self selector]) componentsSeparatedByString:@":"];
+ NSMutableString *description = [[NSMutableString alloc] init];
+ NSUInteger i;
+ for(i = 2; i < numberOfArgs; i++)
+ {
+ [description appendFormat:@"%@%@:", (i > 2 ? @" " : @""), [selectorParts objectAtIndex:(i - 2)]];
+ [description appendString:[self argumentDescriptionAtIndex:(NSInteger)i]];
+ }
+
+ return [description autorelease];
+}
+
+- (NSString *)argumentDescriptionAtIndex:(NSInteger)argIndex
+{
+ const char *argType = OCMTypeWithoutQualifiers([[self methodSignature] getArgumentTypeAtIndex:(NSUInteger)argIndex]);
+
+ switch(*argType)
+ {
+ case '@': return [self objectDescriptionAtIndex:argIndex];
+ case 'B': return [self boolDescriptionAtIndex:argIndex];
+ case 'c': return [self charDescriptionAtIndex:argIndex];
+ case 'C': return [self unsignedCharDescriptionAtIndex:argIndex];
+ case 'i': return [self intDescriptionAtIndex:argIndex];
+ case 'I': return [self unsignedIntDescriptionAtIndex:argIndex];
+ case 's': return [self shortDescriptionAtIndex:argIndex];
+ case 'S': return [self unsignedShortDescriptionAtIndex:argIndex];
+ case 'l': return [self longDescriptionAtIndex:argIndex];
+ case 'L': return [self unsignedLongDescriptionAtIndex:argIndex];
+ case 'q': return [self longLongDescriptionAtIndex:argIndex];
+ case 'Q': return [self unsignedLongLongDescriptionAtIndex:argIndex];
+ case 'd': return [self doubleDescriptionAtIndex:argIndex];
+ case 'f': return [self floatDescriptionAtIndex:argIndex];
+ case 'D': return [self longDoubleDescriptionAtIndex:argIndex];
+ case '{': return [self structDescriptionAtIndex:argIndex];
+ case '^': return [self pointerDescriptionAtIndex:argIndex];
+ case '*': return [self cStringDescriptionAtIndex:argIndex];
+ case ':': return [self selectorDescriptionAtIndex:argIndex];
+ default: return [@"<??" stringByAppendingString:@">"]; // avoid confusion with trigraphs...
+ }
+
+}
+
+
+- (NSString *)objectDescriptionAtIndex:(NSInteger)anInt
+{
+ id object;
+
+ [self getArgument:&object atIndex:anInt];
+ if (object == nil)
+ return @"nil";
+ else if(![object isProxy] && [object isKindOfClass:[NSString class]])
+ return [NSString stringWithFormat:@"@\"%@\"", [object description]];
+ else
+ // The description cannot be nil, if it is then replace it
+ return [object description] ?: @"<nil description>";
+}
+
+- (NSString *)boolDescriptionAtIndex:(NSInteger)anInt
+{
+ bool value;
+ [self getArgument:&value atIndex:anInt];
+ return value? @"YES" : @"NO";
+}
+
+- (NSString *)charDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned char buffer[128];
+ memset(buffer, 0x0, 128);
+
+ [self getArgument:&buffer atIndex:anInt];
+
+ // If there's only one character in the buffer, and it's 0 or 1, then we have a BOOL
+ if (buffer[1] == '\0' && (buffer[0] == 0 || buffer[0] == 1))
+ return (buffer[0] == 1 ? @"YES" : @"NO");
+ else
+ return [NSString stringWithFormat:@"'%c'", *buffer];
+}
+
+- (NSString *)unsignedCharDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned char buffer[128];
+ memset(buffer, 0x0, 128);
+
+ [self getArgument:&buffer atIndex:anInt];
+ return [NSString stringWithFormat:@"'%c'", *buffer];
+}
+
+- (NSString *)intDescriptionAtIndex:(NSInteger)anInt
+{
+ int intValue;
+
+ [self getArgument:&intValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%d", intValue];
+}
+
+- (NSString *)unsignedIntDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned int intValue;
+
+ [self getArgument:&intValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%d", intValue];
+}
+
+- (NSString *)shortDescriptionAtIndex:(NSInteger)anInt
+{
+ short shortValue;
+
+ [self getArgument:&shortValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%hi", shortValue];
+}
+
+- (NSString *)unsignedShortDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned short shortValue;
+
+ [self getArgument:&shortValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%hu", shortValue];
+}
+
+- (NSString *)longDescriptionAtIndex:(NSInteger)anInt
+{
+ long longValue;
+
+ [self getArgument:&longValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%ld", longValue];
+}
+
+- (NSString *)unsignedLongDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned long longValue;
+
+ [self getArgument:&longValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%lu", longValue];
+}
+
+- (NSString *)longLongDescriptionAtIndex:(NSInteger)anInt
+{
+ long long longLongValue;
+
+ [self getArgument:&longLongValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%qi", longLongValue];
+}
+
+- (NSString *)unsignedLongLongDescriptionAtIndex:(NSInteger)anInt
+{
+ unsigned long long longLongValue;
+
+ [self getArgument:&longLongValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%qu", longLongValue];
+}
+
+- (NSString *)doubleDescriptionAtIndex:(NSInteger)anInt
+{
+ double doubleValue;
+
+ [self getArgument:&doubleValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%f", doubleValue];
+}
+
+- (NSString *)floatDescriptionAtIndex:(NSInteger)anInt
+{
+ float floatValue;
+
+ [self getArgument:&floatValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%f", floatValue];
+}
+
+- (NSString *)longDoubleDescriptionAtIndex:(NSInteger)anInt
+{
+ long double longDoubleValue;
+
+ [self getArgument:&longDoubleValue atIndex:anInt];
+ return [NSString stringWithFormat:@"%Lf", longDoubleValue];
+}
+
+- (NSString *)structDescriptionAtIndex:(NSInteger)anInt
+{
+ return [NSString stringWithFormat:@"(%@)", [[self getArgumentAtIndexAsObject:anInt] description]];
+}
+
+- (NSString *)pointerDescriptionAtIndex:(NSInteger)anInt
+{
+ void *buffer;
+
+ [self getArgument:&buffer atIndex:anInt];
+ return [NSString stringWithFormat:@"%p", buffer];
+}
+
+- (NSString *)cStringDescriptionAtIndex:(NSInteger)anInt
+{
+ char buffer[104];
+ char *cStringPtr;
+
+ [self getArgument:&cStringPtr atIndex:anInt];
+ strlcpy(buffer, cStringPtr, sizeof(buffer));
+ strlcpy(buffer + 100, "...", (sizeof(buffer) - 100));
+ return [NSString stringWithFormat:@"\"%s\"", buffer];
+}
+
+- (NSString *)selectorDescriptionAtIndex:(NSInteger)anInt
+{
+ SEL selectorValue;
+
+ [self getArgument:&selectorValue atIndex:anInt];
+ return [NSString stringWithFormat:@"@selector(%@)", NSStringFromSelector(selectorValue)];
+}
+
+@end
diff --git a/Source/OCMock/NSMethodSignature+OCMAdditions.h b/Source/OCMock/NSMethodSignature+OCMAdditions.h
new file mode 100644
index 0000000..c180206
--- /dev/null
+++ b/Source/OCMock/NSMethodSignature+OCMAdditions.h
@@ -0,0 +1,31 @@
+/*
+ * 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 NSMethodSignature(PrivateAPI)
+
++ (id)signatureWithObjCTypes:(const char *)types;
+
+@end
+
+@interface NSMethodSignature(OCMAdditions)
+
+- (BOOL)usesSpecialStructureReturn;
+- (NSString *)fullTypeString;
+- (const char *)fullObjCTypes;
+
+@end
diff --git a/Source/OCMock/NSMethodSignature+OCMAdditions.m b/Source/OCMock/NSMethodSignature+OCMAdditions.m
new file mode 100644
index 0000000..1012635
--- /dev/null
+++ b/Source/OCMock/NSMethodSignature+OCMAdditions.m
@@ -0,0 +1,61 @@
+/*
+ * 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 "NSMethodSignature+OCMAdditions.h"
+#import "OCMFunctions.h"
+#import <objc/runtime.h>
+
+
+@implementation NSMethodSignature(OCMAdditions)
+
+- (BOOL)usesSpecialStructureReturn
+{
+ const char *types = OCMTypeWithoutQualifiers([self methodReturnType]);
+
+ if((types == NULL) || (types[0] != '{'))
+ return NO;
+
+ /* In some cases structures are returned by ref. The rules are complex and depend on the
+ architecture, see:
+
+ http://sealiesoftware.com/blog/archive/2008/10/30/objc_explain_objc_msgSend_stret.html
+ http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/LowLevelABI/000-Introduction/introduction.html
+ https://github.com/atgreen/libffi/blob/master/src/x86/ffi64.c
+ http://www.uclibc.org/docs/psABI-x86_64.pdf
+ http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf
+
+ NSMethodSignature knows the details but has no API to return it, though it is in
+ the debugDescription. Horribly kludgy.
+ */
+ NSRange range = [[self debugDescription] rangeOfString:@"is special struct return? YES"];
+ return range.length > 0;
+}
+
+- (NSString *)fullTypeString
+{
+ NSMutableString *typeString = [NSMutableString string];
+ [typeString appendFormat:@"%s", [self methodReturnType]];
+ for (NSUInteger i=0; i<[self numberOfArguments]; i++)
+ [typeString appendFormat:@"%s", [self getArgumentTypeAtIndex:i]];
+ return typeString;
+}
+
+- (const char *)fullObjCTypes
+{
+ return [[self fullTypeString] UTF8String];
+}
+
+@end
diff --git a/Source/OCMock/NSNotificationCenter+OCMAdditions.h b/Source/OCMock/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 0000000..b54e2b7
--- /dev/null
+++ b/Source/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -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
diff --git a/Source/OCMock/NSNotificationCenter+OCMAdditions.m b/Source/OCMock/NSNotificationCenter+OCMAdditions.m
new file mode 100644
index 0000000..b83da82
--- /dev/null
+++ b/Source/OCMock/NSNotificationCenter+OCMAdditions.m
@@ -0,0 +1,29 @@
+/*
+ * 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 "NSNotificationCenter+OCMAdditions.h"
+#import "OCObserverMockObject.h"
+
+
+@implementation NSNotificationCenter(OCMAdditions)
+
+- (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender
+{
+ [notificationObserver autoRemoveFromCenter:self];
+ [self addObserver:notificationObserver selector:@selector(handleNotification:) name:notificationName object:notificationSender];
+}
+
+@end
diff --git a/Source/OCMock/NSObject+OCMAdditions.h b/Source/OCMock/NSObject+OCMAdditions.h
new file mode 100644
index 0000000..805a958
--- /dev/null
+++ b/Source/OCMock/NSObject+OCMAdditions.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013-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 NSObject(OCMAdditions)
+
++ (IMP)instanceMethodForwarderForSelector:(SEL)aSelector;
++ (void)enumerateMethodsInClass:(Class)aClass usingBlock:(void (^)(Class cls, SEL sel))aBlock;
+
+@end
diff --git a/Source/OCMock/NSObject+OCMAdditions.m b/Source/OCMock/NSObject+OCMAdditions.m
new file mode 100644
index 0000000..87f1934
--- /dev/null
+++ b/Source/OCMock/NSObject+OCMAdditions.m
@@ -0,0 +1,75 @@
+/*
+ * 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 "NSObject+OCMAdditions.h"
+#import "NSMethodSignature+OCMAdditions.h"
+#import <objc/runtime.h>
+
+@implementation NSObject(OCMAdditions)
+
++ (IMP)instanceMethodForwarderForSelector:(SEL)aSelector
+{
+ // use sel_registerName() and not @selector to avoid warning
+ SEL selectorWithNoImplementation = sel_registerName("methodWhichMustNotExist::::");
+
+#ifndef __arm64__
+ static NSMutableDictionary *_OCMReturnTypeCache;
+
+ if(_OCMReturnTypeCache == nil)
+ _OCMReturnTypeCache = [[NSMutableDictionary alloc] init];
+
+ BOOL needsStructureReturn;
+ void *rawCacheKey[2] = { (void *)self, aSelector };
+ NSData *cacheKey = [NSData dataWithBytes:rawCacheKey length:sizeof(rawCacheKey)];
+ NSNumber *cachedValue = [_OCMReturnTypeCache objectForKey:cacheKey];
+
+ if(cachedValue == nil)
+ {
+ NSMethodSignature *sig = [self instanceMethodSignatureForSelector:aSelector];
+ needsStructureReturn = [sig usesSpecialStructureReturn];
+ [_OCMReturnTypeCache setObject:@(needsStructureReturn) forKey:cacheKey];
+ }
+ else
+ {
+ needsStructureReturn = [cachedValue boolValue];
+ }
+
+ if(needsStructureReturn)
+ return class_getMethodImplementation_stret([NSObject class], selectorWithNoImplementation);
+#endif
+
+ return class_getMethodImplementation([NSObject class], selectorWithNoImplementation);
+}
+
+
++ (void)enumerateMethodsInClass:(Class)aClass usingBlock:(void (^)(Class cls, SEL sel))aBlock
+{
+ for(Class cls = aClass; cls != nil; cls = class_getSuperclass(cls))
+ {
+ Method *methodList = class_copyMethodList(cls, NULL);
+ if(methodList == NULL)
+ continue;
+
+ for(Method *mPtr = methodList; *mPtr != NULL; mPtr++)
+ {
+ SEL sel = method_getName(*mPtr);
+ aBlock(cls, sel);
+ }
+ free(methodList);
+ }
+}
+
+@end
diff --git a/Source/OCMock/NSValue+OCMAdditions.h b/Source/OCMock/NSValue+OCMAdditions.h
new file mode 100644
index 0000000..81aa60a
--- /dev/null
+++ b/Source/OCMock/NSValue+OCMAdditions.h
@@ -0,0 +1,23 @@
+/*
+ * 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 NSValue(OCMAdditions)
+
+- (BOOL)getBytes:(void *)outputBuf objCType:(const char *)targetType;
+
+@end
diff --git a/Source/OCMock/NSValue+OCMAdditions.m b/Source/OCMock/NSValue+OCMAdditions.m
new file mode 100644
index 0000000..076a25c
--- /dev/null
+++ b/Source/OCMock/NSValue+OCMAdditions.m
@@ -0,0 +1,107 @@
+/*
+ * 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 "NSValue+OCMAdditions.h"
+
+
+@implementation NSValue(OCMAdditions)
+
+static CFNumberType OCMNumberTypeForObjCType(const char *objcType)
+{
+ switch (objcType[0])
+ {
+ case 'c': return kCFNumberCharType;
+ case 'C': return kCFNumberCharType;
+ case 'B': return kCFNumberCharType;
+ case 's': return kCFNumberShortType;
+ case 'S': return kCFNumberShortType;
+ case 'i': return kCFNumberIntType;
+ case 'I': return kCFNumberIntType;
+ case 'l': return kCFNumberLongType;
+ case 'L': return kCFNumberLongType;
+ case 'q': return kCFNumberLongLongType;
+ case 'Q': return kCFNumberLongLongType;
+ case 'f': return kCFNumberFloatType;
+ case 'd': return kCFNumberDoubleType;
+ default: return 0;
+ }
+}
+
+
+static NSNumber *OCMNumberForValue(NSValue *value)
+{
+#define CREATE_NUM(_type) ({ _type _v; [value getValue:&_v]; @(_v); })
+ switch([value objCType][0])
+ {
+ case 'c': return CREATE_NUM(char);
+ case 'C': return CREATE_NUM(unsigned char);
+ case 'B': return CREATE_NUM(bool);
+ case 's': return CREATE_NUM(short);
+ case 'S': return CREATE_NUM(unsigned short);
+ case 'i': return CREATE_NUM(int);
+ case 'I': return CREATE_NUM(unsigned int);
+ case 'l': return CREATE_NUM(long);
+ case 'L': return CREATE_NUM(unsigned long);
+ case 'q': return CREATE_NUM(long long);
+ case 'Q': return CREATE_NUM(unsigned long long);
+ case 'f': return CREATE_NUM(float);
+ case 'd': return CREATE_NUM(double);
+ default: return nil;
+ }
+}
+
+
+- (BOOL)getBytes:(void *)outputBuf objCType:(const char *)targetType
+{
+ /*
+ * See if they are similar number types, and if we can convert losslessly between them.
+ * For the most part, we set things up to use CFNumberGetValue, which returns false if
+ * conversion will be lossy.
+ */
+ CFNumberType inputType = OCMNumberTypeForObjCType([self objCType]);
+ CFNumberType outputType = OCMNumberTypeForObjCType(targetType);
+
+ if(inputType == 0 || outputType == 0) // one or both are non-number types
+ return NO;
+
+ NSNumber *inputNumber = [self isKindOfClass:[NSNumber class]] ? (NSNumber *)self : OCMNumberForValue(self);
+
+ /*
+ * Due to some legacy, back-compatible requirements in CFNumber.c, CFNumberGetValue can return true for
+ * some conversions which should not be allowed (by reading source, conversions from integer types to
+ * 8-bit or 16-bit integer types). So, check ourselves.
+ */
+ long long min;
+ long long max;
+ long long val = [inputNumber longLongValue];
+ switch(targetType[0])
+ {
+ case 'B':
+ case 'c': min = CHAR_MIN; max = CHAR_MAX; break;
+ case 'C': min = 0; max = UCHAR_MAX; break;
+ case 's': min = SHRT_MIN; max = SHRT_MAX; break;
+ case 'S': min = 0; max = USHRT_MAX; break;
+ default: min = LLONG_MIN; max = LLONG_MAX; break;
+ }
+ if(val < min || val > max)
+ return NO;
+
+ /* Get the number, and return NO if the value was out of range or conversion was lossy */
+ return CFNumberGetValue((CFNumberRef)inputNumber, outputType, outputBuf);
+}
+
+
+@end
diff --git a/Source/OCMock/OCClassMockObject.h b/Source/OCMock/OCClassMockObject.h
new file mode 100644
index 0000000..e5f9cd8
--- /dev/null
+++ b/Source/OCMock/OCClassMockObject.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2005-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>
+
+@interface OCClassMockObject : OCMockObject
+{
+ Class mockedClass;
+ Class originalMetaClass;
+}
+
+- (id)initWithClass:(Class)aClass;
+
+- (Class)mockedClass;
+- (Class)mockObjectClass; // since -class returns the mockedClass
+
+@end
diff --git a/Source/OCMock/OCClassMockObject.m b/Source/OCMock/OCClassMockObject.m
new file mode 100644
index 0000000..2e2bc1e
--- /dev/null
+++ b/Source/OCMock/OCClassMockObject.m
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 2005-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 <objc/runtime.h>
+#import "OCClassMockObject.h"
+#import "NSObject+OCMAdditions.h"
+#import "OCMFunctions.h"
+#import "OCMInvocationStub.h"
+
+@implementation OCClassMockObject
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)initWithClass:(Class)aClass
+{
+ NSParameterAssert(aClass != nil);
+ [super init];
+ mockedClass = aClass;
+ [self prepareClassForClassMethodMocking];
+ return self;
+}
+
+- (void)dealloc
+{
+ [self stopMocking];
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"OCMockObject(%@)", NSStringFromClass(mockedClass)];
+}
+
+- (Class)mockedClass
+{
+ return mockedClass;
+}
+
+#pragma mark Extending/overriding superclass behaviour
+
+- (void)stopMocking
+{
+ if(originalMetaClass != nil)
+ [self restoreMetaClass];
+ [super stopMocking];
+}
+
+- (void)restoreMetaClass
+{
+ OCMSetAssociatedMockForClass(nil, mockedClass);
+ OCMSetIsa(mockedClass, originalMetaClass);
+ originalMetaClass = nil;
+}
+
+- (void)addStub:(OCMInvocationStub *)aStub
+{
+ [super addStub:aStub];
+ if([aStub recordedAsClassMethod])
+ [self setupForwarderForClassMethodSelector:[[aStub recordedInvocation] selector]];
+}
+
+
+#pragma mark Class method mocking
+
+- (void)prepareClassForClassMethodMocking
+{
+ /* haven't figured out how to work around runtime dependencies on NSString, so exclude it for now */
+ /* also weird: [[NSString class] isKindOfClass:[NSString class]] is false, hence the additional clause */
+ if([[mockedClass class] isKindOfClass:[NSString class]] || (mockedClass == [NSString class]))
+ return;
+
+ /* if there is another mock for this exact class, stop it */
+ id otherMock = OCMGetAssociatedMockForClass(mockedClass, NO);
+ if(otherMock != nil)
+ [otherMock restoreMetaClass];
+
+ OCMSetAssociatedMockForClass(self, mockedClass);
+
+ /* dynamically create a subclass and use its meta class as the meta class for the mocked class */
+ Class subclass = OCMCreateSubclass(mockedClass, mockedClass);
+ originalMetaClass = object_getClass(mockedClass);
+ id newMetaClass = object_getClass(subclass);
+ OCMSetIsa(mockedClass, OCMGetIsa(subclass));
+
+ /* point forwardInvocation: of the object to the implementation in the mock */
+ Method myForwardMethod = class_getInstanceMethod([self mockObjectClass], @selector(forwardInvocationForClassObject:));
+ IMP myForwardIMP = method_getImplementation(myForwardMethod);
+ class_addMethod(newMetaClass, @selector(forwardInvocation:), myForwardIMP, method_getTypeEncoding(myForwardMethod));
+
+ /* create a dummy initialize method */
+ Method myDummyInitializeMethod = class_getInstanceMethod([self mockObjectClass], @selector(initializeForClassObject));
+ const char *initializeTypes = method_getTypeEncoding(myDummyInitializeMethod);
+ IMP myDummyInitializeIMP = method_getImplementation(myDummyInitializeMethod);
+ class_addMethod(newMetaClass, @selector(initialize), myDummyInitializeIMP, initializeTypes);
+
+ /* adding forwarder for most class methods (instance methods on meta class) to allow for verify after run */
+ NSArray *methodBlackList = @[@"class", @"forwardingTargetForSelector:", @"methodSignatureForSelector:", @"forwardInvocation:", @"isBlock",
+ @"instanceMethodForwarderForSelector:", @"instanceMethodSignatureForSelector:"];
+ [NSObject enumerateMethodsInClass:originalMetaClass usingBlock:^(Class cls, SEL sel) {
+ if((cls == object_getClass([NSObject class])) || (cls == [NSObject class]) || (cls == object_getClass(cls)))
+ return;
+ NSString *className = NSStringFromClass(cls);
+ NSString *selName = NSStringFromSelector(sel);
+ if(([className hasPrefix:@"NS"] || [className hasPrefix:@"UI"]) &&
+ ([selName hasPrefix:@"_"] || [selName hasSuffix:@"_"]))
+ return;
+ if([methodBlackList containsObject:selName])
+ return;
+ @try
+ {
+ [self setupForwarderForClassMethodSelector:sel];
+ }
+ @catch(NSException *e)
+ {
+ // ignore for now
+ }
+ }];
+}
+
+- (void)setupForwarderForClassMethodSelector:(SEL)selector
+{
+ SEL aliasSelector = OCMAliasForOriginalSelector(selector);
+ if(class_getClassMethod(mockedClass, aliasSelector) != NULL)
+ return;
+
+ Method originalMethod = class_getClassMethod(mockedClass, selector);
+ IMP originalIMP = method_getImplementation(originalMethod);
+ const char *types = method_getTypeEncoding(originalMethod);
+
+ Class metaClass = object_getClass(mockedClass);
+ IMP forwarderIMP = [originalMetaClass instanceMethodForwarderForSelector:selector];
+ class_replaceMethod(metaClass, selector, forwarderIMP, types);
+ class_addMethod(metaClass, aliasSelector, originalIMP, types);
+}
+
+
+- (void)forwardInvocationForClassObject:(NSInvocation *)anInvocation
+{
+ // in here "self" is a reference to the real class, not the mock
+ OCClassMockObject *mock = OCMGetAssociatedMockForClass((Class) self, YES);
+ if(mock == nil)
+ {
+ [NSException raise:NSInternalInconsistencyException format:@"No mock for class %@", NSStringFromClass((Class)self)];
+ }
+ if([mock handleInvocation:anInvocation] == NO)
+ {
+ [anInvocation setSelector:OCMAliasForOriginalSelector([anInvocation selector])];
+ [anInvocation invoke];
+ }
+}
+
+- (void)initializeForClassObject
+{
+ // we really just want to have an implementation so that the superclass's is not called
+}
+
+
+#pragma mark Proxy API
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [mockedClass instanceMethodSignatureForSelector:aSelector];
+}
+
+- (Class)mockObjectClass
+{
+ return [super class];
+}
+
+- (Class)class
+{
+ return mockedClass;
+}
+
+- (BOOL)respondsToSelector:(SEL)selector
+{
+ return [mockedClass instancesRespondToSelector:selector];
+}
+
+- (BOOL)isKindOfClass:(Class)aClass
+{
+ return [mockedClass isSubclassOfClass:aClass];
+}
+
+- (BOOL)conformsToProtocol:(Protocol *)aProtocol
+{
+ return class_conformsToProtocol(mockedClass, aProtocol);
+}
+
+@end
+
+
+#pragma mark -
+
+/**
+ taken from:
+ `class-dump -f isNS /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/CoreFoundation.framework`
+
+ @interface NSObject (__NSIsKinds)
+ - (_Bool)isNSValue__;
+ - (_Bool)isNSTimeZone__;
+ - (_Bool)isNSString__;
+ - (_Bool)isNSSet__;
+ - (_Bool)isNSOrderedSet__;
+ - (_Bool)isNSNumber__;
+ - (_Bool)isNSDictionary__;
+ - (_Bool)isNSDate__;
+ - (_Bool)isNSData__;
+ - (_Bool)isNSArray__;
+ */
+
+@implementation OCClassMockObject(NSIsKindsImplementation)
+
+- (BOOL)isNSValue__
+{
+ return [mockedClass isKindOfClass:[NSValue class]];
+}
+
+- (BOOL)isNSTimeZone__
+{
+ return [mockedClass isKindOfClass:[NSTimeZone class]];
+}
+
+- (BOOL)isNSSet__
+{
+ return [mockedClass isKindOfClass:[NSSet class]];
+}
+
+- (BOOL)isNSOrderedSet__
+{
+ return [mockedClass isKindOfClass:[NSOrderedSet class]];
+}
+
+- (BOOL)isNSNumber__
+{
+ return [mockedClass isKindOfClass:[NSNumber class]];
+}
+
+- (BOOL)isNSDate__
+{
+ return [mockedClass isKindOfClass:[NSDate class]];
+}
+
+- (BOOL)isNSString__
+{
+ return [mockedClass isKindOfClass:[NSString class]];
+}
+
+- (BOOL)isNSDictionary__
+{
+ return [mockedClass isKindOfClass:[NSDictionary class]];
+}
+
+- (BOOL)isNSData__
+{
+ return [mockedClass isKindOfClass:[NSData class]];
+}
+
+- (BOOL)isNSArray__
+{
+ return [mockedClass isKindOfClass:[NSArray class]];
+}
+
+@end
diff --git a/Source/OCMock/OCMArg.h b/Source/OCMock/OCMArg.h
new file mode 100644
index 0000000..a8bdf55
--- /dev/null
+++ b/Source/OCMock/OCMArg.h
@@ -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
diff --git a/Source/OCMock/OCMArg.m b/Source/OCMock/OCMArg.m
new file mode 100644
index 0000000..3a9aec3
--- /dev/null
+++ b/Source/OCMock/OCMArg.m
@@ -0,0 +1,115 @@
+/*
+ * 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 <objc/runtime.h>
+#import <OCMock/OCMArg.h>
+#import <OCMock/OCMConstraint.h>
+#import "OCMPassByRefSetter.h"
+
+@implementation OCMArg
+
++ (id)any
+{
+ return [OCMAnyConstraint constraint];
+}
+
++ (void *)anyPointer
+{
+ return (void *)0x01234567;
+}
+
++ (id __autoreleasing *)anyObjectRef
+{
+ return (id *)0x01234567;
+}
+
++ (SEL)anySelector
+{
+ return NSSelectorFromString(@"aSelectorThatMatchesAnySelector");
+}
+
++ (id)isNil
+{
+ return [OCMIsNilConstraint constraint];
+}
+
++ (id)isNotNil
+{
+ return [OCMIsNotNilConstraint constraint];
+}
+
++ (id)isEqual:(id)value
+{
+ return value;
+}
+
++ (id)isNotEqual:(id)value
+{
+ OCMIsNotEqualConstraint *constraint = [OCMIsNotEqualConstraint constraint];
+ constraint->testValue = value;
+ return constraint;
+}
+
++ (id)isKindOfClass:(Class)cls
+{
+ return [[[OCMBlockConstraint alloc] initWithConstraintBlock:^BOOL(id obj) {
+ return [obj isKindOfClass:cls];
+ }] autorelease];
+}
+
++ (id)checkWithSelector:(SEL)selector onObject:(id)anObject
+{
+ return [OCMConstraint constraintWithSelector:selector onObject:anObject];
+}
+
++ (id)checkWithBlock:(BOOL (^)(id))block
+{
+ return [[[OCMBlockConstraint alloc] initWithConstraintBlock:block] autorelease];
+}
+
++ (id *)setTo:(id)value
+{
+ return (id *)[[[OCMPassByRefSetter alloc] initWithValue:value] autorelease];
+}
+
++ (void *)setToValue:(NSValue *)value
+{
+ return (id *)[[[OCMPassByRefSetter alloc] initWithValue:value] autorelease];
+}
+
++ (id)resolveSpecialValues:(NSValue *)value
+{
+ const char *type = [value objCType];
+ if(type[0] == '^')
+ {
+ void *pointer = [value pointerValue];
+ if(pointer == (void *)0x01234567)
+ return [OCMArg any];
+ if((pointer != NULL) && (object_getClass((id)pointer) == [OCMPassByRefSetter class]))
+ return (id)pointer;
+ }
+ else if(type[0] == ':')
+ {
+ SEL selector;
+ [value getValue:&selector];
+ if(selector == NSSelectorFromString(@"aSelectorThatMatchesAnySelector"))
+ return [OCMArg any];
+ }
+ return value;
+}
+
+
+@end
diff --git a/Source/OCMock/OCMBlockCaller.h b/Source/OCMock/OCMBlockCaller.h
new file mode 100644
index 0000000..5c0aecc
--- /dev/null
+++ b/Source/OCMock/OCMBlockCaller.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010-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 OCMBlockCaller : NSObject
+{
+ void (^block)(NSInvocation *);
+}
+
+- (id)initWithCallBlock:(void (^)(NSInvocation *))theBlock;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
+
diff --git a/Source/OCMock/OCMBlockCaller.m b/Source/OCMock/OCMBlockCaller.m
new file mode 100644
index 0000000..b804edd
--- /dev/null
+++ b/Source/OCMock/OCMBlockCaller.m
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2010-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 "OCMBlockCaller.h"
+
+
+@implementation OCMBlockCaller
+
+-(id)initWithCallBlock:(void (^)(NSInvocation *))theBlock
+{
+ if ((self = [super init]))
+ {
+ block = [theBlock copy];
+ }
+
+ return self;
+}
+
+-(void)dealloc
+{
+ [block release];
+ [super dealloc];
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ if (block != nil)
+ {
+ block(anInvocation);
+ }
+}
+
+@end
diff --git a/Source/OCMock/OCMBoxedReturnValueProvider.h b/Source/OCMock/OCMBoxedReturnValueProvider.h
new file mode 100644
index 0000000..bc6f119
--- /dev/null
+++ b/Source/OCMock/OCMBoxedReturnValueProvider.h
@@ -0,0 +1,23 @@
+/*
+ * 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 "OCMReturnValueProvider.h"
+
+@interface OCMBoxedReturnValueProvider : OCMReturnValueProvider
+{
+}
+
+@end
diff --git a/Source/OCMock/OCMBoxedReturnValueProvider.m b/Source/OCMock/OCMBoxedReturnValueProvider.m
new file mode 100644
index 0000000..6219fe5
--- /dev/null
+++ b/Source/OCMock/OCMBoxedReturnValueProvider.m
@@ -0,0 +1,61 @@
+/*
+ * 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 "OCMBoxedReturnValueProvider.h"
+#import "OCMFunctions.h"
+#import "NSValue+OCMAdditions.h"
+
+@implementation OCMBoxedReturnValueProvider
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ const char *returnType = [[anInvocation methodSignature] methodReturnType];
+ NSUInteger returnTypeSize = [[anInvocation methodSignature] methodReturnLength];
+ char valueBuffer[returnTypeSize];
+ NSValue *returnValueAsNSValue = (NSValue *)returnValue;
+
+ if([self isMethodReturnType:returnType compatibleWithValueType:[returnValueAsNSValue objCType]])
+ {
+ [returnValueAsNSValue getValue:valueBuffer];
+ [anInvocation setReturnValue:valueBuffer];
+ }
+ else if([returnValueAsNSValue getBytes:valueBuffer objCType:returnType])
+ {
+ [anInvocation setReturnValue:valueBuffer];
+ }
+ else
+ {
+ [NSException raise:NSInvalidArgumentException
+ format:@"Return value cannot be used for method; method signature declares '%s' but value is '%s'.", returnType, [returnValueAsNSValue objCType]];
+ }
+}
+
+
+- (BOOL)isMethodReturnType:(const char *)returnType compatibleWithValueType:(const char *)valueType
+{
+ /* Same types are obviously compatible */
+ if(strcmp(returnType, valueType) == 0)
+ return YES;
+
+ /* Allow void* for methods that return id, mainly to be able to handle nil */
+ if(strcmp(returnType, @encode(id)) == 0 && strcmp(valueType, @encode(void *)) == 0)
+ return YES;
+
+ return OCMEqualTypesAllowingOpaqueStructs(returnType, valueType);
+}
+
+
+@end
diff --git a/Source/OCMock/OCMConstraint.h b/Source/OCMock/OCMConstraint.h
new file mode 100644
index 0000000..2164f32
--- /dev/null
+++ b/Source/OCMock/OCMConstraint.h
@@ -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)]
diff --git a/Source/OCMock/OCMConstraint.m b/Source/OCMock/OCMConstraint.m
new file mode 100644
index 0000000..d92be74
--- /dev/null
+++ b/Source/OCMock/OCMConstraint.m
@@ -0,0 +1,156 @@
+/*
+ * 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 <OCMock/OCMConstraint.h>
+
+
+@implementation OCMConstraint
+
++ (instancetype)constraint
+{
+ return [[[self alloc] init] autorelease];
+}
+
+- (BOOL)evaluate:(id)value
+{
+ return NO;
+}
+
+- (id)copyWithZone:(struct _NSZone *)zone
+{
+ return [self retain];
+}
+
++ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject
+{
+ OCMInvocationConstraint *constraint = [OCMInvocationConstraint constraint];
+ NSMethodSignature *signature = [anObject methodSignatureForSelector:aSelector];
+ if(signature == nil)
+ [NSException raise:NSInvalidArgumentException format:@"Unkown selector %@ used in constraint.", NSStringFromSelector(aSelector)];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setTarget:anObject];
+ [invocation setSelector:aSelector];
+ constraint->invocation = invocation;
+ return constraint;
+}
+
++ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue
+{
+ OCMInvocationConstraint *constraint = [self constraintWithSelector:aSelector onObject:anObject];
+ if([[constraint->invocation methodSignature] numberOfArguments] < 4)
+ [NSException raise:NSInvalidArgumentException format:@"Constraint with value requires selector with two arguments."];
+ [constraint->invocation setArgument:&aValue atIndex:3];
+ return constraint;
+}
+
+
+@end
+
+
+
+#pragma mark -
+
+@implementation OCMAnyConstraint
+
+- (BOOL)evaluate:(id)value
+{
+ return YES;
+}
+
+@end
+
+
+
+#pragma mark -
+
+@implementation OCMIsNilConstraint
+
+- (BOOL)evaluate:(id)value
+{
+ return value == nil;
+}
+
+@end
+
+
+
+#pragma mark -
+
+@implementation OCMIsNotNilConstraint
+
+- (BOOL)evaluate:(id)value
+{
+ return value != nil;
+}
+
+@end
+
+
+
+#pragma mark -
+
+@implementation OCMIsNotEqualConstraint
+
+- (BOOL)evaluate:(id)value
+{
+ return ![value isEqual:testValue];
+}
+
+@end
+
+
+
+#pragma mark -
+
+@implementation OCMInvocationConstraint
+
+- (BOOL)evaluate:(id)value
+{
+ [invocation setArgument:&value atIndex:2]; // should test if constraint takes arg
+ [invocation invoke];
+ BOOL returnValue;
+ [invocation getReturnValue:&returnValue];
+ return returnValue;
+}
+
+@end
+
+#pragma mark -
+
+@implementation OCMBlockConstraint
+
+- (instancetype)initWithConstraintBlock:(BOOL (^)(id))aBlock
+{
+ if ((self = [super init]))
+ {
+ block = [aBlock copy];
+ }
+
+ return self;
+}
+
+- (void)dealloc {
+ [block release];
+ [super dealloc];
+}
+
+- (BOOL)evaluate:(id)value
+{
+ return block ? block(value) : NO;
+}
+
+
+@end
diff --git a/Source/OCMock/OCMExceptionReturnValueProvider.h b/Source/OCMock/OCMExceptionReturnValueProvider.h
new file mode 100644
index 0000000..1b9f3ad
--- /dev/null
+++ b/Source/OCMock/OCMExceptionReturnValueProvider.h
@@ -0,0 +1,23 @@
+/*
+ * 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 "OCMReturnValueProvider.h"
+
+@interface OCMExceptionReturnValueProvider : OCMReturnValueProvider
+{
+}
+
+@end
diff --git a/Source/OCMock/OCMExceptionReturnValueProvider.m b/Source/OCMock/OCMExceptionReturnValueProvider.m
new file mode 100644
index 0000000..ac65e22
--- /dev/null
+++ b/Source/OCMock/OCMExceptionReturnValueProvider.m
@@ -0,0 +1,27 @@
+/*
+ * 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 "OCMExceptionReturnValueProvider.h"
+
+
+@implementation OCMExceptionReturnValueProvider
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ @throw returnValue;
+}
+
+@end
diff --git a/Source/OCMock/OCMExpectationRecorder.h b/Source/OCMock/OCMExpectationRecorder.h
new file mode 100644
index 0000000..592c179
--- /dev/null
+++ b/Source/OCMock/OCMExpectationRecorder.h
@@ -0,0 +1,23 @@
+/*
+ * 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/OCMock.h>
+
+@interface OCMExpectationRecorder : OCMStubRecorder
+
+- (id)never;
+
+@end
diff --git a/Source/OCMock/OCMExpectationRecorder.m b/Source/OCMock/OCMExpectationRecorder.m
new file mode 100644
index 0000000..14a742b
--- /dev/null
+++ b/Source/OCMock/OCMExpectationRecorder.m
@@ -0,0 +1,56 @@
+/*
+ * 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 "OCMExpectationRecorder.h"
+#import "OCMInvocationExpectation.h"
+
+@implementation OCMExpectationRecorder
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)init
+{
+ self = [super init];
+ [invocationMatcher release];
+ invocationMatcher = [[OCMInvocationExpectation alloc] init];
+ return self;
+}
+
+- (OCMInvocationExpectation *)expectation
+{
+ return (OCMInvocationExpectation *)invocationMatcher;
+}
+
+
+#pragma mark Modifying the expectation
+
+- (id)never
+{
+ [[self expectation] setMatchAndReject:YES];
+ return self;
+}
+
+
+#pragma mark Finishing recording
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ [super forwardInvocation:anInvocation];
+ [mockObject addExpectation:[self expectation]];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMFunctions.h b/Source/OCMock/OCMFunctions.h
new file mode 100644
index 0000000..578f102
--- /dev/null
+++ b/Source/OCMock/OCMFunctions.h
@@ -0,0 +1,43 @@
+/*
+ * 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 OCClassMockObject;
+@class OCPartialMockObject;
+
+
+BOOL OCMIsObjectType(const char *objCType);
+const char *OCMTypeWithoutQualifiers(const char *objCType);
+BOOL OCMEqualTypesAllowingOpaqueStructs(const char *type1, const char *type2);
+
+Class OCMCreateSubclass(Class class, void *ref);
+
+void OCMSetIsa(id object, Class class);
+Class OCMGetIsa(id object);
+
+BOOL OCMIsAliasSelector(SEL selector);
+SEL OCMAliasForOriginalSelector(SEL selector);
+SEL OCMOriginalSelectorForAlias(SEL selector);
+
+void OCMSetAssociatedMockForClass(OCClassMockObject *mock, Class aClass);
+OCClassMockObject *OCMGetAssociatedMockForClass(Class aClass, BOOL includeSuperclasses);
+
+void OCMSetAssociatedMockForObject(OCClassMockObject *mock, id anObject);
+OCPartialMockObject *OCMGetAssociatedMockForObject(id anObject);
+
+void OCMReportFailure(OCMLocation *loc, NSString *description);
diff --git a/Source/OCMock/OCMFunctions.m b/Source/OCMock/OCMFunctions.m
new file mode 100644
index 0000000..0b7051b
--- /dev/null
+++ b/Source/OCMock/OCMFunctions.m
@@ -0,0 +1,292 @@
+/*
+ * 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 <objc/runtime.h>
+#import "OCMFunctions.h"
+#import "OCMLocation.h"
+#import "OCClassMockObject.h"
+#import "OCPartialMockObject.h"
+
+
+#pragma mark Known private API
+
+@interface NSException(OCMKnownExceptionMethods)
++ (NSException *)failureInFile:(NSString *)file atLine:(int)line withDescription:(NSString *)formatString, ...;
+@end
+
+@interface NSObject(OCMKnownTestCaseMethods)
+- (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)file atLine:(NSUInteger)line expected:(BOOL)expected;
+- (void)failWithException:(NSException *)exception;
+@end
+
+
+#pragma mark Functions related to ObjC type system
+
+BOOL OCMIsObjectType(const char *objCType)
+{
+ objCType = OCMTypeWithoutQualifiers(objCType);
+
+ if(strcmp(objCType, @encode(id)) == 0 || strcmp(objCType, @encode(Class)) == 0)
+ return YES;
+
+ // if the returnType is a typedef to an object, it has the form ^{OriginClass=#}
+ NSString *regexString = @"^\\^\\{(.*)=#.*\\}";
+ NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regexString options:0 error:NULL];
+ NSString *type = [NSString stringWithCString:objCType encoding:NSASCIIStringEncoding];
+ if([regex numberOfMatchesInString:type options:0 range:NSMakeRange(0, type.length)] > 0)
+ return YES;
+
+ // if the return type is a block we treat it like an object
+ // TODO: if the runtime were to encode the block's argument and/or return types, this test would not be sufficient
+ if(strcmp(objCType, @encode(void(^)())) == 0)
+ return YES;
+
+ return NO;
+}
+
+
+const char *OCMTypeWithoutQualifiers(const char *objCType)
+{
+ while(strchr("rnNoORV", objCType[0]) != NULL)
+ objCType += 1;
+ return objCType;
+}
+
+
+/*
+ * Sometimes an external type is an opaque struct (which will have an @encode of "{structName}"
+ * or "{structName=}") but the actual method return type, or property type, will know the contents
+ * of the struct (so will have an objcType of say "{structName=iiSS}". This function will determine
+ * those are equal provided they have the same structure name, otherwise everything else will be
+ * compared textually. This can happen particularly for pointers to such structures, which still
+ * encode what is being pointed to.
+ *
+ * For some types some runtime functions throw exceptions, which is why we wrap this in an
+ * exception handler just below.
+ */
+static BOOL OCMEqualTypesAllowingOpaqueStructsInternal(const char *type1, const char *type2)
+{
+ type1 = OCMTypeWithoutQualifiers(type1);
+ type2 = OCMTypeWithoutQualifiers(type2);
+
+ switch (type1[0])
+ {
+ case '{':
+ case '(':
+ {
+ if (type2[0] != type1[0])
+ return NO;
+ char endChar = type1[0] == '{'? '}' : ')';
+
+ const char *type1End = strchr(type1, endChar);
+ const char *type2End = strchr(type2, endChar);
+ const char *type1Equals = strchr(type1, '=');
+ const char *type2Equals = strchr(type2, '=');
+
+ /* Opaque types either don't have an equals sign (just the name and the end brace), or
+ * empty content after the equals sign.
+ * We want that to compare the same as a type of the same name but with the content.
+ */
+ BOOL type1Opaque = (type1Equals == NULL || (type1End < type1Equals) || type1Equals[1] == endChar);
+ BOOL type2Opaque = (type2Equals == NULL || (type2End < type2Equals) || type2Equals[1] == endChar);
+ const char *type1NameEnd = (type1Equals == NULL || (type1End < type1Equals)) ? type1End : type1Equals;
+ const char *type2NameEnd = (type2Equals == NULL || (type2End < type2Equals)) ? type2End : type2Equals;
+ intptr_t type1NameLen = type1NameEnd - type1;
+ intptr_t type2NameLen = type2NameEnd - type2;
+
+ /* If the names are not equal, return NO */
+ if (type1NameLen != type2NameLen || strncmp(type1, type2, type1NameLen))
+ return NO;
+
+ /* If the same name, and at least one is opaque, that is close enough. */
+ if (type1Opaque || type2Opaque)
+ return YES;
+
+ /* Otherwise, compare all the elements. Use NSGetSizeAndAlignment to walk through the struct elements. */
+ type1 = type1Equals + 1;
+ type2 = type2Equals + 1;
+ while (type1[0] != endChar && type1[0] != '\0')
+ {
+ if (!OCMEqualTypesAllowingOpaqueStructs(type1, type2))
+ return NO;
+ type1 = NSGetSizeAndAlignment(type1, NULL, NULL);
+ type2 = NSGetSizeAndAlignment(type2, NULL, NULL);
+ }
+ return YES;
+ }
+ case '^':
+ /* for a pointer, make sure the other is a pointer, then recursively compare the rest */
+ if (type2[0] != type1[0])
+ return NO;
+ return OCMEqualTypesAllowingOpaqueStructs(type1 + 1, type2 + 1);
+
+ case '\0':
+ return type2[0] == '\0';
+
+ default:
+ {
+ // Move the type pointers past the current types, then compare that region
+ const char *afterType1 = NSGetSizeAndAlignment(type1, NULL, NULL);
+ const char *afterType2 = NSGetSizeAndAlignment(type2, NULL, NULL);
+ intptr_t type1Len = afterType1 - type1;
+ intptr_t type2Len = afterType2 - type2;
+
+ return (type1Len == type2Len && (strncmp(type1, type2, type1Len) == 0));
+ }
+ }
+}
+
+BOOL OCMEqualTypesAllowingOpaqueStructs(const char *type1, const char *type2)
+{
+ @try
+ {
+ return OCMEqualTypesAllowingOpaqueStructsInternal(type1, type2);
+ }
+ @catch (NSException *e)
+ {
+ /* Probably a bitfield or something that NSGetSizeAndAlignment chokes on, oh well */
+ return NO;
+ }
+}
+
+
+#pragma mark Creating classes
+
+Class OCMCreateSubclass(Class class, void *ref)
+{
+ const char *className = [[NSString stringWithFormat:@"%@-%p-%u", NSStringFromClass(class), ref, arc4random()] UTF8String];
+ Class subclass = objc_allocateClassPair(class, className, 0);
+ objc_registerClassPair(subclass);
+ return subclass;
+}
+
+
+#pragma mark Directly manipulating the isa pointer (look away)
+
+void OCMSetIsa(id object, Class class)
+{
+ *((Class *)object) = class;
+}
+
+Class OCMGetIsa(id object)
+{
+ return *((Class *)object);
+}
+
+
+#pragma mark Alias for renaming real methods
+
+static NSString *const OCMRealMethodAliasPrefix = @"ocmock_replaced_";
+static const char *const OCMRealMethodAliasPrefixCString = "ocmock_replaced_";
+
+BOOL OCMIsAliasSelector(SEL selector)
+{
+ return [NSStringFromSelector(selector) hasPrefix:OCMRealMethodAliasPrefix];
+}
+
+SEL OCMAliasForOriginalSelector(SEL selector)
+{
+ char aliasName[2048];
+ const char *originalName = sel_getName(selector);
+ strlcpy(aliasName, OCMRealMethodAliasPrefixCString, sizeof(aliasName));
+ strlcat(aliasName, originalName, sizeof(aliasName));
+ return sel_registerName(aliasName);
+}
+
+SEL OCMOriginalSelectorForAlias(SEL selector)
+{
+ if(!OCMIsAliasSelector(selector))
+ [NSException raise:NSInvalidArgumentException format:@"Not an alias selector; found %@", NSStringFromSelector(selector)];
+ NSString *string = NSStringFromSelector(selector);
+ return NSSelectorFromString([string substringFromIndex:[OCMRealMethodAliasPrefix length]]);
+}
+
+
+#pragma mark Wrappers around associative references
+
+static NSString *const OCMClassMethodMockObjectKey = @"OCMClassMethodMockObjectKey";
+
+void OCMSetAssociatedMockForClass(OCClassMockObject *mock, Class aClass)
+{
+ if((mock != nil) && (objc_getAssociatedObject(aClass, OCMClassMethodMockObjectKey) != nil))
+ [NSException raise:NSInternalInconsistencyException format:@"Another mock is already associated with class %@", NSStringFromClass(aClass)];
+ objc_setAssociatedObject(aClass, OCMClassMethodMockObjectKey, mock, OBJC_ASSOCIATION_ASSIGN);
+}
+
+OCClassMockObject *OCMGetAssociatedMockForClass(Class aClass, BOOL includeSuperclasses)
+{
+ OCClassMockObject *mock = nil;
+ do
+ {
+ mock = objc_getAssociatedObject(aClass, OCMClassMethodMockObjectKey);
+ aClass = class_getSuperclass(aClass);
+ }
+ while((mock == nil) && (aClass != nil) && includeSuperclasses);
+ return mock;
+}
+
+static NSString *const OCMPartialMockObjectKey = @"OCMPartialMockObjectKey";
+
+void OCMSetAssociatedMockForObject(OCClassMockObject *mock, id anObject)
+{
+ if((mock != nil) && (objc_getAssociatedObject(anObject, OCMPartialMockObjectKey) != nil))
+ [NSException raise:NSInternalInconsistencyException format:@"Another mock is already associated with object %@", anObject];
+ objc_setAssociatedObject(anObject, OCMPartialMockObjectKey, mock, OBJC_ASSOCIATION_ASSIGN);
+}
+
+OCPartialMockObject *OCMGetAssociatedMockForObject(id anObject)
+{
+ return objc_getAssociatedObject(anObject, OCMPartialMockObjectKey);
+}
+
+
+#pragma mark Functions related to IDE error reporting
+
+void OCMReportFailure(OCMLocation *loc, NSString *description)
+{
+ id testCase = [loc testCase];
+ if((testCase != nil) && [testCase respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)])
+ {
+ [testCase recordFailureWithDescription:description inFile:[loc file] atLine:[loc line] expected:NO];
+ }
+ else if((testCase != nil) && [testCase respondsToSelector:@selector(failWithException:)])
+ {
+ NSException *exception = nil;
+ if([NSException instancesRespondToSelector:@selector(failureInFile:atLine:withDescription:)])
+ {
+ exception = [NSException failureInFile:[loc file] atLine:(int)[loc line] withDescription:description];
+ }
+ else
+ {
+ NSString *reason = [NSString stringWithFormat:@"%@:%lu %@", [loc file], (unsigned long)[loc line], description];
+ exception = [NSException exceptionWithName:@"OCMockTestFailure" reason:reason userInfo:nil];
+ }
+ [testCase failWithException:exception];
+ }
+ else if(loc != nil)
+ {
+ NSLog(@"%@:%lu %@", [loc file], (unsigned long)[loc line], description);
+ NSString *reason = [NSString stringWithFormat:@"%@:%lu %@", [loc file], (unsigned long)[loc line], description];
+ [[NSException exceptionWithName:@"OCMockTestFailure" reason:reason userInfo:nil] raise];
+
+ }
+ else
+ {
+ NSLog(@"%@", description);
+ [[NSException exceptionWithName:@"OCMockTestFailure" reason:description userInfo:nil] raise];
+ }
+
+}
diff --git a/Source/OCMock/OCMIndirectReturnValueProvider.h b/Source/OCMock/OCMIndirectReturnValueProvider.h
new file mode 100644
index 0000000..a7b1542
--- /dev/null
+++ b/Source/OCMock/OCMIndirectReturnValueProvider.h
@@ -0,0 +1,29 @@
+/*
+ * 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 OCMIndirectReturnValueProvider : NSObject
+{
+ id provider;
+ SEL selector;
+}
+
+- (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMIndirectReturnValueProvider.m b/Source/OCMock/OCMIndirectReturnValueProvider.m
new file mode 100644
index 0000000..1f22d99
--- /dev/null
+++ b/Source/OCMock/OCMIndirectReturnValueProvider.m
@@ -0,0 +1,54 @@
+/*
+ * 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 "NSMethodSignature+OCMAdditions.h"
+#import "OCMIndirectReturnValueProvider.h"
+#import "NSInvocation+OCMAdditions.h"
+
+
+@implementation OCMIndirectReturnValueProvider
+
+- (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector
+{
+ if ((self = [super init]))
+ {
+ provider = [aProvider retain];
+ selector = aSelector;
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [provider release];
+ [super dealloc];
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ id originalTarget = [anInvocation target];
+ SEL originalSelector = [anInvocation selector];
+
+ [anInvocation setTarget:provider];
+ [anInvocation setSelector:selector];
+ [anInvocation invoke];
+
+ [anInvocation setTarget:originalTarget];
+ [anInvocation setSelector:originalSelector];
+}
+
+@end
diff --git a/Source/OCMock/OCMInvocationExpectation.h b/Source/OCMock/OCMInvocationExpectation.h
new file mode 100644
index 0000000..a0a0909
--- /dev/null
+++ b/Source/OCMock/OCMInvocationExpectation.h
@@ -0,0 +1,30 @@
+/*
+ * 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 "OCMInvocationStub.h"
+
+@interface OCMInvocationExpectation : OCMInvocationStub
+{
+ BOOL matchAndReject;
+ BOOL isSatisfied;
+}
+
+- (void)setMatchAndReject:(BOOL)flag;
+- (BOOL)isMatchAndReject;
+
+- (BOOL)isSatisfied;
+
+@end
diff --git a/Source/OCMock/OCMInvocationExpectation.m b/Source/OCMock/OCMInvocationExpectation.m
new file mode 100644
index 0000000..db572d0
--- /dev/null
+++ b/Source/OCMock/OCMInvocationExpectation.m
@@ -0,0 +1,56 @@
+/*
+ * 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 "OCMInvocationExpectation.h"
+#import "NSInvocation+OCMAdditions.h"
+
+
+@implementation OCMInvocationExpectation
+
+- (void)setMatchAndReject:(BOOL)flag
+{
+ matchAndReject = flag;
+ if(matchAndReject)
+ isSatisfied = YES;
+}
+
+- (BOOL)isMatchAndReject
+{
+ return matchAndReject;
+}
+
+- (BOOL)isSatisfied
+{
+ return isSatisfied;
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ [super handleInvocation:anInvocation];
+
+ if(matchAndReject)
+ {
+ isSatisfied = NO;
+ [NSException raise:NSInternalInconsistencyException format:@"%@: explicitly disallowed method invoked: %@",
+ [self description], [anInvocation invocationDescription]];
+ }
+ else
+ {
+ isSatisfied = YES;
+ }
+}
+
+@end
diff --git a/Source/OCMock/OCMInvocationMatcher.h b/Source/OCMock/OCMInvocationMatcher.h
new file mode 100644
index 0000000..bd2758b
--- /dev/null
+++ b/Source/OCMock/OCMInvocationMatcher.h
@@ -0,0 +1,37 @@
+/*
+ * 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 OCMInvocationMatcher : NSObject
+{
+ NSInvocation *recordedInvocation;
+ BOOL recordedAsClassMethod;
+ BOOL ignoreNonObjectArgs;
+}
+
+- (void)setInvocation:(NSInvocation *)anInvocation;
+- (NSInvocation *)recordedInvocation;
+
+- (void)setRecordedAsClassMethod:(BOOL)flag;
+- (BOOL)recordedAsClassMethod;
+
+- (void)setIgnoreNonObjectArgs:(BOOL)flag;
+
+- (BOOL)matchesSelector:(SEL)aSelector;
+- (BOOL)matchesInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMInvocationMatcher.m b/Source/OCMock/OCMInvocationMatcher.m
new file mode 100644
index 0000000..55f7374
--- /dev/null
+++ b/Source/OCMock/OCMInvocationMatcher.m
@@ -0,0 +1,151 @@
+/*
+ * 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 <objc/runtime.h>
+#import <OCMock/OCMArg.h>
+#import <OCMock/OCMConstraint.h>
+#import "OCMPassByRefSetter.h"
+#import "NSInvocation+OCMAdditions.h"
+#import "OCMInvocationMatcher.h"
+#import "OCClassMockObject.h"
+#import "OCMFunctions.h"
+
+
+@interface NSObject(HCMatcherDummy)
+- (BOOL)matches:(id)item;
+@end
+
+
+@implementation OCMInvocationMatcher
+
+- (void)dealloc
+{
+ [recordedInvocation release];
+ [super dealloc];
+}
+
+- (void)setInvocation:(NSInvocation *)anInvocation
+{
+ [recordedInvocation release];
+ // When the method has a char* argument we do not retain the arguments. This makes it possible
+ // to match char* args literally and with anyPointer. Not retaining the argument means that
+ // in these cases tests that use their own autorelease pools may fail unexpectedly.
+ if(![anInvocation hasCharPointerArgument])
+ [anInvocation retainArguments];
+ recordedInvocation = [anInvocation retain];
+}
+
+- (void)setRecordedAsClassMethod:(BOOL)flag
+{
+ recordedAsClassMethod = flag;
+}
+
+- (BOOL)recordedAsClassMethod
+{
+ return recordedAsClassMethod;
+}
+
+- (void)setIgnoreNonObjectArgs:(BOOL)flag
+{
+ ignoreNonObjectArgs = flag;
+}
+
+- (NSString *)description
+{
+ return [recordedInvocation invocationDescription];
+}
+
+- (NSInvocation *)recordedInvocation
+{
+ return recordedInvocation;
+}
+
+- (BOOL)matchesSelector:(SEL)sel
+{
+ if(sel == [recordedInvocation selector])
+ return YES;
+ if(OCMIsAliasSelector(sel) &&
+ OCMOriginalSelectorForAlias(sel) == [recordedInvocation selector])
+ return YES;
+
+ return NO;
+}
+
+- (BOOL)matchesInvocation:(NSInvocation *)anInvocation
+{
+ id target = [anInvocation target];
+ BOOL isClassMethodInvocation = (target != nil) && (target == [target class]);
+ if(isClassMethodInvocation != recordedAsClassMethod)
+ return NO;
+
+ if(![self matchesSelector:[anInvocation selector]])
+ return NO;
+
+ NSMethodSignature *signature = [recordedInvocation methodSignature];
+ NSUInteger n = [signature numberOfArguments];
+ for(NSUInteger i = 2; i < n; i++)
+ {
+ if(ignoreNonObjectArgs && strcmp([signature getArgumentTypeAtIndex:i], @encode(id)))
+ {
+ continue;
+ }
+
+ id recordedArg = [recordedInvocation getArgumentAtIndexAsObject:i];
+ id passedArg = [anInvocation getArgumentAtIndexAsObject:i];
+
+ if([recordedArg isProxy])
+ {
+ if(![recordedArg isEqual:passedArg])
+ return NO;
+ continue;
+ }
+
+ if([recordedArg isKindOfClass:[NSValue class]])
+ recordedArg = [OCMArg resolveSpecialValues:recordedArg];
+
+ if([recordedArg isKindOfClass:[OCMConstraint class]])
+ {
+ if([recordedArg evaluate:passedArg] == NO)
+ return NO;
+ }
+ else if([recordedArg isKindOfClass:[OCMPassByRefSetter class]])
+ {
+ id valueToSet = [(OCMPassByRefSetter *)recordedArg value];
+ // side effect but easier to do here than in handleInvocation
+ if(![valueToSet isKindOfClass:[NSValue class]])
+ *(id *)[passedArg pointerValue] = valueToSet;
+ else
+ [(NSValue *)valueToSet getValue:[passedArg pointerValue]];
+ }
+ else if([recordedArg conformsToProtocol:objc_getProtocol("HCMatcher")])
+ {
+ if([recordedArg matches:passedArg] == NO)
+ return NO;
+ }
+ else
+ {
+ if(([recordedArg class] == [NSNumber class]) &&
+ ([(NSNumber*)recordedArg compare:(NSNumber*)passedArg] != NSOrderedSame))
+ return NO;
+ if(([recordedArg isEqual:passedArg] == NO) &&
+ !((recordedArg == nil) && (passedArg == nil)))
+ return NO;
+ }
+ }
+ return YES;
+}
+
+@end
diff --git a/Source/OCMock/OCMInvocationStub.h b/Source/OCMock/OCMInvocationStub.h
new file mode 100644
index 0000000..d52467b
--- /dev/null
+++ b/Source/OCMock/OCMInvocationStub.h
@@ -0,0 +1,29 @@
+/*
+ * 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 "OCMInvocationMatcher.h"
+
+@interface OCMInvocationStub : OCMInvocationMatcher
+{
+ NSMutableArray *invocationActions;
+}
+
+- (void)addInvocationAction:(id)anAction;
+- (NSArray *)invocationActions;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMInvocationStub.m b/Source/OCMock/OCMInvocationStub.m
new file mode 100644
index 0000000..b16e7b9
--- /dev/null
+++ b/Source/OCMock/OCMInvocationStub.m
@@ -0,0 +1,53 @@
+/*
+ * 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 "OCMInvocationStub.h"
+
+@implementation OCMInvocationStub
+
+- (id)init
+{
+ self = [super init];
+ invocationActions = [[NSMutableArray alloc] init];
+ return self;
+}
+
+- (void)dealloc
+{
+ [invocationActions release];
+ [super dealloc];
+}
+
+
+- (void)addInvocationAction:(id)anAction
+{
+ [invocationActions addObject:anAction];
+}
+
+- (NSArray *)invocationActions
+{
+ return invocationActions;
+}
+
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+// if(![self matchesInvocation:anInvocation])
+// return NO;
+ [invocationActions makeObjectsPerformSelector:@selector(handleInvocation:) withObject:anInvocation];
+}
+
+@end
diff --git a/Source/OCMock/OCMLocation.h b/Source/OCMock/OCMLocation.h
new file mode 100644
index 0000000..7a8231e
--- /dev/null
+++ b/Source/OCMock/OCMLocation.h
@@ -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);
diff --git a/Source/OCMock/OCMLocation.m b/Source/OCMock/OCMLocation.m
new file mode 100644
index 0000000..dbe59bc
--- /dev/null
+++ b/Source/OCMock/OCMLocation.m
@@ -0,0 +1,66 @@
+/*
+ * 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 "OCMLocation.h"
+
+@implementation OCMLocation
+
++ (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine
+{
+ return [[[OCMLocation alloc] initWithTestCase:aTestCase file:aFile line:aLine] autorelease];
+}
+
+- (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine
+{
+ if ((self = [super init]))
+ {
+ testCase = aTestCase;
+ file = [aFile retain];
+ line = aLine;
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [file release];
+ [super dealloc];
+}
+
+- (id)testCase
+{
+ return testCase;
+}
+
+- (NSString *)file
+{
+ return file;
+}
+
+- (NSUInteger)line
+{
+ return line;
+}
+
+@end
+
+
+OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line)
+{
+ return [OCMLocation locationWithTestCase:testCase file:[NSString stringWithUTF8String:fileCString] line:line];
+}
+
diff --git a/Source/OCMock/OCMMacroState.h b/Source/OCMock/OCMMacroState.h
new file mode 100644
index 0000000..96dc5e2
--- /dev/null
+++ b/Source/OCMock/OCMMacroState.h
@@ -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
diff --git a/Source/OCMock/OCMMacroState.m b/Source/OCMock/OCMMacroState.m
new file mode 100644
index 0000000..ace6755
--- /dev/null
+++ b/Source/OCMock/OCMMacroState.m
@@ -0,0 +1,112 @@
+/*
+ * 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 "OCMMacroState.h"
+#import "OCMStubRecorder.h"
+#import "OCMockObject.h"
+#import "OCMExpectationRecorder.h"
+#import "OCMVerifier.h"
+#import "OCMInvocationMatcher.h"
+
+
+@implementation OCMMacroState
+
+static OCMMacroState *globalState;
+
+#pragma mark Methods to begin/end macros
+
++ (void)beginStubMacro
+{
+ OCMStubRecorder *recorder = [[[OCMStubRecorder alloc] init] autorelease];
+ globalState = [[[OCMMacroState alloc] initWithRecorder:recorder] autorelease];
+}
+
++ (OCMStubRecorder *)endStubMacro
+{
+ OCMStubRecorder *recorder = (OCMStubRecorder *)[globalState recorder];
+ globalState = nil;
+ return recorder;
+}
+
+
++ (void)beginExpectMacro
+{
+ OCMExpectationRecorder *recorder = [[[OCMExpectationRecorder alloc] init] autorelease];
+ globalState = [[[OCMMacroState alloc] initWithRecorder:recorder] autorelease];
+}
+
++ (OCMStubRecorder *)endExpectMacro
+{
+ return [self endStubMacro];
+}
+
+
++ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation
+{
+ OCMVerifier *recorder = [[[OCMVerifier alloc] init] autorelease];
+ [recorder setLocation:aLocation];
+ globalState = [[[OCMMacroState alloc] initWithRecorder:recorder] autorelease];
+}
+
++ (void)endVerifyMacro
+{
+ globalState = nil;
+}
+
+
+#pragma mark Accessing global state
+
++ (OCMMacroState *)globalState
+{
+ return globalState;
+}
+
+
+#pragma mark Init, dealloc, accessors
+
+- (id)initWithRecorder:(OCMRecorder *)aRecorder
+{
+ if ((self = [super init]))
+ {
+ recorder = [aRecorder retain];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [recorder release];
+ if(globalState == self)
+ globalState = nil;
+ [super dealloc];
+}
+
+- (OCMRecorder *)recorder
+{
+ return recorder;
+}
+
+
+#pragma mark Changing the recorder
+
+- (void)switchToClassMethod
+{
+ [recorder classMethod];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMNotificationPoster.h b/Source/OCMock/OCMNotificationPoster.h
new file mode 100644
index 0000000..d80d2a3
--- /dev/null
+++ b/Source/OCMock/OCMNotificationPoster.h
@@ -0,0 +1,28 @@
+/*
+ * 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 OCMNotificationPoster : NSObject
+{
+ NSNotification *notification;
+}
+
+- (id)initWithNotification:(id)aNotification;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMNotificationPoster.m b/Source/OCMock/OCMNotificationPoster.m
new file mode 100644
index 0000000..764b23b
--- /dev/null
+++ b/Source/OCMock/OCMNotificationPoster.m
@@ -0,0 +1,44 @@
+/*
+ * 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 "OCMNotificationPoster.h"
+
+
+@implementation OCMNotificationPoster
+
+- (id)initWithNotification:(id)aNotification
+{
+ if ((self = [super init]))
+ {
+ notification = [aNotification retain];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [notification release];
+ [super dealloc];
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ [[NSNotificationCenter defaultCenter] postNotification:notification];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMObserverRecorder.h b/Source/OCMock/OCMObserverRecorder.h
new file mode 100644
index 0000000..04f657b
--- /dev/null
+++ b/Source/OCMock/OCMObserverRecorder.h
@@ -0,0 +1,30 @@
+/*
+ * 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 OCMObserverRecorder : NSObject
+{
+ NSNotification *recordedNotification;
+}
+
+- (void)notificationWithName:(NSString *)name object:(id)sender;
+
+- (BOOL)matchesNotification:(NSNotification *)aNotification;
+
+- (BOOL)argument:(id)expectedArg matchesArgument:(id)observedArg;
+
+@end
diff --git a/Source/OCMock/OCMObserverRecorder.m b/Source/OCMock/OCMObserverRecorder.m
new file mode 100644
index 0000000..ce28c0a
--- /dev/null
+++ b/Source/OCMock/OCMObserverRecorder.m
@@ -0,0 +1,87 @@
+/*
+ * 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 <objc/runtime.h>
+#import <OCMock/OCMConstraint.h>
+#import "NSInvocation+OCMAdditions.h"
+#import "OCMObserverRecorder.h"
+
+@interface NSObject(HCMatcherDummy)
+- (BOOL)matches:(id)item;
+@end
+
+#pragma mark -
+
+
+@implementation OCMObserverRecorder
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (void)dealloc
+{
+ [recordedNotification release];
+ [super dealloc];
+}
+
+
+#pragma mark Recording
+
+- (void)notificationWithName:(NSString *)name object:(id)sender
+{
+ recordedNotification = [[NSNotification notificationWithName:name object:sender] retain];
+}
+
+- (void)notificationWithName:(NSString *)name object:(id)sender userInfo:(NSDictionary *)userInfo
+{
+ recordedNotification = [[NSNotification notificationWithName:name object:sender userInfo:userInfo] retain];
+}
+
+
+#pragma mark Verification
+
+- (BOOL)matchesNotification:(NSNotification *)aNotification
+{
+ return [self argument:[recordedNotification name] matchesArgument:[aNotification name]] &&
+ [self argument:[recordedNotification object] matchesArgument:[aNotification object]] &&
+ [self argument:[recordedNotification userInfo] matchesArgument:[aNotification userInfo]];
+}
+
+- (BOOL)argument:(id)expectedArg matchesArgument:(id)observedArg
+{
+ if([expectedArg isKindOfClass:[OCMConstraint class]])
+ {
+ return [expectedArg evaluate:observedArg];
+ }
+ else if([expectedArg conformsToProtocol:objc_getProtocol("HCMatcher")])
+ {
+ return [expectedArg matches:observedArg];
+ }
+ else if (expectedArg == observedArg)
+ {
+ return YES;
+ }
+ else if (expectedArg == nil || observedArg == nil)
+ {
+ return NO;
+ }
+ else
+ {
+ return [expectedArg isEqual:observedArg];
+ }
+}
+
+
+@end
diff --git a/Source/OCMock/OCMPassByRefSetter.h b/Source/OCMock/OCMPassByRefSetter.h
new file mode 100644
index 0000000..51d3566
--- /dev/null
+++ b/Source/OCMock/OCMPassByRefSetter.h
@@ -0,0 +1,28 @@
+/*
+ * 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 OCMPassByRefSetter : NSObject
+{
+ id value;
+}
+
+- (id)initWithValue:(id)value;
+
+- (id)value;
+
+@end
diff --git a/Source/OCMock/OCMPassByRefSetter.m b/Source/OCMock/OCMPassByRefSetter.m
new file mode 100644
index 0000000..7d9f755
--- /dev/null
+++ b/Source/OCMock/OCMPassByRefSetter.m
@@ -0,0 +1,43 @@
+/*
+ * 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 "OCMPassByRefSetter.h"
+
+
+@implementation OCMPassByRefSetter
+
+- (id)initWithValue:(id)aValue
+{
+ if ((self = [super init]))
+ {
+ value = [aValue retain];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [value release];
+ [super dealloc];
+}
+
+- (id)value
+{
+ return value;
+}
+
+@end
diff --git a/Source/OCMock/OCMRealObjectForwarder.h b/Source/OCMock/OCMRealObjectForwarder.h
new file mode 100644
index 0000000..d09bebb
--- /dev/null
+++ b/Source/OCMock/OCMRealObjectForwarder.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2010-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 OCMRealObjectForwarder : NSObject
+{
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMRealObjectForwarder.m b/Source/OCMock/OCMRealObjectForwarder.m
new file mode 100644
index 0000000..7042c7f
--- /dev/null
+++ b/Source/OCMock/OCMRealObjectForwarder.m
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2010-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 <objc/runtime.h>
+#import "OCPartialMockObject.h"
+#import "OCMRealObjectForwarder.h"
+#import "OCMFunctions.h"
+
+
+@implementation OCMRealObjectForwarder
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ id invocationTarget = [anInvocation target];
+
+ [anInvocation setSelector:OCMAliasForOriginalSelector([anInvocation selector])];
+ if ([invocationTarget isProxy])
+ {
+ if (class_getInstanceMethod([invocationTarget mockObjectClass], @selector(realObject)))
+ {
+ // the method has been invoked on the mock, we need to change the target to the real object
+ [anInvocation setTarget:[(OCPartialMockObject *)invocationTarget realObject]];
+ }
+ else
+ {
+ [NSException raise:NSInternalInconsistencyException
+ format:@"Method andForwardToRealObject can only be used with partial mocks and class methods."];
+ }
+ }
+
+ [anInvocation invoke];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMRecorder.h b/Source/OCMock/OCMRecorder.h
new file mode 100644
index 0000000..3496c77
--- /dev/null
+++ b/Source/OCMock/OCMRecorder.h
@@ -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
diff --git a/Source/OCMock/OCMRecorder.m b/Source/OCMock/OCMRecorder.m
new file mode 100644
index 0000000..4f630b6
--- /dev/null
+++ b/Source/OCMock/OCMRecorder.m
@@ -0,0 +1,109 @@
+/*
+ * 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 <objc/runtime.h>
+#import "OCMRecorder.h"
+#import "OCMockObject.h"
+#import "OCMInvocationMatcher.h"
+#import "OCClassMockObject.h"
+
+@implementation OCMRecorder
+
+- (instancetype)init
+{
+ // no super, we're inheriting from NSProxy
+ return self;
+}
+
+- (instancetype)initWithMockObject:(OCMockObject *)aMockObject
+{
+ [self init];
+ [self setMockObject:aMockObject];
+ return self;
+}
+
+- (void)setMockObject:(OCMockObject *)aMockObject
+{
+ mockObject = aMockObject;
+}
+
+- (void)dealloc
+{
+ [invocationMatcher release];
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return [invocationMatcher description];
+}
+
+- (OCMInvocationMatcher *)invocationMatcher
+{
+ return invocationMatcher;
+}
+
+
+#pragma mark Modifying the matcher
+
+- (id)classMethod
+{
+ // should we handle the case where this is called with a mock that isn't a class mock?
+ [invocationMatcher setRecordedAsClassMethod:YES];
+ return self;
+}
+
+- (id)ignoringNonObjectArgs
+{
+ [invocationMatcher setIgnoreNonObjectArgs:YES];
+ return self;
+}
+
+
+#pragma mark Recording the actual invocation
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ if([invocationMatcher recordedAsClassMethod])
+ return [[(OCClassMockObject *)mockObject mockedClass] methodSignatureForSelector:aSelector];
+
+ NSMethodSignature *signature = [mockObject methodSignatureForSelector:aSelector];
+ if(signature == nil)
+ {
+ // if we're a working with a class mock and there is a class method, auto-switch
+ if(([object_getClass(mockObject) isSubclassOfClass:[OCClassMockObject class]]) &&
+ ([[(OCClassMockObject *)mockObject mockedClass] respondsToSelector:aSelector]))
+ {
+ [self classMethod];
+ signature = [self methodSignatureForSelector:aSelector];
+ }
+ }
+ return signature;
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ [anInvocation setTarget:nil];
+ [invocationMatcher setInvocation:anInvocation];
+}
+
+- (void)doesNotRecognizeSelector:(SEL)aSelector
+{
+ [NSException raise:NSInvalidArgumentException format:@"%@: cannot stub/expect/verify method '%@' because no such method exists in the mocked class.", mockObject, NSStringFromSelector(aSelector)];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMReturnValueProvider.h b/Source/OCMock/OCMReturnValueProvider.h
new file mode 100644
index 0000000..f6690c3
--- /dev/null
+++ b/Source/OCMock/OCMReturnValueProvider.h
@@ -0,0 +1,28 @@
+/*
+ * 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 OCMReturnValueProvider : NSObject
+{
+ id returnValue;
+}
+
+- (instancetype)initWithValue:(id)aValue;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/Source/OCMock/OCMReturnValueProvider.m b/Source/OCMock/OCMReturnValueProvider.m
new file mode 100644
index 0000000..99e285a
--- /dev/null
+++ b/Source/OCMock/OCMReturnValueProvider.m
@@ -0,0 +1,55 @@
+/*
+ * 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 "NSMethodSignature+OCMAdditions.h"
+#import "OCMReturnValueProvider.h"
+#import "OCMFunctions.h"
+
+
+@implementation OCMReturnValueProvider
+
+- (instancetype)initWithValue:(id)aValue
+{
+ if ((self = [super init]))
+ {
+ returnValue = [aValue retain];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [returnValue release];
+ [super dealloc];
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ if(!OCMIsObjectType([[anInvocation methodSignature] methodReturnType]))
+ {
+ @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Expected invocation with object return type. Did you mean to use andReturnValue: instead?" userInfo:nil];
+ }
+ NSString *sel = NSStringFromSelector([anInvocation selector]);
+ if([sel hasPrefix:@"alloc"] || [sel hasPrefix:@"new"] || [sel hasPrefix:@"copy"] || [sel hasPrefix:@"mutableCopy"])
+ {
+ // methods that "create" an object return it with an extra retain count
+ [returnValue retain];
+ }
+ [anInvocation setReturnValue:&returnValue];
+}
+
+@end
diff --git a/Source/OCMock/OCMStubRecorder.h b/Source/OCMock/OCMStubRecorder.h
new file mode 100644
index 0000000..402586d
--- /dev/null
+++ b/Source/OCMock/OCMStubRecorder.h
@@ -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
+
+
+
diff --git a/Source/OCMock/OCMStubRecorder.m b/Source/OCMock/OCMStubRecorder.m
new file mode 100644
index 0000000..665fa8f
--- /dev/null
+++ b/Source/OCMock/OCMStubRecorder.m
@@ -0,0 +1,187 @@
+/*
+ * 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 "OCMStubRecorder.h"
+#import "OCClassMockObject.h"
+#import "OCMReturnValueProvider.h"
+#import "OCMBoxedReturnValueProvider.h"
+#import "OCMExceptionReturnValueProvider.h"
+#import "OCMIndirectReturnValueProvider.h"
+#import "OCMNotificationPoster.h"
+#import "OCMBlockCaller.h"
+#import "OCMRealObjectForwarder.h"
+#import "OCMFunctions.h"
+#import "OCMInvocationStub.h"
+
+
+@implementation OCMStubRecorder
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)init
+{
+ self = [super init];
+ invocationMatcher = [[OCMInvocationStub alloc] init];
+ return self;
+}
+
+- (OCMInvocationStub *)stub
+{
+ return (OCMInvocationStub *)invocationMatcher;
+}
+
+
+#pragma mark Recording invocation actions
+
+- (id)andReturn:(id)anObject
+{
+ [[self stub] addInvocationAction:[[[OCMReturnValueProvider alloc] initWithValue:anObject] autorelease]];
+ return self;
+}
+
+- (id)andReturnValue:(NSValue *)aValue
+{
+ [[self stub] addInvocationAction:[[[OCMBoxedReturnValueProvider alloc] initWithValue:aValue] autorelease]];
+ return self;
+}
+
+- (id)andThrow:(NSException *)anException
+{
+ [[self stub] addInvocationAction:[[[OCMExceptionReturnValueProvider alloc] initWithValue:anException] autorelease]];
+ return self;
+}
+
+- (id)andPost:(NSNotification *)aNotification
+{
+ [[self stub] addInvocationAction:[[[OCMNotificationPoster alloc] initWithNotification:aNotification] autorelease]];
+ return self;
+}
+
+- (id)andCall:(SEL)selector onObject:(id)anObject
+{
+ [[self stub] addInvocationAction:[[[OCMIndirectReturnValueProvider alloc] initWithProvider:anObject andSelector:selector] autorelease]];
+ return self;
+}
+
+- (id)andDo:(void (^)(NSInvocation *))aBlock
+{
+ [[self stub] addInvocationAction:[[[OCMBlockCaller alloc] initWithCallBlock:aBlock] autorelease]];
+ return self;
+}
+
+- (id)andForwardToRealObject
+{
+ [[self stub] addInvocationAction:[[[OCMRealObjectForwarder alloc] init] autorelease]];
+ return self;
+}
+
+
+#pragma mark Finishing recording
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ [super forwardInvocation:anInvocation];
+ [mockObject addStub:[self stub]];
+}
+
+
+@end
+
+
+@implementation OCMStubRecorder (Properties)
+
+@dynamic _andReturn;
+
+- (OCMStubRecorder *(^)(NSValue *))_andReturn
+{
+ id (^theBlock)(id) = ^ (NSValue *aValue)
+ {
+ if(OCMIsObjectType([aValue objCType]))
+ {
+ NSValue *objValue = nil;
+ [aValue getValue:&objValue];
+ return [self andReturn:objValue];
+ }
+ else
+ {
+ return [self andReturnValue:aValue];
+ }
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@dynamic _andThrow;
+
+- (OCMStubRecorder *(^)(NSException *))_andThrow
+{
+ id (^theBlock)(id) = ^ (NSException * anException)
+ {
+ return [self andThrow:anException];
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@dynamic _andPost;
+
+- (OCMStubRecorder *(^)(NSNotification *))_andPost
+{
+ id (^theBlock)(id) = ^ (NSNotification * aNotification)
+ {
+ return [self andPost:aNotification];
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@dynamic _andCall;
+
+- (OCMStubRecorder *(^)(id, SEL))_andCall
+{
+ id (^theBlock)(id, SEL) = ^ (id anObject, SEL aSelector)
+ {
+ return [self andCall:aSelector onObject:anObject];
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@dynamic _andDo;
+
+- (OCMStubRecorder *(^)(void (^)(NSInvocation *)))_andDo
+{
+ id (^theBlock)(void (^)(NSInvocation *)) = ^ (void (^ blockToCall)(NSInvocation *))
+ {
+ return [self andDo:blockToCall];
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@dynamic _andForwardToRealObject;
+
+- (OCMStubRecorder *(^)(void))_andForwardToRealObject
+{
+ id (^theBlock)(void) = ^ (void)
+ {
+ return [self andForwardToRealObject];
+ };
+ return [[theBlock copy] autorelease];
+}
+
+
+@end
diff --git a/Source/OCMock/OCMVerifier.h b/Source/OCMock/OCMVerifier.h
new file mode 100644
index 0000000..c41a6bd
--- /dev/null
+++ b/Source/OCMock/OCMVerifier.h
@@ -0,0 +1,25 @@
+/*
+ * 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 "OCMRecorder.h"
+#import "OCMLocation.h"
+
+
+@interface OCMVerifier : OCMRecorder
+
+@property(retain) OCMLocation *location;
+
+@end
diff --git a/Source/OCMock/OCMVerifier.m b/Source/OCMock/OCMVerifier.m
new file mode 100644
index 0000000..011935d
--- /dev/null
+++ b/Source/OCMock/OCMVerifier.m
@@ -0,0 +1,48 @@
+/*
+ * 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 <objc/runtime.h>
+#import "OCMVerifier.h"
+#import "OCMockObject.h"
+#import "OCMLocation.h"
+#import "OCMInvocationMatcher.h"
+
+
+@implementation OCMVerifier
+
+- (id)init
+{
+ if ((self = [super init]))
+ {
+ invocationMatcher = [[OCMInvocationMatcher alloc] init];
+ }
+
+ return self;
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ [super forwardInvocation:anInvocation];
+ [mockObject verifyInvocation:invocationMatcher atLocation:self.location];
+}
+
+- (void)dealloc
+{
+ [_location release];
+ [super dealloc];
+}
+
+@end
diff --git a/Source/OCMock/OCMock-Info.plist b/Source/OCMock/OCMock-Info.plist
new file mode 100644
index 0000000..1b55c2e
--- /dev/null
+++ b/Source/OCMock/OCMock-Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2004-2013 Mulle Kybernetik.</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/Source/OCMock/OCMock-Prefix.pch b/Source/OCMock/OCMock-Prefix.pch
new file mode 100644
index 0000000..9f3ef37
--- /dev/null
+++ b/Source/OCMock/OCMock-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'OCMock' target in the 'OCMock' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Source/OCMock/OCMock.h b/Source/OCMock/OCMock.h
new file mode 100644
index 0000000..0790594
--- /dev/null
+++ b/Source/OCMock/OCMock.h
@@ -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") \
+})
diff --git a/Source/OCMock/OCMockObject.h b/Source/OCMock/OCMockObject.h
new file mode 100644
index 0000000..58df67d
--- /dev/null
+++ b/Source/OCMock/OCMockObject.h
@@ -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
+
diff --git a/Source/OCMock/OCMockObject.m b/Source/OCMock/OCMockObject.m
new file mode 100644
index 0000000..9534b3d
--- /dev/null
+++ b/Source/OCMock/OCMockObject.m
@@ -0,0 +1,368 @@
+/*
+ * 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 "OCClassMockObject.h"
+#import "OCProtocolMockObject.h"
+#import "OCPartialMockObject.h"
+#import "OCObserverMockObject.h"
+#import "OCMStubRecorder.h"
+#import <OCMock/OCMLocation.h>
+#import "NSInvocation+OCMAdditions.h"
+#import "OCMInvocationMatcher.h"
+#import "OCMMacroState.h"
+#import "OCMFunctions.h"
+#import "OCMVerifier.h"
+#import "OCMInvocationExpectation.h"
+#import "OCMExpectationRecorder.h"
+
+
+@implementation OCMockObject
+
+#pragma mark Class initialisation
+
++ (void)initialize
+{
+ if([[NSInvocation class] instanceMethodSignatureForSelector:@selector(getArgumentAtIndexAsObject:)] == NULL)
+ [NSException raise:NSInternalInconsistencyException format:@"** Expected method not present; the method getArgumentAtIndexAsObject: is not implemented by NSInvocation. If you see this exception it is likely that you are using the static library version of OCMock and your project is not configured correctly to load categories from static libraries. Did you forget to add the -ObjC linker flag?"];
+}
+
+
+#pragma mark Factory methods
+
++ (id)mockForClass:(Class)aClass
+{
+ return [[[OCClassMockObject alloc] initWithClass:aClass] autorelease];
+}
+
++ (id)mockForProtocol:(Protocol *)aProtocol
+{
+ return [[[OCProtocolMockObject alloc] initWithProtocol:aProtocol] autorelease];
+}
+
++ (id)partialMockForObject:(NSObject *)anObject
+{
+ return [[[OCPartialMockObject alloc] initWithObject:anObject] autorelease];
+}
+
+
++ (id)niceMockForClass:(Class)aClass
+{
+ return [self _makeNice:[self mockForClass:aClass]];
+}
+
++ (id)niceMockForProtocol:(Protocol *)aProtocol
+{
+ return [self _makeNice:[self mockForProtocol:aProtocol]];
+}
+
+
++ (id)_makeNice:(OCMockObject *)mock
+{
+ mock->isNice = YES;
+ return mock;
+}
+
+
++ (id)observerMock
+{
+ return [[[OCObserverMockObject alloc] init] autorelease];
+}
+
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (instancetype)init
+{
+ // no [super init], we're inheriting from NSProxy
+ expectationOrderMatters = NO;
+ stubs = [[NSMutableArray alloc] init];
+ expectations = [[NSMutableArray alloc] init];
+ exceptions = [[NSMutableArray alloc] init];
+ invocations = [[NSMutableArray alloc] init];
+ return self;
+}
+
+- (void)dealloc
+{
+ [stubs release];
+ [expectations release];
+ [exceptions release];
+ [invocations release];
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return @"OCMockObject";
+}
+
+- (void)addStub:(OCMInvocationStub *)aStub
+{
+ [stubs addObject:aStub];
+}
+
+- (void)addExpectation:(OCMInvocationExpectation *)anExpectation
+{
+ [expectations addObject:anExpectation];
+}
+
+
+#pragma mark Public API
+
+- (void)setExpectationOrderMatters:(BOOL)flag
+{
+ expectationOrderMatters = flag;
+}
+
+- (void)stopMocking
+{
+ // no-op for mock objects that are not class object or partial mocks
+}
+
+
+- (id)stub
+{
+ return [[[OCMStubRecorder alloc] initWithMockObject:self] autorelease];
+}
+
+- (id)expect
+{
+ return [[[OCMExpectationRecorder alloc] initWithMockObject:self] autorelease];
+}
+
+- (id)reject
+{
+ return [[self expect] never];
+}
+
+
+- (id)verify
+{
+ return [self verifyAtLocation:nil];
+}
+
+- (id)verifyAtLocation:(OCMLocation *)location
+{
+ NSMutableArray *unsatisfiedExpectations = [NSMutableArray array];
+ for(OCMInvocationExpectation *e in expectations)
+ {
+ if(![e isSatisfied])
+ [unsatisfiedExpectations addObject:e];
+ }
+
+ if([unsatisfiedExpectations count] == 1)
+ {
+ NSString *description = [NSString stringWithFormat:@"%@: expected method was not invoked: %@",
+ [self description], [[unsatisfiedExpectations objectAtIndex:0] description]];
+ OCMReportFailure(location, description);
+ }
+ else if([unsatisfiedExpectations count] > 0)
+ {
+ NSString *description = [NSString stringWithFormat:@"%@: %@ expected methods were not invoked: %@",
+ [self description], @([unsatisfiedExpectations count]), [self _stubDescriptions:YES]];
+ OCMReportFailure(location, description);
+ }
+
+ if([exceptions count] > 0)
+ {
+ NSString *description = [NSString stringWithFormat:@"%@: %@ (This is a strict mock failure that was ignored when it actually occured.)",
+ [self description], [[exceptions objectAtIndex:0] description]];
+ OCMReportFailure(location, description);
+ }
+
+ return [[[OCMVerifier alloc] initWithMockObject:self] autorelease];
+}
+
+
+- (void)verifyWithDelay:(NSTimeInterval)delay
+{
+ [self verifyWithDelay:delay atLocation:nil];
+}
+
+- (void)verifyWithDelay:(NSTimeInterval)delay atLocation:(OCMLocation *)location
+{
+ NSTimeInterval step = 0.01;
+ while(delay > 0)
+ {
+ if([expectations count] == 0)
+ break;
+ [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:step]];
+ delay -= step;
+ step *= 2;
+ }
+ [self verifyAtLocation:location];
+}
+
+
+#pragma mark Verify after running
+
+- (void)verifyInvocation:(OCMInvocationMatcher *)matcher
+{
+ [self verifyInvocation:matcher atLocation:nil];
+}
+
+- (void)verifyInvocation:(OCMInvocationMatcher *)matcher atLocation:(OCMLocation *)location
+{
+ for(NSInvocation *invocation in invocations)
+ {
+ if([matcher matchesInvocation:invocation])
+ return;
+ }
+ NSString *description = [NSString stringWithFormat:@"%@: Method %@ was not invoked.",
+ [self description], [matcher description]];
+
+ OCMReportFailure(location, description);
+}
+
+
+#pragma mark Handling invocations
+
+- (id)forwardingTargetForSelector:(SEL)aSelector
+{
+ if([OCMMacroState globalState] != nil)
+ {
+ OCMRecorder *recorder = [[OCMMacroState globalState] recorder];
+ [recorder setMockObject:self];
+ return recorder;
+ }
+ return nil;
+}
+
+
+- (BOOL)handleSelector:(SEL)sel
+{
+ for(OCMInvocationStub *recorder in stubs)
+ if([recorder matchesSelector:sel])
+ return YES;
+
+ return NO;
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ @try
+ {
+ if([self handleInvocation:anInvocation] == NO)
+ [self handleUnRecordedInvocation:anInvocation];
+ }
+ @catch(NSException *e)
+ {
+ [exceptions addObject:e];
+ [e raise];
+ }
+}
+
+- (BOOL)handleInvocation:(NSInvocation *)anInvocation
+{
+ [invocations addObject:anInvocation];
+
+ OCMInvocationStub *stub = nil;
+ for(stub in stubs)
+ {
+ // If the stub forwards its invocation to the real object, then we don't want to do handleInvocation: yet, since forwarding the invocation to the real object could call a method that is expected to happen after this one, which is bad if expectationOrderMatters is YES
+ if([stub matchesInvocation:anInvocation])
+ break;
+ }
+ // Retain the stub in case it ends up being removed from stubs and expectations, since we still have to call handleInvocation on the stub at the end
+ [stub retain];
+ if(stub == nil)
+ return NO;
+
+ if([expectations containsObject:stub])
+ {
+ OCMInvocationExpectation *expectation = [self _nextExptectedInvocation];
+ if(expectationOrderMatters && (expectation != stub))
+ {
+ [NSException raise:NSInternalInconsistencyException format:@"%@: unexpected method invoked: %@\n\texpected:\t%@",
+ [self description], [stub description], [[expectations objectAtIndex:0] description]];
+ }
+
+ // We can't check isSatisfied yet, since the stub won't be satisfied until we call handleInvocation:, and we don't want to call handleInvocation: yes for the reason in the comment above, since we'll still have the current expectation in the expectations array, which will cause an exception if expectationOrderMatters is YES and we're not ready for any future expected methods to be called yet
+ if(![(OCMInvocationExpectation *)stub isMatchAndReject])
+ {
+ [expectations removeObject:stub];
+ [stubs removeObject:stub];
+ }
+ }
+ [stub handleInvocation:anInvocation];
+ [stub release];
+
+ return YES;
+}
+
+
+- (OCMInvocationExpectation *)_nextExptectedInvocation
+{
+ for(OCMInvocationExpectation *expectation in expectations)
+ if(![expectation isMatchAndReject])
+ return expectation;
+ return nil;
+}
+
+- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation
+{
+ if(isNice == NO)
+ {
+ [NSException raise:NSInternalInconsistencyException format:@"%@: unexpected method invoked: %@ %@",
+ [self description], [anInvocation invocationDescription], [self _stubDescriptions:NO]];
+ }
+}
+
+- (void)doesNotRecognizeSelector:(SEL)aSelector __unused
+{
+ if([OCMMacroState globalState] != nil)
+ {
+ // we can't do anything clever with the macro state because we must raise an exception here
+ [NSException raise:NSInvalidArgumentException format:@"%@: Cannot stub/expect/verify method '%@' because no such method exists in the mocked class.",
+ [self description], NSStringFromSelector(aSelector)];
+ }
+ else
+ {
+ [NSException raise:NSInvalidArgumentException format:@"-[%@ %@]: unrecognized selector sent to instance %p",
+ [self description], NSStringFromSelector(aSelector), (void *)self];
+ }
+}
+
+
+#pragma mark Helper methods
+
+- (NSString *)_stubDescriptions:(BOOL)onlyExpectations
+{
+ NSMutableString *outputString = [NSMutableString string];
+ for(OCMStubRecorder *stub in stubs)
+ {
+ NSString *prefix = @"";
+
+ if(onlyExpectations)
+ {
+ if([expectations containsObject:stub] == NO)
+ continue;
+ }
+ else
+ {
+ if([expectations containsObject:stub])
+ prefix = @"expected:\t";
+ else
+ prefix = @"stubbed:\t";
+ }
+ [outputString appendFormat:@"\n\t%@%@", prefix, [stub description]];
+ }
+ return outputString;
+}
+
+
+@end
diff --git a/Source/OCMock/OCObserverMockObject.h b/Source/OCMock/OCObserverMockObject.h
new file mode 100644
index 0000000..7b70e36
--- /dev/null
+++ b/Source/OCMock/OCObserverMockObject.h
@@ -0,0 +1,43 @@
+/*
+ * 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 OCMLocation;
+
+
+@interface OCObserverMockObject : NSObject
+{
+ BOOL expectationOrderMatters;
+ NSMutableArray *recorders;
+ NSMutableArray *centers;
+}
+
+- (void)setExpectationOrderMatters:(BOOL)flag;
+
+- (id)expect;
+
+- (void)verify;
+- (void)verifyAtLocation:(OCMLocation *)location;
+
+- (void)handleNotification:(NSNotification *)aNotification;
+
+// internal use
+
+- (void)autoRemoveFromCenter:(NSNotificationCenter *)aCenter;
+- (void)notificationWithName:(NSString *)name object:(id)sender;
+
+@end
diff --git a/Source/OCMock/OCObserverMockObject.m b/Source/OCMock/OCObserverMockObject.m
new file mode 100644
index 0000000..c02c8ac
--- /dev/null
+++ b/Source/OCMock/OCObserverMockObject.m
@@ -0,0 +1,127 @@
+/*
+ * 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 "OCObserverMockObject.h"
+#import "OCMObserverRecorder.h"
+#import "OCMLocation.h"
+#import "OCMFunctions.h"
+
+
+@implementation OCObserverMockObject
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)init
+{
+ if ((self = [super init]))
+ {
+ recorders = [[NSMutableArray alloc] init];
+ centers = [[NSMutableArray alloc] init];
+ }
+
+ return self;
+}
+
+- (id)retain
+{
+ return [super retain];
+}
+
+- (void)dealloc
+{
+ for(NSNotificationCenter *c in centers)
+ [c removeObserver:self];
+ [centers release];
+ [recorders release];
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return @"OCMockObserver";
+}
+
+- (void)setExpectationOrderMatters:(BOOL)flag
+{
+ expectationOrderMatters = flag;
+}
+
+- (void)autoRemoveFromCenter:(NSNotificationCenter *)aCenter
+{
+ [centers addObject:aCenter];
+}
+
+
+#pragma mark Public API
+
+- (id)expect
+{
+ OCMObserverRecorder *recorder = [[[OCMObserverRecorder alloc] init] autorelease];
+ [recorders addObject:recorder];
+ return recorder;
+}
+
+- (void)verify
+{
+ [self verifyAtLocation:nil];
+}
+
+- (void)verifyAtLocation:(OCMLocation *)location
+{
+ if([recorders count] == 1)
+ {
+ NSString *description = [NSString stringWithFormat:@"%@: expected notification was not observed: %@",
+ [self description], [[recorders lastObject] description]];
+ OCMReportFailure(location, description);
+ }
+ else if([recorders count] > 0)
+ {
+ NSString *description = [NSString stringWithFormat:@"%@ : %@ expected notifications were not observed.",
+ [self description], @([recorders count])];
+ OCMReportFailure(location, description);
+ }
+}
+
+
+#pragma mark Receiving recording requests via macro
+
+- (void)notificationWithName:(NSString *)name object:(id)sender
+{
+ [[self expect] notificationWithName:name object:sender];
+}
+
+
+#pragma mark Receiving notifications
+
+- (void)handleNotification:(NSNotification *)aNotification
+{
+ NSUInteger i, limit;
+
+ limit = expectationOrderMatters ? 1 : [recorders count];
+ for(i = 0; i < limit; i++)
+ {
+ if([[recorders objectAtIndex:i] matchesNotification:aNotification])
+ {
+ [recorders removeObjectAtIndex:i];
+ return;
+ }
+ }
+ [NSException raise:NSInternalInconsistencyException format:@"%@: unexpected notification observed: %@", [self description],
+ [aNotification description]];
+}
+
+
+@end
diff --git a/Source/OCMock/OCPartialMockObject.h b/Source/OCMock/OCPartialMockObject.h
new file mode 100644
index 0000000..646aa6a
--- /dev/null
+++ b/Source/OCMock/OCPartialMockObject.h
@@ -0,0 +1,28 @@
+/*
+ * 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 "OCClassMockObject.h"
+
+@interface OCPartialMockObject : OCClassMockObject
+{
+ NSObject *realObject;
+}
+
+- (id)initWithObject:(NSObject *)anObject;
+
+- (NSObject *)realObject;
+
+@end
diff --git a/Source/OCMock/OCPartialMockObject.m b/Source/OCMock/OCPartialMockObject.m
new file mode 100644
index 0000000..82f376a
--- /dev/null
+++ b/Source/OCMock/OCPartialMockObject.m
@@ -0,0 +1,218 @@
+/*
+ * 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 <objc/runtime.h>
+#import "OCMockObject.h"
+#import "OCPartialMockObject.h"
+#import "NSMethodSignature+OCMAdditions.h"
+#import "NSObject+OCMAdditions.h"
+#import "OCMFunctions.h"
+#import "OCMInvocationStub.h"
+
+
+@implementation OCPartialMockObject
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)initWithObject:(NSObject *)anObject
+{
+ NSParameterAssert(anObject != nil);
+ [self assertClassIsSupported:[anObject class]];
+ [super initWithClass:[anObject class]];
+ realObject = [anObject retain];
+ [self prepareObjectForInstanceMethodMocking];
+ return self;
+}
+
+- (void)dealloc
+{
+ [self stopMocking];
+ [realObject release];
+ [super dealloc];
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"OCPartialMockObject(%@)", NSStringFromClass(mockedClass)];
+}
+
+- (NSObject *)realObject
+{
+ return realObject;
+}
+
+#pragma mark Helper methods
+
+- (void)assertClassIsSupported:(Class)class
+{
+ NSString *classname = NSStringFromClass(class);
+ NSString *reason = nil;
+ if([classname hasPrefix:@"__NSTagged"] || [classname hasPrefix:@"NSTagged"])
+ reason = [NSString stringWithFormat:@"OCMock does not support partially mocking tagged classes; got %@", classname];
+ else if([classname hasPrefix:@"__NSCF"])
+ reason = [NSString stringWithFormat:@"OCMock does not support partially mocking toll-free bridged classes; got %@", classname];
+
+ if(reason != nil)
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil] raise];
+}
+
+
+#pragma mark Extending/overriding superclass behaviour
+
+- (void)stopMocking
+{
+ if(realObject != nil)
+ {
+ OCMSetAssociatedMockForObject(nil, realObject);
+ object_setClass(realObject, [self mockedClass]);
+ [realObject release];
+ realObject = nil;
+ }
+ [super stopMocking];
+}
+
+- (void)addStub:(OCMInvocationStub *)aStub
+{
+ [super addStub:aStub];
+ if(![aStub recordedAsClassMethod])
+ [self setupForwarderForSelector:[[aStub recordedInvocation] selector]];
+}
+
+- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation
+{
+ [anInvocation invokeWithTarget:realObject];
+}
+
+
+#pragma mark Subclass management
+
+- (void)prepareObjectForInstanceMethodMocking
+{
+ OCMSetAssociatedMockForObject(self, realObject);
+
+ /* dynamically create a subclass and set it as the class of the object */
+ Class subclass = OCMCreateSubclass(mockedClass, realObject);
+ object_setClass(realObject, subclass);
+
+ /* point forwardInvocation: of the object to the implementation in the mock */
+ Method myForwardMethod = class_getInstanceMethod([self mockObjectClass], @selector(forwardInvocationForRealObject:));
+ IMP myForwardIMP = method_getImplementation(myForwardMethod);
+ class_addMethod(subclass, @selector(forwardInvocation:), myForwardIMP, method_getTypeEncoding(myForwardMethod));
+
+ /* do the same for forwardingTargetForSelector, remember existing imp with alias selector */
+ Method myForwardingTargetMethod = class_getInstanceMethod([self mockObjectClass], @selector(forwardingTargetForSelectorForRealObject:));
+ IMP myForwardingTargetIMP = method_getImplementation(myForwardingTargetMethod);
+ IMP originalForwardingTargetIMP = [mockedClass instanceMethodForSelector:@selector(forwardingTargetForSelector:)];
+ class_addMethod(subclass, @selector(forwardingTargetForSelector:), myForwardingTargetIMP, method_getTypeEncoding(myForwardingTargetMethod));
+ class_addMethod(subclass, @selector(ocmock_replaced_forwardingTargetForSelector:), originalForwardingTargetIMP, method_getTypeEncoding(myForwardingTargetMethod));
+
+ /* We also override the -class method to return the original class */
+ Method myObjectClassMethod = class_getInstanceMethod([self mockObjectClass], @selector(classForRealObject));
+ const char *objectClassTypes = method_getTypeEncoding(myObjectClassMethod);
+ IMP myObjectClassImp = method_getImplementation(myObjectClassMethod);
+ class_addMethod(subclass, @selector(class), myObjectClassImp, objectClassTypes);
+
+ /* Adding forwarder for most instance methods to allow for verify after run */
+ NSArray *methodBlackList = @[@"class", @"forwardingTargetForSelector:", @"methodSignatureForSelector:", @"forwardInvocation:",
+ @"allowsWeakReference", @"retainWeakReference", @"isBlock"];
+ [NSObject enumerateMethodsInClass:mockedClass usingBlock:^(Class cls, SEL sel) {
+ if((cls == [NSObject class]) || (cls == [NSProxy class]))
+ return;
+ NSString *className = NSStringFromClass(cls);
+ NSString *selName = NSStringFromSelector(sel);
+ if(([className hasPrefix:@"NS"] || [className hasPrefix:@"UI"]) &&
+ ([selName hasPrefix:@"_"] || [selName hasSuffix:@"_"]))
+ return;
+ if([methodBlackList containsObject:selName])
+ return;
+ @try
+ {
+ [self setupForwarderForSelector:sel];
+ }
+ @catch(NSException *e)
+ {
+ // ignore for now
+ }
+ }];
+}
+
+- (void)setupForwarderForSelector:(SEL)sel
+{
+ SEL aliasSelector = OCMAliasForOriginalSelector(sel);
+ if(class_getInstanceMethod(object_getClass(realObject), aliasSelector) != NULL)
+ return;
+
+ Method originalMethod = class_getInstanceMethod(mockedClass, sel);
+ IMP originalIMP = method_getImplementation(originalMethod);
+ const char *types = method_getTypeEncoding(originalMethod);
+ /* Might be NULL if the selector is forwarded to another class */
+ // TODO: check the fallback implementation is actually sufficient
+ if(types == NULL)
+ types = ([[mockedClass instanceMethodSignatureForSelector:sel] fullObjCTypes]);
+
+ Class subclass = object_getClass([self realObject]);
+ IMP forwarderIMP = [mockedClass instanceMethodForwarderForSelector:sel];
+ class_replaceMethod(subclass, sel, forwarderIMP, types);
+ class_addMethod(subclass, aliasSelector, originalIMP, types);
+}
+
+
+// Implementation of the -class method; return the Class that was reported with [realObject class] prior to mocking
+- (Class)classForRealObject
+{
+ // in here "self" is a reference to the real object, not the mock
+ OCPartialMockObject *mock = OCMGetAssociatedMockForObject(self);
+ if(mock == nil)
+ [NSException raise:NSInternalInconsistencyException format:@"No partial mock for object %p", self];
+ return [mock mockedClass];
+}
+
+
+- (id)forwardingTargetForSelectorForRealObject:(SEL)sel
+{
+ // in here "self" is a reference to the real object, not the mock
+ OCPartialMockObject *mock = OCMGetAssociatedMockForObject(self);
+ if(mock == nil)
+ [NSException raise:NSInternalInconsistencyException format:@"No partial mock for object %p", self];
+ if([mock handleSelector:sel])
+ return self;
+
+ return [self ocmock_replaced_forwardingTargetForSelector:sel];
+}
+
+// Make the compiler happy in -forwardingTargetForSelectorForRealObject: because it can't find the message…
+- (id)ocmock_replaced_forwardingTargetForSelector:(SEL)sel
+{
+ return nil;
+}
+
+
+- (void)forwardInvocationForRealObject:(NSInvocation *)anInvocation
+{
+ // in here "self" is a reference to the real object, not the mock
+ OCPartialMockObject *mock = OCMGetAssociatedMockForObject(self);
+ if(mock == nil)
+ [NSException raise:NSInternalInconsistencyException format:@"No partial mock for object %p", self];
+
+ if([mock handleInvocation:anInvocation] == NO)
+ {
+ [anInvocation setSelector:OCMAliasForOriginalSelector([anInvocation selector])];
+ [anInvocation invoke];
+ }
+}
+
+
+@end
diff --git a/Source/OCMock/OCProtocolMockObject.h b/Source/OCMock/OCProtocolMockObject.h
new file mode 100644
index 0000000..9a102b3
--- /dev/null
+++ b/Source/OCMock/OCProtocolMockObject.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2005-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>
+
+@interface OCProtocolMockObject : OCMockObject
+{
+ Protocol *mockedProtocol;
+}
+
+- (id)initWithProtocol:(Protocol *)aProtocol;
+
+@end
+
diff --git a/Source/OCMock/OCProtocolMockObject.m b/Source/OCMock/OCProtocolMockObject.m
new file mode 100644
index 0000000..82f6167
--- /dev/null
+++ b/Source/OCMock/OCProtocolMockObject.m
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2005-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 <objc/runtime.h>
+#import "NSMethodSignature+OCMAdditions.h"
+#import "OCProtocolMockObject.h"
+
+@implementation OCProtocolMockObject
+
+#pragma mark Initialisers, description, accessors, etc.
+
+- (id)initWithProtocol:(Protocol *)aProtocol
+{
+ NSParameterAssert(aProtocol != nil);
+ [super init];
+ mockedProtocol = aProtocol;
+ return self;
+}
+
+- (NSString *)description
+{
+ const char* name = protocol_getName(mockedProtocol);
+ return [NSString stringWithFormat:@"OCMockObject(%s)", name];
+}
+
+#pragma mark Proxy API
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ struct { BOOL isRequired; BOOL isInstance; } opts[4] = { {YES, YES}, {NO, YES}, {YES, NO}, {NO, NO} };
+ for(int i = 0; i < 4; i++)
+ {
+ struct objc_method_description methodDescription = protocol_getMethodDescription(mockedProtocol, aSelector, opts[i].isRequired, opts[i].isInstance);
+ if(methodDescription.name != NULL)
+ return [NSMethodSignature signatureWithObjCTypes:methodDescription.types];
+ }
+ return nil;
+}
+
+- (BOOL)conformsToProtocol:(Protocol *)aProtocol
+{
+ return protocol_conformsToProtocol(mockedProtocol, aProtocol);
+}
+
+- (BOOL)respondsToSelector:(SEL)selector
+{
+ return ([self methodSignatureForSelector:selector] != nil);
+}
+
+@end
diff --git a/Source/OCMock/en.lproj/InfoPlist.strings b/Source/OCMock/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Source/OCMock/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Source/OCMockLib/OCMockLib-Prefix.pch b/Source/OCMockLib/OCMockLib-Prefix.pch
new file mode 100644
index 0000000..d88e7f0
--- /dev/null
+++ b/Source/OCMockLib/OCMockLib-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'OCMockLib' target in the 'OCMockLib' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Source/OCMockLibTests/OCMockLibTests-Info.plist b/Source/OCMockLibTests/OCMockLibTests-Info.plist
new file mode 100644
index 0000000..a765f64
--- /dev/null
+++ b/Source/OCMockLibTests/OCMockLibTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.ocmock.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Source/OCMockLibTests/OCMockLibTests-Prefix.pch b/Source/OCMockLibTests/OCMockLibTests-Prefix.pch
new file mode 100644
index 0000000..3fdee9d
--- /dev/null
+++ b/Source/OCMockLibTests/OCMockLibTests-Prefix.pch
@@ -0,0 +1,10 @@
+//
+// Prefix header
+//
+// The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
diff --git a/Source/OCMockLibTests/en.lproj/InfoPlist.strings b/Source/OCMockLibTests/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Source/OCMockLibTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Source/OCMockTests/NSInvocationOCMAdditionsTests.m b/Source/OCMockTests/NSInvocationOCMAdditionsTests.m
new file mode 100644
index 0000000..2f57961
--- /dev/null
+++ b/Source/OCMockTests/NSInvocationOCMAdditionsTests.m
@@ -0,0 +1,381 @@
+/*
+ * Copyright (c) 2006-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 <XCTest/XCTest.h>
+#import "NSInvocation+OCMAdditions.h"
+
+
+@implementation NSValue(OCMTestAdditions)
+
+- (id)ocmtest_initWithLongDouble:(long double)ldbl
+{
+ return [self initWithBytes:&ldbl objCType:@encode(__typeof__(ldbl))];
+}
+
+@end
+
+
+@interface NSInvocationOCMAdditionsTests : XCTestCase
+
+@end
+
+
+@implementation NSInvocationOCMAdditionsTests
+
+- (void)testInvocationDescriptionWithNoArguments
+{
+ SEL selector = @selector(lowercaseString);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+
+ XCTAssertEqualObjects(@"lowercaseString", [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithObjectArgument
+{
+ SEL selector = @selector(isEqualToNumber:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it one argument (starts at index 2)
+ NSNumber *argument = @1;
+ [invocation setArgument:&argument atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"isEqualToNumber:%d", 1];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithNSStringArgument
+{
+ SEL selector = @selector(isEqualToString:);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it one argument (starts at index 2)
+ NSString *argument = @"TEST_STRING";
+ [invocation setArgument:&argument atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"isEqualToString:@\"%@\"", @"TEST_STRING"];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithObjectArguments
+{
+ SEL selector = @selector(setValue:forKey:);
+ NSMethodSignature *signature = [NSArray instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it two arguments
+ NSNumber *argumentOne = @1;
+ NSString *argumentTwo = @"TEST_STRING";
+ [invocation setArgument:&argumentOne atIndex:2];
+ [invocation setArgument:&argumentTwo atIndex:3];
+
+ NSString *expected = [NSString stringWithFormat:@"setValue:%d forKey:@\"%@\"", 1, @"TEST_STRING"];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithArrayArgument
+{
+ SEL selector = @selector(addObjectsFromArray:);
+ NSMethodSignature *signature = [NSMutableArray instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it one argument (starts at index 2)
+ NSArray *argument = @[@"TEST_STRING"];
+ [invocation setArgument:&argument atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"addObjectsFromArray:%@", [argument description]];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithIntArgument
+{
+ SEL selector = @selector(initWithInt:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ int argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithInt:%d", 1];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithUnsignedIntArgument
+{
+ SEL selector = @selector(initWithUnsignedInt:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ unsigned int argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUnsignedInt:%d", 1];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithBoolArgument
+{
+ SEL selector = @selector(initWithBool:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ BOOL argumentOne = TRUE;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithBool:YES"];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithCharArgument
+{
+ SEL selector = @selector(initWithChar:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ char argumentOne = 'd';
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithChar:'%c'", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithUnsignedCharArgument
+{
+ SEL selector = @selector(initWithUnsignedChar:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ unsigned char argumentOne = 'd';
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUnsignedChar:'%c'", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithDoubleArgument
+{
+ SEL selector = @selector(initWithDouble:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ double argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithDouble:%f", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithFloatArgument
+{
+ SEL selector = @selector(initWithFloat:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ float argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithFloat:%f", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithLongDoubleArgument
+{
+ SEL selector = @selector(ocmtest_initWithLongDouble:);
+ NSMethodSignature *signature = [NSValue instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ long double argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"%@%Lf", NSStringFromSelector(selector),argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithLongArgument
+{
+ SEL selector = @selector(initWithLong:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ long argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithLong:%ld", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithUnsignedLongArgument
+{
+ SEL selector = @selector(initWithUnsignedLong:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ unsigned long argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUnsignedLong:%lu", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithLongLongArgument
+{
+ SEL selector = @selector(initWithLongLong:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ long long argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithLongLong:%qi", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithUnsignedLongLongArgument
+{
+ SEL selector = @selector(initWithUnsignedLongLong:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ unsigned long long argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUnsignedLongLong:%qu", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithShortArgument
+{
+ SEL selector = @selector(initWithShort:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ short argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithShort:%hi", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithUnsignedShortArgument
+{
+ SEL selector = @selector(initWithUnsignedShort:);
+ NSMethodSignature *signature = [NSNumber instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ unsigned short argumentOne = 1;
+ [invocation setArgument:&argumentOne atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUnsignedShort:%hu", argumentOne];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithStructArgument
+{
+ SEL selector = @selector(substringWithRange:);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ NSRange range;
+ range.location = 2;
+ range.length = 4;
+ [invocation setArgument:&range atIndex:2];
+
+ NSString *expected = @"substringWithRange:(NSRange: {2, 4})";
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithCStringArgument
+{
+ SEL selector = @selector(initWithUTF8String:);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ NSString *string = @"A string that is longer than 100 characters. 123456789 123456789 123456789 123456789 123456789 123456789";
+ const char *cString = [string UTF8String];
+ [invocation setArgument:&cString atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithUTF8String:\"%@...\"", [string substringToIndex:100]];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithSelectorArgument
+{
+ SEL selector = @selector(respondsToSelector:);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ SEL selectorValue = @selector(testInvocationDescriptionWithSelectorArgument);
+ [invocation setArgument:&selectorValue atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"respondsToSelector:@selector(%@)", NSStringFromSelector(selectorValue)];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+- (void)testInvocationDescriptionWithPointerArgument
+{
+ SEL selector = @selector(initWithBytes:length:);
+ NSMethodSignature *signature = [NSData instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ NSData *data = [@"foo" dataUsingEncoding:NSUTF8StringEncoding];
+ const void *bytes = [[@"foo" dataUsingEncoding:NSUTF8StringEncoding] bytes];
+ NSUInteger length = [data length];
+ [invocation setArgument:&bytes atIndex:2];
+ [invocation setArgument:&length atIndex:3];
+
+ NSString *expected1 = [NSString stringWithFormat:@"initWithBytes:"];
+ NSString *expected2 = [NSString stringWithFormat:@"length:%lu", (unsigned long)length];
+ NSString *invocationDescription = [invocation invocationDescription];
+ XCTAssertTrue([invocationDescription rangeOfString:expected1].length > 0, @"");
+ XCTAssertTrue([invocationDescription rangeOfString:expected2].length > 0, @"");
+}
+
+- (void)testInvocationDescriptionWithNilArgument
+{
+ SEL selector = @selector(initWithString:);
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:selector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:selector];
+ // Give it an argument
+ NSString *argString = nil;
+ [invocation setArgument:&argString atIndex:2];
+
+ NSString *expected = [NSString stringWithFormat:@"initWithString:nil"];
+ XCTAssertEqualObjects(expected, [invocation invocationDescription], @"");
+}
+
+@end
diff --git a/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m b/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m
new file mode 100644
index 0000000..bfb1426
--- /dev/null
+++ b/Source/OCMockTests/NSMethodSignatureOCMAdditionsTests.m
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import "NSMethodSignature+OCMAdditions.h"
+
+#if TARGET_OS_IPHONE
+#define NSPoint CGPoint
+#define NSSize CGSize
+#define NSRect CGRect
+#endif
+
+@interface NSMethodSignatureOCMAdditionsTests : XCTestCase
+
+@end
+
+@implementation NSMethodSignatureOCMAdditionsTests
+
+- (void)testDeterminesThatSpecialReturnIsNotNeededForNonStruct
+{
+ const char *types = "i";
+ NSMethodSignature *sig = [NSMethodSignature signatureWithObjCTypes:types];
+ XCTAssertFalse([sig usesSpecialStructureReturn], @"Should have determined no need for special (stret) return.");
+}
+
+- (void)testDeterminesThatSpecialReturnIsNeededForLargeStruct
+{
+ // This type should(!) require special returns for all architectures
+ const char *types = "{CATransform3D=ffffffffffffffff}";
+ NSMethodSignature *sig = [NSMethodSignature signatureWithObjCTypes:types];
+ XCTAssertTrue([sig usesSpecialStructureReturn], @"Should have determined need for special (stret) return.");
+}
+
+- (void)testArchDependentSpecialReturns
+{
+#define ASSERT_ENC(expected, enctype) do {\
+ BOOL useSpecial = expected; \
+ XCTAssertNoThrow(useSpecial = [[NSMethodSignature signatureWithObjCTypes:enctype] usesSpecialStructureReturn], \
+ @"NSMethodSignature failed for type '%s'", enctype); \
+ XCTAssertEqual((int)useSpecial, (int)expected,\
+ @"Special (stret) return incorrect for type '%s'", enctype); \
+ } while (0)
+#define ASSERT_TYPE(expected, type) ASSERT_ENC(expected, @encode(type))
+
+#if __x86_64__
+ ASSERT_TYPE(YES,NSRect);
+ ASSERT_TYPE(NO, NSPoint);
+ ASSERT_TYPE(NO, NSRange);
+ ASSERT_ENC(NO, "{foo=ffff}");
+ ASSERT_ENC(YES,"{foo=fffff}");
+ ASSERT_ENC(YES,"{foo=D}");
+ ASSERT_ENC(NO, "{foo=t}");
+ ASSERT_ENC(YES,"{foo=TT}");
+ ASSERT_TYPE(NO, __int128_t);
+ ASSERT_TYPE(NO, long double);
+ ASSERT_ENC(YES,"{nlist_64=(?=I)CCSQ}16@0:8");
+#endif
+#if __i386__
+ ASSERT_TYPE(YES,NSRect);
+ ASSERT_TYPE(NO, NSPoint);
+ ASSERT_TYPE(NO, NSRange);
+ ASSERT_TYPE(NO, long double);
+ ASSERT_ENC(NO, "{foo=ff}");
+ ASSERT_ENC(YES,"{foo=fff}");
+ ASSERT_ENC(NO, "{foo=c}");
+ ASSERT_ENC(NO, "{foo=cc}");
+ ASSERT_ENC(YES,"{foo=ccc}");
+ ASSERT_ENC(NO, "{foo=cccc}");
+ ASSERT_ENC(YES,"{foo=cccccc}");
+ ASSERT_ENC(NO, "{foo=cccccccc}");
+ ASSERT_ENC(YES,"{foo=D}");
+#endif
+#if __arm__
+ ASSERT_TYPE(YES, NSRect);
+ ASSERT_TYPE(YES, NSPoint);
+ ASSERT_TYPE(YES, NSRange);
+ ASSERT_ENC(NO, "{foo=f}");
+ ASSERT_ENC(YES,"{foo=ff}");
+ ASSERT_ENC(NO, "{foo=c}");
+ ASSERT_ENC(NO, "{foo=cc}");
+ ASSERT_ENC(NO, "{foo=ccc}");
+ ASSERT_ENC(NO, "{foo=cccc}");
+ ASSERT_ENC(YES,"{foo=ccccc}");
+#endif
+}
+
+- (void)testNSMethodSignatureDebugDescriptionWorksTheWayWeExpectIt
+{
+ const char *types = "{CATransform3D=ffffffffffffffff}";
+ NSMethodSignature *sig = [NSMethodSignature signatureWithObjCTypes:types];
+ NSString *debugDescription = [sig debugDescription];
+ NSRange stretYESRange = [debugDescription rangeOfString:@"is special struct return? YES"];
+ NSRange stretNORange = [debugDescription rangeOfString:@"is special struct return? NO"];
+ XCTAssertTrue(stretYESRange.length > 0 || stretNORange.length > 0, @"NSMethodSignature debugDescription has changed; need to change OCPartialMockObject impl");
+}
+
+
+@end
diff --git a/Source/OCMockTests/OCMArgTests.m b/Source/OCMockTests/OCMArgTests.m
new file mode 100644
index 0000000..ff0123a
--- /dev/null
+++ b/Source/OCMockTests/OCMArgTests.m
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import "OCMArg.h"
+#import "OCMConstraint.h"
+#import "OCMPassByRefSetter.h"
+
+#if TARGET_OS_IPHONE
+#define NSRect CGRect
+#define NSZeroRect CGRectZero
+#define NSMakeRect CGRectMake
+#define valueWithRect valueWithCGRect
+#endif
+
+@interface OCMArgTests : XCTestCase
+
+@end
+
+
+@implementation OCMArgTests
+
+- (void)testValueMacroCreatesCorrectValueObjects
+{
+ NSRange range = NSMakeRange(5, 5);
+ XCTAssertEqualObjects(OCMOCK_VALUE(range), [NSValue valueWithRange:range]);
+#if !(TARGET_OS_IPHONE && TARGET_RT_64_BIT)
+ /* This should work everywhere but I can't get it to work on iOS 64-bit */
+ XCTAssertEqualObjects(OCMOCK_VALUE((BOOL){YES}), @YES);
+#endif
+ XCTAssertEqualObjects(OCMOCK_VALUE(42), @42);
+#if !TARGET_OS_IPHONE
+ XCTAssertEqualObjects(OCMOCK_VALUE(NSZeroRect), [NSValue valueWithRect:NSZeroRect]);
+#endif
+ XCTAssertEqualObjects(OCMOCK_VALUE([@"0123456789" rangeOfString:@"56789"]), [NSValue valueWithRange:range]);
+}
+
+- (void)testIsKindOfClassCheck
+{
+ OCMBlockConstraint *constraint = [OCMArg isKindOfClass:[NSString class]];
+
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted \"foo\".");
+ XCTAssertFalse([constraint evaluate:[NSArray array]], @"Should not have accepted other value.");
+ XCTAssertFalse([constraint evaluate:nil], @"Should not have accepted nil.");
+}
+
+-(void)testResolvesSpecialAnySelectorToAnyConstraint
+{
+ SEL anySelector = [OCMArg anySelector];
+ NSValue *anySelectorValue = [NSValue valueWithBytes:&anySelector objCType:@encode(SEL)];
+
+ XCTAssertTrue([[OCMArg resolveSpecialValues:anySelectorValue] isKindOfClass:[OCMAnyConstraint class]]);
+}
+
+-(void)testDoesNotTreatOtherSelectorsAsSpecialValue
+{
+ NSValue *arbitrary = [NSValue value:NSSelectorFromString(@"someSelector") withObjCType:@encode(SEL)];
+ XCTAssertEqual([OCMArg resolveSpecialValues:arbitrary], arbitrary, @"Should have returned selector as is.");
+}
+
+-(void)testResolvesSpecialAnyPointerToAnyConstraint
+{
+ void *anyPointer = [OCMArg anyPointer];
+ NSValue *anyPointerValue = [NSValue valueWithPointer:anyPointer];
+
+ XCTAssertTrue([[OCMArg resolveSpecialValues:anyPointerValue] isKindOfClass:[OCMAnyConstraint class]]);
+}
+
+-(void)testResolvesPassByRefSetterValueToSetterInstance
+{
+ NSNumber *value = @1;
+ OCMPassByRefSetter *setter = [[OCMPassByRefSetter alloc] initWithValue:value];
+ NSValue *passByRefSetterValue = [NSValue value:&setter withObjCType:@encode(void *)];
+ XCTAssertEqual([OCMArg resolveSpecialValues:passByRefSetterValue], setter, @"Should have unwrapped setter instance.");
+}
+
+- (void)testDoesNotModifyOtherPointersToObjects
+{
+ NSValue *objectPointer = [NSValue value:&self withObjCType:@encode(void *)];
+ XCTAssertEqual([OCMArg resolveSpecialValues:objectPointer], objectPointer, @"Should have returned value as is.");
+}
+
+- (void)testHandlesNonObjectPointersGracefully
+{
+ long numberThatRepresentsInValidClassPointer = 0x08;
+ long *pointer = &numberThatRepresentsInValidClassPointer;
+ NSValue *nonObjectPointerValue = [NSValue value:&pointer withObjCType:@encode(void *)];
+ XCTAssertEqual([OCMArg resolveSpecialValues:nonObjectPointerValue], nonObjectPointerValue, @"Should have returned value as is.");
+}
+
+@end
diff --git a/Source/OCMockTests/OCMConstraintTests.m b/Source/OCMockTests/OCMConstraintTests.m
new file mode 100644
index 0000000..af3c488
--- /dev/null
+++ b/Source/OCMockTests/OCMConstraintTests.m
@@ -0,0 +1,153 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMConstraint.h>
+
+
+@interface OCMConstraintTests : XCTestCase
+{
+ BOOL didCallCustomConstraint;
+}
+
+@end
+
+
+@implementation OCMConstraintTests
+
+- (void)setUp
+{
+ didCallCustomConstraint = NO;
+}
+
+- (void)testAnyAcceptsAnything
+{
+ OCMConstraint *constraint = [OCMAnyConstraint constraint];
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted a value.");
+ XCTAssertTrue([constraint evaluate:@"bar"], @"Should have accepted another value.");
+ XCTAssertTrue([constraint evaluate:nil], @"Should have accepted nil.");
+}
+
+- (void)testIsNilAcceptsOnlyNil
+{
+ OCMConstraint *constraint = [OCMIsNilConstraint constraint];
+
+ XCTAssertFalse([constraint evaluate:@"foo"], @"Should not have accepted a value.");
+ XCTAssertTrue([constraint evaluate:nil], @"Should have accepted nil.");
+}
+
+- (void)testIsNotNilAcceptsAnythingButNil
+{
+ OCMConstraint *constraint = [OCMIsNotNilConstraint constraint];
+
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted a value.");
+ XCTAssertFalse([constraint evaluate:nil], @"Should not have accepted nil.");
+}
+
+- (void)testNotEqualAcceptsAnythingButValue
+{
+ OCMIsNotEqualConstraint *constraint = [OCMIsNotEqualConstraint constraint];
+ constraint->testValue = @"foo";
+
+ XCTAssertFalse([constraint evaluate:@"foo"], @"Should not have accepted value.");
+ XCTAssertTrue([constraint evaluate:@"bar"], @"Should have accepted other value.");
+ XCTAssertTrue([constraint evaluate:nil], @"Should have accepted nil.");
+}
+
+
+- (BOOL)checkArg:(id)theArg
+{
+ didCallCustomConstraint = YES;
+ return [theArg isEqualToString:@"foo"];
+}
+
+- (void)testUsesPlainMethod
+{
+ OCMConstraint *constraint = CONSTRAINT(@selector(checkArg:));
+
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted foo.");
+ XCTAssertTrue(didCallCustomConstraint, @"Should have used custom method.");
+ XCTAssertFalse([constraint evaluate:@"bar"], @"Should not have accepted bar.");
+}
+
+
+- (BOOL)checkArg:(id)theArg withValue:(id)value
+{
+ didCallCustomConstraint = YES;
+ return [theArg isEqual:value];
+}
+
+- (void)testUsesMethodWithValue
+{
+ OCMConstraint *constraint = CONSTRAINTV(@selector(checkArg:withValue:), @"foo");
+
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted foo.");
+ XCTAssertTrue(didCallCustomConstraint, @"Should have used custom method.");
+ XCTAssertFalse([constraint evaluate:@"bar"], @"Should not have accepted bar.");
+}
+
+
+- (void)testRaisesExceptionWhenConstraintMethodDoesNotTakeArgument
+{
+ XCTAssertThrows(CONSTRAINTV(@selector(checkArg:), @"bar"), @"Should have thrown for invalid constraint method.");
+}
+
+
+- (void)testRaisesExceptionOnUnknownSelector
+{
+ // We use a selector that this test does not implement
+ XCTAssertThrows(CONSTRAINTV(@selector(arrayWithArray:), @"bar"), @"Should have thrown for unknown constraint method.");
+}
+
+
+-(void)testUsesBlock
+{
+ BOOL (^checkForFooBlock)(id) = ^(id value)
+ {
+ return [value isEqualToString:@"foo"];
+ };
+
+ OCMBlockConstraint *constraint = [[OCMBlockConstraint alloc] initWithConstraintBlock:checkForFooBlock];
+
+ XCTAssertTrue([constraint evaluate:@"foo"], @"Should have accepted foo.");
+ XCTAssertFalse([constraint evaluate:@"bar"], @"Should not have accepted bar.");
+}
+
+-(void)testBlockConstraintCanCaptureArgument
+{
+ __block NSString *captured;
+ BOOL (^captureArgBlock)(id) = ^(id value)
+ {
+ captured = value;
+ return YES;
+ };
+
+ OCMBlockConstraint *constraint = [[OCMBlockConstraint alloc] initWithConstraintBlock:captureArgBlock];
+
+ [constraint evaluate:@"foo"];
+ XCTAssertEqualObjects(@"foo", captured, @"Should have captured value from last invocation.");
+ [constraint evaluate:@"bar"];
+ XCTAssertEqualObjects(@"bar", captured, @"Should have captured value from last invocation.");
+}
+
+- (void)testEvaluateNilBlockReturnsNo
+{
+ OCMBlockConstraint *constraint = [[OCMBlockConstraint alloc] initWithConstraintBlock:nil];
+
+ XCTAssertFalse([constraint evaluate:@"foo"]);
+}
+
+@end
diff --git a/Source/OCMockTests/OCMInvocationMatcherTests.m b/Source/OCMockTests/OCMInvocationMatcherTests.m
new file mode 100644
index 0000000..1a7bf77
--- /dev/null
+++ b/Source/OCMockTests/OCMInvocationMatcherTests.m
@@ -0,0 +1,137 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMArg.h>
+#import "OCMInvocationMatcher.h"
+#import "OCClassMockObject.h"
+#import "OCMFunctions.h"
+
+
+@interface TestClassForRecorder : NSObject
+
+- (void)methodWithInt:(int)i andObject:(id)o;
+
+- (void)methodWithClass:(Class)class;
+
+@end
+
+@implementation TestClassForRecorder
+
+- (void)methodWithInt:(int)i andObject:(id)o
+{
+}
+
+- (void)methodWithClass:(Class)class
+{
+}
+
+@end
+
+@interface OCMInvocationMatcherTests : XCTestCase
+
+@end
+
+@implementation OCMInvocationMatcherTests
+
+- (NSInvocation *)invocationForTargetClass:(Class)aClass selector:(SEL)aSelector
+{
+ NSMethodSignature *signature = [aClass instanceMethodSignatureForSelector:aSelector];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:aSelector];
+ return invocation;
+}
+
+- (void)testMatchesAliasedSelector
+{
+ OCMInvocationMatcher *matcher = [[OCMInvocationMatcher alloc] init];
+ NSInvocation *recordedInvocation = [self invocationForTargetClass:[NSString class] selector:@selector(uppercaseString)];
+ [matcher setInvocation:recordedInvocation];
+
+ SEL actual = OCMAliasForOriginalSelector(@selector(uppercaseString));
+
+ XCTAssertTrue([matcher matchesSelector:actual], @"Should have matched.");
+}
+
+- (void)testOnlyMatchesInvocationWithRightArguments
+{
+ NSString *recorded = @"recorded";
+ NSString *actual = @"actual";
+
+ OCMInvocationMatcher *matcher = [[OCMInvocationMatcher alloc] init];
+ NSInvocation *recordedInvocation = [self invocationForTargetClass:[NSString class] selector:@selector(initWithString:)];
+ [recordedInvocation setArgument:&recorded atIndex:2];
+ [matcher setInvocation:recordedInvocation];
+
+ NSInvocation *testInvocation = [self invocationForTargetClass:[NSString class] selector:@selector(initWithString:)];
+ [testInvocation setArgument:&actual atIndex:2];
+ XCTAssertFalse([matcher matchesInvocation:testInvocation], @"Should not match.");
+}
+
+-(void)testSelectivelyIgnoresNonObjectArguments
+{
+ id any = [OCMArg any];
+ NSUInteger zero = 0;
+ NSString *arg1 = @"I (.*) mocks.";
+ NSUInteger arg2 = NSRegularExpressionSearch;
+
+ OCMInvocationMatcher *matcher = [[OCMInvocationMatcher alloc] init];
+ NSInvocation *recordedInvocation = [self invocationForTargetClass:[NSString class] selector:@selector(rangeOfString:options:)];
+ [recordedInvocation setArgument:&any atIndex:2];
+ [recordedInvocation setArgument:&zero atIndex:3];
+ [matcher setInvocation:recordedInvocation];
+ [matcher setIgnoreNonObjectArgs:YES];
+
+ NSInvocation *testInvocation = [self invocationForTargetClass:[NSString class] selector:@selector(rangeOfString:options:)];
+ [testInvocation setArgument:&arg1 atIndex:2];
+ [testInvocation setArgument:&arg2 atIndex:3];
+ XCTAssertTrue([matcher matchesInvocation:testInvocation], @"Should match.");
+}
+
+-(void)testSelectivelyIgnoresNonObjectArgumentsAndStillFailsWhenFollowingObjectArgsDontMatch
+{
+ int arg1 = 17;
+ NSString *recorded = @"recorded";
+ NSString *actual = @"actual";
+
+ OCMInvocationMatcher *matcher = [[OCMInvocationMatcher alloc] init];
+ NSInvocation *recordedInvocation = [self invocationForTargetClass:[TestClassForRecorder class] selector:@selector(methodWithInt:andObject:)];
+ [recordedInvocation setArgument:&arg1 atIndex:2];
+ [recordedInvocation setArgument:&recorded atIndex:3];
+ [matcher setInvocation:recordedInvocation];
+ [matcher setIgnoreNonObjectArgs:YES];
+
+ NSInvocation *testInvocation = [self invocationForTargetClass:[TestClassForRecorder class] selector:@selector(methodWithInt:andObject:)];
+ [testInvocation setArgument:&arg1 atIndex:2];
+ [testInvocation setArgument:&actual atIndex:3];
+ XCTAssertFalse([matcher matchesInvocation:testInvocation], @"Should not match.");
+}
+
+- (void)testMatchesInvocationWithClassObjectArgument
+{
+ Class arg1 = NSObject.class;
+
+ OCMInvocationMatcher *matcher = [[OCMInvocationMatcher alloc] init];
+ NSInvocation *recordedInvocation = [self invocationForTargetClass:[TestClassForRecorder class] selector:@selector(methodWithClass:)];
+ [recordedInvocation setArgument:&arg1 atIndex:2];
+ [matcher setInvocation:recordedInvocation];
+
+ NSInvocation *testInvocation = [self invocationForTargetClass:[TestClassForRecorder class] selector:@selector(methodWithClass:)];
+ [testInvocation setArgument:&arg1 atIndex:2];
+ XCTAssertTrue([matcher matchesInvocation:testInvocation], @"Should match.");
+}
+
+@end
diff --git a/Source/OCMockTests/OCMStubRecorderTests.m b/Source/OCMockTests/OCMStubRecorderTests.m
new file mode 100644
index 0000000..47bab2a
--- /dev/null
+++ b/Source/OCMockTests/OCMStubRecorderTests.m
@@ -0,0 +1,70 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import "OCMStubRecorder.h"
+#import <OCMock/OCMockObject.h>
+#import "OCMReturnValueProvider.h"
+#import "OCMExceptionReturnValueProvider.h"
+#import "OCMInvocationMatcher.h"
+#import "OCMInvocationStub.h"
+
+@interface OCMStubRecorderTests : XCTestCase
+
+@end
+
+
+@implementation OCMStubRecorderTests
+
+- (void)testCreatesInvocationMatcher
+{
+ NSString *arg = @"I love mocks.";
+
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ OCMStubRecorder *recorder = [[OCMStubRecorder alloc] initWithMockObject:mock];
+ [(id)recorder stringByAppendingString:arg];
+
+ NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:@selector(stringByAppendingString:)];
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
+ [invocation setSelector:@selector(stringByAppendingString:)];
+ [invocation setArgument:&arg atIndex:2];
+ XCTAssertTrue([[recorder invocationMatcher] matchesInvocation:invocation], @"Should match.");
+}
+
+- (void)testAddsReturnValueProvider
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ OCMStubRecorder *recorder = [[OCMStubRecorder alloc] initWithMockObject:mock];
+ [recorder andReturn:@"foo"];
+ NSArray *actionList = [(OCMInvocationStub *)[recorder invocationMatcher] invocationActions];
+
+ XCTAssertEqual((NSUInteger)1, [actionList count], @"Should have added one action.");
+ XCTAssertEqualObjects([OCMReturnValueProvider class], [[actionList objectAtIndex:0] class], @"Should have added correct action.");
+}
+
+- (void)testAddsExceptionReturnValueProvider
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ OCMStubRecorder *recorder = [[OCMStubRecorder alloc] initWithMockObject:mock];
+ [recorder andThrow:[NSException exceptionWithName:@"TestException" reason:@"A reason" userInfo:nil]];
+ NSArray *actionList = [(OCMInvocationStub *)[recorder invocationMatcher] invocationActions];
+
+ XCTAssertEqual((NSUInteger)1, [actionList count], @"Should have added one action.");
+ XCTAssertEqualObjects([OCMExceptionReturnValueProvider class], [[actionList objectAtIndex:0] class], @"Should have added correct action.");
+
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m b/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m
new file mode 100644
index 0000000..4aadb77
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectClassMethodMockingTests.m
@@ -0,0 +1,321 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import "OCClassMockObject.h"
+#import "OCPartialMockObject.h"
+
+
+#pragma mark Helper classes
+
+@interface TestClassWithClassMethods : NSObject
++ (NSString *)foo;
++ (NSString *)bar;
+- (NSString *)bar;
+@end
+
+@implementation TestClassWithClassMethods
+
+static NSUInteger initializeCallCount = 0;
+
++ (void)initialize
+{
+ initializeCallCount += 1;
+}
+
++ (NSUInteger)initializeCallCount
+{
+ return initializeCallCount;
+}
+
++ (NSString *)foo
+{
+ return @"Foo-ClassMethod";
+}
+
++ (NSString *)bar
+{
+ return @"Bar-ClassMethod";
+}
+
+- (NSString *)bar
+{
+ return @"Bar";
+}
+
+@end
+
+
+@interface TestSubclassWithClassMethods : TestClassWithClassMethods
+
+@end
+
+@implementation TestSubclassWithClassMethods
+
+@end
+
+
+@interface OCMockObjectClassMethodMockingTests : XCTestCase
+
+@end
+
+
+@implementation OCMockObjectClassMethodMockingTests
+
+#pragma mark Tests stubbing class methods
+
+- (void)testCanStubClassMethod
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked"] foo];
+
+ XCTAssertEqualObjects(@"mocked", [TestClassWithClassMethods foo], @"Should have stubbed class method.");
+}
+
+- (void)testCanExpectTheSameClassMethodMoreThanOnce
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ [[[[mock expect] classMethod] andReturn:@"mocked-foo"] foo];
+ [[[[mock expect] classMethod] andReturn:@"mocked-foo2"] foo];
+
+ XCTAssertEqualObjects(@"mocked-foo", [TestClassWithClassMethods foo], @"Should have stubbed class method 'foo'.");
+ XCTAssertEqualObjects(@"mocked-foo2", [TestClassWithClassMethods foo], @"Should have stubbed class method 'foo2'.");
+}
+
+- (void)testClassReceivesMethodsAfterStopWasCalled
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked"] foo];
+ [mock stopMocking];
+
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should not have stubbed class method.");
+}
+
+- (void)testClassReceivesMethodAgainWhenExpectedCallOccurred
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock expect] classMethod] andReturn:@"mocked"] foo];
+
+ XCTAssertEqualObjects(@"mocked", [TestClassWithClassMethods foo], @"Should have stubbed method.");
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should have 'unstubbed' method.");
+}
+
+- (void)testCanStubClassMethodFromMockForSubclass
+{
+ id subclassMock = [OCMockObject mockForClass:[TestSubclassWithClassMethods class]];
+
+ [[[[subclassMock stub] classMethod] andReturn:@"mocked-subclass"] foo];
+ XCTAssertEqualObjects(@"mocked-subclass", [TestSubclassWithClassMethods foo], @"Should have stubbed method.");
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should not have stubbed method in superclass.");
+}
+
+- (void)testSuperclassReceivesMethodsAfterStopWasCalled
+{
+ id mock = [OCMockObject mockForClass:[TestSubclassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked"] foo];
+ [mock stopMocking];
+
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestSubclassWithClassMethods foo], @"Should not have stubbed class method.");
+}
+
+- (void)testCanReplaceSameMethodInSubclassAfterSuperclassMockWasStopped
+{
+ id superclassMock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ id subclassMock = [OCMockObject mockForClass:[TestSubclassWithClassMethods class]];
+
+ [[[[superclassMock stub] classMethod] andReturn:@"mocked-superclass"] foo];
+ [superclassMock stopMocking];
+
+ [[[[subclassMock stub] classMethod] andReturn:@"mocked-subclass"] foo];
+ XCTAssertEqualObjects(@"mocked-subclass", [TestSubclassWithClassMethods foo], @"Should have stubbed method");
+}
+
+- (void)testCanReplaceSameMethodInSuperclassAfterSubclassMockWasStopped
+{
+ id superclassMock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ id subclassMock = [OCMockObject mockForClass:[TestSubclassWithClassMethods class]];
+
+ [[[[subclassMock stub] classMethod] andReturn:@"mocked-subclass"] foo];
+ [subclassMock stopMocking];
+
+ [[[[superclassMock stub] classMethod] andReturn:@"mocked-superclass"] foo];
+ XCTAssertEqualObjects(@"mocked-superclass", [TestClassWithClassMethods foo], @"Should have stubbed method");
+}
+
+- (void)testStubbingIsOnlyActiveAtTheClassItWasAdded
+{
+ // stage 1: stub in superclass affects only superclass
+ id superclassMock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ [[[[superclassMock stub] classMethod] andReturn:@"mocked-superclass"] foo];
+ XCTAssertEqualObjects(@"mocked-superclass", [TestClassWithClassMethods foo], @"Should have stubbed method");
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestSubclassWithClassMethods foo], @"Should NOT have stubbed method");
+ [superclassMock stopMocking];
+
+ // stage 2: stub in subclass affects only subclass
+ id subclassMock = [OCMockObject mockForClass:[TestSubclassWithClassMethods class]];
+ [[[[subclassMock stub] classMethod] andReturn:@"mocked-subclass"] foo];
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should NOT have stubbed method");
+ XCTAssertEqualObjects(@"mocked-subclass", [TestSubclassWithClassMethods foo], @"Should have stubbed method");
+ [subclassMock stopMocking];
+
+ // stage 3: like stage 1; also demonstrates that subclass cleared all stubs
+ id superclassMock2 = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ [[[[superclassMock2 stub] classMethod] andReturn:@"mocked-superclass"] foo];
+ XCTAssertEqualObjects(@"mocked-superclass", [TestClassWithClassMethods foo], @"Should have stubbed method");
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestSubclassWithClassMethods foo], @"Should NOT have stubbed method");
+}
+
+- (void)testStubsOnlyClassMethodWhenInstanceMethodWithSameNameExists
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked"] bar];
+
+ XCTAssertEqualObjects(@"mocked", [TestClassWithClassMethods bar], @"Should have stubbed class method.");
+ XCTAssertThrows([mock bar], @"Should not have stubbed instance method.");
+}
+
+- (void)testStubsClassMethodWhenNoInstanceMethodExistsWithName
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[mock stub] andReturn:@"mocked"] foo];
+
+ XCTAssertEqualObjects(@"mocked", [TestClassWithClassMethods foo], @"Should have stubbed class method.");
+}
+
+- (void)testStubsCanDistinguishInstanceAndClassMethods
+{
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked-class"] bar];
+ [[[mock stub] andReturn:@"mocked-instance"] bar];
+
+ XCTAssertEqualObjects(@"mocked-class", [TestClassWithClassMethods bar], @"Should have stubbed class method.");
+ XCTAssertEqualObjects(@"mocked-instance", [mock bar], @"Should have stubbed instance method.");
+}
+
+- (void)testRevertsAllStubbedMethodsOnDealloc
+{
+ id mock = [[OCClassMockObject alloc] initWithClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked-foo"] foo];
+ [[[[mock stub] classMethod] andReturn:@"mocked-bar"] bar];
+
+ XCTAssertEqualObjects(@"mocked-foo", [TestClassWithClassMethods foo], @"Should have stubbed class method 'foo'.");
+ XCTAssertEqualObjects(@"mocked-bar", [TestClassWithClassMethods bar], @"Should have stubbed class method 'bar'.");
+
+ mock = nil;
+
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should have 'unstubbed' class method 'foo'.");
+ XCTAssertEqualObjects(@"Bar-ClassMethod", [TestClassWithClassMethods bar], @"Should have 'unstubbed' class method 'bar'.");
+}
+
+- (void)testRevertsAllStubbedMethodsOnPartialMockDealloc
+{
+ id mock = [[OCPartialMockObject alloc] initWithClass:[TestClassWithClassMethods class]];
+
+ [[[[mock stub] classMethod] andReturn:@"mocked-foo"] foo];
+ [[[[mock stub] classMethod] andReturn:@"mocked-bar"] bar];
+
+ XCTAssertEqualObjects(@"mocked-foo", [TestClassWithClassMethods foo], @"Should have stubbed class method 'foo'.");
+ XCTAssertEqualObjects(@"mocked-bar", [TestClassWithClassMethods bar], @"Should have stubbed class method 'bar'.");
+
+ mock = nil;
+
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo], @"Should have 'unstubbed' class method 'foo'.");
+ XCTAssertEqualObjects(@"Bar-ClassMethod", [TestClassWithClassMethods bar], @"Should have 'unstubbed' class method 'bar'.");
+}
+
+- (void)testSecondClassMockDeactivatesFirst
+{
+ id mock1 = [[OCClassMockObject alloc] initWithClass:[TestClassWithClassMethods class]];
+ [[[mock1 stub] andReturn:@"mocked-foo-1"] foo];
+
+ id mock2 = [[OCClassMockObject alloc] initWithClass:[TestClassWithClassMethods class]];
+ XCTAssertEqualObjects(@"Foo-ClassMethod", [TestClassWithClassMethods foo]);
+
+ [mock2 stopMocking];
+ XCTAssertNoThrow([TestClassWithClassMethods foo]);
+}
+
+- (void)testForwardToRealObject
+{
+ NSString *classFooValue = [TestClassWithClassMethods foo];
+ NSString *classBarValue = [TestClassWithClassMethods bar];
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+
+ [[[[mock expect] classMethod] andForwardToRealObject] foo];
+ NSString *result = [TestClassWithClassMethods foo];
+ XCTAssertEqualObjects(result, classFooValue);
+ XCTAssertNoThrow([mock verify]);
+
+ [[[mock expect] andForwardToRealObject] foo];
+ result = [TestClassWithClassMethods foo];
+ XCTAssertEqualObjects(result, classFooValue);
+ XCTAssertNoThrow([mock verify]);
+
+ [[[[mock expect] classMethod] andForwardToRealObject] bar];
+ result = [TestClassWithClassMethods bar];
+ XCTAssertEqualObjects(result, classBarValue);
+ XCTAssertNoThrow([mock verify]);
+
+ [[[[mock expect] classMethod] andForwardToRealObject] bar];
+ XCTAssertThrowsSpecificNamed([mock bar], NSException, NSInternalInconsistencyException, @"");
+
+ [[[mock expect] andForwardToRealObject] bar];
+ XCTAssertThrowsSpecificNamed([mock bar], NSException, NSInternalInconsistencyException, @"Did not get the exception saying andForwardToRealObject not supported");
+
+ [[[mock expect] andForwardToRealObject] foo];
+ XCTAssertThrows([mock foo]);
+}
+
+- (void)testRefusesToCreateClassMockForNilClass
+{
+ XCTAssertThrows(OCMClassMock(nil));
+}
+
+- (void)testInitializeIsNotCalledOnMockedClass
+{
+ NSUInteger countBefore = [TestClassWithClassMethods initializeCallCount];
+
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ [TestClassWithClassMethods foo];
+ [[mock verify] foo];
+
+ NSUInteger countAfter = [TestClassWithClassMethods initializeCallCount];
+
+ XCTAssertEqual(countBefore, countAfter, @"Creating a mock should not have resulted in call to +initialize");
+}
+
+- (void)testCanStubNSObjectClassMethodsIncludingAlloc
+{
+ TestClassWithClassMethods *dummyObject = [[TestClassWithClassMethods alloc] init];
+
+ id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
+ [[[mock stub] andReturn:dummyObject] new];
+
+ id newObject = [TestClassWithClassMethods new];
+
+ XCTAssertEqualObjects(dummyObject, newObject, @"Should have stubbed +new method");
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectForwardingTargetTests.m b/Source/OCMockTests/OCMockObjectForwardingTargetTests.m
new file mode 100644
index 0000000..99e2ccc
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectForwardingTargetTests.m
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import <objc/runtime.h>
+
+#pragma mark Helper classes
+
+@interface InternalObject : NSObject
+{
+ NSString *_name;
+}
+@property (nonatomic, strong) NSString *name;
+@end
+
+@interface PublicObject : NSObject
+{
+ InternalObject *_internal;
+};
+@property (nonatomic, strong) NSString *name;
+@end
+
+@implementation InternalObject
+
+@synthesize name = _name;
+
+@end
+
+
+@implementation PublicObject
+
+@dynamic name;
+
+- (instancetype)initWithInternal:(InternalObject *)internal
+{
+ self = [super init];
+ if (!self)
+ return self;
+
+ _internal = internal;
+ return self;
+}
+
+- (instancetype)init
+{
+ return [self initWithInternal:[[InternalObject alloc] init]];
+}
+
+- (id)forwardingTargetForSelector:(SEL)selector
+{
+ if (selector == @selector(name) ||
+ selector == @selector(setName:))
+ return _internal;
+ return [super forwardingTargetForSelector:selector];
+}
+
++ (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)selector
+{
+ NSMethodSignature *signature = [super instanceMethodSignatureForSelector:selector];
+ if (signature)
+ return signature;
+ else
+ return [InternalObject instanceMethodSignatureForSelector:selector];
+}
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector
+{
+ NSMethodSignature *signature = [super methodSignatureForSelector:selector];
+ if (signature)
+ return signature;
+
+ return [[self forwardingTargetForSelector:selector] methodSignatureForSelector:selector];
+}
+
+- (BOOL)respondsToSelector:(SEL)selector
+{
+ if ([super respondsToSelector:selector])
+ return YES;
+
+ return [[self forwardingTargetForSelector:selector] respondsToSelector:selector];
+}
+
++ (BOOL)instancesRespondToSelector:(SEL)selector
+{
+ if (class_respondsToSelector(self, selector))
+ return YES;
+
+ return [InternalObject instancesRespondToSelector:selector];
+}
+
+- (id)valueForUndefinedKey:(NSString *)key
+{
+ return [_internal valueForKey:key];
+}
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key
+{
+ [_internal setValue:value forKey:key];
+}
+
+@end
+
+
+#pragma mark Tests
+
+
+@interface OCMockForwardingTargetTests : XCTestCase
+
+@end
+
+
+@implementation OCMockForwardingTargetTests
+
+- (void)testNameShouldForwardToInternal
+{
+ InternalObject *internal = [[InternalObject alloc] init];
+ internal.name = @"Internal Object";
+ PublicObject *public = [[PublicObject alloc] initWithInternal:internal];
+ XCTAssertEqualObjects(@"Internal Object", public.name);
+}
+
+- (void)testStubsMethodImplementation
+{
+ PublicObject *public = [[PublicObject alloc] init];
+ id mock = [OCMockObject partialMockForObject:public];
+
+ [[[mock stub] andReturn:@"FOO"] name];
+ XCTAssertEqualObjects(@"FOO", [mock name]);
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectHamcrestTests.mm b/Source/OCMockTests/OCMockObjectHamcrestTests.mm
new file mode 100644
index 0000000..6240260
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectHamcrestTests.mm
@@ -0,0 +1,47 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+
+#define HC_SHORTHAND
+#import <OCHamcrest/OCHamcrest.h>
+
+
+@interface OCMockObjectHamcrestTests : XCTestCase
+
+@end
+
+
+@implementation OCMockObjectHamcrestTests
+
+- (void)testAcceptsStubbedMethodWithHamcrestConstraint
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] hasSuffix:(id)startsWith(@"foo")];
+ [mock hasSuffix:@"foobar"];
+}
+
+
+- (void)testRejectsUnstubbedMethodWithHamcrestConstraint
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] hasSuffix:(id)anyOf(equalTo(@"foo"), equalTo(@"bar"), NULL)];
+ XCTAssertThrows([mock hasSuffix:@"foobar"], @"Should have raised an exception.");
+}
+
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectMacroTests.m b/Source/OCMockTests/OCMockObjectMacroTests.m
new file mode 100644
index 0000000..11a3970
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectMacroTests.m
@@ -0,0 +1,377 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+
+
+@protocol TestProtocolForMacroTesting
+- (NSString *)stringValue;
+@end
+
+@interface TestClassForMacroTesting : NSObject <TestProtocolForMacroTesting>
+
+@end
+
+@implementation TestClassForMacroTesting
+
+- (NSString *)stringValue
+{
+ return @"FOO";
+}
+
+@end
+
+
+@interface TestClassWithDecimalReturnMethod : NSObject
+
+- (NSDecimalNumber*)method;
+
+@end
+
+@implementation TestClassWithDecimalReturnMethod
+
+- (NSDecimalNumber*)method {
+ return nil;
+}
+
+@end
+
+
+// implemented in OCMockObjectClassMethodMockingTests
+
+@interface TestClassWithClassMethods : NSObject
++ (NSString *)foo;
++ (NSString *)bar;
+- (NSString *)bar;
+@end
+
+
+
+@interface OCMockObjectMacroTests : XCTestCase
+{
+ BOOL shouldCaptureFailure;
+ NSString *reportedDescription;
+ NSString *reportedFile;
+ NSUInteger reportedLine;
+}
+
+@end
+
+
+@implementation OCMockObjectMacroTests
+
+- (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)file atLine:(NSUInteger)line expected:(BOOL)expected
+{
+ if(shouldCaptureFailure)
+ {
+ reportedDescription = description;
+ reportedFile = file;
+ reportedLine = line;
+ }
+ else
+ {
+ [super recordFailureWithDescription:description inFile:file atLine:line expected:expected];
+ }
+}
+
+
+- (void)testReportsVerifyFailureWithCorrectLocation
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [[mock expect] lowercaseString];
+
+ shouldCaptureFailure = YES;
+ OCMVerifyAll(mock); const char *expectedFile = __FILE__; int expectedLine = __LINE__;
+ shouldCaptureFailure = NO;
+
+ XCTAssertNotNil(reportedDescription, @"Should have recorded a failure with description.");
+ XCTAssertEqualObjects([NSString stringWithUTF8String:expectedFile], reportedFile, @"Should have reported correct file.");
+ XCTAssertEqual(expectedLine, (int)reportedLine, @"Should have reported correct line");
+}
+
+- (void)testReportsIgnoredExceptionsAtVerifyLocation
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [[mock reject] lowercaseString];
+
+ @try
+ {
+ [mock lowercaseString];
+ }
+ @catch (NSException *exception)
+ {
+ // ignore; the mock will rethrow this in verify
+ }
+
+ shouldCaptureFailure = YES;
+ OCMVerifyAll(mock); const char *expectedFile = __FILE__; int expectedLine = __LINE__;
+ shouldCaptureFailure = NO;
+
+ XCTAssertTrue([reportedDescription rangeOfString:@"ignored"].location != NSNotFound, @"Should have reported ignored exceptions.");
+ XCTAssertEqualObjects([NSString stringWithUTF8String:expectedFile], reportedFile, @"Should have reported correct file.");
+ XCTAssertEqual(expectedLine, (int)reportedLine, @"Should have reported correct line");
+}
+
+- (void)testReportsVerifyWithDelayFailureWithCorrectLocation
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [[mock expect] lowercaseString];
+
+ shouldCaptureFailure = YES;
+ OCMVerifyAllWithDelay(mock, 0.05); const char *expectedFile = __FILE__; int expectedLine = __LINE__;
+ shouldCaptureFailure = NO;
+
+ XCTAssertNotNil(reportedDescription, @"Should have recorded a failure with description.");
+ XCTAssertEqualObjects([NSString stringWithUTF8String:expectedFile], reportedFile, @"Should have reported correct file.");
+ XCTAssertEqual(expectedLine, (int)reportedLine, @"Should have reported correct line");
+}
+
+
+- (void)testSetsUpStubsForCorrectMethods
+{
+ id mock = OCMStrictClassMock([NSString class]);
+
+ OCMStub([mock uppercaseString]).andReturn(@"TEST_STRING");
+
+ XCTAssertEqualObjects(@"TEST_STRING", [mock uppercaseString], @"Should have returned stubbed value");
+ XCTAssertThrows([mock lowercaseString]);
+}
+
+- (void)testSetsUpStubsWithNonObjectReturnValues
+{
+ id mock = OCMStrictClassMock([NSString class]);
+
+ OCMStub([mock boolValue]).andReturn(YES);
+
+ XCTAssertEqual(YES, [mock boolValue], @"Should have returned stubbed value");
+}
+
+- (void)testSetsUpStubsWithStructureReturnValues
+{
+ id mock = OCMStrictClassMock([NSString class]);
+
+ NSRange expected = NSMakeRange(123, 456);
+ OCMStub([mock rangeOfString:[OCMArg any]]).andReturn(expected);
+
+ NSRange actual = [mock rangeOfString:@"substring"];
+ XCTAssertEqual((NSUInteger)123, actual.location, @"Should have returned stubbed value");
+ XCTAssertEqual((NSUInteger)456, actual.length, @"Should have returned stubbed value");
+}
+
+- (void)testSetsUpStubReturningNilForIdReturnType
+{
+ id mock = OCMClassMock([NSString class]);
+
+ OCMStub([mock lowercaseString]).andReturn(nil);
+
+ XCTAssertNil([mock lowercaseString], @"Should have returned stubbed value");
+}
+
+- (void)testSetsUpExceptionThrowing
+{
+ id mock = OCMClassMock([NSString class]);
+
+ OCMStub([mock uppercaseString]).andThrow([NSException exceptionWithName:@"TestException" reason:@"Testing" userInfo:nil]);
+
+ XCTAssertThrowsSpecificNamed([mock uppercaseString], NSException, @"TestException", @"Should have thrown correct exception");
+}
+
+- (void)testSetsUpNotificationPostingAndNotificationObserving
+{
+ id mock = OCMProtocolMock(@protocol(TestProtocolForMacroTesting));
+
+ NSNotification *n = [NSNotification notificationWithName:@"TestNotification" object:nil];
+
+ id observer = OCMObserverMock();
+ [[NSNotificationCenter defaultCenter] addMockObserver:observer name:[n name] object:nil];
+ OCMExpect([observer notificationWithName:[n name] object:[OCMArg any]]);
+
+ OCMStub([mock stringValue]).andPost(n);
+
+ [mock stringValue];
+
+ OCMVerifyAll(observer);
+}
+
+- (void)testSetsUpSubstituteCall
+{
+ id mock = OCMStrictProtocolMock(@protocol(TestProtocolForMacroTesting));
+
+ OCMStub([mock stringValue]).andCall(self, @selector(stringValueForTesting));
+
+ XCTAssertEqualObjects([mock stringValue], @"TEST_STRING_FROM_TESTCASE", @"Should have called method from test case");
+}
+
+- (NSString *)stringValueForTesting
+{
+ return @"TEST_STRING_FROM_TESTCASE";
+}
+
+
+- (void)testCanChainPropertyBasedActions
+{
+ id mock = OCMPartialMock([[TestClassForMacroTesting alloc] init]);
+
+ __block BOOL didCallBlock = NO;
+ void (^theBlock)(NSInvocation *) = ^(NSInvocation *invocation)
+ {
+ didCallBlock = YES;
+ };
+
+ OCMStub([mock stringValue]).andDo(theBlock).andForwardToRealObject();
+
+ NSString *actual = [mock stringValue];
+
+ XCTAssertTrue(didCallBlock, @"Should have called block");
+ XCTAssertEqualObjects(@"FOO", actual, @"Should have forwarded invocation");
+}
+
+
+- (void)testCanUseVariablesInInvocationSpec
+{
+ id mock = OCMStrictClassMock([NSString class]);
+
+ NSString *expected = @"foo";
+ OCMStub([mock rangeOfString:expected]).andReturn(NSMakeRange(0, 3));
+
+ XCTAssertThrows([mock rangeOfString:@"bar"], @"Should not have accepted invocation with non-matching arg.");
+}
+
+
+- (void)testSetsUpExpectations
+{
+ id mock = OCMClassMock([TestClassForMacroTesting class]);
+
+ OCMExpect([mock stringValue]).andReturn(@"TEST_STRING");
+
+ XCTAssertThrows([mock verify], @"Should have complained about expected method not being invoked");
+
+ XCTAssertEqual([mock stringValue], @"TEST_STRING", @"Should have stubbed method, too");
+ XCTAssertNoThrow([mock verify], @"Should have accepted invocation as matching expectation");
+}
+
+
+- (void)testShouldNotReportErrorWhenMethodWasInvoked
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [mock lowercaseString];
+
+ shouldCaptureFailure = YES;
+ OCMVerify([mock lowercaseString]);
+ shouldCaptureFailure = NO;
+
+ XCTAssertNil(reportedDescription, @"Should not have recorded a failure.");
+}
+
+- (void)testShouldReportErrorWhenMethodWasNotInvoked
+{
+ id mock = OCMClassMock([NSString class]);
+
+ [mock lowercaseString];
+
+ shouldCaptureFailure = YES;
+ OCMVerify([mock uppercaseString]); const char *expectedFile = __FILE__; int expectedLine = __LINE__;
+ shouldCaptureFailure = NO;
+
+ XCTAssertNotNil(reportedDescription, @"Should have recorded a failure with description.");
+ XCTAssertEqualObjects([NSString stringWithUTF8String:expectedFile], reportedFile, @"Should have reported correct file.");
+ XCTAssertEqual(expectedLine, (int)reportedLine, @"Should have reported correct line");
+}
+
+- (void)testShouldThrowDescriptiveExceptionWhenTryingToVerifyUnimplementedMethod
+{
+ id mock = OCMClassMock([NSString class]);
+
+ // have not found a way to report the error; it seems we must throw an
+ // exception to get out of the forwarding machinery
+ XCTAssertThrowsSpecificNamed(OCMVerify([mock arrayByAddingObject:nil]),
+ NSException,
+ NSInvalidArgumentException,
+ @"should throw NSInvalidArgumentException exception");
+}
+
+
+- (void)testCanExplicitlySelectClassMethodForStubs
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ OCMStub(ClassMethod([mock bar])).andReturn(@"mocked-class");
+ OCMStub([mock bar]).andReturn(@"mocked-instance");
+
+ XCTAssertEqualObjects(@"mocked-class", [TestClassWithClassMethods bar], @"Should have stubbed class method.");
+ XCTAssertEqualObjects(@"mocked-instance", [mock bar], @"Should have stubbed instance method.");
+}
+
+- (void)testSelectsInstanceMethodForStubsWhenAmbiguous
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ OCMStub([mock bar]).andReturn(@"mocked-instance");
+
+ XCTAssertEqualObjects(@"mocked-instance", [mock bar], @"Should have stubbed instance method.");
+}
+
+- (void)testSelectsClassMethodForStubsWhenUnambiguous
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ OCMStub([mock foo]).andReturn(@"mocked-class");
+
+ XCTAssertEqualObjects(@"mocked-class", [TestClassWithClassMethods foo], @"Should have stubbed class method.");
+}
+
+
+- (void)testCanExplicitlySelectClassMethodForVerify
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ [TestClassWithClassMethods bar];
+
+ OCMVerify(ClassMethod([mock bar]));
+}
+
+- (void)testSelectsInstanceMethodForVerifyWhenAmbiguous
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ [mock bar];
+
+ OCMVerify([mock bar]);
+}
+
+- (void)testSelectsClassMethodForVerifyWhenUnambiguous
+{
+ id mock = OCMClassMock([TestClassWithClassMethods class]);
+
+ [TestClassWithClassMethods foo];
+
+ OCMVerify([mock foo]);
+}
+
+
+- (void)testCanUseMacroToStubMethodWithDecimalReturnValue
+{
+ id mock = OCMClassMock([TestClassWithDecimalReturnMethod class]);
+ OCMStub([mock method]).andReturn([NSDecimalNumber decimalNumberWithDecimal:[@0 decimalValue]]);
+ XCTAssertEqualObjects([mock method], [NSDecimalNumber decimalNumberWithDecimal:[@0 decimalValue]]);
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectPartialMocksTests.m b/Source/OCMockTests/OCMockObjectPartialMocksTests.m
new file mode 100644
index 0000000..57ff492
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectPartialMocksTests.m
@@ -0,0 +1,446 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import <objc/runtime.h>
+
+#if TARGET_OS_IPHONE
+#define NSRect CGRect
+#define NSZeroRect CGRectZero
+#define NSMakeRect CGRectMake
+#define valueWithRect valueWithCGRect
+#endif
+
+#pragma mark Helper classes
+
+@interface TestClassWithSimpleMethod : NSObject
++ (NSUInteger)initializeCallCount;
+- (NSString *)foo;
+@end
+
+@implementation TestClassWithSimpleMethod
+
+static NSUInteger initializeCallCount = 0;
+
++ (void)initialize
+{
+ initializeCallCount += 1;
+}
+
++ (NSUInteger)initializeCallCount
+{
+ return initializeCallCount;
+}
+
+- (NSString *)foo
+{
+ return @"Foo";
+}
+
+@end
+
+
+@interface TestClassThatCallsSelf : NSObject
+{
+ int methodInt;
+}
+
+- (NSString *)method1;
+- (NSString *)method2;
+- (NSRect)methodRect1;
+- (NSRect)methodRect2;
+- (int)methodInt;
+- (void)methodVoid;
+- (void)setMethodInt:(int)anInt;
+@end
+
+@implementation TestClassThatCallsSelf
+
+- (NSString *)method1
+{
+ id retVal = [self method2];
+ return retVal;
+}
+
+- (NSString *)method2
+{
+ return @"Foo";
+}
+
+
+- (NSRect)methodRect1
+{
+ NSRect retVal = [self methodRect2];
+ return retVal;
+}
+
+- (NSRect)methodRect2
+{
+ return NSMakeRect(10, 10, 10, 10);
+}
+
+- (int)methodInt
+{
+ return methodInt;
+}
+
+- (void)methodVoid
+{
+}
+
+- (void)setMethodInt:(int)anInt
+{
+ methodInt = anInt;
+}
+
+@end
+
+
+@interface NSObject(OCMCategoryForTesting)
+
+- (NSString *)categoryMethod;
+
+@end
+
+@implementation NSObject(OCMCategoryForTesting)
+
+- (NSString *)categoryMethod
+{
+ return @"Foo-Category";
+}
+
+@end
+
+
+
+
+@interface OCMockObjectPartialMocksTests : XCTestCase
+{
+ int numKVOCallbacks;
+}
+
+@end
+
+
+@implementation OCMockObjectPartialMocksTests
+
+#pragma mark Tests for stubbing with partial mocks
+
+- (void)testStubsMethodsOnPartialMock
+{
+ TestClassWithSimpleMethod *object = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:object];
+ [[[mock stub] andReturn:@"hi"] foo];
+ XCTAssertEqualObjects(@"hi", [mock foo], @"Should have returned stubbed value");
+}
+
+- (void)testForwardsUnstubbedMethodsCallsToRealObjectOnPartialMock
+{
+ TestClassWithSimpleMethod *object = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:object];
+ XCTAssertEqualObjects(@"Foo", [mock foo], @"Should have returned value from real object.");
+}
+
+//- (void)testForwardsUnstubbedMethodsCallsToRealObjectOnPartialMockForTollFreeBridgedClasses
+//{
+// mock = [OCMockObject partialMockForObject:[NSString stringWithString:@"hello2"]];
+// STAssertEqualObjects(@"HELLO2", [mock uppercaseString], @"Should have returned value from real object.");
+//}
+
+- (void)testStubsMethodOnRealObjectReference
+{
+ TestClassWithSimpleMethod *realObject = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturn:@"TestFoo"] foo];
+ XCTAssertEqualObjects(@"TestFoo", [realObject foo], @"Should have stubbed method.");
+}
+
+- (void)testCallsToSelfInRealObjectAreShadowedByPartialMock
+{
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturn:@"FooFoo"] method2];
+ XCTAssertEqualObjects(@"FooFoo", [mock method1], @"Should have called through to stubbed method.");
+}
+
+- (void)testCallsToSelfInRealObjectStructReturnAreShadowedByPartialMock
+{
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturnValue:OCMOCK_VALUE(NSZeroRect)] methodRect2];
+#if TARGET_OS_IPHONE
+#define NSEqualRects CGRectEqualToRect
+#endif
+ XCTAssertTrue(NSEqualRects(NSZeroRect, [mock methodRect1]), @"Should have called through to stubbed method.");
+}
+
+- (void)testInvocationsOfNSObjectCategoryMethodsCanBeStubbed
+{
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturn:@"stubbed"] categoryMethod];
+ XCTAssertEqualObjects(@"stubbed", [realObject categoryMethod], @"Should have stubbed NSObject's method");
+}
+
+
+#pragma mark Tests for behaviour when setting up partial mocks
+
+- (void)testPartialMockClassOverrideReportsOriginalClass
+{
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ Class origClass = [realObject class];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ XCTAssertEqualObjects([realObject class], origClass, @"Override of -class method did not work");
+ XCTAssertEqualObjects([mock class], origClass, @"Mock proxy -class method did not work");
+ XCTAssertFalse(origClass == object_getClass(realObject), @"Subclassing did not work");
+ [mock stopMocking];
+ XCTAssertEqualObjects([realObject class], origClass, @"Classes different after stopMocking");
+ XCTAssertEqualObjects(object_getClass(realObject), origClass, @"Classes different after stopMocking");
+}
+
+- (void)testInitializeIsNotCalledOnMockedClass
+{
+ NSUInteger countBefore = [TestClassWithSimpleMethod initializeCallCount];
+
+ TestClassWithSimpleMethod *object = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:object];
+ [[[mock expect] andForwardToRealObject] foo];
+ [object foo];
+
+ NSUInteger countAfter = [TestClassWithSimpleMethod initializeCallCount];
+
+ XCTAssertEqual(countBefore, countAfter, @"Creating a mock should not have resulted in call to +initialize");
+}
+
+
+- (void)testRefusesToCreateTwoPartialMocksForTheSameObject
+{
+ id object = [[TestClassThatCallsSelf alloc] init];
+
+ id partialMock1 = [OCMockObject partialMockForObject:object];
+
+ XCTAssertNotNil(partialMock1, @"Should have created first partial mock.");
+ XCTAssertThrows([OCMockObject partialMockForObject:object], @"Should not have allowed creation of second partial mock");
+}
+
+- (void)testRefusesToCreatePartialMockForTollFreeBridgedClasses
+{
+ id object = (id)CFBridgingRelease(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingASCII));
+ XCTAssertThrowsSpecificNamed([OCMockObject partialMockForObject:object],
+ NSException,
+ NSInvalidArgumentException,
+ @"should throw NSInvalidArgumentException exception");
+}
+
+#if TARGET_RT_64_BIT
+
+- (void)testRefusesToCreatePartialMockForTaggedPointers
+{
+ NSDate *object = [NSDate dateWithTimeIntervalSince1970:0];
+ XCTAssertThrowsSpecificNamed([OCMockObject partialMockForObject:object],
+ NSException,
+ NSInvalidArgumentException,
+ @"should throw NSInvalidArgumentException exception");
+}
+
+#endif
+
+- (void)testRefusesToCreatePartialMockForNilObject
+{
+ XCTAssertThrows(OCMPartialMock(nil));
+}
+
+
+#pragma mark Tests for KVO interaction with mocks
+
+/* Starting KVO observations on an already-mocked object generally should work. */
+- (void)testAddingKVOObserverOnPartialMock
+{
+ static char *MyContext;
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ Class origClass = [realObject class];
+
+ id mock = [OCMockObject partialMockForObject:realObject];
+ Class ourSubclass = object_getClass(realObject);
+
+ [realObject addObserver:self forKeyPath:@"methodInt" options:NSKeyValueObservingOptionNew context:MyContext];
+ Class kvoClass = object_getClass(realObject);
+
+ /* KVO additionally overrides the -class method, but they return the superclass of their special
+ subclass, which in this case is the special mock subclass */
+ XCTAssertEqualObjects([realObject class], ourSubclass, @"KVO override of class did not return our subclass");
+ XCTAssertFalse(ourSubclass == kvoClass, @"KVO with subclass did not work");
+
+ [realObject setMethodInt:45];
+ XCTAssertEqual(numKVOCallbacks, 1, @"did not get subclass KVO notification");
+ [mock setMethodInt:47];
+ XCTAssertEqual(numKVOCallbacks, 2, @"did not get mock KVO notification");
+
+ [realObject removeObserver:self forKeyPath:@"methodInt" context:MyContext];
+ XCTAssertEqualObjects([realObject class], origClass, @"Classes different after stopKVO");
+ XCTAssertEqualObjects(object_getClass(realObject), ourSubclass, @"Classes different after stopKVO");
+
+ [mock stopMocking];
+ XCTAssertEqualObjects([realObject class], origClass, @"Classes different after stopMocking");
+ XCTAssertEqualObjects(object_getClass(realObject), origClass, @"Classes different after stopMocking");
+}
+
+/* Mocking a class which already has KVO observations does not work, but does not crash. */
+- (void)testPartialMockOnKVOObserved
+{
+ static char *MyContext;
+ TestClassThatCallsSelf *realObject = [[TestClassThatCallsSelf alloc] init];
+ Class origClass = [realObject class];
+
+ [realObject addObserver:self forKeyPath:@"methodInt" options:NSKeyValueObservingOptionNew context:MyContext];
+ Class kvoClass = object_getClass(realObject);
+
+ id mock = [OCMockObject partialMockForObject:realObject];
+ Class ourSubclass = object_getClass(realObject);
+
+ XCTAssertEqualObjects([realObject class], origClass, @"We did not preserve the original [self class]");
+ XCTAssertFalse(ourSubclass == kvoClass, @"KVO with subclass did not work");
+
+ /* Due to the way we replace the object's class, the KVO class gets overwritten and
+ KVO notifications stop functioning. If we did not do this, the presence of the mock
+ subclass would cause KVO to crash, at least without further tinkering. */
+ [realObject setMethodInt:45];
+// STAssertEquals(numKVOCallbacks, 1, @"did not get subclass KVO notification");
+ XCTAssertEqual(numKVOCallbacks, 0, @"got subclass KVO notification");
+ [mock setMethodInt:47];
+// STAssertEquals(numKVOCallbacks, 2, @"did not get mock KVO notification");
+ XCTAssertEqual(numKVOCallbacks, 0, @"got mock KVO notification");
+
+ [mock stopMocking];
+ XCTAssertEqualObjects([realObject class], origClass, @"Classes different after stopMocking");
+// STAssertEqualObjects(object_getClass(realObject), kvoClass, @"KVO class different after stopMocking");
+ XCTAssertEqualObjects(object_getClass(realObject), origClass, @"class different after stopMocking");
+
+ [realObject removeObserver:self forKeyPath:@"methodInt" context:MyContext];
+ XCTAssertEqualObjects([realObject class], origClass, @"Classes different after stopKVO");
+ XCTAssertEqualObjects(object_getClass(realObject), origClass, @"Classes different after stopKVO");
+}
+
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+ numKVOCallbacks++;
+}
+
+
+#pragma mark Tests for end of stubbing with partial mocks
+
+- (void)testReturnsToRealImplementationWhenExpectedCallOccurred
+{
+ TestClassWithSimpleMethod *realObject = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock expect] andReturn:@"TestFoo"] foo];
+ XCTAssertEqualObjects(@"TestFoo", [realObject foo], @"Should have stubbed method.");
+ XCTAssertEqualObjects(@"Foo", [realObject foo], @"Should have 'unstubbed' method.");
+}
+
+- (void)testRestoresObjectWhenStopped
+{
+ TestClassWithSimpleMethod *realObject = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturn:@"TestFoo"] foo];
+ XCTAssertEqualObjects(@"TestFoo", [realObject foo], @"Should have stubbed method.");
+ XCTAssertEqualObjects(@"TestFoo", [realObject foo], @"Should have stubbed method.");
+ [mock stopMocking];
+ XCTAssertEqualObjects(@"Foo", [realObject foo], @"Should have 'unstubbed' method.");
+}
+
+
+#pragma mark Tests for explicit forward to real object with partial mocks
+
+- (void)testForwardsToRealObjectWhenSetUpAndCalledOnMock
+{
+ TestClassWithSimpleMethod *realObject = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+
+ [[[mock expect] andForwardToRealObject] foo];
+ XCTAssertEqual(@"Foo", [mock foo], @"Should have called method on real object.");
+
+ [mock verify];
+}
+
+- (void)testForwardsToRealObjectWhenSetUpAndCalledOnRealObject
+{
+ TestClassWithSimpleMethod *realObject = [[TestClassWithSimpleMethod alloc] init];
+ id mock = [OCMockObject partialMockForObject:realObject];
+
+ [[[mock expect] andForwardToRealObject] foo];
+ XCTAssertEqual(@"Foo", [realObject foo], @"Should have called method on real object.");
+
+ [mock verify];
+}
+
+- (void)testReturnValueFromRealObjectShouldBeReturnedEvenWithPrecedingAndCall
+{
+ TestClassThatCallsSelf *object = [[TestClassThatCallsSelf alloc] init];
+ OCMockObject *mock = OCMPartialMock(object);
+ [[[[mock stub] andCall:@selector(firstReturnValueMethod) onObject:self] andForwardToRealObject] method2];
+ XCTAssertEqualObjects([object method2], @"Foo", @"Should have returned value from real object.");
+}
+
+- (NSString *)firstReturnValueMethod
+{
+ return @"Bar";
+}
+
+- (void)testExpectedMethodCallsExpectedMethodWithExpectationOrdering
+{
+ TestClassThatCallsSelf *object = [[TestClassThatCallsSelf alloc] init];
+ id mock = OCMPartialMock(object);
+ [mock setExpectationOrderMatters:YES];
+ [[[mock expect] andForwardToRealObject] method1];
+ [[[mock expect] andForwardToRealObject] method2];
+ XCTAssertNoThrow([object method1], @"Calling an expected method that internally calls another expected method should not make expectations appear to be out of order.");
+}
+
+
+#pragma mark Tests for method swizzling with partial mocks
+
+- (NSString *)differentMethodInDifferentClass
+{
+ return @"swizzled!";
+}
+
+- (void)testImplementsMethodSwizzling
+{
+ // using partial mocks and the indirect return value provider
+ TestClassThatCallsSelf *foo = [[TestClassThatCallsSelf alloc] init];
+ id mock = [OCMockObject partialMockForObject:foo];
+ [[[mock stub] andCall:@selector(differentMethodInDifferentClass) onObject:self] method1];
+ XCTAssertEqualObjects(@"swizzled!", [foo method1], @"Should have returned value from different method");
+}
+
+
+- (void)aMethodWithVoidReturn
+{
+}
+
+- (void)testMethodSwizzlingWorksForVoidReturns
+{
+ TestClassThatCallsSelf *foo = [[TestClassThatCallsSelf alloc] init];
+ id mock = [OCMockObject partialMockForObject:foo];
+ [[[mock stub] andCall:@selector(aMethodWithVoidReturn) onObject:self] methodVoid];
+ XCTAssertNoThrow([foo method1], @"Should have worked.");
+}
+
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectProtocolMocksTests.m b/Source/OCMockTests/OCMockObjectProtocolMocksTests.m
new file mode 100644
index 0000000..4c4a6db
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectProtocolMocksTests.m
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2013-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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+
+
+// --------------------------------------------------------------------------------------
+// Helper classes and protocols for testing
+// --------------------------------------------------------------------------------------
+
+@protocol TestProtocol
++ (NSString *)stringValueClassMethod;
+- (int)primitiveValue;
+@optional
+- (id)objectValue;
+@end
+
+@interface InterfaceForTypedef : NSObject {
+ int prop1;
+ NSObject *prop2;
+}
+@end
+
+@implementation InterfaceForTypedef
+@end
+
+typedef InterfaceForTypedef TypedefInterface;
+typedef InterfaceForTypedef* PointerTypedefInterface;
+
+@protocol ProtocolWithTypedefs
+- (TypedefInterface*)typedefReturnValue1;
+- (PointerTypedefInterface)typedefReturnValue2;
+- (void)typedefParameter:(TypedefInterface*)parameter;
+@end
+
+
+
+@interface OCMockObjectProtocolMocksTests : XCTestCase
+
+@end
+
+
+@implementation OCMockObjectProtocolMocksTests
+
+// --------------------------------------------------------------------------------------
+// Tests
+// --------------------------------------------------------------------------------------
+
+- (void)testCanMockFormalProtocol
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(NSLocking)];
+ [[mock expect] lock];
+
+ [mock lock];
+
+ [mock verify];
+}
+
+- (void)testSetsCorrectNameForProtocolMockObjects
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(NSLocking)];
+ XCTAssertEqualObjects(@"OCMockObject(NSLocking)", [mock description], @"Should have returned correct description.");
+}
+
+- (void)testRaisesWhenUnknownMethodIsCalledOnProtocol
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(NSLocking)];
+ XCTAssertThrows([mock lowercaseString], @"Should have raised an exception.");
+}
+
+- (void)testConformsToMockedProtocol
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(NSLocking)];
+ XCTAssertTrue([mock conformsToProtocol:@protocol(NSLocking)]);
+}
+
+- (void)testRespondsToValidProtocolRequiredSelector
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(TestProtocol)];
+ XCTAssertTrue([mock respondsToSelector:@selector(primitiveValue)]);
+}
+
+- (void)testRespondsToValidProtocolOptionalSelector
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(TestProtocol)];
+ XCTAssertTrue([mock respondsToSelector:@selector(objectValue)]);
+}
+
+- (void)testDoesNotRespondToInvalidProtocolSelector
+{
+ id mock = [OCMockObject mockForProtocol:@protocol(TestProtocol)];
+ XCTAssertFalse([mock respondsToSelector:@selector(testDoesNotRespondToInvalidProtocolSelector)]);
+}
+
+- (void)testWithTypedefReturnType {
+ id mock = [OCMockObject mockForProtocol:@protocol(ProtocolWithTypedefs)];
+ XCTAssertNoThrow([[[mock stub] andReturn:[TypedefInterface new]] typedefReturnValue1], @"Should accept a typedefed return-type");
+ XCTAssertNoThrow([mock typedefReturnValue1]);
+}
+
+- (void)testWithTypedefPointerReturnType {
+ id mock = [OCMockObject mockForProtocol:@protocol(ProtocolWithTypedefs)];
+ XCTAssertNoThrow([[[mock stub] andReturn:[TypedefInterface new]] typedefReturnValue2], @"Should accept a typedefed return-type");
+ XCTAssertNoThrow([mock typedefReturnValue2]);
+}
+
+- (void)testWithTypedefParameter {
+ id mock = [OCMockObject mockForProtocol:@protocol(ProtocolWithTypedefs)];
+ XCTAssertNoThrow([[mock stub] typedefParameter:nil], @"Should accept a typedefed parameter-type");
+ XCTAssertNoThrow([mock typedefParameter:nil]);
+}
+
+
+- (void)testReturnDefaultValueWhenUnknownMethodIsCalledOnNiceProtocolMock
+{
+ id mock = [OCMockObject niceMockForProtocol:@protocol(TestProtocol)];
+ XCTAssertTrue(0 == [mock primitiveValue], @"Should return 0 on unexpected method call (for nice mock).");
+ [mock verify];
+}
+
+- (void)testRaisesAnExceptionWenAnExpectedMethodIsNotCalledOnNiceProtocolMock
+{
+ id mock = [OCMockObject niceMockForProtocol:@protocol(TestProtocol)];
+ [[mock expect] primitiveValue];
+ XCTAssertThrows([mock verify], @"Should have raised an exception because method was not called.");
+}
+
+- (void)testProtocolClassMethod
+{
+ id mock = OCMProtocolMock(@protocol(TestProtocol));
+ OCMStub([mock stringValueClassMethod]).andReturn(@"stubbed");
+ id result = [mock stringValueClassMethod];
+ XCTAssertEqual(@"stubbed", result, @"Should have stubbed the class method.");
+}
+
+- (void)testRefusesToCreateProtocolMockForNilProtocol
+{
+ XCTAssertThrows(OCMProtocolMock(nil));
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectRuntimeTests.m b/Source/OCMockTests/OCMockObjectRuntimeTests.m
new file mode 100644
index 0000000..2227068
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectRuntimeTests.m
@@ -0,0 +1,218 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+
+
+#pragma mark Helper classes
+
+@interface TestClassWithTypeQualifierMethod : NSObject
+
+- (void)aSpecialMethod:(byref in void *)someArg;
+
+@end
+
+@implementation TestClassWithTypeQualifierMethod
+
+- (void)aSpecialMethod:(byref in __unused void *)someArg
+{
+}
+
+@end
+
+
+typedef NSString TypedefString;
+
+@interface TestClassWithTypedefObjectArgument : NSObject
+
+- (NSString *)stringForTypedef:(TypedefString *)string;
+
+@end
+
+@implementation TestClassWithTypedefObjectArgument
+
+- (NSString *)stringForTypedef:(TypedefString *)string
+{
+ return @"Whatever. Doesn't matter.";
+}
+@end
+
+
+@interface TestDelegate : NSObject
+
+- (void)go;
+
+@end
+
+@implementation TestDelegate
+
+- (void)go
+{
+}
+
+@end
+
+@interface TestClassWithDelegate : NSObject
+
+@property (nonatomic, weak) TestDelegate *delegate;
+
+@end
+
+@implementation TestClassWithDelegate
+
+- (void)run
+{
+ TestDelegate *delegate = self.delegate;
+ [delegate go];
+}
+
+@end
+
+
+
+#pragma mark Tests for interaction with runtime and foundation conventions
+
+@interface OCMockObjectRuntimeTests : XCTestCase
+
+@end
+
+@implementation OCMockObjectRuntimeTests
+
+- (void)testRespondsToValidSelector
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ XCTAssertTrue([mock respondsToSelector:@selector(lowercaseString)]);
+}
+
+
+- (void)testDoesNotRespondToInvalidSelector
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ // We use a selector that's not implemented by the mock
+ XCTAssertFalse([mock respondsToSelector:@selector(arrayWithArray:)]);
+}
+
+
+- (void)testCanStubValueForKeyMethod
+{
+ id mock = [OCMockObject mockForClass:[NSObject class]];
+ [[[mock stub] andReturn:@"SomeValue"] valueForKey:@"SomeKey"];
+
+ id returnValue = [mock valueForKey:@"SomeKey"];
+
+ XCTAssertEqualObjects(@"SomeValue", returnValue, @"Should have returned value that was set up.");
+}
+
+
+- (void)testForwardsIsKindOfClass
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ XCTAssertTrue([mock isKindOfClass:[NSString class]], @"Should have pretended to be the mocked class.");
+}
+
+
+- (void)testWorksWithTypeQualifiers
+{
+ id myMock = [OCMockObject mockForClass:[TestClassWithTypeQualifierMethod class]];
+
+ XCTAssertNoThrow([[myMock expect] aSpecialMethod:"foo"], @"Should not complain about method with type qualifiers.");
+ XCTAssertNoThrow([myMock aSpecialMethod:"foo"], @"Should not complain about method with type qualifiers.");
+}
+
+- (void)testWorksWithTypedefsToObjects
+{
+ id myMock = [OCMockObject mockForClass:[TestClassWithTypedefObjectArgument class]];
+ [[[myMock stub] andReturn:@"stubbed"] stringForTypedef:[OCMArg any]];
+ id actualReturn = [myMock stringForTypedef:@"Some arg that shouldn't matter"];
+ XCTAssertEqualObjects(actualReturn, @"stubbed", @"Should have matched invocation.");
+}
+
+
+#if 0 // can't test this with ARC
+- (void)testAdjustsRetainCountWhenStubbingMethodsThatCreateObjects
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ NSString *objectToReturn = [NSString stringWithFormat:@"This is not a %@.", @"string constant"];
+#pragma clang diagnostic push
+#pragma ide diagnostic ignored "NotReleasedValue"
+ [[[mock stub] andReturn:objectToReturn] mutableCopy];
+#pragma clang diagnostic pop
+
+ NSUInteger retainCountBefore = [objectToReturn retainCount];
+ id returnedObject = [mock mutableCopy];
+ [returnedObject release]; // the expectation is that we have to call release after a copy
+ NSUInteger retainCountAfter = [objectToReturn retainCount];
+
+ XCTAssertEqualObjects(objectToReturn, returnedObject, @"Should have stubbed copy method");
+ XCTAssertEqual(retainCountBefore, retainCountAfter, @"Should have incremented retain count in copy stub.");
+}
+#endif
+
+- (void)testComplainsWhenUnimplementedMethodIsCalled
+{
+ id mock = [OCMockObject mockForClass:[NSString class]];
+ XCTAssertThrowsSpecificNamed([mock performSelector:@selector(sortedArrayHint)], NSException, NSInvalidArgumentException);
+}
+
+
+- (void)testMockShouldNotRaiseWhenDescribing
+{
+ id mock = [OCMockObject mockForClass:[NSObject class]];
+
+ XCTAssertNoThrow(NSLog(@"Testing description handling dummy methods... %@ %@ %@ %@ %@",
+ @{@"foo": mock},
+ @[mock],
+ [NSSet setWithObject:mock],
+ [mock description],
+ mock),
+ @"asking for the description of a mock shouldn't cause a test to fail.");
+}
+
+
+- (void)testPartialMockShouldNotRaiseWhenDescribing
+{
+ id mock = [OCMockObject partialMockForObject:[[NSObject alloc] init]];
+
+ XCTAssertNoThrow(NSLog(@"Testing description handling dummy methods... %@ %@ %@ %@ %@",
+ @{@"bar": mock},
+ @[mock],
+ [NSSet setWithObject:mock],
+ [mock description],
+ mock),
+ @"asking for the description of a mock shouldn't cause a test to fail.");
+ [mock stopMocking];
+}
+
+
+- (void)testWeakReferencesShouldStayAround
+{
+ TestClassWithDelegate *object = [TestClassWithDelegate new];
+
+ TestDelegate *delegate = [TestDelegate new];
+ object.delegate = delegate;
+ XCTAssertNotNil(object.delegate, @"Should have delegate");
+
+ id mockDelegate = OCMPartialMock(delegate);
+ XCTAssertNotNil(object.delegate, @"Should still have delegate");
+
+ [object run];
+
+ OCMVerify([mockDelegate go]);
+ XCTAssertNotNil(object.delegate, @"Should still have delegate");
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockObjectTests.m b/Source/OCMockTests/OCMockObjectTests.m
new file mode 100644
index 0000000..1386c47
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectTests.m
@@ -0,0 +1,940 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+#import "OCMBoxedReturnValueProvider.h"
+
+// --------------------------------------------------------------------------------------
+// Helper classes and protocols for testing
+// --------------------------------------------------------------------------------------
+
+@interface OCMBoxedReturnValueProvider (Private)
+- (BOOL)isMethodReturnType:(const char *)returnType compatibleWithValueType:(const char *)valueType;
+@end
+
+@interface TestClassWithSelectorMethod : NSObject
+
+- (void)doWithSelector:(SEL)aSelector;
+
+@end
+
+@implementation TestClassWithSelectorMethod
+
+- (void)doWithSelector:(__unused SEL)aSelector
+{
+}
+
+@end
+
+
+@interface TestClassWithIntPointerMethod : NSObject
+
+- (void)returnValueInPointer:(int *)ptr;
+
+@end
+
+@implementation TestClassWithIntPointerMethod
+
+- (void)returnValueInPointer:(int *)ptr
+{
+ *ptr = 555;
+}
+
+@end
+
+@interface TestClassWithOpaquePointerMethod : NSObject
+typedef struct TestOpaque *OpaquePtr;
+
+- (OpaquePtr)opaquePtrValue;
+
+@end
+
+@implementation TestClassWithOpaquePointerMethod
+
+typedef struct TestOpaque {
+ int i;
+ int j;
+} TestOpaque;
+
+TestOpaque myOpaque;
+
+- (OpaquePtr)opaquePtrValue
+{
+ myOpaque.i = 3;
+ myOpaque.i = 4;
+ return &myOpaque;
+}
+
+@end
+
+@interface TestClassWithProperty : NSObject
+
+@property (nonatomic, retain) NSString *title;
+
+@end
+
+@implementation TestClassWithProperty
+
+@synthesize title;
+
+@end
+
+
+@interface NotificationRecorderForTesting : NSObject
+{
+ @public
+ NSNotification *notification;
+}
+
+@end
+
+@implementation NotificationRecorderForTesting
+
+- (void)dealloc
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+- (void)receiveNotification:(NSNotification *)aNotification
+{
+ notification = aNotification;
+}
+
+@end
+
+static NSString *TestNotification = @"TestNotification";
+
+
+@interface OCMockObjectTests : XCTestCase
+{
+ id mock;
+}
+
+@end
+
+
+// --------------------------------------------------------------------------------------
+// setup
+// --------------------------------------------------------------------------------------
+
+
+@implementation OCMockObjectTests
+
+- (void)setUp
+{
+ mock = [OCMockObject mockForClass:[NSString class]];
+}
+
+
+// --------------------------------------------------------------------------------------
+// accepting stubbed methods / rejecting methods not stubbed
+// --------------------------------------------------------------------------------------
+
+- (void)testAcceptsStubbedMethod
+{
+ [[mock stub] lowercaseString];
+ [mock lowercaseString];
+}
+
+- (void)testRaisesExceptionWhenUnknownMethodIsCalled
+{
+ [[mock stub] lowercaseString];
+ XCTAssertThrows([mock uppercaseString], @"Should have raised an exception.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithSpecificArgument
+{
+ [[mock stub] hasSuffix:@"foo"];
+ [mock hasSuffix:@"foo"];
+}
+
+
+- (void)testAcceptsStubbedMethodWithConstraint
+{
+ [[mock stub] hasSuffix:[OCMArg any]];
+ [mock hasSuffix:@"foo"];
+ [mock hasSuffix:@"bar"];
+}
+
+- (void)testAcceptsStubbedMethodWithBlockArgument
+{
+ mock = [OCMockObject mockForClass:[NSArray class]];
+ [[mock stub] indexesOfObjectsPassingTest:[OCMArg any]];
+ [mock indexesOfObjectsPassingTest:^(id obj, NSUInteger idx, BOOL *stop) { return YES; }];
+}
+
+
+- (void)testAcceptsStubbedMethodWithBlockConstraint
+{
+ [[mock stub] hasSuffix:[OCMArg checkWithBlock:^(id value) { return [value isEqualToString:@"foo"]; }]];
+
+ XCTAssertNoThrow([mock hasSuffix:@"foo"], @"Should not have thrown a exception");
+ XCTAssertThrows([mock hasSuffix:@"bar"], @"Should have thrown a exception");
+}
+
+
+- (void)testAcceptsStubbedMethodWithNilArgument
+{
+ [[mock stub] hasSuffix:nil];
+ [mock hasSuffix:nil];
+}
+
+- (void)testRaisesExceptionWhenMethodWithWrongArgumentIsCalled
+{
+ [[mock stub] hasSuffix:@"foo"];
+ XCTAssertThrows([mock hasSuffix:@"xyz"], @"Should have raised an exception.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithScalarArgument
+{
+ [[mock stub] stringByPaddingToLength:20 withString:@"foo" startingAtIndex:5];
+ [mock stringByPaddingToLength:20 withString:@"foo" startingAtIndex:5];
+}
+
+- (void)testRaisesExceptionWhenMethodWithOneWrongScalarArgumentIsCalled
+{
+ [[mock stub] stringByPaddingToLength:20 withString:@"foo" startingAtIndex:5];
+ XCTAssertThrows([mock stringByPaddingToLength:20 withString:@"foo" startingAtIndex:3], @"Should have raised an exception.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithSelectorArgument
+{
+ mock = [OCMockObject mockForClass:[TestClassWithSelectorMethod class]];
+ [[mock stub] doWithSelector:@selector(allKeys)];
+ [mock doWithSelector:@selector(allKeys)];
+}
+
+- (void)testRaisesExceptionWhenMethodWithWrongSelectorArgumentIsCalled
+{
+ mock = [OCMockObject mockForClass:[TestClassWithSelectorMethod class]];
+ [[mock stub] doWithSelector:@selector(allKeys)];
+ XCTAssertThrows([mock doWithSelector:@selector(allValues)]);
+}
+
+- (void)testAcceptsStubbedMethodWithAnySelectorArgument
+{
+ mock = [OCMockObject mockForClass:[TestClassWithSelectorMethod class]];
+ [[mock stub] doWithSelector:[OCMArg anySelector]];
+ [mock doWithSelector:@selector(allKeys)];
+}
+
+
+- (void)testAcceptsStubbedMethodWithPointerArgument
+{
+ NSError __autoreleasing *error;
+ [[[mock stub] andReturnValue:@YES] writeToFile:[OCMArg any] atomically:YES encoding:NSMacOSRomanStringEncoding error:&error];
+
+ XCTAssertTrue([mock writeToFile:@"foo" atomically:YES encoding:NSMacOSRomanStringEncoding error:&error]);
+}
+
+- (void)testRaisesExceptionWhenMethodWithWrongPointerArgumentIsCalled
+{
+ NSString *string;
+ NSString *anotherString;
+ NSArray *array;
+
+ [[mock stub] completePathIntoString:&string caseSensitive:YES matchesIntoArray:&array filterTypes:[OCMArg any]];
+
+ XCTAssertThrows([mock completePathIntoString:&anotherString caseSensitive:YES matchesIntoArray:&array filterTypes:[OCMArg any]]);
+}
+
+- (void)testAcceptsStubbedMethodWithAnyPointerArgument
+{
+ [[mock stub] getCharacters:[OCMArg anyPointer]];
+
+ unichar buffer[10];
+ XCTAssertNoThrow([mock getCharacters:buffer], @"Should have stubbed method.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithMatchingCharPointer
+{
+ char buffer[10] = "foo";
+ [[[mock stub] andReturnValue:@YES] getCString:buffer maxLength:10 encoding:NSASCIIStringEncoding];
+
+ BOOL result = [mock getCString:buffer maxLength:10 encoding:NSASCIIStringEncoding];
+
+ XCTAssertEqual(YES, result, @"Should have stubbed method.");
+}
+
+- (void)testAcceptsStubbedMethodWithAnyPointerArgumentForCharPointer
+{
+
+ [[[mock stub] andReturnValue:@YES] getCString:[OCMArg anyPointer] maxLength:10 encoding:NSASCIIStringEncoding];
+
+ char buffer[10] = "foo";
+ BOOL result = [mock getCString:buffer maxLength:10 encoding:NSASCIIStringEncoding];
+
+ XCTAssertEqual(YES, result, @"Should have stubbed method.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithAnyObjectRefArgument
+{
+ NSError *error;
+ [[[mock stub] andReturnValue:@YES] writeToFile:[OCMArg any] atomically:YES encoding:NSMacOSRomanStringEncoding error:[OCMArg anyObjectRef]];
+
+ XCTAssertTrue([mock writeToFile:@"foo" atomically:YES encoding:NSMacOSRomanStringEncoding error:&error]);
+}
+
+- (void)testAcceptsStubbedMethodWithVoidPointerArgument
+{
+ mock = [OCMockObject mockForClass:[NSMutableData class]];
+ [[mock stub] appendBytes:NULL length:0];
+ [mock appendBytes:NULL length:0];
+}
+
+
+- (void)testRaisesExceptionWhenMethodWithWrongVoidPointerArgumentIsCalled
+{
+ mock = [OCMockObject mockForClass:[NSMutableData class]];
+ [[mock stub] appendBytes:"foo" length:3];
+ XCTAssertThrows([mock appendBytes:"bar" length:3], @"Should have raised an exception.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithPointerPointerArgument
+{
+ NSError __autoreleasing *error = nil;
+ [[mock stub] writeToFile:@"foo.txt" atomically:NO encoding:NSASCIIStringEncoding error:&error];
+ [mock writeToFile:@"foo.txt" atomically:NO encoding:NSASCIIStringEncoding error:&error];
+}
+
+
+- (void)testRaisesExceptionWhenMethodWithWrongPointerPointerArgumentIsCalled
+{
+ NSError *error = nil, *error2;
+ [[mock stub] writeToFile:@"foo.txt" atomically:NO encoding:NSASCIIStringEncoding error:&error];
+ XCTAssertThrows([mock writeToFile:@"foo.txt" atomically:NO encoding:NSASCIIStringEncoding error:&error2], @"Should have raised.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithStructArgument
+{
+ NSRange range = NSMakeRange(0,20);
+ [[mock stub] substringWithRange:range];
+ [mock substringWithRange:range];
+}
+
+
+- (void)testRaisesExceptionWhenMethodWithWrongStructArgumentIsCalled
+{
+ NSRange range = NSMakeRange(0,20);
+ NSRange otherRange = NSMakeRange(0,10);
+ [[mock stub] substringWithRange:range];
+ XCTAssertThrows([mock substringWithRange:otherRange], @"Should have raised an exception.");
+}
+
+
+- (void)testCanPassMocksAsArguments
+{
+ id mockArg = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] stringByAppendingString:[OCMArg any]];
+ [mock stringByAppendingString:mockArg];
+}
+
+- (void)testCanStubWithMockArguments
+{
+ id mockArg = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] stringByAppendingString:mockArg];
+ [mock stringByAppendingString:mockArg];
+}
+
+- (void)testRaisesExceptionWhenStubbedMockArgIsNotUsed
+{
+ id mockArg = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] stringByAppendingString:mockArg];
+ XCTAssertThrows([mock stringByAppendingString:@"foo"], @"Should have raised an exception.");
+}
+
+- (void)testRaisesExceptionWhenDifferentMockArgumentIsPassed
+{
+ id expectedArg = [OCMockObject mockForClass:[NSString class]];
+ id otherArg = [OCMockObject mockForClass:[NSString class]];
+ [[mock stub] stringByAppendingString:otherArg];
+ XCTAssertThrows([mock stringByAppendingString:expectedArg], @"Should have raised an exception.");
+}
+
+
+- (void)testAcceptsStubbedMethodWithAnyNonObjectArgument
+{
+ [[[mock stub] ignoringNonObjectArgs] rangeOfString:@"foo" options:0];
+ [mock rangeOfString:@"foo" options:NSRegularExpressionSearch];
+}
+
+- (void)testRaisesExceptionWhenMethodWithMixedArgumentsIsCalledWithWrongObjectArgument
+{
+ [[[mock stub] ignoringNonObjectArgs] rangeOfString:@"foo" options:0];
+ XCTAssertThrows([mock rangeOfString:@"bar" options:NSRegularExpressionSearch], @"Should have raised an exception.");
+}
+
+
+// --------------------------------------------------------------------------------------
+// returning values from stubbed methods
+// --------------------------------------------------------------------------------------
+
+- (void)testReturnsStubbedReturnValue
+{
+ [[[mock stub] andReturn:@"megamock"] lowercaseString];
+ id returnValue = [mock lowercaseString];
+
+ XCTAssertEqualObjects(@"megamock", returnValue, @"Should have returned stubbed value.");
+}
+
+- (void)testReturnsStubbedIntReturnValue
+{
+ [[[mock stub] andReturnValue:@42] intValue];
+ int returnValue = [mock intValue];
+
+ XCTAssertEqual(42, returnValue, @"Should have returned stubbed value.");
+}
+
+- (void)testReturnsStubbedUnsignedLongReturnValue
+{
+ mock = [OCMockObject mockForClass:[NSNumber class]];
+ [[[mock expect] andReturnValue:@42LU] unsignedLongValue];
+ unsigned long returnValue = [mock unsignedLongValue];
+ XCTAssertEqual(returnValue, 42LU, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:@42] unsignedLongValue];
+ returnValue = [mock unsignedLongValue];
+ XCTAssertEqual(returnValue, 42LU, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:@42.0] unsignedLongValue];
+ returnValue = [mock unsignedLongValue];
+ XCTAssertEqual(returnValue, 42LU, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE((char)42)] unsignedLongValue];
+ returnValue = [mock unsignedLongValue];
+ XCTAssertEqual(returnValue, 42LU, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE((float)42)] unsignedLongValue];
+ returnValue = [mock unsignedLongValue];
+ XCTAssertEqual(returnValue, 42LU, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE((float)42.5)] unsignedLongValue];
+ XCTAssertThrows([mock unsignedLongValue], @"Should not be able to convert non-integer float to long");
+
+#if !__LP64__
+ [[[mock expect] andReturnValue:OCMOCK_VALUE((long long)LLONG_MAX)] unsignedLongValue];
+ XCTAssertThrows([mock unsignedLongValue], @"Should not be able to convert large long long to long");
+#endif
+}
+
+- (void)testReturnsStubbedBoolReturnValue
+{
+ [[[mock expect] andReturnValue:@YES] boolValue];
+ BOOL returnValue = [mock boolValue];
+ XCTAssertEqual(returnValue, YES, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE(YES)] boolValue];
+ returnValue = [mock boolValue];
+ XCTAssertEqual(returnValue, YES, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE(1)] boolValue];
+ returnValue = [mock boolValue];
+ XCTAssertEqual(returnValue, YES, @"Should have returned stubbed value.");
+
+ [[[mock expect] andReturnValue:OCMOCK_VALUE(300)] boolValue];
+ XCTAssertThrows([mock boolValue], @"Should not be able to convert large integer into BOOL");
+}
+
+- (void)testRaisesWhenBoxedValueTypesDoNotMatch
+{
+ [[[mock stub] andReturnValue:[NSValue valueWithRange:NSMakeRange(0, 0)]] intValue];
+
+ XCTAssertThrows([mock intValue], @"Should have raised an exception.");
+}
+
+- (void)testOpaqueStructComparison
+{
+ TestClassWithOpaquePointerMethod *obj = [TestClassWithOpaquePointerMethod new];
+ OpaquePtr val = [obj opaquePtrValue];
+ id mockVal = [OCMockObject partialMockForObject:obj];
+ [[[mockVal stub] andReturnValue:OCMOCK_VALUE(val)] opaquePtrValue];
+ OpaquePtr val2 = [obj opaquePtrValue];
+ XCTAssertEqual(val, val2);
+
+ // from https://github.com/erikdoe/ocmock/pull/97
+ const char *type1 =
+ "r^{GURL={basic_string<char, std::__1::char_traits<char>, std::__1::alloca"
+ "tor<char> >={__compressed_pair<std::__1::basic_string<char, std::__1::cha"
+ "r_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<c"
+ "har> >={__rep}}}B{Parsed={Component=ii}{Component=ii}{Component=ii}{Compo"
+ "nent=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}^{Parsed}"
+ "}{scoped_ptr<GURL, base::DefaultDeleter<GURL> >={scoped_ptr_impl<GURL, ba"
+ "se::DefaultDeleter<GURL> >={Data=^{GURL}}}}}";
+
+ const char *type2 =
+ "r^{GURL={basic_string<char, std::__1::char_traits<char>, std::__1::alloca"
+ "tor<char> >={__compressed_pair<std::__1::basic_string<char, std::__1::cha"
+ "r_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<c"
+ "har> >={__rep=(?={__long=II*}{__short=(?=Cc)[11c]}{__raw=[3L]})}}}B{Parse"
+ "d={Component=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}{"
+ "Component=ii}{Component=ii}{Component=ii}^{Parsed}}{scoped_ptr<GURL, base"
+ "::DefaultDeleter<GURL> >={scoped_ptr_impl<GURL, base::DefaultDeleter<GURL"
+ "> >={Data=^{GURL}}}}}";
+
+ const char *type3 =
+ "r^{GURL}";
+
+ OCMBoxedReturnValueProvider *boxed = [OCMBoxedReturnValueProvider new];
+ XCTAssertTrue([boxed isMethodReturnType:type1 compatibleWithValueType:type2]);
+ XCTAssertTrue([boxed isMethodReturnType:type1 compatibleWithValueType:type3]);
+ XCTAssertTrue([boxed isMethodReturnType:type2 compatibleWithValueType:type1]);
+ XCTAssertTrue([boxed isMethodReturnType:type2 compatibleWithValueType:type3]);
+ XCTAssertTrue([boxed isMethodReturnType:type3 compatibleWithValueType:type1]);
+ XCTAssertTrue([boxed isMethodReturnType:type3 compatibleWithValueType:type2]);
+}
+
+- (void)testReturnsStubbedNilReturnValue
+{
+ [[[mock stub] andReturn:nil] uppercaseString];
+
+ id returnValue = [mock uppercaseString];
+
+ XCTAssertNil(returnValue, @"Should have returned stubbed value, which is nil.");
+}
+
+- (void)testReturnsStubbedValueForProperty
+{
+ TestClassWithProperty *myMock = [OCMockObject mockForClass:[TestClassWithProperty class]];
+
+ [[[(id)myMock stub] andReturn:@"stubbed title"] title];
+
+ XCTAssertEqualObjects(@"stubbed title", myMock.title);
+}
+
+
+// --------------------------------------------------------------------------------------
+// beyond stubbing: raising exceptions, posting notifications, etc.
+// --------------------------------------------------------------------------------------
+
+- (void)testRaisesExceptionWhenAskedTo
+{
+ NSException *exception = [NSException exceptionWithName:@"TestException" reason:@"test" userInfo:nil];
+ [[[mock expect] andThrow:exception] lowercaseString];
+
+ XCTAssertThrows([mock lowercaseString], @"Should have raised an exception.");
+}
+
+- (void)testPostsNotificationWhenAskedTo
+{
+ NotificationRecorderForTesting *observer = [[NotificationRecorderForTesting alloc] init];
+ [[NSNotificationCenter defaultCenter] addObserver:observer selector:@selector(receiveNotification:) name:TestNotification object:nil];
+
+ NSNotification *notification = [NSNotification notificationWithName:TestNotification object:self];
+ [[[mock stub] andPost:notification] lowercaseString];
+
+ [mock lowercaseString];
+
+ XCTAssertNotNil(observer->notification, @"Should have sent a notification.");
+ XCTAssertEqualObjects(TestNotification, [observer->notification name], @"Name should match posted one.");
+ XCTAssertEqualObjects(self, [observer->notification object], @"Object should match posted one.");
+}
+
+- (void)testPostsNotificationInAdditionToReturningValue
+{
+ NotificationRecorderForTesting *observer = [[NotificationRecorderForTesting alloc] init];
+ [[NSNotificationCenter defaultCenter] addObserver:observer selector:@selector(receiveNotification:) name:TestNotification object:nil];
+
+ NSNotification *notification = [NSNotification notificationWithName:TestNotification object:self];
+ [[[[mock stub] andReturn:@"foo"] andPost:notification] lowercaseString];
+
+ XCTAssertEqualObjects(@"foo", [mock lowercaseString], @"Should have returned stubbed value.");
+ XCTAssertNotNil(observer->notification, @"Should have sent a notification.");
+}
+
+
+- (NSString *)valueForString:(NSString *)aString andMask:(NSStringCompareOptions)mask
+{
+ return [NSString stringWithFormat:@"[%@, %ld]", aString, (long)mask];
+}
+
+- (void)testCallsAlternativeMethodAndPassesOriginalArgumentsAndReturnsValue
+{
+ [[[mock stub] andCall:@selector(valueForString:andMask:) onObject:self] commonPrefixWithString:@"FOO" options:NSCaseInsensitiveSearch];
+
+ NSString *returnValue = [mock commonPrefixWithString:@"FOO" options:NSCaseInsensitiveSearch];
+
+ XCTAssertEqualObjects(@"[FOO, 1]", returnValue, @"Should have passed and returned invocation.");
+}
+
+
+- (void)testCallsBlockWhichCanSetUpReturnValue
+{
+ void (^theBlock)(NSInvocation *) = ^(NSInvocation *invocation)
+ {
+ NSString *value;
+ [invocation getArgument:&value atIndex:2];
+ value = [NSString stringWithFormat:@"MOCK %@", value];
+ [invocation setReturnValue:&value];
+ };
+
+ [[[mock stub] andDo:theBlock] stringByAppendingString:[OCMArg any]];
+
+ XCTAssertEqualObjects(@"MOCK foo", [mock stringByAppendingString:@"foo"], @"Should have called block.");
+ XCTAssertEqualObjects(@"MOCK bar", [mock stringByAppendingString:@"bar"], @"Should have called block.");
+}
+
+- (void)testHandlesNilPassedAsBlock
+{
+ [[[mock stub] andDo:nil] stringByAppendingString:[OCMArg any]];
+
+ XCTAssertNoThrow([mock stringByAppendingString:@"foo"], @"Should have done nothing.");
+ XCTAssertNil([mock stringByAppendingString:@"foo"], @"Should have returned default value.");
+}
+
+
+- (void)testThrowsWhenTryingToUseForwardToRealObjectOnNonPartialMock
+{
+ XCTAssertThrows([[[mock expect] andForwardToRealObject] name], @"Should have raised and exception.");
+}
+
+
+// --------------------------------------------------------------------------------------
+// returning values in pass-by-reference arguments
+// --------------------------------------------------------------------------------------
+
+- (void)testReturnsValuesInPassByReferenceArguments
+{
+ NSString *expectedName = @"Test";
+ NSArray *expectedArray = [NSArray array];
+
+ [[mock expect] completePathIntoString:[OCMArg setTo:expectedName] caseSensitive:YES
+ matchesIntoArray:[OCMArg setTo:expectedArray] filterTypes:[OCMArg any]];
+
+ NSString *actualName = nil;
+ NSArray *actualArray = nil;
+ [mock completePathIntoString:&actualName caseSensitive:YES matchesIntoArray:&actualArray filterTypes:nil];
+
+ XCTAssertNoThrow([mock verify], @"An unexpected exception was thrown");
+ XCTAssertEqualObjects(expectedName, actualName, @"The two string objects should be equal");
+ XCTAssertEqualObjects(expectedArray, actualArray, @"The two array objects should be equal");
+}
+
+
+- (void)testReturnsValuesInNonObjectPassByReferenceArguments
+{
+ mock = [OCMockObject mockForClass:[TestClassWithIntPointerMethod class]];
+ [[mock stub] returnValueInPointer:[OCMArg setToValue:@1234]];
+
+ int actualValue = 0;
+ [mock returnValueInPointer:&actualValue];
+
+ XCTAssertEqual(1234, actualValue, @"Should have returned value via pass by ref argument.");
+
+}
+
+
+// --------------------------------------------------------------------------------------
+// accepting expected methods
+// --------------------------------------------------------------------------------------
+
+- (void)testAcceptsExpectedMethod
+{
+ [[mock expect] lowercaseString];
+ [mock lowercaseString];
+}
+
+
+- (void)testAcceptsExpectedMethodAndReturnsValue
+{
+ [[[mock expect] andReturn:@"Objective-C"] lowercaseString];
+ id returnValue = [mock lowercaseString];
+
+ XCTAssertEqualObjects(@"Objective-C", returnValue, @"Should have returned stubbed value.");
+}
+
+
+- (void)testAcceptsExpectedMethodsInRecordedSequence
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ [mock lowercaseString];
+ [mock uppercaseString];
+}
+
+
+- (void)testAcceptsExpectedMethodsInDifferentSequence
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ [mock uppercaseString];
+ [mock lowercaseString];
+}
+
+
+// --------------------------------------------------------------------------------------
+// verifying expected methods
+// --------------------------------------------------------------------------------------
+
+- (void)testAcceptsAndVerifiesExpectedMethods
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ [mock lowercaseString];
+ [mock uppercaseString];
+
+ [mock verify];
+}
+
+
+- (void)testRaisesExceptionOnVerifyWhenNotAllExpectedMethodsWereCalled
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ [mock lowercaseString];
+
+ XCTAssertThrows([mock verify], @"Should have raised an exception.");
+}
+
+- (void)testAcceptsAndVerifiesTwoExpectedInvocationsOfSameMethod
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] lowercaseString];
+
+ [mock lowercaseString];
+ [mock lowercaseString];
+
+ [mock verify];
+}
+
+
+- (void)testAcceptsAndVerifiesTwoExpectedInvocationsOfSameMethodAndReturnsCorrespondingValues
+{
+ [[[mock expect] andReturn:@"foo"] lowercaseString];
+ [[[mock expect] andReturn:@"bar"] lowercaseString];
+
+ XCTAssertEqualObjects(@"foo", [mock lowercaseString], @"Should have returned first stubbed value");
+ XCTAssertEqualObjects(@"bar", [mock lowercaseString], @"Should have returned seconds stubbed value");
+
+ [mock verify];
+}
+
+- (void)testReturnsStubbedValuesIndependentOfExpectations
+{
+ [[mock stub] hasSuffix:@"foo"];
+ [[mock expect] hasSuffix:@"bar"];
+
+ [mock hasSuffix:@"foo"];
+ [mock hasSuffix:@"bar"];
+ [mock hasSuffix:@"foo"]; // Since it's a stub, shouldn't matter how many times we call this
+
+ [mock verify];
+}
+
+-(void)testAcceptsAndVerifiesMethodsWithSelectorArgument
+{
+ [[mock expect] performSelector:@selector(lowercaseString)];
+ [mock performSelector:@selector(lowercaseString)];
+ [mock verify];
+}
+
+
+// --------------------------------------------------------------------------------------
+// verify with delay
+// --------------------------------------------------------------------------------------
+
+- (void)testAcceptsAndVerifiesExpectedMethodsWithDelay
+{
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ [mock lowercaseString];
+ [mock uppercaseString];
+
+ [mock verifyWithDelay:1];
+}
+
+- (void)testAcceptsAndVerifiesExpectedMethodsWithDelayBlock
+{
+ dispatch_async(dispatch_queue_create("mockqueue", nil), ^{
+ [NSThread sleepForTimeInterval:0.1];
+ [mock lowercaseString];
+ });
+
+ [[mock expect] lowercaseString];
+ [mock verifyWithDelay:1];
+}
+
+- (void)testFailsVerifyExpectedMethodsWithoutDelay
+{
+ dispatch_async(dispatch_queue_create("mockqueue", nil), ^{
+ [NSThread sleepForTimeInterval:0.1];
+ [mock lowercaseString];
+ });
+
+ [[mock expect] lowercaseString];
+ XCTAssertThrows([mock verify], @"Should have raised an exception because method was not called in time.");
+}
+
+- (void)testFailsVerifyExpectedMethodsWithDelay
+{
+ [[mock expect] lowercaseString];
+ XCTAssertThrows([mock verifyWithDelay:0.1], @"Should have raised an exception because method was not called.");
+}
+
+- (void)testAcceptsAndVerifiesExpectedMethodsWithDelayBlockTimeout
+{
+ dispatch_async(dispatch_queue_create("mockqueue", nil), ^{
+ [NSThread sleepForTimeInterval:1];
+ [mock lowercaseString];
+ });
+
+ [[mock expect] lowercaseString];
+ XCTAssertThrows([mock verifyWithDelay:0.1], @"Should have raised an exception because method was not called.");
+}
+
+// --------------------------------------------------------------------------------------
+// ordered expectations
+// --------------------------------------------------------------------------------------
+
+- (void)testAcceptsExpectedMethodsInRecordedSequenceWhenOrderMatters
+{
+ [mock setExpectationOrderMatters:YES];
+
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ XCTAssertNoThrow([mock lowercaseString], @"Should have accepted expected method in sequence.");
+ XCTAssertNoThrow([mock uppercaseString], @"Should have accepted expected method in sequence.");
+}
+
+- (void)testRaisesExceptionWhenSequenceIsWrongAndOrderMatters
+{
+ [mock setExpectationOrderMatters:YES];
+
+ [[mock expect] lowercaseString];
+ [[mock expect] uppercaseString];
+
+ XCTAssertThrows([mock uppercaseString], @"Should have complained about wrong sequence.");
+}
+
+- (void)testRejectThenExpectWithExpectationOrdering
+{
+ [mock setExpectationOrderMatters:YES];
+ [[mock reject] lowercaseString];
+ [[mock expect] uppercaseString];
+ XCTAssertNoThrow([mock uppercaseString], @"Since lowercaseString should be rejected, we shouldn't expect it to be called before uppercaseString.");
+}
+
+
+
+// --------------------------------------------------------------------------------------
+// nice mocks don't complain about unknown methods, unless told to
+// --------------------------------------------------------------------------------------
+
+- (void)testReturnsDefaultValueWhenUnknownMethodIsCalledOnNiceClassMock
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+ XCTAssertNil([mock lowercaseString], @"Should return nil on unexpected method call (for nice mock).");
+ [mock verify];
+}
+
+- (void)testRaisesAnExceptionWhenAnExpectedMethodIsNotCalledOnNiceClassMock
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+ [[[mock expect] andReturn:@"HELLO!"] uppercaseString];
+ XCTAssertThrows([mock verify], @"Should have raised an exception because method was not called.");
+}
+
+- (void)testThrowsWhenRejectedMethodIsCalledOnNiceMock
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+
+ [[mock reject] uppercaseString];
+ XCTAssertThrows([mock uppercaseString], @"Should have complained about rejected method being called.");
+}
+
+- (void)testUncalledRejectStubDoesNotCountAsExpectation
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+
+ [[mock expect] lowercaseString];
+ [[mock reject] uppercaseString];
+ [mock lowercaseString];
+
+ XCTAssertNoThrow([mock verify], @"Should not have any unmet expectations.");
+
+}
+
+
+// --------------------------------------------------------------------------------------
+// some internal tests
+// --------------------------------------------------------------------------------------
+
+- (void)testReRaisesFailFastExceptionsOnVerify
+{
+ @try
+ {
+ [mock lowercaseString];
+ }
+ @catch(NSException *exception)
+ {
+ // expected
+ }
+ XCTAssertThrows([mock verify], @"Should have reraised the exception.");
+}
+
+- (void)testReRaisesRejectExceptionsOnVerify
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+ [[mock reject] uppercaseString];
+ @try
+ {
+ [mock uppercaseString];
+ }
+ @catch(NSException *exception)
+ {
+ // expected
+ }
+ XCTAssertThrows([mock verify], @"Should have reraised the exception.");
+}
+
+
+- (void)testCanCreateExpectationsAfterInvocations
+{
+ [[mock expect] lowercaseString];
+ [mock lowercaseString];
+ [mock expect];
+}
+
+
+- (void)testArgumentConstraintsAreOnlyCalledAsOftenAsTheMethodIsCalled
+{
+ __block int count = 0;
+
+ [[mock stub] hasSuffix:[OCMArg checkWithBlock:^(id value) { count++; return YES; }]];
+
+ [mock hasSuffix:@"foo"];
+ [mock hasSuffix:@"bar"];
+
+ XCTAssertEqual(2, count, @"Should have evaluated constraint only twice");
+}
+
+
+@end
+
+
diff --git a/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m b/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m
new file mode 100644
index 0000000..79e4911
--- /dev/null
+++ b/Source/OCMockTests/OCMockObjectVerifyAfterRunTests.m
@@ -0,0 +1,120 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import "OCMockObject.h"
+#import "OCMStubRecorder.h"
+
+@interface TestBaseClassForVerifyAfterRun : NSObject
+
++ (NSString *)classMethod1;
+- (NSString *)method2;
+
+@end
+
+@implementation TestBaseClassForVerifyAfterRun
+
++ (NSString *)classMethod1
+{
+ return @"Foo-ClassMethod";
+}
+
+- (NSString *)method2
+{
+ return @"Foo";
+}
+
+@end
+
+@interface TestClassForVerifyAfterRun : TestBaseClassForVerifyAfterRun
+
+- (NSString *)method1;
+
+@end
+
+@implementation TestClassForVerifyAfterRun
+
+- (NSString *)method1
+{
+ id retVal = [self method2];
+ return retVal;
+}
+
+@end
+
+@interface OCMockObjectVerifyAfterRunTests : XCTestCase
+
+@end
+
+
+@implementation OCMockObjectVerifyAfterRunTests
+
+- (void)testDoesNotThrowWhenMethodWasInvoked
+{
+ id mock = [OCMockObject niceMockForClass:[NSString class]];
+
+ [mock lowercaseString];
+
+ XCTAssertNoThrow([[mock verify] lowercaseString], @"Should not have thrown an exception for method that was called.");
+}
+
+- (void)testThrowsWhenMethodWasNotInvoked
+{
+ id mock = [OCMockObject niceMockForClass:[NSString class]];
+
+ [mock lowercaseString];
+
+ XCTAssertThrows([[mock verify] uppercaseString], @"Should have thrown an exception for a method that was not called.");
+}
+
+- (void)testDoesNotThrowWhenMethodWasInvokedOnPartialMock
+{
+ TestClassForVerifyAfterRun *testObject = [[TestClassForVerifyAfterRun alloc] init];
+ id mock = [OCMockObject partialMockForObject:testObject];
+
+ [mock method2];
+
+ XCTAssertNoThrow([[mock verify] method2], @"Should not have thrown an exception for method that was called.");
+}
+
+- (void)testDoesNotThrowWhenMethodWasInvokedOnRealObjectEvenInSuperclass
+{
+ TestClassForVerifyAfterRun *testObject = [[TestClassForVerifyAfterRun alloc] init];
+ id mock = [OCMockObject partialMockForObject:testObject];
+
+ NSString *string = [testObject method1];
+
+ XCTAssertEqualObjects(@"Foo", string, @"Should have returned value from actual implementation.");
+ XCTAssertNoThrow([[mock verify] method2], @"Should not have thrown an exception for method that was called.");
+}
+
+- (void)testDoesNotThrowWhenClassMethodWasInvoked
+{
+ id mock = [OCMockObject niceMockForClass:[TestBaseClassForVerifyAfterRun class]];
+
+ [TestBaseClassForVerifyAfterRun classMethod1];
+
+ XCTAssertNoThrow([[mock verify] classMethod1], @"Should not have thrown an exception for class method that was called.");
+}
+
+- (void)testThrowsWhenClassMethodWasNotInvoked
+{
+ id mock = [OCMockObject niceMockForClass:[TestBaseClassForVerifyAfterRun class]];
+
+ XCTAssertThrows([[mock verify] classMethod1], @"Should not have thrown an exception for class method that was called.");
+}
+
+@end
diff --git a/Source/OCMockTests/OCMockTests-Info.plist b/Source/OCMockTests/OCMockTests-Info.plist
new file mode 100644
index 0000000..a409125
--- /dev/null
+++ b/Source/OCMockTests/OCMockTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Source/OCMockTests/OCMockTests-Prefix.pch b/Source/OCMockTests/OCMockTests-Prefix.pch
new file mode 100644
index 0000000..35d7640
--- /dev/null
+++ b/Source/OCMockTests/OCMockTests-Prefix.pch
@@ -0,0 +1,9 @@
+//
+// Prefix header
+//
+// The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
diff --git a/Source/OCMockTests/OCObserverMockObjectTests.m b/Source/OCMockTests/OCObserverMockObjectTests.m
new file mode 100644
index 0000000..48f9ddd
--- /dev/null
+++ b/Source/OCMockTests/OCObserverMockObjectTests.m
@@ -0,0 +1,159 @@
+/*
+ * 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 <XCTest/XCTest.h>
+#import <OCMock/OCMock.h>
+
+static NSString *TestNotificationOne = @"TestNotificationOne";
+
+
+@interface OCObserverMockObjectTest : XCTestCase
+{
+ NSNotificationCenter *center;
+ id mock;
+}
+
+@end
+
+
+@implementation OCObserverMockObjectTest
+
+- (void)setUp
+{
+ center = [[NSNotificationCenter alloc] init];
+ mock = [OCMockObject observerMock];
+}
+
+- (void)testAcceptsExpectedNotification
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+
+ [center postNotificationName:TestNotificationOne object:self];
+
+ [mock verify];
+}
+
+- (void)testAcceptsExpectedNotificationWithSpecifiedObjectAndUserInfo
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ NSDictionary *info = @{@"key": @"foo"};
+ [[mock expect] notificationWithName:TestNotificationOne object:self userInfo:info];
+
+ [center postNotificationName:TestNotificationOne object:self userInfo:info];
+
+ [mock verify];
+}
+
+- (void)testAcceptsNotificationsInAnyOrder
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+
+ [center postNotificationName:TestNotificationOne object:[NSString string]];
+ [center postNotificationName:TestNotificationOne object:self];
+}
+
+- (void)testAcceptsNotificationsInCorrectOrderWhenOrderMatters
+{
+ [mock setExpectationOrderMatters:YES];
+
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+
+ [center postNotificationName:TestNotificationOne object:self];
+ [center postNotificationName:TestNotificationOne object:[NSString string]];
+}
+
+- (void)testRaisesExceptionWhenSequenceIsWrongAndOrderMatters
+{
+ [mock setExpectationOrderMatters:YES];
+
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+
+ XCTAssertThrows([center postNotificationName:TestNotificationOne object:[NSString string]], @"Should have complained about sequence.");
+}
+
+- (void)testRaisesEvenThoughOverlappingExpectationsCouldHaveBeenSatisfied
+{
+ // this test demonstrates a shortcoming, not a feature
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+
+ [center postNotificationName:TestNotificationOne object:self];
+ XCTAssertThrows([center postNotificationName:TestNotificationOne object:[NSString string]]);
+}
+
+- (void)testRaisesExceptionWhenUnexpectedNotificationIsReceived
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+
+ XCTAssertThrows([center postNotificationName:TestNotificationOne object:self]);
+}
+
+- (void)testRaisesWhenNotificationWithWrongObjectIsReceived
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+
+ XCTAssertThrows([center postNotificationName:TestNotificationOne object:[NSString string]]);
+}
+
+- (void)testRaisesWhenNotificationWithWrongUserInfoIsReceived
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:self
+ userInfo:@{@"key": @"foo"}];
+ XCTAssertThrows([center postNotificationName:TestNotificationOne object:[NSString string]
+ userInfo:@{@"key": @"bar"}]);
+}
+
+- (void)testRaisesOnVerifyWhenExpectedNotificationIsNotSent
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+
+ XCTAssertThrows([mock verify]);
+}
+
+- (void)testRaisesOnVerifyWhenNotAllNotificationsWereSent
+{
+ [center addMockObserver:mock name:TestNotificationOne object:nil];
+ [[mock expect] notificationWithName:TestNotificationOne object:[OCMArg any]];
+ [[mock expect] notificationWithName:TestNotificationOne object:self];
+
+ [center postNotificationName:TestNotificationOne object:self];
+ XCTAssertThrows([mock verify]);
+}
+
+- (void)testChecksNotificationNamesCorrectly
+{
+ NSString *notificationName = @"MyNotification";
+
+ [center addMockObserver:mock name:notificationName object:nil];
+ [[mock expect] notificationWithName:[notificationName mutableCopy] object:[OCMArg any]];
+
+ [center postNotificationName:notificationName object:self];
+
+ [mock verify];
+}
+
+@end
diff --git a/Source/OCMockTests/en.lproj/InfoPlist.strings b/Source/OCMockTests/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/Source/OCMockTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/Tools/build.rb b/Tools/build.rb
new file mode 100755
index 0000000..627bcfa
--- /dev/null
+++ b/Tools/build.rb
@@ -0,0 +1,167 @@
+#!/usr/bin/env ruby
+
+class Builder
+
+ def initialize
+ @env = Environment.new()
+ @worker = CompositeWorker.new([Logger.new(), Executer.new()])
+ end
+
+ def makeRelease
+ createWorkingDirectories
+ downloadSource
+ copySource
+ buildModules
+ createPackage "ocmock-3.1.3.dmg", "OCMock 3.1.3"
+ openPackageDir
+ end
+
+ def justBuild
+ createWorkingDirectories
+ downloadSource
+ buildModules
+ openPackageDir
+ end
+
+ def createWorkingDirectories
+ @worker.run("mkdir -p #{@env.sourcedir}")
+ @worker.run("mkdir -p #{@env.productdir}")
+ @worker.run("mkdir -p #{@env.packagedir}")
+ end
+
+ def downloadSource
+ @worker.run("git archive master | tar -x -v -C #{@env.sourcedir}")
+ end
+
+ def copySource
+ @worker.run("cp -R #{@env.sourcedir}/Source #{@env.productdir}")
+ end
+
+ def buildModules
+ @worker.chdir("#{@env.sourcedir}/Source")
+ @worker.run("xcodebuild -project OCMock.xcodeproj -target OCMock OBJROOT=#{@env.objroot} SYMROOT=#{@env.symroot}")
+ osxproductdir = "#{@env.productdir}/OSX"
+ @worker.run("mkdir -p #{osxproductdir}")
+ @worker.run("cp -R #{@env.symroot}/Release/OCMock.framework #{osxproductdir}")
+ @worker.run("xcodebuild -project OCMock.xcodeproj -target OCMockLib -sdk iphoneos8.2 OBJROOT=#{@env.objroot} SYMROOT=#{@env.symroot}")
+ @worker.run("xcodebuild -project OCMock.xcodeproj -target OCMockLib -sdk iphonesimulator8.2 OBJROOT=#{@env.objroot} SYMROOT=#{@env.symroot}")
+ @worker.run("lipo -create -output #{@env.symroot}/Release/libOCMock.a #{@env.symroot}/Release-*/libOCMock.a")
+ iosproductdir = "#{@env.productdir}/iOS"
+ @worker.run("mkdir -p #{iosproductdir}")
+ @worker.run("cp -R #{@env.symroot}/Release/libOCMock.a #{iosproductdir}")
+ @worker.run("cp -R #{@env.symroot}/Release-iphoneos/OCMock #{iosproductdir}")
+ end
+
+ def createPackage(packagename, volumename)
+ @worker.chdir(@env.packagedir)
+ @worker.run("hdiutil create -size 4m temp.dmg -layout NONE")
+ disk_id = nil
+ @worker.run("hdid -nomount temp.dmg") { |hdid| disk_id = hdid.readline.split[0] }
+ @worker.run("newfs_hfs -v '#{volumename}' #{disk_id}")
+ @worker.run("hdiutil eject #{disk_id}")
+ @worker.run("hdid temp.dmg") { |hdid| disk_id = hdid.readline.split[0] }
+ @worker.run("cp -R #{@env.productdir}/* '/Volumes/#{volumename}'")
+ @worker.run("hdiutil eject #{disk_id}")
+ @worker.run("hdiutil convert -format UDZO temp.dmg -o #{@env.packagedir}/#{packagename} -imagekey zlib-level=9")
+ @worker.run("hdiutil internet-enable -yes #{@env.packagedir}/#{packagename}")
+ @worker.run("rm temp.dmg")
+ end
+
+ def openPackageDir
+ @worker.run("open #{@env.packagedir}")
+ end
+
+ def upload(packagename, dest)
+ @worker.run("scp #{@env.packagedir}/#{packagename} #{dest}")
+ end
+
+ def cleanup
+ @worker.run("chmod -R u+w #{@env.tmpdir}")
+ @worker.run("rm -rf #{@env.tmpdir}");
+ end
+
+end
+
+
+## Environment
+## use attributes to configure manager for your environment
+
+class Environment
+ def initialize()
+ @tmpdir = "/tmp/ocmock.#{Process.pid}"
+ @sourcedir = tmpdir + "/Source"
+ @productdir = tmpdir + "/Products"
+ @packagedir = tmpdir
+ @objroot = tmpdir + '/Build/Intermediates'
+ @symroot = tmpdir + '/Build'
+ end
+
+ attr_accessor :tmpdir, :sourcedir, :productdir, :packagedir, :objroot, :symroot
+end
+
+
+## Logger (Worker)
+## prints commands
+
+class Logger
+ def chdir(dir)
+ puts "## chdir #{dir}"
+ end
+
+ def run(cmd)
+ puts "## #{cmd}"
+ end
+end
+
+
+## Executer (Worker)
+## actually runs commands
+
+class Executer
+ def chdir(dir)
+ Dir.chdir(dir)
+ end
+
+ def run(cmd, &block)
+ if block == nil
+ system(cmd)
+ else
+ IO.popen(cmd, &block)
+ end
+ end
+end
+
+
+## Composite Worker (Worker)
+## sends commands to multiple workers
+
+class CompositeWorker
+ def initialize(workers)
+ @workers = workers
+ end
+
+ def chdir(dir)
+ @workers.each { |w| w.chdir(dir) }
+ end
+
+ def run(cmd)
+ @workers.each { |w| w.run(cmd) }
+ end
+
+ def run(cmd, &block)
+ @workers.each { |w| w.run(cmd, &block) }
+ end
+end
+
+
+if /Tools$/.match(Dir.pwd)
+ Dir.chdir("..")
+end
+
+if ARGV[0] == '-r'
+ Builder.new.makeRelease
+else
+ Builder.new.justBuild
+end
+
+
diff --git a/Tools/updatebanner.rb b/Tools/updatebanner.rb
new file mode 100755
index 0000000..f8ebe4a
--- /dev/null
+++ b/Tools/updatebanner.rb
@@ -0,0 +1,66 @@
+#!/usr/bin/env ruby
+
+def update_directory(directory)
+ Dir.entries(directory).each do | file |
+ path = "#{directory}/#{file}"
+ if File.directory?(path)
+ update_directory(path) unless (file =~ /^[.]+$/)
+ else
+ update_file(path) if file =~ /\.(h|m|mm)$/
+ end
+ end
+end
+
+def update_file(filename)
+ tmpname = "#{filename}.orig"
+ `mv #{filename} #{tmpname}`
+ infile = File.open("#{tmpname}", "r")
+ outfile = File.open("#{filename}", "w")
+ replace_banner(infile, outfile)
+ `rm #{tmpname}`
+end
+
+def replace_banner(infile, outfile)
+ in_banner = true
+ year = nil
+ infile.each_line do | line |
+ if in_banner
+ copyright_match = /Copyright \(c\) ([0-9]{4})/.match(line)
+ if copyright_match
+ year = copyright_match[1]
+ end
+ if !(line =~ /^\/\//) && !(line =~ /^[\/ ]\*/)
+ write_banner(outfile, year)
+ in_banner = false
+ end
+ end
+ if !in_banner
+ outfile.puts line
+ end
+ end
+end
+
+def write_banner(outfile, year)
+ banner = <<-EOS
+/*
+ * Copyright (c) %YEARS% 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.
+ */
+ EOS
+ years = (year != "2015") ? "#{year}-2015" : year
+ banner.gsub!(/%YEARS%/, years)
+ outfile.write(banner)
+end
+
+update_directory(ARGV[0])