Fix a TextSpan test (#135187)
`TextSpan.toStringDeep()` returns a string that contains a lengthy diagnostic message instead of the plain string.
This commit is contained in:
parent
d0664bcd79
commit
45e4a0e525
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user