Text test should check that a paragraph's longest line is not greater than the width constraint (#67000)

This commit is contained in:
Jason Simmons 2020-09-30 14:52:08 -07:00 committed by GitHub
parent 39a825ede0
commit e5de2b08b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -943,7 +943,7 @@ void main() {
if (method != #drawParagraph)
return false;
final ui.Paragraph paragraph = arguments[0] as ui.Paragraph;
if (paragraph.width > paragraph.longestLine)
if (paragraph.longestLine > paragraph.width)
throw 'paragraph width (${paragraph.width}) greater than its longest line (${paragraph.longestLine}).';
if (paragraph.width >= 400)
throw 'paragraph.width (${paragraph.width}) >= 400';