Skip to content

Commit 30e06fd

Browse files
committed
Update Tests
1 parent 78eb14d commit 30e06fd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Tests/CodeEditSourceEditorTests/Highlighting/HighlightProviderStateTest.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,13 @@ final class HighlightProviderStateTest: XCTestCase {
116116
language: .swift
117117
)
118118

119+
// These reflect values like `NSTextStorage` outputs, and differ from ranges used in other tests.
119120
let mockEdits: [(NSRange, Int)] = [
120-
(NSRange(location: 0, length: 10), 10), // Inserted 10
121-
(NSRange(location: 5, length: 0), -2), // Deleted 2 at 5
122-
(NSRange(location: 0, length: 2), 3), // Replaced 0-2 with 3
121+
(NSRange(location: 0, length: 0), 10), // Inserted 10
122+
(NSRange(location: 3, length: 2), -2), // Deleted 2 at 5
123+
(NSRange(location: 0, length: 2), 1), // Replaced 0-2 with 3
123124
(NSRange(location: 9, length: 1), 1),
124-
(NSRange(location: 0, length: 0), -10)
125+
(NSRange(location: 0, length: 10), -10)
125126
]
126127

127128
for edit in mockEdits {

0 commit comments

Comments
 (0)