Add more tests

This commit is contained in:
Yui T 2015-12-02 13:45:52 -08:00
parent ace383d342
commit 135e091c2a
2 changed files with 26 additions and 12 deletions

View File

@ -5,9 +5,7 @@
//// type NestedCtor<AA> = new() => AA & (new () => AA & { constructor: NestedCtor<A/*3*/A> });
//// type Method<AA> = { method(): A/*4*/A };
//// type Construct<AA> = { new(): A/*5*/A };
//// type Call<AA> = { (): A/*6*/A };
//// type Index<AA> = {[foo: string]: A/*7*/A};
//// type GenericMethod<AA> = { method<BB>(): A/*8*/A & B/*9*/B }
goTo.marker('1');
verify.quickInfoIs('(type parameter) AA in type Ctor<AA>');
@ -18,12 +16,4 @@ verify.quickInfoIs('(type parameter) AA in type NestedCtor<AA>');
goTo.marker('4');
verify.quickInfoIs('(type parameter) AA in type Method<AA>');
goTo.marker('5');
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');
goTo.marker('6');
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
goTo.marker('7');
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
goTo.marker('8');
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
goTo.marker('9');
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');
verify.quickInfoIs('(type parameter) AA in type Construct<AA>');

View File

@ -0,0 +1,24 @@
/// <reference path="fourslash.ts" />
//// type Call<AA> = { (): A/*1*/A };
//// type Index<AA> = {[foo: string]: A/*2*/A};
//// type GenericMethod<AA> = { method<BB>(): A/*3*/A & B/*4*/B }
//// type Nesting<TT> = { method<UU>(): new <WW>() => T/*5*/T & U/*6*/U & W/*7*/W };
type Nesting<TT> = { method<UU>(): new <WW>() => TT & UU & WW }
goTo.marker('1');
verify.quickInfoIs('(type parameter) AA in type Call<AA>');
goTo.marker('2');
verify.quickInfoIs('(type parameter) AA in type Index<AA>');
goTo.marker('3');
verify.quickInfoIs('(type parameter) AA in type GenericMethod<AA>');
goTo.marker('4');
verify.quickInfoIs('(type parameter) BB in method<BB>(): AA & BB');
goTo.marker('5');
verify.quickInfoIs('(type parameter) TT in type Nesting<TT>');
goTo.marker('6');
verify.quickInfoIs('(type parameter) UU in method<UU>(): new <WW>() => TT & UU & WW');
goTo.marker('7');
verify.quickInfoIs('(type parameter) WW in <WW>(): TT & UU & WW');