mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
More incremental parser tests.
This commit is contained in:
parent
563b234240
commit
ee828dc1da
@ -866,6 +866,7 @@ module ts {
|
||||
|
||||
filename: string;
|
||||
text: string;
|
||||
|
||||
getLineAndCharacterFromPosition(position: number): LineAndCharacter;
|
||||
getPositionFromLineAndCharacter(line: number, character: number): number;
|
||||
getLineStarts(): number[];
|
||||
|
||||
@ -67,6 +67,9 @@ module ts {
|
||||
// There should be no reused nodes between two trees that are fully parsed.
|
||||
assert.isTrue(reusedElements(oldTree, newTree) === 0);
|
||||
|
||||
assert.equal(newTree.filename, incrementalNewTree.filename, "newTree.filename !== incrementalNewTree.filename");
|
||||
assert.equal(newTree.text, incrementalNewTree.text, "newTree.filename !== incrementalNewTree.filename");
|
||||
|
||||
if (expectedReusedElements !== -1) {
|
||||
var actualReusedCount = reusedElements(oldTree, incrementalNewTree);
|
||||
assert.equal(actualReusedCount, expectedReusedElements, actualReusedCount + " !== " + expectedReusedElements);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user