Commits

Veg Head  committed ec05042

Add OCUnit test support. Add hex->NSColor conversion. Add corresponding test.

  • Participants
  • Parent commits d016f9d

Comments (0)

Files changed (11)

File HSApplication.h

 
 @property (strong, readwrite) NSMutableArray *theStak;
 
++ (NSColor *)colorFromHexRGB:(NSString *) inColorString;
+
 @end

File HSApplication.m

     return self;
 }
 
+/*
+ NSColor: Instantiate from Web-like Hex RRGGBB string
+ Original Source: <http://cocoa.karelia.com/Foundation_Categories/NSColor__Instantiat.m>
+ (See copyright notice at <http://cocoa.karelia.com>)
+ */
+
++ (NSColor *)colorFromHexRGB:(NSString *) inColorString
+{
+	NSColor *result = nil;
+	unsigned int colorCode = 0;
+	unsigned char redByte, greenByte, blueByte;
+	
+	if (nil != inColorString)
+	{
+		NSScanner *scanner = [NSScanner scannerWithString:inColorString];
+		(void) [scanner scanHexInt:&colorCode];	// ignore error
+	}
+	redByte		= (unsigned char) (colorCode >> 16);
+	greenByte	= (unsigned char) (colorCode >> 8);
+	blueByte	= (unsigned char) (colorCode);	// masks off high bits
+	result = [NSColor
+              colorWithCalibratedRed:		(float)redByte	/ 0xff
+              green:	(float)greenByte/ 0xff
+              blue:	(float)blueByte	/ 0xff
+              alpha:1.0];
+	return result;
+}
 @end

File MainStak.xib

 															<string key="NSFrameSize">{427, 500}</string>
 															<reference key="NSSuperview" ref="220322029"/>
 															<reference key="NSWindow"/>
-															<reference key="NSNextKeyView" ref="834539644"/>
+															<reference key="NSNextKeyView"/>
 														</object>
 													</array>
 													<string key="NSFrameSize">{427, 220}</string>
 											<string key="NSFrame">{{7, 7}, {427, 220}}</string>
 											<reference key="NSSuperview" ref="237142718"/>
 											<reference key="NSWindow"/>
-											<reference key="NSNextKeyView" ref="220322029"/>
+											<reference key="NSNextKeyView" ref="834539644"/>
 											<int key="NSsFlags">149568</int>
 											<reference key="NSVScroller" ref="834539644"/>
 											<reference key="NSHScroller" ref="226143158"/>
 							<object class="NSTextFieldCell" key="NSCell" id="513623010">
 								<int key="NSCellFlags">68288064</int>
 								<int key="NSCellFlags2">1145046016</int>
-								<string key="NSContents">Pop:↑ Push:←↓→ </string>
+								<string key="NSContents">Push:←↓→ Pop:↑  </string>
 								<object class="NSFont" key="NSSupport">
 									<string key="NSName">LucidaGrande</string>
 									<double key="NSSize">10</double>
         NSDate *now = [NSDate date];
         _pushTime = now;
         NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
-         [formatter setTimeStyle:NSDateFormatterNoStyle];
-         [formatter setDateStyle:NSDateFormatterMediumStyle];
+        [formatter setTimeStyle:NSDateFormatterNoStyle];
+        [formatter setDateStyle:NSDateFormatterMediumStyle];
         NSString *dateDesc = [NSDateFormatter localizedStringFromDate:_pushTime 
          dateStyle:NSDateFormatterMediumStyle
          timeStyle:NSDateFormatterMediumStyle];

File StakItemView.m

     r.origin.y = r.size.height - [[self background] size].height;
     [[self background] drawAtPoint:r.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
 }
+
 @end

File headstak.xcodeproj/project.pbxproj

 		8D4BAC441528C58F00C0843F /* FMResultSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D4BAC3F1528C58F00C0843F /* FMResultSet.m */; };
 		8D4BAC461528DAFC00C0843F /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D4BAC451528DAFC00C0843F /* libsqlite3.dylib */; };
 		8D4BAC4A15290AF600C0843F /* StakDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D4BAC4915290AF600C0843F /* StakDB.m */; };
+		8D93F031154C896800E65DC8 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D93F030154C896800E65DC8 /* SenTestingKit.framework */; };
+		8D93F033154C896800E65DC8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D93F032154C896800E65DC8 /* Cocoa.framework */; };
+		8D93F03A154C896800E65DC8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D93F038154C896800E65DC8 /* InfoPlist.strings */; };
+		8D93F03D154C896800E65DC8 /* headstakTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D93F03C154C896800E65DC8 /* headstakTests.m */; };
+		8D93F04B154C979F00E65DC8 /* HSApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EDDA76B13DCCE4D00C60BD3 /* HSApplication.m */; };
 		8DDFE1B714A2A87500947DED /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DDFE1B614A2A87500947DED /* Carbon.framework */; };
 		8E1E6E9613EDDA1D000AADA8 /* StakWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E1E6E9513EDDA1D000AADA8 /* StakWindowController.m */; };
 		8E1E6E9813EF3751000AADA8 /* MainStak.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E1E6E9713EF3751000AADA8 /* MainStak.xib */; };
 		8EDDA76C13DCCE4D00C60BD3 /* HSApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EDDA76B13DCCE4D00C60BD3 /* HSApplication.m */; };
 /* End PBXBuildFile section */
 
+/* Begin PBXContainerItemProxy section */
+		8D93F048154C95EE00E65DC8 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 8D1107260486CEB800E47090;
+			remoteInfo = headstak;
+		};
+/* End PBXContainerItemProxy section */
+
 /* Begin PBXFileReference section */
 		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
 		8D4BAC451528DAFC00C0843F /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
 		8D4BAC4815290AF600C0843F /* StakDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StakDB.h; sourceTree = "<group>"; };
 		8D4BAC4915290AF600C0843F /* StakDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StakDB.m; sourceTree = "<group>"; };
+		8D93F02F154C896800E65DC8 /* headstakTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = headstakTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+		8D93F030154C896800E65DC8 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+		8D93F032154C896800E65DC8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
+		8D93F034154C896800E65DC8 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+		8D93F037154C896800E65DC8 /* headstakTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "headstakTests-Info.plist"; sourceTree = "<group>"; };
+		8D93F039154C896800E65DC8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		8D93F03B154C896800E65DC8 /* headstakTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = headstakTests.h; sourceTree = "<group>"; };
+		8D93F03C154C896800E65DC8 /* headstakTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = headstakTests.m; sourceTree = "<group>"; };
+		8D93F03E154C896800E65DC8 /* headstakTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "headstakTests-Prefix.pch"; sourceTree = "<group>"; };
 		8DDFE1B614A2A87500947DED /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
 		8E1E6E9413EDDA1D000AADA8 /* StakWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StakWindowController.h; sourceTree = "<group>"; };
 		8E1E6E9513EDDA1D000AADA8 /* StakWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StakWindowController.m; sourceTree = "<group>"; };
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		8D93F02B154C896800E65DC8 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D93F031154C896800E65DC8 /* SenTestingKit.framework in Frameworks */,
+				8D93F033154C896800E65DC8 /* Cocoa.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
 				8DDFE1B614A2A87500947DED /* Carbon.framework */,
 				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
 				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+				8D93F034154C896800E65DC8 /* CoreData.framework */,
 			);
 			name = "Other Frameworks";
 			sourceTree = "<group>";
 			isa = PBXGroup;
 			children = (
 				8D1107320486CEB800E47090 /* headstak.app */,
+				8D93F02F154C896800E65DC8 /* headstakTests.octest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 				080E96DDFE201D6D7F000001 /* Classes */,
 				29B97315FDCFA39411CA2CEA /* Other Sources */,
 				29B97317FDCFA39411CA2CEA /* Resources */,
+				8D93F035154C896800E65DC8 /* headstakTests */,
 				29B97323FDCFA39411CA2CEA /* Frameworks */,
 				19C28FACFE9D520D11CA2CBB /* Products */,
 			);
 			isa = PBXGroup;
 			children = (
 				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+				8D93F030154C896800E65DC8 /* SenTestingKit.framework */,
+				8D93F032154C896800E65DC8 /* Cocoa.framework */,
 				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
 			);
 			name = Frameworks;
 			name = fmdb;
 			sourceTree = "<group>";
 		};
+		8D93F035154C896800E65DC8 /* headstakTests */ = {
+			isa = PBXGroup;
+			children = (
+				8D93F03B154C896800E65DC8 /* headstakTests.h */,
+				8D93F03C154C896800E65DC8 /* headstakTests.m */,
+				8D93F036154C896800E65DC8 /* Supporting Files */,
+			);
+			path = headstakTests;
+			sourceTree = "<group>";
+		};
+		8D93F036154C896800E65DC8 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				8D93F037154C896800E65DC8 /* headstakTests-Info.plist */,
+				8D93F038154C896800E65DC8 /* InfoPlist.strings */,
+				8D93F03E154C896800E65DC8 /* headstakTests-Prefix.pch */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
 			productReference = 8D1107320486CEB800E47090 /* headstak.app */;
 			productType = "com.apple.product-type.application";
 		};
+		8D93F02E154C896800E65DC8 /* headstakTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 8D93F041154C896800E65DC8 /* Build configuration list for PBXNativeTarget "headstakTests" */;
+			buildPhases = (
+				8D93F02A154C896800E65DC8 /* Sources */,
+				8D93F02B154C896800E65DC8 /* Frameworks */,
+				8D93F02C154C896800E65DC8 /* Resources */,
+				8D93F02D154C896800E65DC8 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				8D93F049154C95EE00E65DC8 /* PBXTargetDependency */,
+			);
+			name = headstakTests;
+			productName = headstakTests;
+			productReference = 8D93F02F154C896800E65DC8 /* headstakTests.octest */;
+			productType = "com.apple.product-type.bundle";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
 				Japanese,
 				French,
 				German,
+				en,
 			);
 			mainGroup = 29B97314FDCFA39411CA2CEA /* headstak */;
 			projectDirPath = "";
 			projectRoot = "";
 			targets = (
 				8D1107260486CEB800E47090 /* headstak */,
+				8D93F02E154C896800E65DC8 /* headstakTests */,
 			);
 		};
 /* End PBXProject section */
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		8D93F02C154C896800E65DC8 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D93F03A154C896800E65DC8 /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXResourcesBuildPhase section */
 
+/* Begin PBXShellScriptBuildPhase section */
+		8D93F02D154C896800E65DC8 /* 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 */
 		8D11072C0486CEB800E47090 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		8D93F02A154C896800E65DC8 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D93F04B154C979F00E65DC8 /* HSApplication.m in Sources */,
+				8D93F03D154C896800E65DC8 /* headstakTests.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
+/* Begin PBXTargetDependency section */
+		8D93F049154C95EE00E65DC8 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 8D1107260486CEB800E47090 /* headstak */;
+			targetProxy = 8D93F048154C95EE00E65DC8 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
 /* Begin PBXVariantGroup section */
 		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
 			isa = PBXVariantGroup;
 			name = InfoPlist.strings;
 			sourceTree = "<group>";
 		};
+		8D93F038154C896800E65DC8 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				8D93F039154C896800E65DC8 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
 /* End PBXVariantGroup section */
 
 /* Begin XCBuildConfiguration section */
 			};
 			name = Release;
 		};
+		8D93F03F154C896800E65DC8 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "headstakTests/headstakTests-Prefix.pch";
+				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;
+				INFOPLIST_FILE = "headstakTests/headstakTests-Info.plist";
+				MACOSX_DEPLOYMENT_TARGET = 10.7;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "";
+				WRAPPER_EXTENSION = octest;
+			};
+			name = Debug;
+		};
+		8D93F040154C896800E65DC8 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "headstakTests/headstakTests-Prefix.pch";
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				INFOPLIST_FILE = "headstakTests/headstakTests-Info.plist";
+				MACOSX_DEPLOYMENT_TARGET = 10.7;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "";
+				WRAPPER_EXTENSION = octest;
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		8D93F041154C896800E65DC8 /* Build configuration list for PBXNativeTarget "headstakTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				8D93F03F154C896800E65DC8 /* Debug */,
+				8D93F040154C896800E65DC8 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;

File headstakTests/en.lproj/InfoPlist.strings

+/* Localized versions of Info.plist keys */
+

File headstakTests/headstakTests-Info.plist

+<?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.dreadtech.${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>

File headstakTests/headstakTests-Prefix.pch

+//
+// Prefix header for all source files of the 'headstakTests' target in the 'headstakTests' project
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif

File headstakTests/headstakTests.h

+//
+//  headstakTests.h
+//  headstakTests
+//
+//  Created by Veghead on 4/28/12.
+//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface headstakTests : SenTestCase
+
+@end

File headstakTests/headstakTests.m

+//
+//  headstakTests.m
+//  headstakTests
+//
+//  Created by Veghead on 4/28/12.
+//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "headstakTests.h"
+#import "HSApplication.h"
+
+@implementation headstakTests
+
+- (void)setUp
+{
+    [super setUp];
+    
+    // Set-up code here.
+}
+
+- (void)tearDown
+{
+    // Tear-down code here.
+    
+    [super tearDown];
+}
+
+- (void)testHexColorConversion
+{
+    NSColor *shouldBeGreen = [HSApplication colorFromHexRGB:@"abcdef"];
+    STAssertEqualsWithAccuracy([shouldBeGreen blueComponent],0xef / 255.0,0.001,@"hex colour conversion failed");
+    STAssertEqualsWithAccuracy([shouldBeGreen redComponent],0xab / 255.0,0.001,@"hex colour conversion failed");
+    STAssertEqualsWithAccuracy([shouldBeGreen greenComponent],0xcd / 255.0,0.001,@"hex colour conversion failed");
+}
+
+@end