From 135e091c2acc81325f0d205db253e45b75d0c18c Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 2 Dec 2015 13:45:52 -0800 Subject: [PATCH] Add more tests --- ... quickInfoForTypeParameterInTypeAlias1.ts} | 14 ++--------- .../quickInfoForTypeParameterInTypeAlias2.ts | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 12 deletions(-) rename tests/cases/fourslash/{quickInfoForTypeParameterInTypeAlias.ts => quickInfoForTypeParameterInTypeAlias1.ts} (59%) create mode 100644 tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts diff --git a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts similarity index 59% rename from tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts rename to tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts index 7259a299a7b..7f5f6df4d5b 100644 --- a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias.ts +++ b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias1.ts @@ -5,9 +5,7 @@ //// type NestedCtor = new() => AA & (new () => AA & { constructor: NestedCtor }); //// type Method = { method(): A/*4*/A }; //// type Construct = { new(): A/*5*/A }; -//// type Call = { (): A/*6*/A }; -//// type Index = {[foo: string]: A/*7*/A}; -//// type GenericMethod = { method(): A/*8*/A & B/*9*/B } + goTo.marker('1'); verify.quickInfoIs('(type parameter) AA in type Ctor'); @@ -18,12 +16,4 @@ verify.quickInfoIs('(type parameter) AA in type NestedCtor'); goTo.marker('4'); verify.quickInfoIs('(type parameter) AA in type Method'); goTo.marker('5'); -verify.quickInfoIs('(type parameter) AA in type Construct'); -goTo.marker('6'); -verify.quickInfoIs('(type parameter) AA in type Call'); -goTo.marker('7'); -verify.quickInfoIs('(type parameter) AA in type Index'); -goTo.marker('8'); -verify.quickInfoIs('(type parameter) AA in type GenericMethod'); -goTo.marker('9'); -verify.quickInfoIs('(type parameter) BB in method(): AA & BB'); \ No newline at end of file +verify.quickInfoIs('(type parameter) AA in type Construct'); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts new file mode 100644 index 00000000000..9a3682bf3bc --- /dev/null +++ b/tests/cases/fourslash/quickInfoForTypeParameterInTypeAlias2.ts @@ -0,0 +1,24 @@ +/// + +//// type Call = { (): A/*1*/A }; +//// type Index = {[foo: string]: A/*2*/A}; +//// type GenericMethod = { method(): A/*3*/A & B/*4*/B } +//// type Nesting = { method(): new () => T/*5*/T & U/*6*/U & W/*7*/W }; + +type Nesting = { method(): new () => TT & UU & WW } + +goTo.marker('1'); +verify.quickInfoIs('(type parameter) AA in type Call'); +goTo.marker('2'); +verify.quickInfoIs('(type parameter) AA in type Index'); +goTo.marker('3'); +verify.quickInfoIs('(type parameter) AA in type GenericMethod'); +goTo.marker('4'); +verify.quickInfoIs('(type parameter) BB in method(): AA & BB'); +goTo.marker('5'); +verify.quickInfoIs('(type parameter) TT in type Nesting'); +goTo.marker('6'); +verify.quickInfoIs('(type parameter) UU in method(): new () => TT & UU & WW'); +goTo.marker('7'); +verify.quickInfoIs('(type parameter) WW in (): TT & UU & WW'); +