From bc9645aa4f9c815f83d2ce2e6abebf4bcfcd5082 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 9 Sep 2010 14:04:47 -0700 Subject: [PATCH] Added a test for hex conversions in CPColor --- Tests/AppKit/CPColorTest.j | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Tests/AppKit/CPColorTest.j diff --git a/Tests/AppKit/CPColorTest.j b/Tests/AppKit/CPColorTest.j new file mode 100644 index 000000000..f5768a46a --- /dev/null +++ b/Tests/AppKit/CPColorTest.j @@ -0,0 +1,14 @@ +@import + +@implementation CPColorTest : OJTestCase +{ +} + +- (void)testHexStringConversion +{ + var colors = ['000000', '7E8EAB', 'FFFFFF']; + for (var i = 0; i < colors.length; ++i) + [self assert: colors[i] equals: [[CPColor colorWithHexString: colors[i]] hexString]]; +} + +@end