Skip to content

Commit 19c9043

Browse files
committed
Cleanup: tvOS test changes.
1 parent aeebce4 commit 19c9043

File tree

1 file changed

+16
-28
lines changed

1 file changed

+16
-28
lines changed

Tests/DiffableTextKitXUIKitTests/Models/ModelsTests+Font.swift

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,22 @@ final class ModelsTestsXFont: Tests {
2323
// MARK: State
2424
//=------------------------------------------------------------------------=
2525

26-
#if os(tvOS)
27-
let fonts: [DiffableTextFont] = [
28-
.title1,
29-
.title2,
30-
.title3,
31-
.headline,
32-
.subheadline,
33-
.body,
34-
.callout,
35-
.footnote,
36-
.caption1,
37-
.caption2,
38-
]
39-
#else
40-
let fonts: [DiffableTextFont] = [
41-
.largeTitle,
42-
.title1,
43-
.title2,
44-
.title3,
45-
.headline,
46-
.subheadline,
47-
.body,
48-
.callout,
49-
.footnote,
50-
.caption1,
51-
.caption2,
52-
]
53-
#endif
26+
lazy var fonts: [DiffableTextFont] = {
27+
var fonts = [DiffableTextFont]()
28+
#if !os(tvOS)
29+
fonts.append(.largeTitle)
30+
#endif
31+
fonts.append(.title1)
32+
fonts.append(.title2)
33+
fonts.append(.title3)
34+
fonts.append(.headline)
35+
fonts.append(.subheadline)
36+
fonts.append(.body)
37+
fonts.append(.footnote)
38+
fonts.append(.caption1)
39+
fonts.append(.caption2)
40+
return fonts
41+
}()
5442

5543
lazy var designs: [UIFontDescriptor.SystemDesign] = [
5644
.default, .monospaced, .rounded, .serif

0 commit comments

Comments
 (0)