@@ -54,12 +54,14 @@ void testParagraphStyle() {
5454 final ParagraphStyle ps1 = ParagraphStyle (textDirection: TextDirection .rtl, fontSize: 14.0 );
5555 final ParagraphStyle ps2 = ParagraphStyle (textAlign: TextAlign .center, fontWeight: FontWeight .w800, fontSize: 10.0 , height: 100.0 );
5656 final ParagraphStyle ps3 = ParagraphStyle (fontWeight: FontWeight .w700, fontSize: 12.0 , height: 123.0 );
57+ final ParagraphStyle ps4 = ParagraphStyle (fontWeight: FontWeight .w700, fontSize: 12.0 , height: kTextHeightNone);
5758
5859 test ('ParagraphStyle toString works' , () {
5960 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)' ));
6061 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)' ));
6162 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)' ));
6263 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)' ));
6365 });
6466}
6567
@@ -69,6 +71,7 @@ void testTextStyle() {
6971 final TextStyle ts2 = TextStyle (fontFamily: 'test' );
7072 final TextStyle ts3 = TextStyle (fontFamily: 'foo' , fontFamilyFallback: < String > ['Roboto' , 'test' ]);
7173 final TextStyle ts4 = TextStyle (leadingDistribution: TextLeadingDistribution .even);
74+ final TextStyle ts5 = TextStyle (height: kTextHeightNone);
7275
7376 test ('TextStyle toString works' , () {
7477 expect (
@@ -91,6 +94,10 @@ void testTextStyle() {
9194 ts4.toString (),
9295 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)' ),
9396 );
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+ );
94101 });
95102}
96103
0 commit comments