Skip to content

Commit 37eb93f

Browse files
mbrandonwgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent 102ab45 commit 37eb93f

File tree

3 files changed

+62
-62
lines changed

3 files changed

+62
-62
lines changed

Sources/_SwiftUINavigationState/ConfirmationDialogState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ extension ConfirmationDialogState: CustomDumpReflectable {
201201
extension ConfirmationDialogState: Equatable where Action: Equatable {
202202
public static func == (lhs: Self, rhs: Self) -> Bool {
203203
lhs.title == rhs.title
204-
&& lhs.message == rhs.message
205-
&& lhs.buttons == rhs.buttons
204+
&& lhs.message == rhs.message
205+
&& lhs.buttons == rhs.buttons
206206
}
207207
}
208208

Sources/_SwiftUINavigationState/TextState.swift

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public struct TextState: Equatable, Hashable {
120120

121121
case let (.localized(lk, lt, lb, lc), .localized(rk, rt, rb, rc)):
122122
return lk.formatted(tableName: lt, bundle: lb, comment: lc)
123-
== rk.formatted(tableName: rt, bundle: rb, comment: rc)
123+
== rk.formatted(tableName: rt, bundle: rb, comment: rc)
124124

125125
case let (.verbatim(lhs), .verbatim(rhs)):
126126
return lhs == rhs
@@ -129,7 +129,7 @@ public struct TextState: Equatable, Hashable {
129129
let (.verbatim(string), .localized(key, tableName, bundle, comment)):
130130
return key.formatted(tableName: tableName, bundle: bundle, comment: comment) == string
131131

132-
// NB: We do not attempt to equate concatenated cases.
132+
// NB: We do not attempt to equate concatenated cases.
133133
default:
134134
return false
135135
}
@@ -455,8 +455,8 @@ extension Text {
455455
}
456456
#else
457457
case .accessibilityHeading,
458-
.accessibilityLabel,
459-
.accessibilityTextContentType:
458+
.accessibilityLabel,
459+
.accessibilityTextContentType:
460460
return text
461461
#endif
462462
case let .baselineOffset(baselineOffset):
@@ -611,7 +611,7 @@ extension LocalizedStringKey {
611611
// `LocalizedStringKey.FormatArgument` differs depending on OS/platform.
612612
if children[0].label == "storage" {
613613
(value, formatter) =
614-
Array(Mirror(reflecting: children[0].value).children)[0].value as! (Any, Formatter?)
614+
Array(Mirror(reflecting: children[0].value).children)[0].value as! (Any, Formatter?)
615615
} else {
616616
value = children[0].value
617617
formatter = children[1].value as? Formatter
@@ -718,18 +718,18 @@ extension TextState: CustomDumpRepresentable {
718718
case .underline(isActive: true, pattern: _, color: .none):
719719
tag("u")
720720
case .bold(isActive: false),
721-
.font(.none),
722-
.fontDesign(.none),
723-
.fontWeight(.none),
724-
.fontWidth(.none),
725-
.foregroundColor(.none),
726-
.italic(isActive: false),
727-
.monospacedDigit,
728-
.speechAlwaysIncludesPunctuation(false),
729-
.speechAnnouncementsQueued(false),
730-
.speechSpellsOutCharacters(false),
731-
.strikethrough(isActive: false, pattern: _, color: _),
732-
.underline(isActive: false, pattern: _, color: _):
721+
.font(.none),
722+
.fontDesign(.none),
723+
.fontWeight(.none),
724+
.fontWidth(.none),
725+
.foregroundColor(.none),
726+
.italic(isActive: false),
727+
.monospacedDigit,
728+
.speechAlwaysIncludesPunctuation(false),
729+
.speechAnnouncementsQueued(false),
730+
.speechSpellsOutCharacters(false),
731+
.strikethrough(isActive: false, pattern: _, color: _),
732+
.underline(isActive: false, pattern: _, color: _):
733733
break
734734
}
735735
}

Tests/SwiftUINavigationTests/TextStateTests.swift

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,67 @@ final class TextStateTests: XCTestCase {
88
customDump(TextState("Hello, world!"), to: &dump)
99
XCTAssertEqual(
1010
dump,
11-
"""
12-
"Hello, world!"
13-
"""
11+
"""
12+
"Hello, world!"
13+
"""
1414
)
1515

1616
dump = ""
1717
customDump(
1818
TextState("Hello, ")
19-
+ TextState("world").bold().italic()
20-
+ TextState("!"),
19+
+ TextState("world").bold().italic()
20+
+ TextState("!"),
2121
to: &dump
2222
)
2323
XCTAssertEqual(
2424
dump,
25-
"""
26-
"Hello, _**world**_!"
27-
"""
25+
"""
26+
"Hello, _**world**_!"
27+
"""
2828
)
2929

3030
dump = ""
3131
customDump(
3232
TextState("Offset by 10.5").baselineOffset(10.5)
33-
+ TextState("\n") + TextState("Headline").font(.headline)
34-
+ TextState("\n") + TextState("No font").font(nil)
35-
+ TextState("\n") + TextState("Light font weight").fontWeight(.light)
36-
+ TextState("\n") + TextState("No font weight").fontWeight(nil)
37-
+ TextState("\n") + TextState("Red").foregroundColor(.red)
38-
+ TextState("\n") + TextState("No color").foregroundColor(nil)
39-
+ TextState("\n") + TextState("Italic").italic()
40-
+ TextState("\n") + TextState("Kerning of 2.5").kerning(2.5)
41-
+ TextState("\n") + TextState("Stricken").strikethrough()
42-
+ TextState("\n") + TextState("Stricken green").strikethrough(color: .green)
43-
+ TextState("\n") + TextState("Not stricken blue").strikethrough(false, color: .blue)
44-
+ TextState("\n") + TextState("Tracking of 5.5").tracking(5.5)
45-
+ TextState("\n") + TextState("Underlined").underline()
46-
+ TextState("\n") + TextState("Underlined pink").underline(color: .pink)
47-
+ TextState("\n") + TextState("Not underlined purple").underline(false, color: .pink),
33+
+ TextState("\n") + TextState("Headline").font(.headline)
34+
+ TextState("\n") + TextState("No font").font(nil)
35+
+ TextState("\n") + TextState("Light font weight").fontWeight(.light)
36+
+ TextState("\n") + TextState("No font weight").fontWeight(nil)
37+
+ TextState("\n") + TextState("Red").foregroundColor(.red)
38+
+ TextState("\n") + TextState("No color").foregroundColor(nil)
39+
+ TextState("\n") + TextState("Italic").italic()
40+
+ TextState("\n") + TextState("Kerning of 2.5").kerning(2.5)
41+
+ TextState("\n") + TextState("Stricken").strikethrough()
42+
+ TextState("\n") + TextState("Stricken green").strikethrough(color: .green)
43+
+ TextState("\n") + TextState("Not stricken blue").strikethrough(false, color: .blue)
44+
+ TextState("\n") + TextState("Tracking of 5.5").tracking(5.5)
45+
+ TextState("\n") + TextState("Underlined").underline()
46+
+ TextState("\n") + TextState("Underlined pink").underline(color: .pink)
47+
+ TextState("\n") + TextState("Not underlined purple").underline(false, color: .pink),
4848
to: &dump
4949
)
5050
XCTAssertNoDifference(
5151
dump,
52-
#"""
53-
"""
54-
<baseline-offset=10.5>Offset by 10.5</baseline-offset>
55-
Headline
56-
No font
57-
<font-weight=light>Light font weight</font-weight>
58-
No font weight
59-
<foreground-color=red>Red</foreground-color>
60-
No color
61-
_Italic_
62-
<kerning=2.5>Kerning of 2.5</kerning>
63-
~~Stricken~~
64-
<s color=green>Stricken green</s>
65-
Not stricken blue
66-
<tracking=5.5>Tracking of 5.5</tracking>
67-
<u>Underlined</u>
68-
<u color=pink>Underlined pink</u>
69-
Not underlined purple
70-
"""
71-
"""#
52+
#"""
53+
"""
54+
<baseline-offset=10.5>Offset by 10.5</baseline-offset>
55+
Headline
56+
No font
57+
<font-weight=light>Light font weight</font-weight>
58+
No font weight
59+
<foreground-color=red>Red</foreground-color>
60+
No color
61+
_Italic_
62+
<kerning=2.5>Kerning of 2.5</kerning>
63+
~~Stricken~~
64+
<s color=green>Stricken green</s>
65+
Not stricken blue
66+
<tracking=5.5>Tracking of 5.5</tracking>
67+
<u>Underlined</u>
68+
<u color=pink>Underlined pink</u>
69+
Not underlined purple
70+
"""
71+
"""#
7272
)
7373
}
7474
}

0 commit comments

Comments
 (0)