aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrx777 <david.rekowski@gmx.de>2010-05-03 19:18:20 +0000
committerdrx777 <david.rekowski@gmx.de>2010-05-03 19:18:20 +0000
commit2c5d2d7c475c15b5c5a80fc928ae4c3061e5d214 (patch)
tree2674f6aadb7451ca5cdf3a93e2b9134e4c8797e0
parent526230dfeadf7aed85e3b05bbb7f0cea0829f6f6 (diff)
downloadsequelpro-2c5d2d7c475c15b5c5a80fc928ae4c3061e5d214.tar.gz
sequelpro-2c5d2d7c475c15b5c5a80fc928ae4c3061e5d214.tar.bz2
sequelpro-2c5d2d7c475c15b5c5a80fc928ae4c3061e5d214.zip
- Added OCMock.framework for unittests using mock objects
l---------Frameworks/OCMock.framework/Headers1
l---------Frameworks/OCMock.framework/OCMock1
l---------Frameworks/OCMock.framework/Resources1
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h15
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h30
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h48
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h10
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h41
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h28
-rwxr-xr-xFrameworks/OCMock.framework/Versions/A/OCMockbin0 -> 291796 bytes
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Resources/Info.plist26
-rw-r--r--Frameworks/OCMock.framework/Versions/A/Resources/License.txt15
l---------Frameworks/OCMock.framework/Versions/Current1
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj11
14 files changed, 224 insertions, 4 deletions
diff --git a/Frameworks/OCMock.framework/Headers b/Frameworks/OCMock.framework/Headers
new file mode 120000
index 00000000..a177d2a6
--- /dev/null
+++ b/Frameworks/OCMock.framework/Headers
@@ -0,0 +1 @@
+Versions/Current/Headers \ No newline at end of file
diff --git a/Frameworks/OCMock.framework/OCMock b/Frameworks/OCMock.framework/OCMock
new file mode 120000
index 00000000..c388ea8d
--- /dev/null
+++ b/Frameworks/OCMock.framework/OCMock
@@ -0,0 +1 @@
+Versions/Current/OCMock \ No newline at end of file
diff --git a/Frameworks/OCMock.framework/Resources b/Frameworks/OCMock.framework/Resources
new file mode 120000
index 00000000..953ee36f
--- /dev/null
+++ b/Frameworks/OCMock.framework/Resources
@@ -0,0 +1 @@
+Versions/Current/Resources \ No newline at end of file
diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h b/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h
new file mode 100644
index 00000000..ae2e37d0
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h
@@ -0,0 +1,15 @@
+//---------------------------------------------------------------------------------------
+// $Id: NSNotificationCenter+OCMAdditions.h$
+// 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/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h
new file mode 100644
index 00000000..a775f39f
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h
@@ -0,0 +1,30 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2009 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;
+
+// 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/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h
new file mode 100644
index 00000000..0bab7775
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h
@@ -0,0 +1,48 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2007-2009 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
+
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
++ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue;
+
+// try to use [OCMArg checkWith...] instead of constraintWithSelector in here
+
+@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
+
+#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
+#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h
new file mode 100644
index 00000000..e18de58a
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/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/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h
new file mode 100644
index 00000000..87e7b82e
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h
@@ -0,0 +1,41 @@
+//---------------------------------------------------------------------------------------
+// $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 *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/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h b/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h
new file mode 100644
index 00000000..7463a3f4
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h
@@ -0,0 +1,28 @@
+//---------------------------------------------------------------------------------------
+// $Id$
+// Copyright (c) 2004-2009 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;
+
+- (NSArray *)invocationHandlers;
+
+@end
diff --git a/Frameworks/OCMock.framework/Versions/A/OCMock b/Frameworks/OCMock.framework/Versions/A/OCMock
new file mode 100755
index 00000000..303e9337
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/OCMock
Binary files differ
diff --git a/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist b/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist
new file mode 100644
index 00000000..4634d14c
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Resources/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>English</string>
+ <key>CFBundleExecutable</key>
+ <string>OCMock</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mulle-kybernetik.OCMock</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>OCMock</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.29</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2004-2009 Mulle Kybernetik.</string>
+</dict>
+</plist>
diff --git a/Frameworks/OCMock.framework/Versions/A/Resources/License.txt b/Frameworks/OCMock.framework/Versions/A/Resources/License.txt
new file mode 100644
index 00000000..e2c13960
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/A/Resources/License.txt
@@ -0,0 +1,15 @@
+
+ Copyright (c) 2004-2009 by Mulle Kybernetik. All rights reserved.
+
+ Permission to use, copy, modify and distribute this software and its documentation
+ is hereby granted, provided that both the copyright notice and this permission
+ notice appear in all copies of the software, derivative works or modified versions,
+ and any portions thereof, and that both notices appear in supporting documentation,
+ and that credit is given to Mulle Kybernetik in all documents and publicity
+ pertaining to direct or indirect use of this code or its derivatives.
+
+ THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE
+ SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY
+ DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE
+ OR OF ANY DERIVATIVE WORK. \ No newline at end of file
diff --git a/Frameworks/OCMock.framework/Versions/Current b/Frameworks/OCMock.framework/Versions/Current
new file mode 120000
index 00000000..8c7e5a66
--- /dev/null
+++ b/Frameworks/OCMock.framework/Versions/Current
@@ -0,0 +1 @@
+A \ No newline at end of file
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index aa2144b6..59a8f02a 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -16,11 +16,11 @@
1198F5B31174EDD500670590 /* SPDatabaseCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1198F5B21174EDD500670590 /* SPDatabaseCopy.m */; };
1198F5C41174EF3F00670590 /* SPDatabaseCopyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1198F5C31174EF3F00670590 /* SPDatabaseCopyTest.m */; };
1198F7541174FFCF00670590 /* SPDatabaseCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1198F5B21174EDD500670590 /* SPDatabaseCopy.m */; };
- 1198F873117510EE00670590 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1198F872117510EE00670590 /* OCMock.framework */; };
11B55BFE1189E3B2009EF465 /* SPDBActionCommons.m in Sources */ = {isa = PBXBuildFile; fileRef = 11B55BFD1189E3B2009EF465 /* SPDBActionCommons.m */; };
11C211261180EBFF00758039 /* SPDatabaseRenameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C210DE1180E9B800758039 /* SPDatabaseRenameTest.m */; };
11C211271180EC0400758039 /* SPDatabaseRename.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C2109D1180E70800758039 /* SPDatabaseRename.m */; };
11C211301180EC9A00758039 /* SPDatabaseRename.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C2109D1180E70800758039 /* SPDatabaseRename.m */; };
+ 11D44DF0118F5887002AA43C /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11D44DEF118F5887002AA43C /* OCMock.framework */; };
171312CE109D23C700FB465F /* SPTableTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 171312CD109D23C700FB465F /* SPTableTextFieldCell.m */; };
17292443107AC41000B21980 /* SPXMLExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17292442107AC41000B21980 /* SPXMLExporter.m */; };
172A65110F7BED7A001E861A /* SPConsoleMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 172A65100F7BED7A001E861A /* SPConsoleMessage.m */; };
@@ -334,13 +334,13 @@
1198F5B21174EDD500670590 /* SPDatabaseCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseCopy.m; sourceTree = "<group>"; };
1198F5C21174EF3F00670590 /* SPDatabaseCopyTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseCopyTest.h; sourceTree = "<group>"; };
1198F5C31174EF3F00670590 /* SPDatabaseCopyTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseCopyTest.m; sourceTree = "<group>"; };
- 1198F872117510EE00670590 /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMock.framework; path = Library/Frameworks/OCMock.framework; sourceTree = DEVELOPER_DIR; };
11B55BFC1189E3B2009EF465 /* SPDBActionCommons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDBActionCommons.h; sourceTree = "<group>"; };
11B55BFD1189E3B2009EF465 /* SPDBActionCommons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDBActionCommons.m; sourceTree = "<group>"; };
11C2109C1180E70800758039 /* SPDatabaseRename.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseRename.h; sourceTree = "<group>"; };
11C2109D1180E70800758039 /* SPDatabaseRename.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseRename.m; sourceTree = "<group>"; };
11C210DD1180E9B800758039 /* SPDatabaseRenameTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseRenameTest.h; sourceTree = "<group>"; };
11C210DE1180E9B800758039 /* SPDatabaseRenameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseRenameTest.m; sourceTree = "<group>"; };
+ 11D44DEF118F5887002AA43C /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMock.framework; path = Frameworks/OCMock.framework; sourceTree = "<group>"; };
17128B8A0FE6E0210035DD75 /* QLPreviewPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QLPreviewPanel.h; sourceTree = "<group>"; };
1713122F109C7DF600FB465F /* build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = build.sh; sourceTree = "<group>"; };
171312CC109D23C700FB465F /* SPTableTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableTextFieldCell.h; sourceTree = "<group>"; };
@@ -748,7 +748,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 1198F873117510EE00670590 /* OCMock.framework in Frameworks */,
+ 11D44DF0118F5887002AA43C /* OCMock.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -801,6 +801,7 @@
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
+ 11D44DEF118F5887002AA43C /* OCMock.framework */,
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
B5EAC0FC0EC87FF900CC579C /* Security.framework */,
@@ -1503,7 +1504,6 @@
children = (
1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
- 1198F872117510EE00670590 /* OCMock.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -2349,6 +2349,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"\"$(SRCROOT)/Frameworks\"",
+ "\"$(SRCROOT)\"",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -2383,6 +2384,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"\"$(SRCROOT)/Frameworks\"",
+ "\"$(SRCROOT)\"",
);
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -2413,6 +2415,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"\"$(SRCROOT)/Frameworks\"",
+ "\"$(SRCROOT)\"",
);
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;