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

@@ -1213,14 +1213,14 @@
4C305F3B179A19F90082334F /* KPKIconLoading.m */, 4C305F3B179A19F90082334F /* KPKIconLoading.m */,
4C1842B6179B348600E2F5BC /* KPKLegacyLoadingTest.h */, 4C1842B6179B348600E2F5BC /* KPKLegacyLoadingTest.h */,
4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */, 4C1842B7179B348600E2F5BC /* KPKLegacyLoadingTest.m */,
4CECB31517AC326D00EAFB0F /* KPKLegacyWritingTest.h */,
4CECB31617AC326D00EAFB0F /* KPKLegacyWritingTest.m */,
4CFC8741179DFD3E000DFC03 /* KPKXmlLoadingTest.h */, 4CFC8741179DFD3E000DFC03 /* KPKXmlLoadingTest.h */,
4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */, 4CFC8742179DFD3E000DFC03 /* KPKXmlLoadingTest.m */,
4C79E80417A9400500AC6CD2 /* KPKTestNSCoding.h */, 4C79E80417A9400500AC6CD2 /* KPKTestNSCoding.h */,
4C79E80517A9400500AC6CD2 /* KPKTestNSCoding.m */, 4C79E80517A9400500AC6CD2 /* KPKTestNSCoding.m */,
4C79E80717A9485600AC6CD2 /* KPKTestNSCopying.h */, 4C79E80717A9485600AC6CD2 /* KPKTestNSCopying.h */,
4C79E80817A9485600AC6CD2 /* KPKTestNSCopying.m */, 4C79E80817A9485600AC6CD2 /* KPKTestNSCopying.m */,
4CECB31517AC326D00EAFB0F /* KPKLegacyWritingTest.h */,
4CECB31617AC326D00EAFB0F /* KPKLegacyWritingTest.m */,
4CAC614117AD319200023F9E /* KPKTestXmlParsing.h */, 4CAC614117AD319200023F9E /* KPKTestXmlParsing.h */,
4CAC614217AD319200023F9E /* KPKTestXmlParsing.m */, 4CAC614217AD319200023F9E /* KPKTestXmlParsing.m */,
4C6366AD17AF207600AAF17D /* KPKTestHexColor.h */, 4C6366AD17AF207600AAF17D /* KPKTestHexColor.h */,

View File

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