mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 06:35:35 -05:00
More incremental parser tests.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user