Unverified Commit 45e4a0e5 authored by LongCatIsLooong's avatar LongCatIsLooong Committed by GitHub

Fix a TextSpan test (#135187)

`TextSpan.toStringDeep()` returns a string that contains a lengthy diagnostic message instead of the plain string.
parent d0664bcd
......@@ -436,15 +436,15 @@ void main() {
expect(paragraph.size.width, 78.0);
expect(paragraph.size.height, 26.0);
final int length = testSpan.toPlainText().length;
// Test the sizes of nested spans.
final String text = testSpan.toStringDeep();
final List<ui.TextBox> boxes = <ui.TextBox>[
for (int i = 0; i < text.length; ++i)
for (int i = 0; i < length; ++i)
...paragraph.getBoxesForSelection(
TextSelection(baseOffset: i, extentOffset: i + 1),
),
];
expect(boxes.length, equals(4));
expect(boxes, hasLength(4));
expect(boxes[0].toRect().width, 13.0);
expect(boxes[0].toRect().height, 13.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment