@@ -18,7 +18,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
18
18
subject. addAttributes ( [ . link( URL ( string: " https://google.com " ) !) ] , range: 1 ..< 3 )
19
19
XCTAssertNotEqual ( subject, expected)
20
20
#if swift(>=4.0)
21
- let linkAttributeName = NSAttributedString . Key . link
21
+ let linkAttributeName = AttributeName . link
22
22
#else
23
23
let linkAttributeName = NSLinkAttributeName
24
24
#endif
@@ -33,7 +33,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
33
33
subject. addAttributes ( [ . font( . boldSystemFont( ofSize: 17 ) ) ] , range: NSRange ( location: 0 , length: 1 ) )
34
34
XCTAssertNotEqual ( subject, expected)
35
35
#if swift(>=4.0)
36
- let fontAttributeName = NSAttributedString . Key . font
36
+ let fontAttributeName = AttributeName . font
37
37
#else
38
38
let fontAttributeName = NSFontAttributeName
39
39
#endif
@@ -48,7 +48,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
48
48
subject. setAttributes ( [ . backgroundColor( . orange) ] , range: 0 ..< 3 )
49
49
XCTAssertNotEqual ( subject, expected)
50
50
#if swift(>=4.0)
51
- let attributeName = NSAttributedString . Key . backgroundColor
51
+ let attributeName = AttributeName . backgroundColor
52
52
#else
53
53
let attributeName = NSBackgroundColorAttributeName
54
54
#endif
@@ -63,7 +63,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
63
63
subject. setAttributes ( [ . backgroundColor( . orange) ] , range: NSRange ( location: 2 , length: 2 ) )
64
64
XCTAssertNotEqual ( subject, expected)
65
65
#if swift(>=4.0)
66
- let attributeName = NSAttributedString . Key . backgroundColor
66
+ let attributeName = AttributeName . backgroundColor
67
67
#else
68
68
let attributeName = NSBackgroundColorAttributeName
69
69
#endif
@@ -88,7 +88,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
88
88
subject. replaceCharacters ( in: 0 ..< 2 , with: " Chi " . withBackgroundColor ( . magenta) )
89
89
XCTAssertNotEqual ( subject, expected)
90
90
#if swift(>=4.0)
91
- let attributeName = NSAttributedString . Key . backgroundColor
91
+ let attributeName = AttributeName . backgroundColor
92
92
#else
93
93
let attributeName = NSBackgroundColorAttributeName
94
94
#endif
@@ -113,7 +113,7 @@ class NSMutableAttributedString_Tests: XCTestCase {
113
113
subject. removeAttribute ( . baselineOffset, range: 1 ..< 4 )
114
114
XCTAssertNotEqual ( subject, expected)
115
115
#if swift(>=4.0)
116
- let attributeName = NSAttributedString . Key . baselineOffset
116
+ let attributeName = AttributeName . baselineOffset
117
117
#else
118
118
let attributeName = NSBaselineOffsetAttributeName
119
119
#endif
0 commit comments