mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Added tests for overloads.
This commit is contained in:
parent
4e18efd25c
commit
dfe79621fe
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("x");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("y");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("z");
|
||||
|
||||
@ -7,8 +7,11 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
//verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('g(templateStrings: any, x: any, y: any, z: any): string');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
verify.currentParameterSpanIs("templateStrings: any");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(1);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(2);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(2);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("x");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(2);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("y");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
verify.currentParameterHelpArgumentNameIs("y");
|
||||
|
||||
@ -7,7 +7,9 @@
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('g(templateStrings: any, x: any, y: any, z: any): string');
|
||||
});
|
||||
@ -8,7 +8,9 @@ debugger;
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(1);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: any, x: any, y: any, z: any): number');
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `/*1*/ /*2*/$/*3*/{
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(2);
|
||||
|
||||
verify.currentSignatureParamterCountIs(2);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o1: string): number');
|
||||
verify.currentParameterHelpArgumentNameIs("templateStrings");
|
||||
verify.currentParameterSpanIs("templateStrings: string[]");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${/*1*/ /*2*/ /*3*/
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(2);
|
||||
|
||||
verify.currentSignatureParamterCountIs(2);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o1: string): number');
|
||||
verify.currentParameterHelpArgumentNameIs("p1_o1");
|
||||
verify.currentParameterSpanIs("p1_o1: string");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${/*1*/ "s/*2*/tring" /*3*/ } ${
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean');
|
||||
verify.currentParameterHelpArgumentNameIs("p1_o3");
|
||||
verify.currentParameterSpanIs("p1_o3: string");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${/*1*/ 123.456/*2*/ /*3*/ } ${
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string');
|
||||
verify.currentParameterHelpArgumentNameIs("p1_o2");
|
||||
verify.currentParameterSpanIs("p1_o2: number");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${ } ${/*1*/ /*2*/ /*3*/
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string');
|
||||
verify.currentParameterHelpArgumentNameIs("p2_o2");
|
||||
verify.currentParameterSpanIs("p2_o2: number");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${ } ${/*1*/ /*2*/ /*3*/}
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string');
|
||||
verify.currentParameterHelpArgumentNameIs("p2_o2");
|
||||
verify.currentParameterSpanIs("p2_o2: number");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${ } ${/*1*/ fa/*2*/lse /*3*/}
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(3);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean');
|
||||
verify.currentParameterHelpArgumentNameIs("p2_o3");
|
||||
verify.currentParameterSpanIs("p2_o3: boolean");
|
||||
});
|
||||
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
//// function f(templateStrings: string[], p1_o1: string): number;
|
||||
//// function f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string;
|
||||
//// function f(templateStrings: string[], p1_o3: string, p2_o3: boolean, p3_o3: number): boolean;
|
||||
//// function f(...foo[]: any) { return ""; }
|
||||
////
|
||||
//// f `${ undefined } ${ undefined } ${/*1*/ 10/*2*/./*3*/01 /*4*/} `
|
||||
|
||||
test.markers().forEach(m => {
|
||||
goTo.position(m.position);
|
||||
|
||||
verify.signatureHelpCountIs(3);
|
||||
verify.signatureHelpArgumentCountIs(4);
|
||||
|
||||
verify.currentSignatureParamterCountIs(4);
|
||||
verify.currentSignatureHelpIs('f(templateStrings: string[], p1_o2: number, p2_o2: number, p3_o2: number): string');
|
||||
verify.currentParameterHelpArgumentNameIs("p3_o2");
|
||||
verify.currentParameterSpanIs("p3_o2: number");
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user