Skip to content

Commit

Permalink
Fix accuracy?
Browse files Browse the repository at this point in the history
This test passed on my local computer, but not travis. I am switching the test to use accuracy.
  • Loading branch information
RSully committed Mar 16, 2014
1 parent 7109b90 commit cf127e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RSColorPickerTests/CPTestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import <XCTest/XCTest.h>

#define kColorComponentAccuracy (1.0/255.0)

@interface CPTestCase : XCTestCase

- (void)assertColor:(UIColor *)colorA equalsColor:(UIColor *)colorB;
Expand Down
1 change: 0 additions & 1 deletion RSColorPickerTests/CPTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "CPTestCase.h"
#import "RSColorFunctions.h"

#define kColorComponentAccuracy (1.0/255.0)

@implementation CPTestCase

Expand Down
2 changes: 1 addition & 1 deletion RSColorPickerTests/RSColorFunctionsTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ - (void)testRandomColor {
UIColor *color = RSRandomColorOpaque(YES);

RSGetComponentsForColor(components, color);
XCTAssertEqual(components[3], 1.0);
XCTAssertEqualWithAccuracy(components[3], 1.0, kColorComponentAccuracy);
}

@end

0 comments on commit cf127e4

Please sign in to comment.