Added tests for index signature completion builders.

This commit is contained in:
Daniel Rosenwasser 2015-07-02 12:20:20 -07:00
parent f37a7f5752
commit e8a1f16e62
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,20 @@
/// <reference path='fourslash.ts' />
////interface I<T> {
//// [/*1*/]: T;
//// [/*2*/]: T;
////}
////
////class C {
//// [/*3*/]: string;
//// [str/*4*/: string]: number;
////}
////
////type T = {
//// [x/*5*/yz: number]: boolean;
//// [/*6*/
for (let marker of test.markers()) {
goTo.position(marker.position);
verify.completionListAllowsNewIdentifier();
}

View File

@ -0,0 +1,19 @@
/// <reference path='fourslash.ts' />
////interface I<T> {
//// [x: /*1*/]: T;
//// [: /*2*/]: T
////}
////
////class C {
//// [a: /*3*/]: string;
//// [str: string/*4*/]: number;
////}
////
////type T = {
//// [xyz: /*5*/
for (let marker of test.markers()) {
goTo.position(marker.position);
verify.not.completionListAllowsNewIdentifier();
}