Skip to content

Commit c8b2851

Browse files
dharmik-ymlmpospese
authored andcommitted
Improved test case
1 parent 7953ba0 commit c8b2851

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

Tests/YCoreUITests/Extensions/UIKit/UIView+constrainSizeTests.swift

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@ import XCTest
1010
@testable import YCoreUI
1111

1212
final class UIViewConstrainSizeTests: XCTestCase {
13-
private lazy var randomSize = {
14-
CGSize(
15-
width: self.randomFloat,
16-
height: self.randomFloat
17-
)
18-
}()
1913

20-
private lazy var randomDimension: CGFloat = {
21-
randomFloat
22-
}()
14+
let randomSize = CGSize(width: 150, height: 200)
2315

2416
func testSize() {
2517
let sut = makeSUT()
@@ -88,7 +80,7 @@ final class UIViewConstrainSizeTests: XCTestCase {
8880

8981
XCTAssert(sut.translatesAutoresizingMaskIntoConstraints)
9082

91-
let randomDimension = randomFloat
83+
let randomDimension = 100.0
9284

9385
let sizeAttributes: [
9486
(NSLayoutConstraint.Attribute, CGFloat)
@@ -127,8 +119,4 @@ extension UIViewConstrainSizeTests {
127119
trackForMemoryLeak(sut, file: file, line: line)
128120
return sut
129121
}
130-
131-
var randomFloat: CGFloat {
132-
CGFloat.random(in: 0...500)
133-
}
134122
}

0 commit comments

Comments
 (0)