♻️ :: Remove trailing .0 where it's not needed

This commit is contained in:
Felix Mau
2021-10-02 13:47:17 +02:00
parent 849ef3e945
commit ffe69dda79
7 changed files with 14 additions and 14 deletions
@@ -30,8 +30,8 @@ final class BlueBorderedButton: UIButton {
backgroundColor = .clear
tintColor = UIColor.CustomColors.blue
layer.cornerRadius = 4.0
layer.cornerRadius = 4
layer.borderColor = UIColor.CustomColors.blue.cgColor
layer.borderWidth = 1.0
layer.borderWidth = 1
}
}
@@ -15,7 +15,7 @@ class CustomColorSnapshotTestCase: XCTestCase {
// MARK: - Config
/// The frame we use for rendering the `GradientLoadingBar`. This will also be the image size for our snapshot.
private static let frame = CGRect(x: 0.0, y: 0.0, width: 375.0, height: 4.0)
private static let frame = CGRect(origin: .zero, size: CGSize(width: 375, height: 4))
/// The custom colors we use on this test-case.
/// Source: https://color.adobe.com/Pink-Flamingo-color-theme-10343714/
@@ -15,7 +15,7 @@ class DefaultColorSnapshotTestCase: XCTestCase {
// MARK: - Config
/// The frame we use for rendering the `GradientLoadingBar`. This will also be the image size for our snapshot.
private static let frame = CGRect(x: 0.0, y: 0.0, width: 375.0, height: 4.0)
private static let frame = CGRect(origin: .zero, size: CGSize(width: 375, height: 4))
// MARK: - Test cases
@@ -46,7 +46,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
let expectation = self.expectation(description: "Expect completion handler to be called.")
// Hide view to validate fade-in.
gradientActivityIndicatorView.alpha = 0.0
gradientActivityIndicatorView.alpha = 0
gradientActivityIndicatorView.isHidden = true
// When
@@ -67,7 +67,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
let expectation = self.expectation(description: "Expect completion handler to be called.")
// Hide view to validate fade-in.
gradientActivityIndicatorView.alpha = 0.0
gradientActivityIndicatorView.alpha = 0
gradientActivityIndicatorView.isHidden = true
// When
@@ -99,7 +99,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
wait(for: [expectation], timeout: 1)
XCTAssertTrue(gradientActivityIndicatorView.isHidden)
XCTAssertEqual(gradientActivityIndicatorView.alpha, 0.0, accuracy: CGFloat.ulpOfOne)
XCTAssertEqual(gradientActivityIndicatorView.alpha, 0, accuracy: CGFloat.ulpOfOne)
}
func testAnimateIsHiddenWithInterruptionShouldNotHideViewAndCallCompletionHandler() {
@@ -128,7 +128,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
let expectation = self.expectation(description: "Expect completion handler to be called.")
// Hide view to validate fade-in.
gradientActivityIndicatorView.alpha = 0.0
gradientActivityIndicatorView.alpha = 0
gradientActivityIndicatorView.isHidden = true
// When
@@ -149,7 +149,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
let expectation = self.expectation(description: "Expect completion handler to be called.")
// Hide view to validate fade-in.
gradientActivityIndicatorView.alpha = 0.0
gradientActivityIndicatorView.alpha = 0
gradientActivityIndicatorView.isHidden = true
// When
@@ -183,7 +183,7 @@ class GradientActivityIndicatorViewAnimateIsHiddenTestCase: XCTestCase {
wait(for: [expectation], timeout: 1)
XCTAssertTrue(gradientActivityIndicatorView.isHidden)
XCTAssertEqual(gradientActivityIndicatorView.alpha, 0.0, accuracy: CGFloat.ulpOfOne)
XCTAssertEqual(gradientActivityIndicatorView.alpha, 0, accuracy: CGFloat.ulpOfOne)
}
func testFadeOutWithInterruptionShouldNotHideViewAndCallCompletionHandler() {