diff --git a/Tests/SaplingEditorTests/EditorLargeDocumentValidationTests.swift b/Tests/SaplingEditorTests/EditorLargeDocumentValidationTests.swift index c483467..573c2ec 100644 --- a/Tests/SaplingEditorTests/EditorLargeDocumentValidationTests.swift +++ b/Tests/SaplingEditorTests/EditorLargeDocumentValidationTests.swift @@ -38,12 +38,11 @@ final class EditorLargeDocumentValidationTests: XCTestCase { previousActiveLineIndex: activeLineIndex, currentActiveLineIndex: activeLineIndex ) + let updatedLineIndex = DocumentLineIndex(source: updatedSource) let dirtyRenderMeasurement = elapsedTime { - let lines = EditorActiveLineTracker.lines(from: updatedSource, activeLineIndex: activeLineIndex) - let dirty = Set(plan.dirtyLineIndexes) let renderer = HybridMarkdownLineRenderer() - _ = lines - .filter { dirty.contains($0.index) } + _ = plan.dirtyLineIndexes + .compactMap { updatedLineIndex.editorLine(at: $0, activeLineIndex: activeLineIndex) } .map(renderer.renderPlan(for:)) }