From e5de2b08b85cd824acc7679cce67e44ca5122625 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 30 Sep 2020 14:52:08 -0700 Subject: [PATCH] Text test should check that a paragraph's longest line is not greater than the width constraint (#67000) --- packages/flutter/test/widgets/text_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/test/widgets/text_test.dart b/packages/flutter/test/widgets/text_test.dart index c4f4596805e..a2797001a2a 100644 --- a/packages/flutter/test/widgets/text_test.dart +++ b/packages/flutter/test/widgets/text_test.dart @@ -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';