@@ -54,12 +54,14 @@ void testParagraphStyle() {
54
54
final ParagraphStyle ps1 = ParagraphStyle (textDirection: TextDirection .rtl, fontSize: 14.0 );
55
55
final ParagraphStyle ps2 = ParagraphStyle (textAlign: TextAlign .center, fontWeight: FontWeight .w800, fontSize: 10.0 , height: 100.0 );
56
56
final ParagraphStyle ps3 = ParagraphStyle (fontWeight: FontWeight .w700, fontSize: 12.0 , height: 123.0 );
57
+ final ParagraphStyle ps3 = ParagraphStyle (fontWeight: FontWeight .w700, fontSize: 12.0 , height: kTextHeightNone);
57
58
58
59
test ('ParagraphStyle toString works' , () {
59
60
expect (ps0.toString (), equals ('ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.ltr, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, textHeightBehavior: unspecified, fontFamily: unspecified, fontSize: 14.0, height: unspecified, strutStyle: unspecified, ellipsis: unspecified, locale: unspecified)' ));
60
61
expect (ps1.toString (), equals ('ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.rtl, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, textHeightBehavior: unspecified, fontFamily: unspecified, fontSize: 14.0, height: unspecified, strutStyle: unspecified, ellipsis: unspecified, locale: unspecified)' ));
61
62
expect (ps2.toString (), equals ('ParagraphStyle(textAlign: TextAlign.center, textDirection: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, maxLines: unspecified, textHeightBehavior: unspecified, fontFamily: unspecified, fontSize: 10.0, height: 100.0x, strutStyle: unspecified, ellipsis: unspecified, locale: unspecified)' ));
62
63
expect (ps3.toString (), equals ('ParagraphStyle(textAlign: unspecified, textDirection: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, maxLines: unspecified, textHeightBehavior: unspecified, fontFamily: unspecified, fontSize: 12.0, height: 123.0x, strutStyle: unspecified, ellipsis: unspecified, locale: unspecified)' ));
64
+ expect (ps4.toString (), equals ('ParagraphStyle(textAlign: unspecified, textDirection: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, maxLines: unspecified, textHeightBehavior: unspecified, fontFamily: unspecified, fontSize: 12.0, height: unspecified, strutStyle: unspecified, ellipsis: unspecified, locale: unspecified)' ));
63
65
});
64
66
}
65
67
@@ -69,6 +71,7 @@ void testTextStyle() {
69
71
final TextStyle ts2 = TextStyle (fontFamily: 'test' );
70
72
final TextStyle ts3 = TextStyle (fontFamily: 'foo' , fontFamilyFallback: < String > ['Roboto' , 'test' ]);
71
73
final TextStyle ts4 = TextStyle (leadingDistribution: TextLeadingDistribution .even);
74
+ final TextStyle ts5 = TextStyle (height: kTextHeightNone);
72
75
73
76
test ('TextStyle toString works' , () {
74
77
expect (
@@ -91,6 +94,10 @@ void testTextStyle() {
91
94
ts4.toString (),
92
95
equals ('TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, leadingDistribution: TextLeadingDistribution.even, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified, fontVariations: unspecified)' ),
93
96
);
97
+ expect (
98
+ ts5.toString (),
99
+ equals ('TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, decorationThickness: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: kTextHeightNone, leadingDistribution: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified, fontFeatures: unspecified, fontVariations: unspecified)' ),
100
+ );
94
101
});
95
102
}
96
103
0 commit comments