Permalink
Browse files

add unit tests for construction, erosion, and dilation

git-svn-id: http://simple-iphone-image-processing.googlecode.com/svn/trunk@5 f0a95276-1093-11de-b0d4-7fec019aa467
  • Loading branch information...
1 parent ddd6c38 commit cea417279760192d822a8cecc11f06f8d8bd4abb awostenberg committed Mar 29, 2009
Showing with 315 additions and 0 deletions.
  1. +170 −0 ImageProcessing.xcodeproj/project.pbxproj
  2. +15 −0 TestImage.h
  3. +110 −0 TestImage.mm
  4. +20 −0 Unit Tests-Info.plist
  5. BIN r50g100b200.png
@@ -14,6 +14,14 @@
2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; };
2899E5600DE3E45000AC0155 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E55F0DE3E45000AC0155 /* RootViewController.xib */; };
28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; };
+ 3808B6D20F7F60C8004A0F75 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 3808B6D40F7F6122004A0F75 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3808B6D30F7F6122004A0F75 /* SenTestingKit.framework */; };
+ 3808B6DE0F7F616A004A0F75 /* TestImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3808B6DD0F7F616A004A0F75 /* TestImage.mm */; };
+ 3808B6E10F7F6193004A0F75 /* r50g100b200.png in Resources */ = {isa = PBXBuildFile; fileRef = 3808B6E00F7F6193004A0F75 /* r50g100b200.png */; };
+ 3808B6E30F7F61AE004A0F75 /* elmo.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3808B6E20F7F61AE004A0F75 /* elmo.jpg */; };
+ 3808B6E80F7F62BA004A0F75 /* Image.mm in Sources */ = {isa = PBXBuildFile; fileRef = 839D2F770F6BC9E2000E4323 /* Image.mm */; };
+ 3808B6EA0F7F62F0004A0F75 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 3808B6EC0F7F630D004A0F75 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; };
839D2F5F0F6BC914000E4323 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 839D2F5E0F6BC914000E4323 /* MainWindow.xib */; };
839D2F620F6BC940000E4323 /* ListBundleImagesViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 839D2F610F6BC940000E4323 /* ListBundleImagesViewController.mm */; };
839D2F650F6BC984000E4323 /* ResultViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 839D2F640F6BC984000E4323 /* ResultViewController.xib */; };
@@ -23,6 +31,16 @@
839D30210F6BCE03000E4323 /* ListBundleImagesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 839D30200F6BCE03000E4323 /* ListBundleImagesViewController.xib */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 3808B6D50F7F6131004A0F75 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 3808B6CC0F7F60A1004A0F75 /* Unit Tests */;
+ remoteInfo = "Unit Tests";
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* ImageProcessingAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageProcessingAppDelegate.h; sourceTree = "<group>"; };
@@ -35,6 +53,13 @@
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>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 3808B6CD0F7F60A1004A0F75 /* Unit Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Unit Tests.octest"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3808B6CE0F7F60A1004A0F75 /* Unit Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Unit Tests-Info.plist"; sourceTree = "<group>"; };
+ 3808B6D30F7F6122004A0F75 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Developer/Library/Frameworks/SenTestingKit.framework; sourceTree = SDKROOT; };
+ 3808B6DD0F7F616A004A0F75 /* TestImage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestImage.mm; sourceTree = "<group>"; };
+ 3808B6DF0F7F6179004A0F75 /* TestImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestImage.h; sourceTree = "<group>"; };
+ 3808B6E00F7F6193004A0F75 /* r50g100b200.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = r50g100b200.png; sourceTree = "<group>"; };
+ 3808B6E20F7F61AE004A0F75 /* elmo.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = elmo.jpg; path = "../Documents/simple-iphone-image-processing-read-only/elmo.jpg"; sourceTree = SOURCE_ROOT; };
839D2F5E0F6BC914000E4323 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
839D2F600F6BC940000E4323 /* ListBundleImagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListBundleImagesViewController.h; sourceTree = "<group>"; };
839D2F610F6BC940000E4323 /* ListBundleImagesViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ListBundleImagesViewController.mm; sourceTree = "<group>"; };
@@ -59,6 +84,17 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 3808B6CA0F7F60A1004A0F75 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3808B6D20F7F60C8004A0F75 /* Foundation.framework in Frameworks */,
+ 3808B6D40F7F6122004A0F75 /* SenTestingKit.framework in Frameworks */,
+ 3808B6EA0F7F62F0004A0F75 /* UIKit.framework in Frameworks */,
+ 3808B6EC0F7F630D004A0F75 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -83,18 +119,21 @@
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* ImageProcessing.app */,
+ 3808B6CD0F7F60A1004A0F75 /* Unit Tests.octest */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
+ 3808B6DA0F7F614E004A0F75 /* Test Cases */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
+ 3808B6CE0F7F60A1004A0F75 /* Unit Tests-Info.plist */,
);
name = CustomTemplate;
sourceTree = "<group>";
@@ -111,6 +150,8 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 3808B6E20F7F61AE004A0F75 /* elmo.jpg */,
+ 3808B6E00F7F6193004A0F75 /* r50g100b200.png */,
839D2FD30F6BCC13000E4323 /* me.jpg */,
839D2F640F6BC984000E4323 /* ResultViewController.xib */,
839D2F5E0F6BC914000E4323 /* MainWindow.xib */,
@@ -124,13 +165,23 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 3808B6D30F7F6122004A0F75 /* SenTestingKit.framework */,
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
+ 3808B6DA0F7F614E004A0F75 /* Test Cases */ = {
+ isa = PBXGroup;
+ children = (
+ 3808B6DF0F7F6179004A0F75 /* TestImage.h */,
+ 3808B6DD0F7F616A004A0F75 /* TestImage.mm */,
+ );
+ name = "Test Cases";
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -145,12 +196,31 @@
buildRules = (
);
dependencies = (
+ 3808B6D60F7F6131004A0F75 /* PBXTargetDependency */,
);
name = ImageProcessing;
productName = ImageProcessing;
productReference = 1D6058910D05DD3D006BFB54 /* ImageProcessing.app */;
productType = "com.apple.product-type.application";
};
+ 3808B6CC0F7F60A1004A0F75 /* Unit Tests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 3808B6D10F7F60A2004A0F75 /* Build configuration list for PBXNativeTarget "Unit Tests" */;
+ buildPhases = (
+ 3808B6C80F7F60A1004A0F75 /* Resources */,
+ 3808B6C90F7F60A1004A0F75 /* Sources */,
+ 3808B6CA0F7F60A1004A0F75 /* Frameworks */,
+ 3808B6CB0F7F60A1004A0F75 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "Unit Tests";
+ productName = "Unit Tests";
+ productReference = 3808B6CD0F7F60A1004A0F75 /* Unit Tests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -171,6 +241,7 @@
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* ImageProcessing */,
+ 3808B6CC0F7F60A1004A0F75 /* Unit Tests */,
);
};
/* End PBXProject section */
@@ -185,11 +256,36 @@
839D2F650F6BC984000E4323 /* ResultViewController.xib in Resources */,
839D2FD40F6BCC13000E4323 /* me.jpg in Resources */,
839D30210F6BCE03000E4323 /* ListBundleImagesViewController.xib in Resources */,
+ 3808B6E30F7F61AE004A0F75 /* elmo.jpg in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 3808B6C80F7F60A1004A0F75 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3808B6E10F7F6193004A0F75 /* r50g100b200.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ 3808B6CB0F7F60A1004A0F75 /* 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 */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -204,8 +300,25 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 3808B6C90F7F60A1004A0F75 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3808B6DE0F7F616A004A0F75 /* TestImage.mm in Sources */,
+ 3808B6E80F7F62BA004A0F75 /* Image.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ 3808B6D60F7F6131004A0F75 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 3808B6CC0F7F60A1004A0F75 /* Unit Tests */;
+ targetProxy = 3808B6D50F7F6131004A0F75 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -233,6 +346,54 @@
};
name = Release;
};
+ 3808B6CF0F7F60A2004A0F75 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ "\"$(SDKROOT)$(DEVELOPER_FRAMEWORKS_DIR)\"",
+ );
+ INFOPLIST_FILE = "Unit Tests-Info.plist";
+ INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
+ OTHER_LDFLAGS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = "Unit Tests";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 3808B6D00F7F60A2004A0F75 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ "\"$(SDKROOT)$(DEVELOPER_FRAMEWORKS_DIR)\"",
+ );
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
+ INFOPLIST_FILE = "Unit Tests-Info.plist";
+ INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Cocoa,
+ "-framework",
+ SenTestingKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = "Unit Tests";
+ WRAPPER_EXTENSION = octest;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -272,6 +433,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 3808B6D10F7F60A2004A0F75 /* Build configuration list for PBXNativeTarget "Unit Tests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 3808B6CF0F7F60A2004A0F75 /* Debug */,
+ 3808B6D00F7F60A2004A0F75 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ImageProcessing" */ = {
isa = XCConfigurationList;
buildConfigurations = (
View
@@ -0,0 +1,15 @@
+//
+// TestImage.h
+//
+// Created by Alan Wostenberg on 3/26/09.
+// Copyright 2009 Wosterware.com. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+
+@interface TestImage : SenTestCase {
+
+}
+
+@end
Oops, something went wrong.

0 comments on commit cea4172

Please sign in to comment.