Source

headstak / headstakTests / headstakTests.m

Full commit
//
//  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