assertBufferLines method
Implementation
void assertBufferLines(List<String> expected) {
final expectedBuf = Buffer.withLines(expected);
for (var y = 0; y < expected.length; y++) {
for (var x = 0; x < expected[y].length; x++) {
final expectedCell = expectedBuf.cellAt(Position(x, y));
final actualCell = _buffer.cellAt(Position(x, y));
if (expectedCell?.symbol != actualCell?.symbol) {
throw AssertionError(
'Buffer mismatch at ($x, $y): expected "${expectedCell?.symbol}", got "${actualCell?.symbol}"',
);
}
}
}
}