Detect and dump flaky LineMetrics test data (#46213)

This commit is contained in:
Gary Qian 2019-12-19 09:28:02 +09:00 committed by GitHub
parent 9184f4d6fb
commit f05ab50370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -745,6 +745,15 @@ void main() {
expect(lines.length, 4);
// TODO(garyq): This data dump is for debugging a test flake. This should
// be removed when it is no longer useful.
if (lines[1].hardBreak == true) {
print('LineMetrics called: ${lines.length}');
for (ui.LineMetrics line in lines) {
print('${line.lineNumber}: ${line.hardBreak}');
}
}
expect(lines[0].hardBreak, true);
expect(lines[1].hardBreak, false);
expect(lines[2].hardBreak, true);