From db3f7c538e324be4219dab947e3734f81e07b508 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 11 Jan 2018 17:43:27 -0800 Subject: [PATCH] Update test baselines --- .../fourslash/autoFormattingOnPasting.ts | 12 ++-- tests/cases/fourslash/classInterfaceInsert.ts | 2 +- .../fourslash/codeFixAddMissingMember.ts | 2 +- .../fourslash/codeFixAddMissingMember2.ts | 2 +- .../fourslash/codeFixAddMissingMember3.ts | 2 +- .../fourslash/codeFixAddMissingMember4.ts | 4 +- .../fourslash/codeFixAddMissingMember5.ts | 4 +- .../fourslash/codeFixAddMissingMember6.ts | 4 +- .../fourslash/codeFixAddMissingMember7.ts | 4 +- .../fourslash/codeFixAddMissingMember_all.ts | 8 +-- .../codeFixAddMissingMember_all_js.ts | 10 ++-- ...ClassImplementClassFunctionVoidInferred.ts | 8 +-- ...prExtendsAbstractExpressionWithTypeArgs.ts | 4 +- ...assExtendAbstractExpressionWithTypeArgs.ts | 4 +- .../codeFixClassExtendAbstractGetterSetter.ts | 16 ++--- .../codeFixClassExtendAbstractMethod.ts | 22 +++---- .../codeFixClassExtendAbstractMethodThis.ts | 8 +-- ...stractMethodTypeParamsInstantiateNumber.ts | 8 +-- ...endAbstractMethodTypeParamsInstantiateU.ts | 8 +-- .../codeFixClassExtendAbstractMethod_all.ts | 16 ++--- .../codeFixClassExtendAbstractProperty.ts | 8 +-- .../codeFixClassExtendAbstractPropertyThis.ts | 4 +- ...FixClassExtendAbstractProtectedProperty.ts | 4 +- ...odeFixClassExtendAbstractPublicProperty.ts | 4 +- ...ImplementClassAbstractGettersAndSetters.ts | 8 +-- ...ClassImplementClassFunctionVoidInferred.ts | 8 +-- ...xClassImplementClassMultipleSignatures1.ts | 10 ++-- ...xClassImplementClassMultipleSignatures2.ts | 14 ++--- ...FixClassImplementClassPropertyModifiers.ts | 8 +-- ...FixClassImplementClassPropertyTypeQuery.ts | 4 +- .../codeFixClassImplementDeepInheritance.ts | 14 ++--- .../codeFixClassImplementDefaultClass.ts | 4 +- ...odeFixClassImplementInterfaceArrayTuple.ts | 8 +-- ...xClassImplementInterfaceClassExpression.ts | 4 +- .../codeFixClassImplementInterfaceComments.ts | 12 ++-- ...lementInterfaceComputedPropertyLiterals.ts | 18 +++--- ...aceComputedPropertyNameWellKnownSymbols.ts | 58 +++++++++---------- ...deFixClassImplementInterfaceInNamespace.ts | 8 +-- ...ssImplementInterfaceIndexSignaturesBoth.ts | 6 +- ...ImplementInterfaceIndexSignaturesNumber.ts | 4 +- ...ImplementInterfaceIndexSignaturesString.ts | 4 +- ...codeFixClassImplementInterfaceIndexType.ts | 4 +- ...mplementInterfaceInheritsAbstractMethod.ts | 8 +-- ...odeFixClassImplementInterfaceMappedType.ts | 4 +- ...ImplementInterfaceMemberNestedTypeAlias.ts | 10 ++-- ...ixClassImplementInterfaceMemberOrdering.ts | 50 ++++++++-------- ...xClassImplementInterfaceMemberTypeAlias.ts | 10 ++-- ...mentInterfaceMethodThisAndSelfReference.ts | 8 +-- ...ssImplementInterfaceMethodTypePredicate.ts | 12 ++-- ...tInterfaceMultipleMembersAndPunctuation.ts | 26 ++++----- ...assImplementInterfaceMultipleSignatures.ts | 14 ++--- ...plementInterfaceMultipleSignaturesRest1.ts | 14 ++--- ...plementInterfaceMultipleSignaturesRest2.ts | 14 ++--- ...lassImplementInterfaceNamespaceConflict.ts | 4 +- ...ClassImplementInterfaceOptionalProperty.ts | 6 +- .../codeFixClassImplementInterfaceProperty.ts | 10 ++-- ...assImplementInterfacePropertySignatures.ts | 24 ++++---- ...FixClassImplementInterfaceQualifiedName.ts | 4 +- ...mentInterfaceTypeParamInstantiateDeeply.ts | 4 +- ...mentInterfaceTypeParamInstantiateNumber.ts | 4 +- ...ImplementInterfaceTypeParamInstantiateT.ts | 4 +- ...ImplementInterfaceTypeParamInstantiateU.ts | 4 +- ...xClassImplementInterfaceTypeParamMethod.ts | 8 +-- .../codeFixClassImplementInterface_all.ts | 22 +++---- .../codeFixClassSuperMustPrecedeThisAccess.ts | 2 +- ...eFixClassSuperMustPrecedeThisAccess_all.ts | 4 +- ...deFixConstructorForDerivedNeedSuperCall.ts | 4 +- ...xConstructorForDerivedNeedSuperCall_all.ts | 8 +-- .../codeFixDisableJsDiagnosticsInFile_all.ts | 4 +- .../codeFixUndeclaredInStaticMethod.ts | 48 +++++++-------- .../fourslash/codeFixUndeclaredMethod.ts | 36 ++++++------ ...completionAfterBackslashFollowingString.ts | 2 +- ...Import_default_alreadyExistedWithRename.ts | 2 +- .../completionsImport_default_anonymous.ts | 4 +- ...letionsImport_default_didNotExistBefore.ts | 4 +- ...sImport_default_exportDefaultIdentifier.ts | 4 +- .../completionsImport_fromAmbientModule.ts | 4 +- .../completionsImport_multipleWithSameName.ts | 4 +- ...tionsImport_named_exportEqualsNamespace.ts | 4 +- .../fourslash/completionsImport_ofAlias.ts | 4 +- ...mpletionsImport_ofAlias_preferShortPath.ts | 4 +- .../fourslash/completionsImport_require.ts | 8 +-- ...tenceOnIndentionsOfChainedFunctionCalls.ts | 2 +- ...ocCommentTemplateFunctionWithParameters.ts | 4 +- .../fourslash/findReferencesAfterEdit.ts | 2 +- tests/cases/fourslash/formatEmptyBlock.ts | 2 +- .../cases/fourslash/formatTemplateLiteral.ts | 4 +- .../formattingOnDoWhileNoSemicolon.ts | 2 +- .../formattingOnNestedDoWhileByEnter.ts | 2 +- ...formattingWithEnterAfterMultilineString.ts | 2 +- .../fourslash/getOccurrencesAfterEdit.ts | 2 +- .../fourslash/importNameCodeFixReExport.ts | 4 +- .../noSmartIndentInsideMultilineString.ts | 2 +- .../shims-pp/getOccurrencesAtPosition.ts | 2 +- .../shims/getOccurrencesAtPosition.ts | 2 +- .../smartIndentArrayBindingPattern01.ts | 2 +- .../smartIndentArrayBindingPattern02.ts | 2 +- .../cases/fourslash/smartIndentDoStatement.ts | 2 +- .../cases/fourslash/smartIndentIfStatement.ts | 2 +- .../smartIndentInParenthesizedExpression01.ts | 2 +- .../smartIndentObjectBindingPattern01.ts | 2 +- .../smartIndentObjectBindingPattern02.ts | 2 +- .../cases/fourslash/smartIndentOnAccessors.ts | 4 +- .../fourslash/smartIndentOnAccessors01.ts | 4 +- .../smartIndentOnFunctionParameters.ts | 4 +- ...rtIndentOnUnclosedFunctionDeclaration01.ts | 2 +- ...rtIndentOnUnclosedFunctionDeclaration02.ts | 2 +- ...rtIndentOnUnclosedFunctionDeclaration03.ts | 2 +- ...rtIndentOnUnclosedFunctionDeclaration04.ts | 2 +- .../fourslash/smartIndentStartLineInLists.ts | 2 +- .../fourslash/smartIndentTemplateLiterals.ts | 2 +- 111 files changed, 424 insertions(+), 424 deletions(-) diff --git a/tests/cases/fourslash/autoFormattingOnPasting.ts b/tests/cases/fourslash/autoFormattingOnPasting.ts index 5c9e2c86e37..7eb08116041 100644 --- a/tests/cases/fourslash/autoFormattingOnPasting.ts +++ b/tests/cases/fourslash/autoFormattingOnPasting.ts @@ -11,12 +11,12 @@ public testMethod( ) }`); // We're missing scenarios of formatting option settings due to bug 693273 - [TypeScript] Need to improve fourslash support for formatting options. // Missing scenario ** Uncheck Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste ** -//verify.currentFileContentIs("module TestModule {\r\n\ -// class TestClass{\r\n\ -//private foo;\r\n\ -//public testMethod( )\r\n\ -//{}\r\n\ -//}\r\n\ +//verify.currentFileContentIs("module TestModule {\n\ +// class TestClass{\n\ +//private foo;\n\ +//public testMethod( )\n\ +//{}\n\ +//}\n\ //}"); // Missing scenario ** Check Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste ** verify.currentFileContentIs(`module TestModule { diff --git a/tests/cases/fourslash/classInterfaceInsert.ts b/tests/cases/fourslash/classInterfaceInsert.ts index e2610532083..d645d6eb8eb 100644 --- a/tests/cases/fourslash/classInterfaceInsert.ts +++ b/tests/cases/fourslash/classInterfaceInsert.ts @@ -12,6 +12,6 @@ verify.quickInfoAt("className", "class Sphere"); goTo.marker('interfaceGoesHere'); -edit.insert("\r\ninterface Surface {\r\n reflect: () => number;\r\n}\r\n"); +edit.insert("\ninterface Surface {\n reflect: () => number;\n}\n"); verify.quickInfoAt("className", "class Sphere"); diff --git a/tests/cases/fourslash/codeFixAddMissingMember.ts b/tests/cases/fourslash/codeFixAddMissingMember.ts index 563cc29f4ea..8c337c30318 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember.ts @@ -11,7 +11,7 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newFileContent: `class C { - foo: number;\r + foo: number; method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember2.ts b/tests/cases/fourslash/codeFixAddMissingMember2.ts index 06e111e63c7..e8a28810a60 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember2.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember2.ts @@ -11,7 +11,7 @@ verify.codeFix({ index: 1, // TODO: GH#18445 newFileContent: `class C { - [x: string]: number;\r + [x: string]: number; method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember3.ts b/tests/cases/fourslash/codeFixAddMissingMember3.ts index adc099eff74..8367e6918cc 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember3.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember3.ts @@ -11,7 +11,7 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newFileContent: `class C { - static foo: number;\r + static foo: number; static method() { this.foo = 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember4.ts b/tests/cases/fourslash/codeFixAddMissingMember4.ts index 97a17959d26..5f84b28cde3 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember4.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember4.ts @@ -17,8 +17,8 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newFileContent: `class C { - constructor() {\r - this.foo = undefined;\r + constructor() { + this.foo = undefined; } method() { this.foo === 10; diff --git a/tests/cases/fourslash/codeFixAddMissingMember5.ts b/tests/cases/fourslash/codeFixAddMissingMember5.ts index a15b564c786..727253f0b9d 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember5.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember5.ts @@ -18,7 +18,7 @@ verify.codeFix({ static method() { ()=>{ this.foo === 10 }; } -}\r -C.foo = undefined;\r +} +C.foo = undefined; ` }); diff --git a/tests/cases/fourslash/codeFixAddMissingMember6.ts b/tests/cases/fourslash/codeFixAddMissingMember6.ts index a04a14c9ce5..f418f2c3ebc 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember6.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember6.ts @@ -15,8 +15,8 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newFileContent: `class C { - constructor() {\r - this.foo = undefined;\r + constructor() { + this.foo = undefined; } prop = ()=>{ this.foo === 10 }; }` diff --git a/tests/cases/fourslash/codeFixAddMissingMember7.ts b/tests/cases/fourslash/codeFixAddMissingMember7.ts index 0655898218b..8a475ebaf9c 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember7.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember7.ts @@ -14,7 +14,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `class C { static p = ()=>{ this.foo === 10 }; -}\r -C.foo = undefined;\r +} +C.foo = undefined; ` }); diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all.ts b/tests/cases/fourslash/codeFixAddMissingMember_all.ts index e7edad47227..9b9618ecaeb 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all.ts @@ -13,10 +13,10 @@ verify.codeFixAll({ newFileContent: // TODO: GH#18445 `class C { - x: number;\r - y(): any {\r - throw new Error("Method not implemented.");\r - }\r + x: number; + y(): any { + throw new Error("Method not implemented."); + } method() { this.x = 0; this.y(); diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts index 1bc0d03c211..67a91fd8b93 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts @@ -18,11 +18,11 @@ verify.codeFixAll({ newFileContent: // TODO: GH#18445 `class C { - y() {\r - throw new Error("Method not implemented.");\r - }\r - constructor() {\r - this.x = undefined;\r + y() { + throw new Error("Method not implemented."); + } + constructor() { + this.x = undefined; } method() { this.x; diff --git a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts index 68743288c71..9fa45fde8dc 100644 --- a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts @@ -12,9 +12,9 @@ verify.codeFix({ `class A { f() {} } -let B = class implements A {\r - f(): void {\r - throw new Error("Method not implemented.");\r - }\r +let B = class implements A { + f(): void { + throw new Error("Method not implemented."); + } }` }); diff --git a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts index 76117f05090..ef85b2c6cdf 100644 --- a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts @@ -20,7 +20,7 @@ verify.codeFix({ return C; } -let B = class extends foo("s") {\r - a: string | number;\r +let B = class extends foo("s") { + a: string | number; }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts index b7557419de0..e21b7a21e26 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts @@ -20,7 +20,7 @@ verify.codeFix({ return C; } -class B extends foo("s") {\r - a: string | number;\r +class B extends foo("s") { + a: string | number; }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts index 4949ddbf7c5..8dd0e508ce9 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts @@ -42,13 +42,13 @@ verify.codeFix({ // Don't need to add anything in this case. abstract class B extends A {} -class C extends A {\r - a: string | number;\r - b: this;\r - c: A;\r - d: string | number;\r - e: this;\r - f: A;\r - g: string;\r +class C extends A { + a: string | number; + b: this; + c: A; + d: string | number; + e: this; + f: A; + g: string; }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts index 462dd1e18ea..7098af8bc27 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts @@ -22,16 +22,16 @@ verify.codeFix({ abstract foo(): number; } -class C extends A {\r - f(a: number, b: string): boolean;\r - f(a: number, b: string): this;\r - f(a: string, b: number): Function;\r - f(a: string): Function;\r - f(a: any, b?: any) {\r - throw new Error("Method not implemented.");\r - }\r - foo(): number {\r - throw new Error("Method not implemented.");\r - }\r +class C extends A { + f(a: number, b: string): boolean; + f(a: number, b: string): this; + f(a: string, b: number): Function; + f(a: string): Function; + f(a: any, b?: any) { + throw new Error("Method not implemented."); + } + foo(): number { + throw new Error("Method not implemented."); + } }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts index 7fa5b762787..f0bb90c9443 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts @@ -14,9 +14,9 @@ verify.codeFix({ abstract f(): this; } -class C extends A {\r - f(): this {\r - throw new Error("Method not implemented.");\r - }\r +class C extends A { + f(): this { + throw new Error("Method not implemented."); + } }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts index 01411fb34cb..fdbbda75113 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts @@ -14,9 +14,9 @@ verify.codeFix({ abstract f(x: T): T; } -class C extends A {\r - f(x: number): number {\r - throw new Error("Method not implemented.");\r - }\r +class C extends A { + f(x: number): number { + throw new Error("Method not implemented."); + } }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts index aff612ac95d..41fe94ae634 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts @@ -14,9 +14,9 @@ verify.codeFix({ abstract f(x: T): T; } -class C extends A {\r - f(x: U): U {\r - throw new Error("Method not implemented.");\r - }\r +class C extends A { + f(x: U): U { + throw new Error("Method not implemented."); + } }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts index ba6afb9ac7a..aa28f301cc8 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts @@ -13,14 +13,14 @@ verify.codeFixAll({ `abstract class A { abstract m(): void; } -class B extends A {\r - m(): void {\r - throw new Error("Method not implemented.");\r - }\r +class B extends A { + m(): void { + throw new Error("Method not implemented."); + } } -class C extends A {\r - m(): void {\r - throw new Error("Method not implemented.");\r - }\r +class C extends A { + m(): void { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts index 6fd77e90385..e5811016e8c 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts @@ -18,9 +18,9 @@ verify.codeFix({ abstract z: A; } -class C extends A {\r - x: number;\r - y: this;\r - z: A;\r +class C extends A { + x: number; + y: this; + z: A; }` }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts index 9531c3b7533..c1184c083a5 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts @@ -14,7 +14,7 @@ verify.codeFix({ abstract x: this; } -class C extends A {\r - x: this;\r +class C extends A { + x: this; }`, }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts index 63a3ed99f67..e2472318e10 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts @@ -14,7 +14,7 @@ verify.codeFix({ protected abstract x: number; } -class C extends A {\r - protected x: number;\r +class C extends A { + protected x: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts index c8696b1ad6c..bb9ed1ec9c5 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts @@ -14,7 +14,7 @@ verify.codeFix({ public abstract x: number; } -class C extends A {\r - public x: number;\r +class C extends A { + public x: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts b/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts index f6fac956c5b..ee28448f06e 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts @@ -28,9 +28,9 @@ verify.codeFix({ abstract set c(arg: number | string); } -class C implements A {\r - a: string;\r - b: number;\r - c: string | number;\r +class C implements A { + a: string; + b: number; + c: string | number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts index dbc0689644f..8b749145ec2 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts @@ -14,9 +14,9 @@ verify.codeFix({ f() {} } -class B implements A {\r - f(): void {\r - throw new Error("Method not implemented.");\r - }\r +class B implements A { + f(): void { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts index 8c563d4dbb7..a2492787bf7 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts @@ -14,10 +14,10 @@ verify.codeFix({ method(a: number, b: string): boolean; method(a: string | number, b?: string | number): boolean | Function { return true; } } -class C implements A {\r - method(a: number, b: string): boolean;\r - method(a: string | number, b?: string | number): boolean | Function {\r - throw new Error("Method not implemented.");\r - }\r +class C implements A { + method(a: number, b: string): boolean; + method(a: string | number, b?: string | number): boolean | Function { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts index de2bfab561e..83e531c9ef4 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts @@ -18,12 +18,12 @@ verify.codeFix({ method(a: string): Function; method(a: string | number, b?: string | number): boolean | Function { return true; } } -class C implements A {\r - method(a: any, b: string): boolean;\r - method(a: string, b: number): Function;\r - method(a: string): Function;\r - method(a: string | number, b?: string | number): boolean | Function {\r - throw new Error("Method not implemented.");\r - }\r +class C implements A { + method(a: any, b: string): boolean; + method(a: string, b: number): Function; + method(a: string): Function; + method(a: string | number, b?: string | number): boolean | Function { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts b/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts index f3aa6bc6c6c..59d406541a6 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts @@ -20,9 +20,9 @@ verify.codeFix({ public w: number; } -class C implements A {\r - x: number;\r - protected z: number;\r - public w: number;\r +class C implements A { + x: number; + protected z: number; + public w: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts b/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts index 0981db995bb..326ad2b547e 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts @@ -12,7 +12,7 @@ verify.codeFix({ `class A { A: typeof A; } -class D implements A {\r - A: typeof A;\r +class D implements A { + A: typeof A; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts b/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts index ae187b93572..785ffb80a08 100644 --- a/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts +++ b/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts @@ -75,12 +75,12 @@ class C4 extends C3 implements I0, I4, I5 { } interface I6 extends C4 {} -class C5 implements I6 {\r - e: number;\r - f: number;\r - a: number;\r - b: number;\r - d: number;\r - c: number;\r +class C5 implements I6 { + e: number; + f: number; + a: number; + b: number; + d: number; + c: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts b/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts index 53fb9378591..e2ffab5a784 100644 --- a/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts +++ b/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts @@ -8,7 +8,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `interface I { x: number; } -export default class implements I {\r - x: number;\r +export default class implements I { + x: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts index b121fe54ac7..05c5ceaa6bc 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts @@ -18,9 +18,9 @@ verify.codeFix({ z: [number, string, I]; } -class C implements I {\r - x: number[];\r - y: number[];\r - z: [number, string, I];\r +class C implements I { + x: number[]; + y: number[]; + z: [number, string, I]; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts index 8b811a98d25..0340cdf180b 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts @@ -9,7 +9,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `interface I { x: number; } -new class implements I {\r - x: number;\r +new class implements I { + x: number; };`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts index 98a00d43f4c..a80dcf0c4b9 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts @@ -36,11 +36,11 @@ verify.codeFix({ /**method signature prefix */foo /**open angle prefix */< /**type parameter name prefix */ X /** closing angle prefix */> /**open paren prefix */(/** parameter prefix */ a/** colon prefix */: /** parameter type prefix */ X /** close paren prefix */) /** colon prefix */: /** return type prefix */ string /** semicolon prefix */; /**close-brace prefix*/ } /**close-brace prefix*/ } -class C implements N.I {\r - /** property prefix */ a /** colon prefix */: N.E.a;\r - /** property prefix */ b /** colon prefix */: N.E;\r - /**method signature prefix */ foo /**open angle prefix */(a: X): string {\r - throw new Error("Method not implemented.");\r - }\r +class C implements N.I { + /** property prefix */ a /** colon prefix */: N.E.a; + /** property prefix */ b /** colon prefix */: N.E; + /**method signature prefix */ foo /**open angle prefix */(a: X): string { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts index 6bbe5f4efd1..4e999d38426 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts @@ -20,14 +20,14 @@ verify.codeFix({ [2]: boolean; } -class C implements I {\r - ["foo"](o: any): boolean {\r - throw new Error("Method not implemented.");\r - }\r - ["x"]: boolean;\r - [1](): string {\r - throw new Error("Method not implemented.");\r - }\r - [2]: boolean;\r +class C implements I { + ["foo"](o: any): boolean { + throw new Error("Method not implemented."); + } + ["x"]: boolean; + [1](): string { + throw new Error("Method not implemented."); + } + [2]: boolean; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts index ab8b7ddfebb..be9f6ddbbec 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts @@ -38,34 +38,34 @@ verify.codeFix({ [Symbol.toStringTag]: string; [Symbol.unscopables]: any; } -class C implements I {\r - [Symbol.hasInstance](o: any): boolean {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.isConcatSpreadable]: boolean;\r - [Symbol.iterator]() {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.match]: boolean;\r - [Symbol.replace](...args: {}) {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.search](str: string): number {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.species](): number {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.split](str: string, limit?: number): {} {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.toPrimitive](hint: "number"): number;\r - [Symbol.toPrimitive](hint: "default"): number;\r - [Symbol.toPrimitive](hint: "string"): string;\r - [Symbol.toPrimitive](hint: any) {\r - throw new Error("Method not implemented.");\r - }\r - [Symbol.toStringTag]: string\;\r - [Symbol.unscopables]: any;\r +class C implements I { + [Symbol.hasInstance](o: any): boolean { + throw new Error("Method not implemented."); + } + [Symbol.isConcatSpreadable]: boolean; + [Symbol.iterator]() { + throw new Error("Method not implemented."); + } + [Symbol.match]: boolean; + [Symbol.replace](...args: {}) { + throw new Error("Method not implemented."); + } + [Symbol.search](str: string): number { + throw new Error("Method not implemented."); + } + [Symbol.species](): number { + throw new Error("Method not implemented."); + } + [Symbol.split](str: string, limit?: number): {} { + throw new Error("Method not implemented."); + } + [Symbol.toPrimitive](hint: "number"): number; + [Symbol.toPrimitive](hint: "default"): number; + [Symbol.toPrimitive](hint: "string"): string; + [Symbol.toPrimitive](hint: any) { + throw new Error("Method not implemented."); + } + [Symbol.toStringTag]: string\; + [Symbol.unscopables]: any; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts index 9e01e080af6..b52e4d98c38 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts @@ -24,9 +24,9 @@ interface I1 { f1(); } -class C1 implements N1.I1 {\r - f1(): string {\r - throw new Error("Method not implemented.");\r - }\r +class C1 implements N1.I1 { + f1(): string { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts index 2becd28aa4f..011bed12d8b 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts @@ -17,8 +17,8 @@ verify.codeFix({ [y: string]: I; } -class C implements I {\r - [x: number]: I;\r - [y: string]: I;\r +class C implements I { + [x: number]: I; + [y: string]: I; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts index ebd0904e88a..5b4a2bb73c0 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts @@ -12,7 +12,7 @@ verify.codeFix({ `interface I { [x: number]: I; } -class C implements I {\r - [x: number]: I;\r +class C implements I { + [x: number]: I; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts index 4cd6cd0c9a3..5f9c943330b 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts @@ -14,7 +14,7 @@ verify.codeFix({ [Ƚ: string]: X; } -class C implements I {\r - [Ƚ: string]: number;\r +class C implements I { + [Ƚ: string]: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts index 7e93871c552..760d15f1d8f 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts @@ -12,7 +12,7 @@ verify.codeFix({ `interface I { x: keyof X; } -class C implements I {\r - x: keyof Y;\r +class C implements I { + x: keyof Y; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts index 83a2c131d97..e4e8c409165 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts @@ -16,9 +16,9 @@ abstract class C2 { abstract fA(); } interface I1 extends C1, C2 { } -class C3 implements I1 {\r - fA() {\r - throw new Error("Method not implemented.");\r - }\r +class C3 implements I1 { + fA() { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts index 5fff622f2db..86a979b23df 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts @@ -12,7 +12,7 @@ verify.codeFix({ `interface I { x: { readonly [K in keyof X]: X[K] }; } -class C implements I {\r - x: { readonly [K in keyof Y]: Y[K]; };\r +class C implements I { + x: { readonly [K in keyof Y]: Y[K]; }; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts index fc1217f1556..af4c591fd37 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts @@ -16,10 +16,10 @@ interface I { x: Either>; foo(x: Either>): void; } -class C implements I {\r - x: Either>;\r - foo(x: Either>): void {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + x: Either>; + foo(x: Either>): void { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts index 4bb20142df3..e7d98d4ee1b 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts @@ -62,30 +62,30 @@ interface I { /** a nice safe prime */ 23; } -class C implements I {\r - 1: any;\r - 2: any;\r - 3: any;\r - 4: any;\r - 5: any;\r - 6: any;\r - 7: any;\r - 8: any;\r - 9: any;\r - 10: any;\r - 11: any;\r - 12: any;\r - 13: any;\r - 14: any;\r - 15: any;\r - 16: any;\r - 17: any;\r - 18: any;\r - 19: any;\r - 20: any;\r - 21: any;\r - 22: any;\r - /** a nice safe prime */\r - 23: any;\r +class C implements I { + 1: any; + 2: any; + 3: any; + 4: any; + 5: any; + 6: any; + 7: any; + 8: any; + 9: any; + 10: any; + 11: any; + 12: any; + 13: any; + 14: any; + 15: any; + 16: any; + 17: any; + 18: any; + 19: any; + 20: any; + 21: any; + 22: any; + /** a nice safe prime */ + 23: any; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts index 23f1c79054e..87fda6bcd11 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts @@ -10,10 +10,10 @@ verify.codeFix({ newFileContent: `type MyType = [string, number]; interface I { x: MyType; test(a: MyType): void; } -class C implements I {\r - x: [string, number];\r - test(a: [string, number]): void {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + x: [string, number]; + test(a: [string, number]): void { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts index 41c8f2254db..c382b9f6858 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts @@ -14,9 +14,9 @@ verify.codeFix({ f(x: number, y: this): I } -class C implements I {\r - f(x: number, y: this): I {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + f(x: number, y: this): I { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts index ce1dfead0f3..9c916e3f4c6 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts @@ -16,11 +16,11 @@ verify.codeFix({ f(): this is I; } -class C implements I {\r - f(i: any): i is I;\r - f(): this is I;\r - f(i?: any) {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + f(i: any): i is I; + f(): this is I; + f(i?: any) { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts index afad257a699..9b7a91891a7 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts @@ -24,18 +24,18 @@ verify.codeFix({ h(); } -class C1 implements I1 {\r - x: number;\r - y: number;\r - z: number;\r - f() {\r - throw new Error("Method not implemented.");\r - }\r - g() {\r - throw new Error("Method not implemented.");\r - }\r - h() {\r - throw new Error("Method not implemented.");\r - }\r +class C1 implements I1 { + x: number; + y: number; + z: number; + f() { + throw new Error("Method not implemented."); + } + g() { + throw new Error("Method not implemented."); + } + h() { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts index b8167ccf35b..05b08d6f570 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts @@ -18,12 +18,12 @@ verify.codeFix({ method(a: string): Function; } -class C implements I {\r - method(a: number, b: string): boolean;\r - method(a: string, b: number): Function;\r - method(a: string): Function;\r - method(a: any, b?: any) {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + method(a: number, b: string): boolean; + method(a: string, b: number): Function; + method(a: string): Function; + method(a: any, b?: any) { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts index ee64c1be6bb..91f142db5dd 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts @@ -18,12 +18,12 @@ verify.codeFix({ method(a: string): Function; } -class C implements I {\r - method(a: number, ...b: string[]): boolean;\r - method(a: string, ...b: number[]): Function;\r - method(a: string): Function;\r - method(a: any, ...b?: any[]) {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + method(a: number, ...b: string[]): boolean; + method(a: string, ...b: number[]): Function; + method(a: string): Function; + method(a: any, ...b?: any[]) { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts index 9b4e471a5d8..ae57831f0ea 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts @@ -18,12 +18,12 @@ verify.codeFix({ method(a: string): Function; } -class C implements I {\r - method(a: number, ...b: string[]): boolean;\r - method(a: string, b: number): Function;\r - method(a: string): Function;\r - method(a: any, b?: any, ...rest?: any[]) {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + method(a: number, ...b: string[]): boolean; + method(a: string, b: number): Function; + method(a: string): Function; + method(a: any, b?: any, ...rest?: any[]) { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts index ee9808603cf..bca3c7b5fe2 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts @@ -18,7 +18,7 @@ verify.codeFix({ interface I1 { f1(); } -class C1 implements N1.I1 {\r - x: number;\r +class C1 implements N1.I1 { + x: number; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts index ea4f5dbdd91..215d11f1d94 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts @@ -14,8 +14,8 @@ verify.codeFix({ name: string; birthday?: string; } -class Person implements IPerson {\r - name: string;\r - birthday?: string;\r +class Person implements IPerson { + name: string; + birthday?: string; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts index f8fb576800f..db9bf753ef7 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts @@ -22,10 +22,10 @@ interface I { z: symbol; w: object; } -class C implements I {\r - x: E;\r - y: E.a;\r - z: symbol;\r - w: object;\r +class C implements I { + x: E; + y: E.a; + z: symbol; + w: object; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts b/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts index 98a0f374ae7..37a35470d53 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts @@ -40,17 +40,17 @@ verify.codeFix({ a9: { (b9: number, c9: string): number; [d9: number]: I }; a10: { (b10: number, c10: string): number; [d10: string]: I }; } -class C implements I {\r - a0: {};\r - a1: (b1: number, c1: string) => number;\r - a2: (b2: number, c2: string) => number;\r - a3: { (b3: number, c3: string): number; x: number; };\r - a4: new (b1: number, c1: string) => number;\r - a5: new (b2: number, c2: string) => number;\r - a6: { new(b3: number, c3: string): number; x: number; };\r - a7: { foo(b7: number, c7: string): number; };\r - a8: { (b81: number, c81: string): number; new(b82: number, c82: string): number; };\r - a9: { (b9: number, c9: string): number;[d9: number]: I; };\r - a10: { (b10: number, c10: string): number;[d10: string]: I; };\r +class C implements I { + a0: {}; + a1: (b1: number, c1: string) => number; + a2: (b2: number, c2: string) => number; + a3: { (b3: number, c3: string): number; x: number; }; + a4: new (b1: number, c1: string) => number; + a5: new (b2: number, c2: string) => number; + a6: { new(b3: number, c3: string): number; x: number; }; + a7: { foo(b7: number, c7: string): number; }; + a8: { (b81: number, c81: string): number; new(b82: number, c82: string): number; }; + a9: { (b9: number, c9: string): number;[d9: number]: I; }; + a10: { (b10: number, c10: string): number;[d10: string]: I; }; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts index c8e88bced9f..9ca2894741c 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts @@ -12,7 +12,7 @@ verify.codeFix({ `namespace N { export interface I { y: I; } } -class C1 implements N.I {\r - y: N.I;\r +class C1 implements N.I { + y: N.I; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts index 4b50cf2e69b..486bea3098a 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts @@ -12,7 +12,7 @@ verify.codeFix({ `interface I { x: { y: T, z: T[] }; } -class C implements I {\r - x: { y: number; z: number[]; };\r +class C implements I { + x: { y: number; z: number[]; }; }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts index 6df183d3e44..dde7bc4fc09 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts @@ -8,7 +8,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `interface I { x: T; } -class C implements I {\r - x: number;\r +class C implements I { + x: number; }` }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts index 7be7d21f1e4..4a796bcefc1 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts @@ -8,7 +8,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `interface I { x: T; } -class C implements I {\r - x: T;\r +class C implements I { + x: T; }` }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts index ac4cad80220..efe5295d3b3 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts @@ -8,7 +8,7 @@ verify.codeFix({ // TODO: GH#18445 newFileContent: `interface I { x: T; } -class C implements I {\r - x: U;\r +class C implements I { + x: U; }` }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts index 6a93c84ecf0..5596b091754 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts @@ -12,9 +12,9 @@ verify.codeFix({ `interface I { f(x: T); } -class C implements I {\r - f(x: T) {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I { + f(x: T) { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassImplementInterface_all.ts b/tests/cases/fourslash/codeFixClassImplementInterface_all.ts index fb3672a7949..641f355be32 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterface_all.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterface_all.ts @@ -11,17 +11,17 @@ verify.codeFixAll({ newFileContent: `interface I { i(): void; } interface J { j(): void; } -class C implements I, J {\r - i(): void {\r - throw new Error("Method not implemented.");\r - }\r - j(): void {\r - throw new Error("Method not implemented.");\r - }\r +class C implements I, J { + i(): void { + throw new Error("Method not implemented."); + } + j(): void { + throw new Error("Method not implemented."); + } } -class D implements J {\r - j(): void {\r - throw new Error("Method not implemented.");\r - }\r +class D implements J { + j(): void { + throw new Error("Method not implemented."); + } }`, }); diff --git a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts index a4db2c909fd..ab0860a4caa 100644 --- a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts +++ b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts @@ -11,6 +11,6 @@ ////} // TODO: GH#18445 verify.rangeAfterCodeFix(` - super();\r + super(); this.a = 12; `, /*includeWhiteSpace*/ true); diff --git a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_all.ts b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_all.ts index 0b12fb4b03d..96f3677fda7 100644 --- a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_all.ts +++ b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess_all.ts @@ -18,14 +18,14 @@ verify.codeFixAll({ fixId: "classSuperMustPrecedeThisAccess", newFileContent: `class C extends Object { constructor() { - super();\r + super(); this; this; } } class D extends Object { constructor() { - super();\r + super(); this; } }`, diff --git a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts index 402d4196360..030463345f3 100644 --- a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts +++ b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts @@ -13,8 +13,8 @@ verify.codeFix({ `class Base{ } class C extends Base{ - constructor() {\r - super();\r + constructor() { + super(); } }`, }); diff --git a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts index 8aa0e2c6ade..60e6d1d4599 100644 --- a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts +++ b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts @@ -11,13 +11,13 @@ verify.codeFixAll({ fixId: "constructorForDerivedNeedSuperCall", // TODO: GH#18445 newFileContent: `class C extends Object { - constructor() {\r - super();\r + constructor() { + super(); } } class D extends Object { - constructor() {\r - super();\r + constructor() { + super(); } }`, }); diff --git a/tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_all.ts b/tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_all.ts index 527ecb66848..9c3785cf2ae 100644 --- a/tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_all.ts +++ b/tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile_all.ts @@ -13,8 +13,8 @@ verify.codeFixAll({ fixId: "disableJsDiagnostics", newFileContent: `let x = ""; -// @ts-ignore\r +// @ts-ignore x = 1; -// @ts-ignore\r +// @ts-ignore x = true;`, }); diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index b1fac4e0f12..0a978fab222 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -14,9 +14,9 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newRangeContent: ` - static m1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + static m1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } `, }); @@ -24,12 +24,12 @@ verify.codeFix({ description: "Declare static method 'm2'", index: 0, newRangeContent: ` - static m2(arg0: any, arg1: any): any {\r - throw new Error("Method not implemented.");\r - }\r - static m1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + static m2(arg0: any, arg1: any): any { + throw new Error("Method not implemented."); + } + static m1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } `, }); @@ -37,13 +37,13 @@ verify.codeFix({ description: "Declare static property 'prop1'", index: 0, newRangeContent: ` - static prop1: number;\r - static m2(arg0: any, arg1: any): any {\r - throw new Error("Method not implemented.");\r - }\r - static m1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + static prop1: number; + static m2(arg0: any, arg1: any): any { + throw new Error("Method not implemented."); + } + static m1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } `, }); @@ -51,13 +51,13 @@ verify.codeFix({ description: "Declare static property 'prop2'", index: 0, newRangeContent: ` - static prop2: string;\r - static prop1: number;\r - static m2(arg0: any, arg1: any): any {\r - throw new Error("Method not implemented.");\r - }\r - static m1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + static prop2: string; + static prop1: number; + static m2(arg0: any, arg1: any): any { + throw new Error("Method not implemented."); + } + static m1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } `, }); diff --git a/tests/cases/fourslash/codeFixUndeclaredMethod.ts b/tests/cases/fourslash/codeFixUndeclaredMethod.ts index 2f291490b14..bffa9fb0897 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethod.ts @@ -15,9 +15,9 @@ verify.codeFix({ index: 0, // TODO: GH#18445 newRangeContent: ` - foo1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + foo1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } `, }); @@ -25,12 +25,12 @@ verify.codeFix({ description: "Declare method 'foo2'", index: 0, newRangeContent: ` - foo2(): any {\r - throw new Error("Method not implemented.");\r - }\r - foo1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + foo2(): any { + throw new Error("Method not implemented."); + } + foo1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } ` }); @@ -38,14 +38,14 @@ verify.codeFix({ description: "Declare method 'foo3'", index: 0, newRangeContent:` - foo3(): any {\r - throw new Error("Method not implemented.");\r - }\r - foo2(): any {\r - throw new Error("Method not implemented.");\r - }\r - foo1(arg0: any, arg1: any, arg2: any): any {\r - throw new Error("Method not implemented.");\r - }\r + foo3(): any { + throw new Error("Method not implemented."); + } + foo2(): any { + throw new Error("Method not implemented."); + } + foo1(arg0: any, arg1: any, arg2: any): any { + throw new Error("Method not implemented."); + } ` }); diff --git a/tests/cases/fourslash/completionAfterBackslashFollowingString.ts b/tests/cases/fourslash/completionAfterBackslashFollowingString.ts index e8eeeb571b6..2e8587ffd1f 100644 --- a/tests/cases/fourslash/completionAfterBackslashFollowingString.ts +++ b/tests/cases/fourslash/completionAfterBackslashFollowingString.ts @@ -1,6 +1,6 @@ /// -////Harness.newLine = "\r"\n/**/ +////Harness.newLine = ""\n/**/ goTo.marker(); verify.not.completionListIsEmpty(); \ No newline at end of file diff --git a/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts b/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts index 09c0e74002b..0c3df5d0f23 100644 --- a/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts +++ b/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts @@ -19,6 +19,6 @@ verify.applyCodeActionFromCompletion("", { description: `Import 'foo' from module "./a"`, // TODO: GH#18445 newFileContent: `import f_o_o from "./a"; -import foo from "./a";\r +import foo from "./a"; f;`, }); diff --git a/tests/cases/fourslash/completionsImport_default_anonymous.ts b/tests/cases/fourslash/completionsImport_default_anonymous.ts index 35489c1110b..617e3c5f669 100644 --- a/tests/cases/fourslash/completionsImport_default_anonymous.ts +++ b/tests/cases/fourslash/completionsImport_default_anonymous.ts @@ -23,8 +23,8 @@ verify.applyCodeActionFromCompletion("1", { source: "/src/foo-bar", description: `Import 'fooBar' from module "./foo-bar"`, // TODO: GH#18445 - newFileContent: `import fooBar from "./foo-bar";\r -\r + newFileContent: `import fooBar from "./foo-bar"; + def fooB`, }); diff --git a/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts b/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts index 558be4bee03..0daeabf1ec7 100644 --- a/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts +++ b/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts @@ -19,7 +19,7 @@ verify.applyCodeActionFromCompletion("", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import foo from "./a";\r -\r + newFileContent: `import foo from "./a"; + f;`, }); diff --git a/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts b/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts index 7549c2e001b..2b3056313e8 100644 --- a/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts +++ b/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts @@ -20,7 +20,7 @@ verify.applyCodeActionFromCompletion("", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import foo from "./a";\r -\r + newFileContent: `import foo from "./a"; + f;`, }); diff --git a/tests/cases/fourslash/completionsImport_fromAmbientModule.ts b/tests/cases/fourslash/completionsImport_fromAmbientModule.ts index db9b586eb42..90806f802ee 100644 --- a/tests/cases/fourslash/completionsImport_fromAmbientModule.ts +++ b/tests/cases/fourslash/completionsImport_fromAmbientModule.ts @@ -13,7 +13,7 @@ verify.applyCodeActionFromCompletion("", { source: "m", description: `Import 'x' from module "m"`, // TODO: GH#18445 - newFileContent: `import { x } from "m";\r -\r + newFileContent: `import { x } from "m"; + `, }); diff --git a/tests/cases/fourslash/completionsImport_multipleWithSameName.ts b/tests/cases/fourslash/completionsImport_multipleWithSameName.ts index d85c04ce9f8..e2bc53a94bf 100644 --- a/tests/cases/fourslash/completionsImport_multipleWithSameName.ts +++ b/tests/cases/fourslash/completionsImport_multipleWithSameName.ts @@ -24,7 +24,7 @@ verify.applyCodeActionFromCompletion("", { source: "/b", description: `Import 'foo' from module "./b"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./b";\r -\r + newFileContent: `import { foo } from "./b"; + fo`, }); diff --git a/tests/cases/fourslash/completionsImport_named_exportEqualsNamespace.ts b/tests/cases/fourslash/completionsImport_named_exportEqualsNamespace.ts index b88ce9cae0d..eb8e86194fe 100644 --- a/tests/cases/fourslash/completionsImport_named_exportEqualsNamespace.ts +++ b/tests/cases/fourslash/completionsImport_named_exportEqualsNamespace.ts @@ -20,7 +20,7 @@ verify.applyCodeActionFromCompletion("", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./a";\r -\r + newFileContent: `import { foo } from "./a"; + f;`, }); diff --git a/tests/cases/fourslash/completionsImport_ofAlias.ts b/tests/cases/fourslash/completionsImport_ofAlias.ts index 5808e6c9f1a..40889e14033 100644 --- a/tests/cases/fourslash/completionsImport_ofAlias.ts +++ b/tests/cases/fourslash/completionsImport_ofAlias.ts @@ -30,7 +30,7 @@ verify.applyCodeActionFromCompletion("", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./a";\r -\r + newFileContent: `import { foo } from "./a"; + fo`, }); diff --git a/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts b/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts index b837b759b53..23938746d25 100644 --- a/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts +++ b/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts @@ -25,7 +25,7 @@ verify.applyCodeActionFromCompletion("", { source: "/foo/lib/foo", description: `Import 'foo' from module "./foo"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./foo";\r -\r + newFileContent: `import { foo } from "./foo"; + fo`, }); diff --git a/tests/cases/fourslash/completionsImport_require.ts b/tests/cases/fourslash/completionsImport_require.ts index 2355cd06c33..5a0839bfe52 100644 --- a/tests/cases/fourslash/completionsImport_require.ts +++ b/tests/cases/fourslash/completionsImport_require.ts @@ -24,8 +24,8 @@ verify.applyCodeActionFromCompletion("b", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./a";\r -\r + newFileContent: `import { foo } from "./a"; + const a = require("./a"); fo`, }); @@ -41,8 +41,8 @@ verify.applyCodeActionFromCompletion("c", { source: "/a", description: `Import 'foo' from module "./a"`, // TODO: GH#18445 - newFileContent: `import { foo } from "./a";\r -\r + newFileContent: `import { foo } from "./a"; + const a = import("./a"); fo`, }); diff --git a/tests/cases/fourslash/consistenceOnIndentionsOfChainedFunctionCalls.ts b/tests/cases/fourslash/consistenceOnIndentionsOfChainedFunctionCalls.ts index ec2ae9b3c22..feead97486b 100644 --- a/tests/cases/fourslash/consistenceOnIndentionsOfChainedFunctionCalls.ts +++ b/tests/cases/fourslash/consistenceOnIndentionsOfChainedFunctionCalls.ts @@ -15,7 +15,7 @@ ////}); goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); goTo.marker("0"); // Won't-fixed: Smart indent during chained function calls verify.indentationIs(4); \ No newline at end of file diff --git a/tests/cases/fourslash/docCommentTemplateFunctionWithParameters.ts b/tests/cases/fourslash/docCommentTemplateFunctionWithParameters.ts index b1955d98417..50cebb527ce 100644 --- a/tests/cases/fourslash/docCommentTemplateFunctionWithParameters.ts +++ b/tests/cases/fourslash/docCommentTemplateFunctionWithParameters.ts @@ -5,8 +5,8 @@ //// /*1*/ //// function foo(x: number, y: string): boolean {} -const noIndentScaffolding = "/**\r\n * \r\n * @param x\r\n * @param y\r\n */"; -const oneIndentScaffolding = "/**\r\n * \r\n * @param x\r\n * @param y\r\n */"; +const noIndentScaffolding = "/**\n * \n * @param x\n * @param y\n */"; +const oneIndentScaffolding = "/**\n * \n * @param x\n * @param y\n */"; const noIndentOffset = 8; const oneIndentOffset = noIndentOffset + 4; diff --git a/tests/cases/fourslash/findReferencesAfterEdit.ts b/tests/cases/fourslash/findReferencesAfterEdit.ts index 2d57e78c637..599be2255a3 100644 --- a/tests/cases/fourslash/findReferencesAfterEdit.ts +++ b/tests/cases/fourslash/findReferencesAfterEdit.ts @@ -15,6 +15,6 @@ verify.singleReferenceGroup("(property) A.foo: string"); goTo.marker(""); -edit.insert("\r\n"); +edit.insert("\n"); verify.singleReferenceGroup("(property) A.foo: string"); diff --git a/tests/cases/fourslash/formatEmptyBlock.ts b/tests/cases/fourslash/formatEmptyBlock.ts index 565dbc6257c..0521ab6c816 100644 --- a/tests/cases/fourslash/formatEmptyBlock.ts +++ b/tests/cases/fourslash/formatEmptyBlock.ts @@ -3,6 +3,6 @@ ////{} goTo.eof(); -edit.insert("\r\n"); +edit.insert("\n"); goTo.bof(); verify.currentLineContentIs("{ }"); \ No newline at end of file diff --git a/tests/cases/fourslash/formatTemplateLiteral.ts b/tests/cases/fourslash/formatTemplateLiteral.ts index a10f8dba8f2..6ec1ec3082e 100644 --- a/tests/cases/fourslash/formatTemplateLiteral.ts +++ b/tests/cases/fourslash/formatTemplateLiteral.ts @@ -15,10 +15,10 @@ goTo.marker("1"); -edit.insert("\r\n"); // edit will trigger formatting - should succeeed +edit.insert("\n"); // edit will trigger formatting - should succeeed goTo.marker("2"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(0); verify.currentLineContentIs("3`;") diff --git a/tests/cases/fourslash/formattingOnDoWhileNoSemicolon.ts b/tests/cases/fourslash/formattingOnDoWhileNoSemicolon.ts index 848f9943925..8304415ebfa 100644 --- a/tests/cases/fourslash/formattingOnDoWhileNoSemicolon.ts +++ b/tests/cases/fourslash/formattingOnDoWhileNoSemicolon.ts @@ -5,7 +5,7 @@ /////*4*/ i -= 2 /////*5*/ }/*1*/while (1 !== 1) goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); verify.currentLineContentIs("while (1 !== 1)"); goTo.marker("2"); verify.currentLineContentIs("do {"); diff --git a/tests/cases/fourslash/formattingOnNestedDoWhileByEnter.ts b/tests/cases/fourslash/formattingOnNestedDoWhileByEnter.ts index e35f4a333b9..2b5dc9a3a5c 100644 --- a/tests/cases/fourslash/formattingOnNestedDoWhileByEnter.ts +++ b/tests/cases/fourslash/formattingOnNestedDoWhileByEnter.ts @@ -7,7 +7,7 @@ /////*6*/}while(a!==b) /////*7*/}while(a!==b) goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); verify.currentLineContentIs(" {"); goTo.marker("2"); verify.currentLineContentIs("do{"); diff --git a/tests/cases/fourslash/formattingWithEnterAfterMultilineString.ts b/tests/cases/fourslash/formattingWithEnterAfterMultilineString.ts index e64c7be0492..40fc4a5934b 100644 --- a/tests/cases/fourslash/formattingWithEnterAfterMultilineString.ts +++ b/tests/cases/fourslash/formattingWithEnterAfterMultilineString.ts @@ -8,7 +8,7 @@ ////} goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); // We actually need to verify smart (virtual) identation here rather than actual identation. Fourslash support is required. verify.indentationIs(8); goTo.marker("2"); diff --git a/tests/cases/fourslash/getOccurrencesAfterEdit.ts b/tests/cases/fourslash/getOccurrencesAfterEdit.ts index 0654cc3962c..5514e22dce9 100644 --- a/tests/cases/fourslash/getOccurrencesAfterEdit.ts +++ b/tests/cases/fourslash/getOccurrencesAfterEdit.ts @@ -12,7 +12,7 @@ goTo.marker("1"); verify.occurrencesAtPositionCount(2); goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); goTo.marker("1"); verify.occurrencesAtPositionCount(2); \ No newline at end of file diff --git a/tests/cases/fourslash/importNameCodeFixReExport.ts b/tests/cases/fourslash/importNameCodeFixReExport.ts index eb1c1a91343..e6e5f21f4ac 100644 --- a/tests/cases/fourslash/importNameCodeFixReExport.ts +++ b/tests/cases/fourslash/importNameCodeFixReExport.ts @@ -11,7 +11,7 @@ goTo.file("/b.ts"); // TODO:GH#18445 -verify.rangeAfterCodeFix(`import { x } from "./a";\r -\r +verify.rangeAfterCodeFix(`import { x } from "./a"; + export { x } from "./a"; x;`, /*includeWhiteSpace*/ true); diff --git a/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts b/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts index 06c0fb6e44a..a81bcb2f241 100644 --- a/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts +++ b/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts @@ -7,5 +7,5 @@ ////}; goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(0); \ No newline at end of file diff --git a/tests/cases/fourslash/shims-pp/getOccurrencesAtPosition.ts b/tests/cases/fourslash/shims-pp/getOccurrencesAtPosition.ts index 0654cc3962c..5514e22dce9 100644 --- a/tests/cases/fourslash/shims-pp/getOccurrencesAtPosition.ts +++ b/tests/cases/fourslash/shims-pp/getOccurrencesAtPosition.ts @@ -12,7 +12,7 @@ goTo.marker("1"); verify.occurrencesAtPositionCount(2); goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); goTo.marker("1"); verify.occurrencesAtPositionCount(2); \ No newline at end of file diff --git a/tests/cases/fourslash/shims/getOccurrencesAtPosition.ts b/tests/cases/fourslash/shims/getOccurrencesAtPosition.ts index 0654cc3962c..5514e22dce9 100644 --- a/tests/cases/fourslash/shims/getOccurrencesAtPosition.ts +++ b/tests/cases/fourslash/shims/getOccurrencesAtPosition.ts @@ -12,7 +12,7 @@ goTo.marker("1"); verify.occurrencesAtPositionCount(2); goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); goTo.marker("1"); verify.occurrencesAtPositionCount(2); \ No newline at end of file diff --git a/tests/cases/fourslash/smartIndentArrayBindingPattern01.ts b/tests/cases/fourslash/smartIndentArrayBindingPattern01.ts index 980f2383299..c16585f452d 100644 --- a/tests/cases/fourslash/smartIndentArrayBindingPattern01.ts +++ b/tests/cases/fourslash/smartIndentArrayBindingPattern01.ts @@ -4,7 +4,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentArrayBindingPattern02.ts b/tests/cases/fourslash/smartIndentArrayBindingPattern02.ts index b9a1da7796a..278c9ecf1ee 100644 --- a/tests/cases/fourslash/smartIndentArrayBindingPattern02.ts +++ b/tests/cases/fourslash/smartIndentArrayBindingPattern02.ts @@ -4,7 +4,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentDoStatement.ts b/tests/cases/fourslash/smartIndentDoStatement.ts index d121344bed0..144e04567be 100644 --- a/tests/cases/fourslash/smartIndentDoStatement.ts +++ b/tests/cases/fourslash/smartIndentDoStatement.ts @@ -7,7 +7,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentIfStatement.ts b/tests/cases/fourslash/smartIndentIfStatement.ts index 5a8c5014a77..a59b374be45 100644 --- a/tests/cases/fourslash/smartIndentIfStatement.ts +++ b/tests/cases/fourslash/smartIndentIfStatement.ts @@ -9,7 +9,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentInParenthesizedExpression01.ts b/tests/cases/fourslash/smartIndentInParenthesizedExpression01.ts index 253f58071d9..a3bed952e95 100644 --- a/tests/cases/fourslash/smartIndentInParenthesizedExpression01.ts +++ b/tests/cases/fourslash/smartIndentInParenthesizedExpression01.ts @@ -4,7 +4,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts b/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts index e10ef704c2c..a9bae4bbef5 100644 --- a/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts +++ b/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts @@ -4,7 +4,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts b/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts index 9247f5f467b..b4c751f58a1 100644 --- a/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts +++ b/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts @@ -4,7 +4,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentOnAccessors.ts b/tests/cases/fourslash/smartIndentOnAccessors.ts index a7972b1f48b..6176163a5fa 100644 --- a/tests/cases/fourslash/smartIndentOnAccessors.ts +++ b/tests/cases/fourslash/smartIndentOnAccessors.ts @@ -17,7 +17,7 @@ goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(8); goTo.marker("1"); verify.currentLineContentIs(" b,"); @@ -26,7 +26,7 @@ verify.currentLineContentIs(" //comment"); goTo.marker("3"); verify.currentLineContentIs(" c"); goTo.marker("4"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(8); goTo.marker("5"); verify.currentLineContentIs(" b,"); diff --git a/tests/cases/fourslash/smartIndentOnAccessors01.ts b/tests/cases/fourslash/smartIndentOnAccessors01.ts index a7972b1f48b..6176163a5fa 100644 --- a/tests/cases/fourslash/smartIndentOnAccessors01.ts +++ b/tests/cases/fourslash/smartIndentOnAccessors01.ts @@ -17,7 +17,7 @@ goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(8); goTo.marker("1"); verify.currentLineContentIs(" b,"); @@ -26,7 +26,7 @@ verify.currentLineContentIs(" //comment"); goTo.marker("3"); verify.currentLineContentIs(" c"); goTo.marker("4"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(8); goTo.marker("5"); verify.currentLineContentIs(" b,"); diff --git a/tests/cases/fourslash/smartIndentOnFunctionParameters.ts b/tests/cases/fourslash/smartIndentOnFunctionParameters.ts index 8823bf46917..1bc42fe2a67 100644 --- a/tests/cases/fourslash/smartIndentOnFunctionParameters.ts +++ b/tests/cases/fourslash/smartIndentOnFunctionParameters.ts @@ -12,7 +12,7 @@ //// 2/*7*/ ////] goTo.marker("0"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(4); goTo.marker("2"); verify.currentLineContentIs(" b,"); @@ -21,7 +21,7 @@ verify.currentLineContentIs(" //comment"); goTo.marker("4"); verify.currentLineContentIs(" c"); goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(4); goTo.marker("5"); verify.currentLineContentIs(" //comment"); diff --git a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration01.ts b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration01.ts index 3e08fe5975e..9ee221225e6 100644 --- a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration01.ts +++ b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration01.ts @@ -5,7 +5,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration02.ts b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration02.ts index 3de8b5ec6c3..f1e2d013c40 100644 --- a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration02.ts +++ b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration02.ts @@ -5,7 +5,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration03.ts b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration03.ts index 9a6c378f6ce..cb7aad0cc66 100644 --- a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration03.ts +++ b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration03.ts @@ -5,7 +5,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts index 2cfd27f2e3b..73bd7d388c4 100644 --- a/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts +++ b/tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts @@ -5,7 +5,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(indentation); } diff --git a/tests/cases/fourslash/smartIndentStartLineInLists.ts b/tests/cases/fourslash/smartIndentStartLineInLists.ts index 3410b4012ee..d61930ef511 100644 --- a/tests/cases/fourslash/smartIndentStartLineInLists.ts +++ b/tests/cases/fourslash/smartIndentStartLineInLists.ts @@ -4,5 +4,5 @@ ////}) goTo.marker("1"); -edit.insert("\r\n"); +edit.insert("\n"); verify.indentationIs(4); \ No newline at end of file diff --git a/tests/cases/fourslash/smartIndentTemplateLiterals.ts b/tests/cases/fourslash/smartIndentTemplateLiterals.ts index 679978a515c..38b0252a01b 100644 --- a/tests/cases/fourslash/smartIndentTemplateLiterals.ts +++ b/tests/cases/fourslash/smartIndentTemplateLiterals.ts @@ -7,7 +7,7 @@ function verifyIndentation(marker: string): void { goTo.marker(marker); - edit.insert("\r\n"); + edit.insert("\n"); verify.indentationIs(0); } verifyIndentation("1");