mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Add incremental test.
This commit is contained in:
@@ -200,7 +200,7 @@ module ts {
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Regular comment 1',() => {
|
||||
it('Comment 1',() => {
|
||||
var source = "class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }";
|
||||
|
||||
var semicolonIndex = source.indexOf(";");
|
||||
@@ -209,5 +209,14 @@ module ts {
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
|
||||
it('Comment 2',() => {
|
||||
var source = "class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }";
|
||||
|
||||
var oldText = ScriptSnapshot.fromString(source);
|
||||
var newTextAndChange = withInsert(oldText, 0, "//");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user