Why cgColor of UIColor has different number of components under UITests target and my app target?

Viewed 16

I have a simple function:

func replace(color: UIColor, withColor: UIColor, tolerance: CGFloat) -> UIImage {
    guard color.cgColor.numberOfComponents == 4, withColor.cgColor.numberOfComponents == 4 else {
        return self // here function goes for uitests target, why?
    }
    // here function goes for app target
}
0 Answers
Related