@@ -53,6 +53,12 @@ final class TypographyMutatorsTests: XCTestCase {
5353 _test ( original: $0, modified: $0. fontSize ( newFontSize) , fontSize: newFontSize)
5454 }
5555 }
56+
57+ func testLineHeight( ) {
58+ types. forEach {
59+ _test ( original: $0, modified: $0. lineHeight ( $0. lineHeight + 1 ) , lineHeight: ( $0. lineHeight + 1 ) )
60+ }
61+ }
5662
5763 func testFixed( ) {
5864 types. forEach {
@@ -89,13 +95,15 @@ final class TypographyMutatorsTests: XCTestCase {
8995 modified: Typography ,
9096 weight: Typography . FontWeight ? = nil ,
9197 fontSize: CGFloat ? = nil ,
98+ lineHeight: CGFloat ? = nil ,
9299 isFixed: Bool ? = nil ,
93100 letterSpacing: CGFloat ? = nil ,
94101 textCase: Typography . TextCase ? = nil ,
95102 textDecoration: Typography . TextDecoration ? = nil
96103 ) {
97104 let weight = weight ?? original. fontWeight
98105 let fontSize = fontSize ?? original. fontSize
106+ let lineHeight = lineHeight ?? original. lineHeight
99107 let isFixed = isFixed ?? original. isFixed
100108 let kerning = letterSpacing ?? original. letterSpacing
101109 let textCase = textCase ?? original. textCase
@@ -104,14 +112,14 @@ final class TypographyMutatorsTests: XCTestCase {
104112 // fontWeight, fontSize, isFixed, letterSpacing, textCase, and textDecoration should be as expected
105113 XCTAssertEqual ( modified. fontWeight, weight)
106114 XCTAssertEqual ( modified. fontSize, fontSize)
115+ XCTAssertEqual ( modified. lineHeight, lineHeight)
107116 XCTAssertEqual ( modified. isFixed, isFixed)
108117 XCTAssertEqual ( modified. letterSpacing, kerning)
109118 XCTAssertEqual ( modified. textCase, textCase)
110119 XCTAssertEqual ( modified. textDecoration, textDecoration)
111120
112121 // the other variables should be the same
113122 XCTAssertEqual ( modified. fontFamily. familyName, original. fontFamily. familyName)
114- XCTAssertEqual ( modified. lineHeight, original. lineHeight)
115123 XCTAssertEqual ( modified. textStyle, original. textStyle)
116124 XCTAssertEqual ( modified. paragraphIndent, original. paragraphIndent)
117125 XCTAssertEqual ( modified. paragraphSpacing, original. paragraphSpacing)
0 commit comments