mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Rename functions as per code review feedback
This commit is contained in:
parent
ae04acf27b
commit
3b2dee1329
@ -769,7 +769,7 @@ module FourSlash {
|
||||
return "\nActual " + name + ":\n\t" + actualValue + "\nExpected value:\n\t" + expectedValue;
|
||||
}
|
||||
|
||||
public quickInfoIs(negative: boolean, expectedText?: string, expectedDocumentation?: string) {
|
||||
public verifyQuickInfoString(negative: boolean, expectedText?: string, expectedDocumentation?: string) {
|
||||
[expectedText, expectedDocumentation].forEach(str => {
|
||||
if (str) {
|
||||
this.scenarioActions.push('<ShowQuickInfo />');
|
||||
@ -799,7 +799,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
|
||||
public verifyQuickInfo(kind: string, kindModifiers: string, textSpan: { start: number; length: number; },
|
||||
public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { start: number; length: number; },
|
||||
displayParts: { text: string; kind: string; }[],
|
||||
documentation: { text: string; kind: string; }[]) {
|
||||
this.scenarioActions.push('<ShowQuickInfo />');
|
||||
|
||||
@ -231,7 +231,7 @@ module FourSlashInterface {
|
||||
}
|
||||
|
||||
public quickInfoIs(expectedText?: string, expectedDocumentation?: string) {
|
||||
FourSlash.currentTestState.quickInfoIs(this.negative, expectedText, expectedDocumentation);
|
||||
FourSlash.currentTestState.verifyQuickInfoString(this.negative, expectedText, expectedDocumentation);
|
||||
}
|
||||
|
||||
public quickInfoExists() {
|
||||
@ -435,10 +435,10 @@ module FourSlashInterface {
|
||||
FourSlash.currentTestState.verifyRenameLocations(findInStrings, findInComments);
|
||||
}
|
||||
|
||||
public verifyQuickInfo(kind: string, kindModifiers: string, textSpan: { start: number; length: number; },
|
||||
public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: { start: number; length: number; },
|
||||
displayParts: { text: string; kind: string; }[],
|
||||
documentation: { text: string; kind: string; }[]) {
|
||||
FourSlash.currentTestState.verifyQuickInfo(kind, kindModifiers, textSpan, displayParts, documentation);
|
||||
FourSlash.currentTestState.verifyQuickInfoDisplayParts(kind, kindModifiers, textSpan, displayParts, documentation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,19 +6,19 @@
|
||||
////var /*4*/cVal = /*5*/c;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("1").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("1").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("2").position, length: "cInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("2").position, length: "cInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
goTo.marker('3');
|
||||
verify.verifyQuickInfo("constructor", "", { start: test.markerByName("3").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("constructor", "", { start: test.markerByName("3").position, length: "c".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "constructor", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" },
|
||||
{ text: "(", kind: "punctuation" }, { text: ")", kind: "punctuation" }, { text: ":", kind: "punctuation" },
|
||||
@ -26,7 +26,7 @@ verify.verifyQuickInfo("constructor", "", { start: test.markerByName("3").positi
|
||||
[]);
|
||||
|
||||
goTo.marker('4');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("4").position, length: "cVal".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("4").position, length: "cVal".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cVal", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
@ -34,6 +34,6 @@ verify.verifyQuickInfo("var", "", { start: test.markerByName("4").position, leng
|
||||
[]);
|
||||
|
||||
goTo.marker('5');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("5").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("5").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
function verifyClassProperty(markerName: string, kindModifiers: string, propertyName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("property", kindModifiers, { start: test.markerByName(markerName).position, length: propertyName.length },
|
||||
verify.verifyQuickInfoDisplayParts("property", kindModifiers, { start: test.markerByName(markerName).position, length: propertyName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "property", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
{ text: "c", kind: "className" }, { text: ".", kind: "punctuation" }, { text: propertyName, kind: "propertyName" },
|
||||
@ -97,7 +97,7 @@ verifyProtectedStaticProperty('81');
|
||||
verifyProtectedStaticProperty('81s');
|
||||
|
||||
goTo.marker('9');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
@ -106,14 +106,14 @@ verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, leng
|
||||
verifyPublicProperty('10');
|
||||
|
||||
goTo.marker('11');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
verifyStaticProperty('12');
|
||||
|
||||
goTo.marker('9s');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("9s").position, length: "cInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("9s").position, length: "cInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
@ -122,7 +122,7 @@ verify.verifyQuickInfo("var", "", { start: test.markerByName("9s").position, len
|
||||
verifyPublicProperty('10s');
|
||||
|
||||
goTo.marker('11s');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("11s").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("11s").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
function verifyNonOverloadSignature(marker: string, textSpanLength: number) {
|
||||
goTo.marker(marker);
|
||||
verify.verifyQuickInfo("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
verify.verifyQuickInfoDisplayParts("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "constructor", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" },
|
||||
{ text: "(", kind: "punctuation" }, { text: ")", kind: "punctuation" }, { text: ":", kind: "punctuation" },
|
||||
@ -39,7 +39,7 @@ function verifyNonOverloadSignature(marker: string, textSpanLength: number) {
|
||||
|
||||
function verifyClassInstance(markerName: string, instanceName: string, className: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName(markerName).position, length: instanceName.length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName(markerName).position, length: instanceName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: instanceName, kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: className, kind: "className" }],
|
||||
@ -48,14 +48,14 @@ function verifyClassInstance(markerName: string, instanceName: string, className
|
||||
|
||||
function verifyClass(markerName: string, className: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName(markerName).position, length: className.length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName(markerName).position, length: className.length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: className, kind: "className" }],
|
||||
[]);
|
||||
}
|
||||
|
||||
function verifyTypeOfClass(markerName: string, typeOfVarName: string, className: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName(markerName).position, length: typeOfVarName.length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName(markerName).position, length: typeOfVarName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: typeOfVarName, kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
@ -65,7 +65,7 @@ function verifyTypeOfClass(markerName: string, typeOfVarName: string, className:
|
||||
|
||||
function verifySingleOverloadSignature(marker: string, textSpanLength: number, parameterType: string) {
|
||||
goTo.marker(marker);
|
||||
verify.verifyQuickInfo("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
verify.verifyQuickInfoDisplayParts("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "constructor", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cWithOverloads", kind: "className" }, { text: "(", kind: "punctuation" },
|
||||
{ text: "x", kind: "parameterName" }, { text: ":", kind: "punctuation" },
|
||||
@ -81,7 +81,7 @@ function verifySingleOverloadSignature(marker: string, textSpanLength: number, p
|
||||
|
||||
function verifyMultipleOverloadSignature(marker: string, textSpanLength: number, parameterType: string) {
|
||||
goTo.marker(marker);
|
||||
verify.verifyQuickInfo("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
verify.verifyQuickInfoDisplayParts("constructor", "", { start: test.markerByName(marker).position, length: textSpanLength },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "constructor", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cWithMultipleOverloads", kind: "className" }, { text: "(", kind: "punctuation" },
|
||||
{ text: "x", kind: "parameterName" }, { text: ":", kind: "punctuation" },
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
function verifyClassMethod(markerName: string, kindModifiers: string, methodName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("method", kindModifiers, { start: test.markerByName(markerName).position, length: methodName.length },
|
||||
verify.verifyQuickInfoDisplayParts("method", kindModifiers, { start: test.markerByName(markerName).position, length: methodName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "method", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
{ text: "c", kind: "className" }, { text: ".", kind: "punctuation" }, { text: methodName, kind: "methodName" },
|
||||
@ -70,7 +70,7 @@ verifyPrivateStaticMethod('8');
|
||||
verifyProtectedStaticMethod('81');
|
||||
|
||||
goTo.marker('9');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
@ -79,7 +79,7 @@ verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, leng
|
||||
verifyPublicMethod('10');
|
||||
|
||||
goTo.marker('11');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
function verifyClassProperty(markerName: string, kindModifiers: string, propertyName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("property", kindModifiers, { start: test.markerByName(markerName).position, length: propertyName.length },
|
||||
verify.verifyQuickInfoDisplayParts("property", kindModifiers, { start: test.markerByName(markerName).position, length: propertyName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "property", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
{ text: "c", kind: "className" }, { text: ".", kind: "punctuation" }, { text: propertyName, kind: "propertyName" },
|
||||
@ -69,7 +69,7 @@ verifyPrivateStaticProperty('8');
|
||||
verifyProtectedStaticProperty('81');
|
||||
|
||||
goTo.marker('9');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("9").position, length: "cInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "cInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
@ -78,7 +78,7 @@ verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, leng
|
||||
verifyPublicProperty('10');
|
||||
|
||||
goTo.marker('11');
|
||||
verify.verifyQuickInfo("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
verify.verifyQuickInfoDisplayParts("class", "", { start: test.markerByName("11").position, length: "c".length },
|
||||
[{ text: "class", kind: "keyword" }, { text: " ", kind: "space" }, { text: "c", kind: "className" }],
|
||||
[]);
|
||||
|
||||
@ -5,18 +5,18 @@
|
||||
////var /*2*/iInstance: /*3*/i;
|
||||
|
||||
goTo.marker('1');
|
||||
verify.verifyQuickInfo("interface", "", { start: test.markerByName("1").position, length: "i".length },
|
||||
verify.verifyQuickInfoDisplayParts("interface", "", { start: test.markerByName("1").position, length: "i".length },
|
||||
[{ text: "interface", kind: "keyword" }, { text: " ", kind: "space" }, { text: "i", kind: "interfaceName" }],
|
||||
[]);
|
||||
|
||||
goTo.marker('2');
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("2").position, length: "iInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("2").position, length: "iInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "iInstance", kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "i", kind: "interfaceName" }],
|
||||
[]);
|
||||
|
||||
goTo.marker('3');
|
||||
verify.verifyQuickInfo("interface", "", { start: test.markerByName("3").position, length: "i".length },
|
||||
verify.verifyQuickInfoDisplayParts("interface", "", { start: test.markerByName("3").position, length: "i".length },
|
||||
[{ text: "interface", kind: "keyword" }, { text: " ", kind: "space" }, { text: "i", kind: "interfaceName" }],
|
||||
[]);
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
function verifyInterfaceProperty(markerName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("property", "", { start: test.markerByName(markerName).position, length: "property".length },
|
||||
verify.verifyQuickInfoDisplayParts("property", "", { start: test.markerByName(markerName).position, length: "property".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "property", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
{ text: "I", kind: "interfaceName" }, { text: ".", kind: "punctuation" }, { text: "property", kind: "propertyName" },
|
||||
@ -23,7 +23,7 @@ function verifyInterfaceProperty(markerName: string) {
|
||||
|
||||
function verifyInterfaceMethod(markerName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("method", "", { start: test.markerByName(markerName).position, length: "method".length },
|
||||
verify.verifyQuickInfoDisplayParts("method", "", { start: test.markerByName(markerName).position, length: "method".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "method", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" },
|
||||
{ text: "I", kind: "interfaceName" }, { text: ".", kind: "punctuation" }, { text: "method", kind: "methodName" },
|
||||
@ -34,7 +34,7 @@ function verifyInterfaceMethod(markerName: string) {
|
||||
|
||||
function verifyInterfaceInstanceVar(markerName: string, instanceName: string) {
|
||||
goTo.marker(markerName);
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName(markerName).position, length: instanceName.length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName(markerName).position, length: instanceName.length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: instanceName, kind: "localName" }, { text: ":", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "I", kind: "interfaceName" }],
|
||||
@ -51,7 +51,7 @@ verifyInterfaceMethod("6");
|
||||
|
||||
// Call signature
|
||||
goTo.marker("7");
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("7").position, length: "iInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("7").position, length: "iInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "iInstance", kind: "localName" },
|
||||
{ text: ":", kind: "punctuation" }, { text: " ", kind: "space" }, { text: "I", kind: "interfaceName" },
|
||||
@ -64,7 +64,7 @@ verifyInterfaceInstanceVar("8", "anotherInstance");
|
||||
|
||||
// Cosntruct signature
|
||||
goTo.marker("9");
|
||||
verify.verifyQuickInfo("var", "", { start: test.markerByName("9").position, length: "iInstance".length },
|
||||
verify.verifyQuickInfoDisplayParts("var", "", { start: test.markerByName("9").position, length: "iInstance".length },
|
||||
[{ text: "(", kind: "punctuation" }, { text: "var", kind: "text" }, { text: ")", kind: "punctuation" },
|
||||
{ text: " ", kind: "space" }, { text: "iInstance", kind: "localName" },
|
||||
{ text: ":", kind: "punctuation" }, { text: " ", kind: "space" },
|
||||
Loading…
x
Reference in New Issue
Block a user