Last active
March 3, 2019 19:12
-
-
Save ulian-onua/14ad965fb74809d43af3feaae664eb36 to your computer and use it in GitHub Desktop.
UIColor_native_initializer_tests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
class UIColorNativeTests: XCTestCase { | |
var computedNativeColor: UIColor { | |
return UIColor(red: 224.0 / 255.0, | |
green: 17.0 / 255.0, | |
blue: 95.0 / 255.0, | |
alpha: 1.0) | |
} | |
func testShortLoop() { | |
measure { | |
for _ in 0..<TestConstants.shortLoopCount { | |
let _ = computedNativeColor | |
} | |
} | |
} | |
func testMediumLoop() { | |
measure { | |
for _ in 0..<TestConstants.mediumLoopCount { | |
let _ = computedNativeColor | |
} | |
} | |
} | |
func testLongLoop() { | |
measure { | |
for _ in 0..<TestConstants.longLoopCount { | |
let _ = computedNativeColor | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment