Skip to content

Commit ec357db

Browse files
author
Andy Hanson
committed
Fix test
1 parent 6e69bdb commit ec357db

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/harness/unittests/versionCache.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ namespace ts {
1010
return lineIndex.absolutePositionOfStartOfLine(line) + (col - 1);
1111
}
1212

13-
function foo(lineIndex: server.LineIndex) {
14-
lineIndex.load([]);
15-
lineIndex.positionToLineOffset(0);
16-
}
17-
foo;
18-
1913
function validateEdit(lineIndex: server.LineIndex, sourceText: string, position: number, deleteLength: number, insertString: string): void {
2014
const checkText = editFlat(position, deleteLength, insertString, sourceText);
2115
const snapshot = lineIndex.edit(position, deleteLength, insertString);
@@ -58,7 +52,7 @@ var q:Point=<Point>p;`;
5852
it("handles empty lines array", () => {
5953
const lineIndex = new server.LineIndex();
6054
lineIndex.load([]);
61-
assert.equal(lineIndex.positionToLineOffset(0), { line: 0, offset: 0 });
55+
assert.deepEqual(lineIndex.positionToLineOffset(0), { line: 1, offset: 1 });
6256
});
6357

6458
it(`change 9 1 0 1 {"y"}`, () => {

0 commit comments

Comments
 (0)