Add incremental test.

This commit is contained in:
Cyrus Najmabadi
2014-12-09 16:57:51 -08:00
parent 778e180e40
commit de84ddd815

View File

@@ -237,5 +237,20 @@ module ts {
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Parameter 1',() => {
// Should be able to reuse all the parameters.
var source = "class C {\r\n" +
" public foo2(a, b, c, d) {\r\n" +
" return 1;\r\n" +
" }\r\n" +
"}";
var semicolonIndex = source.indexOf(";");
var oldText = ScriptSnapshot.fromString(source);
var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1");
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
});
}