assertLine method
Implementation
void assertLine(int lineIndex, String expected) {
final actualLines = lines;
if (lineIndex >= actualLines.length) {
throw AssertionError(
'Line $lineIndex out of range (max: ${actualLines.length - 1})',
);
}
final actual = actualLines[lineIndex];
if (actual != expected) {
throw AssertionError(
'Line $lineIndex does not match:\n Expected: "$expected"\n Actual: "$actual"',
);
}
}