Skip to content

Commit

Permalink
Add UIColor comparison tests to validate const colors vs normal colors
Browse files Browse the repository at this point in the history
  • Loading branch information
msft-Jeyaram committed Apr 27, 2017
1 parent 41ffd69 commit 5c7b79a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unittests/UIKit/UIColorTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
#include <TestFramework.h>
#import <UIKit/UIColor.h>

TEST(UIColorTest, ColorTests) {
UIColor* color = [UIColor redColor];
UIColor* color2 = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
EXPECT_OBJCEQ(color, color2);

color = [UIColor blackColor];
color2 = [UIColor colorWithWhite:0 alpha:1];
EXPECT_OBJCEQ(color, color2);

color = [UIColor blackColor];
color2 = [UIColor colorWithRed:0 green:0 blue:0 alpha:1];
EXPECT_OBJCNE(color, color2);
}

TEST(UIColorTest, NamedUIColorMethods) {
UIColor* color = [UIColor redColor];

Expand Down

0 comments on commit 5c7b79a

Please sign in to comment.