Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Unit test- How do I assert that a CGColor is what it's supposed to be?

Using Xcode V7.2. Trying to unit test, need to verify that the correct color has been set, and get this message:

Cannot invoke 'XCTAssertEqual' with an argument list of type '(CGColor, CGColor)'

How do I assert that a CGColor is what it's supposed to be?

like image 473
corykon Avatar asked Nov 25 '25 16:11

corykon


1 Answers

Use XCTAssert and test whether CGColorEqualToColor is true.

like image 127
matt Avatar answered Nov 27 '25 04:11

matt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!