Updated Submodule.

Fixed Hexcolor test
This commit is contained in:
michael starke
2013-08-09 23:34:50 +02:00
parent f586127cd1
commit 714563250b
3 changed files with 6 additions and 8 deletions

View File

@@ -36,13 +36,11 @@
- (void)testColorRefReading {
uint32_t colorBytes = 0x000000FF;
uint32_t swappedData = colorBytes;
NSData *colorData = [NSData dataWithBytesNoCopy:&swappedData length:sizeof(uint32_t) freeWhenDone:NO];
NSData *colorData = [NSData dataWithBytesNoCopy:&colorBytes length:3 freeWhenDone:NO];
NSColor *color = [NSColor colorWithData:colorData];
STAssertEquals([color redComponent], 0.0, @"Red 100%");
STAssertEquals([color redComponent], 1.0, @"Red 100%");
STAssertEquals([color greenComponent], 0.0, @"Green 0%");
STAssertEquals([color blueComponent], 1.0, @"Blue 100%");
STAssertEquals([color blueComponent], 0.0, @"Blue 100%");
}
@end