Skip to content

Commit b557bf5

Browse files
committed
Applied Swift Format
1 parent 0496e9b commit b557bf5

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Tests/SnapshotTestingTests/UITests.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import SnapshotTesting
2+
23
@testable import XCTSnapshot
4+
35
#if canImport(Testing)
46
import Testing
57

@@ -32,7 +34,7 @@ struct UITests {
3234
contentView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
3335
contentView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
3436
contentView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor),
35-
contentView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor)
37+
contentView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
3638
])
3739

3840
return view
@@ -68,7 +70,7 @@ struct UITests {
6870

6971
contentView.translatesAutoresizingMaskIntoConstraints = false
7072
rectangleView.translatesAutoresizingMaskIntoConstraints = false
71-
73+
7274
scrollView.addSubview(contentView)
7375
contentView.addSubview(rectangleView)
7476

@@ -77,15 +79,15 @@ struct UITests {
7779
contentView.bottomAnchor.constraint(equalTo: scrollView.contentLayoutGuide.bottomAnchor),
7880
contentView.leadingAnchor.constraint(equalTo: scrollView.contentLayoutGuide.leadingAnchor),
7981
contentView.trailingAnchor.constraint(equalTo: scrollView.contentLayoutGuide.trailingAnchor),
80-
contentView.widthAnchor.constraint(equalTo: scrollView.frameLayoutGuide.widthAnchor)
82+
contentView.widthAnchor.constraint(equalTo: scrollView.frameLayoutGuide.widthAnchor),
8183
])
8284

8385
NSLayoutConstraint.activate([
8486
rectangleView.topAnchor.constraint(equalTo: contentView.topAnchor),
8587
rectangleView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
8688
rectangleView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
8789
rectangleView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
88-
rectangleView.heightAnchor.constraint(equalToConstant: 200)
90+
rectangleView.heightAnchor.constraint(equalToConstant: 200),
8991
])
9092

9193
return scrollView
@@ -107,7 +109,7 @@ struct UITests {
107109

108110
NSLayoutConstraint.activate([
109111
view.heightAnchor.constraint(equalToConstant: 300),
110-
constraint
112+
constraint,
111113
])
112114

113115
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
@@ -136,7 +138,7 @@ struct UITests {
136138

137139
let testCases = [
138140
(.light, "lightMode"),
139-
(.dark, "darkMode")
141+
(.dark, "darkMode"),
140142
]
141143

142144
for (style, name) in testCases {
@@ -159,7 +161,7 @@ struct UITests {
159161
let categories: [UITraitCollection.ContentSizeCategory] = [
160162
.extraSmall,
161163
.large,
162-
.accessibilityExtraExtraExtraLarge
164+
.accessibilityExtraExtraExtraLarge,
163165
]
164166

165167
for category in categories {
@@ -182,7 +184,7 @@ struct UITests {
182184
named: "iPhone16Pro"
183185
)
184186
}
185-
#endif
187+
#endif
186188

187189
@Test
188190
func complexLayouts() async throws {
@@ -195,7 +197,7 @@ struct UITests {
195197
#endif
196198
NSLayoutConstraint.activate([
197199
bigView.heightAnchor.constraint(equalToConstant: 3000),
198-
bigView.widthAnchor.constraint(equalToConstant: 2000)
200+
bigView.widthAnchor.constraint(equalToConstant: 2000),
199201
])
200202

201203
try await assert(of: bigView, as: .image)

Tests/XCTSnapshotTests/UITests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ final class UITests: BaseTestCase {
2020
nil
2121
}
2222

23-
// override var record: RecordMode {
24-
// .missing
25-
// }
23+
// override var record: RecordMode {
24+
// .missing
25+
// }
2626

2727
#if os(iOS) || os(tvOS) || os(visionOS)
2828
@MainActor
@@ -1505,7 +1505,7 @@ final class UITests: BaseTestCase {
15051505
let view = NSView()
15061506
NSLayoutConstraint.activate([
15071507
view.heightAnchor.constraint(equalToConstant: 10),
1508-
view.widthAnchor.constraint(equalToConstant: 10)
1508+
view.widthAnchor.constraint(equalToConstant: 10),
15091509
])
15101510
view.wantsLayer = true
15111511
view.layer?.backgroundColor = NSColor.green.cgColor

0 commit comments

Comments
 (0)