Skip to content

Commit de17f05

Browse files
committed
Fix swiftlint
1 parent 9877c42 commit de17f05

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

Tests/StaggerTests/StaggerTests.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import XCTest
77

88
@Test func testDefaultConfiguration() {
99
let config = StaggerConfiguration()
10-
10+
1111
#expect(config.baseDelay == 0.1)
1212
// Check animation curve type without direct comparison
1313
if case .default = config.animationCurve {
1414
// This is correct
1515
} else {
1616
XCTFail("Expected default animation curve")
1717
}
18-
18+
1919
// Check calculation strategy type without direct comparison
2020
if case .priorityThenPosition(let direction) = config.calculationStrategy {
2121
if case .leftToRight = direction {
@@ -34,9 +34,9 @@ import XCTest
3434
animationCurve: .spring(response: 0.4, dampingFraction: 0.7),
3535
calculationStrategy: .positionOnly(.topToBottom)
3636
)
37-
37+
3838
#expect(config.baseDelay == 0.2)
39-
39+
4040
// Check calculation strategy
4141
if case .positionOnly(let direction) = config.calculationStrategy {
4242
if case .topToBottom = direction {
@@ -47,7 +47,7 @@ import XCTest
4747
} else {
4848
XCTFail("Expected positionOnly strategy")
4949
}
50-
50+
5151
// Check animation curve
5252
if case .spring(let response, let dampingFraction) = config.animationCurve {
5353
#expect(response == 0.4)
@@ -61,7 +61,7 @@ import XCTest
6161

6262
@Test func testAnimationCurveDefault() {
6363
let curve = StaggerConfiguration.AnimationCurve.default
64-
64+
6565
if case .default = curve {
6666
// This is correct
6767
} else {
@@ -71,7 +71,7 @@ import XCTest
7171

7272
@Test func testAnimationCurveEaseIn() {
7373
let curve = StaggerConfiguration.AnimationCurve.easeIn
74-
74+
7575
if case .easeIn = curve {
7676
// This is correct
7777
} else {
@@ -81,7 +81,7 @@ import XCTest
8181

8282
@Test func testAnimationCurveEaseOut() {
8383
let curve = StaggerConfiguration.AnimationCurve.easeOut
84-
84+
8585
if case .easeOut = curve {
8686
// This is correct
8787
} else {
@@ -91,7 +91,7 @@ import XCTest
9191

9292
@Test func testAnimationCurveEaseInOut() {
9393
let curve = StaggerConfiguration.AnimationCurve.easeInOut
94-
94+
9595
if case .easeInOut = curve {
9696
// This is correct
9797
} else {
@@ -103,7 +103,7 @@ import XCTest
103103
let response = 0.6
104104
let dampingFraction = 0.8
105105
let curve = StaggerConfiguration.AnimationCurve.spring(response: response, dampingFraction: dampingFraction)
106-
106+
107107
if case .spring(let resultResponse, let resultDampingFraction) = curve {
108108
#expect(resultResponse == response)
109109
#expect(resultDampingFraction == dampingFraction)
@@ -115,7 +115,7 @@ import XCTest
115115
@Test func testAnimationCurveCustom() {
116116
let customAnimation = Animation.linear(duration: 0.5)
117117
let curve = StaggerConfiguration.AnimationCurve.custom(customAnimation)
118-
118+
119119
if case .custom = curve {
120120
// This is correct
121121
} else {
@@ -127,7 +127,7 @@ import XCTest
127127

128128
@Test func testCalculationStrategyDefault() {
129129
let strategy = StaggerConfiguration.CalculationStrategy.default
130-
130+
131131
if case .priorityThenPosition(let direction) = strategy {
132132
if case .leftToRight = direction {
133133
// This is correct
@@ -148,27 +148,27 @@ import XCTest
148148
.topToBottom,
149149
.bottomToTop
150150
]
151-
151+
152152
#expect(directions.count == 4)
153153
}
154154

155155
// MARK: - Environment Values Tests
156156

157157
@Test func testEnvironmentValuesDefaults() {
158158
let values = EnvironmentValues()
159-
159+
160160
#expect(values.delays.isEmpty)
161-
161+
162162
let defaultConfig = values.configuration
163163
#expect(defaultConfig.baseDelay == 0.1)
164-
164+
165165
// Check animation curve type
166166
if case .default = defaultConfig.animationCurve {
167167
// This is correct
168168
} else {
169169
XCTFail("Expected default animation curve")
170170
}
171-
171+
172172
// Check calculation strategy type
173173
if case .priorityThenPosition(let direction) = defaultConfig.calculationStrategy {
174174
if case .leftToRight = direction {
@@ -179,4 +179,4 @@ import XCTest
179179
} else {
180180
XCTFail("Expected priorityThenPosition strategy")
181181
}
182-
}
182+
}

Tests/StaggerTests/StaggerUITests.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import SwiftUI
66

77
struct SampleContentView: View {
88
@State private var isVisible = false
9-
9+
1010
let items = (0..<5).map { _ in
1111
Color(red: Double.random(in: 0...1),
1212
green: Double.random(in: 0...1),
1313
blue: Double.random(in: 0...1))
1414
}
15-
15+
1616
var body: some View {
1717
VStack(spacing: 20) {
1818
Text("Stagger Animation")
@@ -21,7 +21,7 @@ struct SampleContentView: View {
2121
transition: .move(edge: .top).combined(with: .opacity),
2222
priority: 10
2323
)
24-
24+
2525
LazyVGrid(columns: [GridItem(.adaptive(minimum: 100))], spacing: 20) {
2626
ForEach(items.indices, id: \.self) { index in
2727
RoundedRectangle(cornerRadius: 12)
@@ -30,7 +30,7 @@ struct SampleContentView: View {
3030
.stagger()
3131
}
3232
}
33-
33+
3434
Button("Toggle") {
3535
isVisible.toggle()
3636
}
@@ -45,7 +45,7 @@ struct SampleContentView: View {
4545

4646
@Test @MainActor func testSampleContentViewCreation() async {
4747
// Verifies that the sample view can be created without errors
48-
let _ = SampleContentView()
48+
_ = SampleContentView()
4949
// If this test completes, it implies the view was successfully created
5050
}
5151

@@ -59,10 +59,10 @@ struct SampleContentView: View {
5959
.priorityOnly,
6060
.positionOnly(.leftToRight)
6161
]
62-
62+
6363
for strategy in strategies {
6464
let config = StaggerConfiguration(calculationStrategy: strategy)
65-
let _ = VStack {
65+
_ = VStack {
6666
Text("Test")
6767
}
6868
.staggerContainer(configuration: config)
@@ -80,10 +80,10 @@ struct SampleContentView: View {
8080
.spring(response: 0.5, dampingFraction: 0.8),
8181
.custom(Animation.linear(duration: 1.0))
8282
]
83-
83+
8484
for curve in curves {
8585
let config = StaggerConfiguration(animationCurve: curve)
86-
let _ = VStack {
86+
_ = VStack {
8787
Text("Test")
8888
}
8989
.staggerContainer(configuration: config)

Tests/StaggerTests/StaggerViewModifierTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import SwiftUI
77
@Test @MainActor func testStaggerViewModifier() async {
88
let view = Text("Test")
99
_ = view.stagger()
10-
10+
1111
// Simply test that we can create the view with the modifier
1212
// If this test completes, it implies the view was successfully created with the modifier
1313
}
@@ -16,15 +16,15 @@ import SwiftUI
1616
let priority = 10.0
1717
let view = Text("Test")
1818
_ = view.stagger(priority: priority)
19-
19+
2020
// Simply test that we can create the view with the modifier
2121
// If this test completes, it implies the view was successfully created with the modifier and priority
2222
}
2323

2424
@Test @MainActor func testStaggerViewModifierWithCustomTransition() async {
2525
let view = Text("Test")
2626
_ = view.stagger(transition: .move(edge: .leading))
27-
27+
2828
// Simply test that we can create the view with the modifier
2929
// If this test completes, it implies the view was successfully created with the custom transition
3030
}
@@ -34,7 +34,7 @@ import SwiftUI
3434
Text("Test")
3535
}
3636
_ = view.staggerContainer()
37-
37+
3838
// Simply test that we can create the view with the container modifier
3939
// If this test completes, it implies the view was successfully created with the container
4040
}
@@ -45,12 +45,12 @@ import SwiftUI
4545
animationCurve: .easeIn,
4646
calculationStrategy: .positionOnly(.bottomToTop)
4747
)
48-
48+
4949
let view = VStack {
5050
Text("Test")
5151
}
5252
_ = view.staggerContainer(configuration: config)
53-
53+
5454
// Simply test that we can create the view with the container modifier and custom config
5555
// If this test completes, it implies the view was successfully created with the container and config
5656
}

0 commit comments

Comments
 (0)