From b566480aaaf92460b37eb0977b5c07c1c0729c85 Mon Sep 17 00:00:00 2001 From: uniqueiniquity Date: Fri, 27 Oct 2017 16:39:33 -0700 Subject: [PATCH] Update tests to expect empty doc comment template --- src/harness/fourslash.ts | 4 ++-- tests/cases/fourslash/docCommentTemplateEmptyFile.ts | 2 +- tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts | 2 +- .../cases/fourslash/docCommentTemplateInSingleLineComment.ts | 2 +- .../fourslash/docCommentTemplateInsideFunctionDeclaration.ts | 2 +- .../fourslash/docCommentTemplateNamespacesAndModules02.ts | 4 ++-- tests/cases/fourslash/docCommentTemplateRegex.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 7ba4e94902d..79cd18da839 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -4050,9 +4050,9 @@ namespace FourSlashInterface { this.state.verifyDocCommentTemplate({ newText: expectedText.replace(/\r?\n/g, "\r\n"), caretOffset: expectedOffset }); } - public noDocCommentTemplateAt(marker: string | FourSlash.Marker) { + public emptyDocCommentTemplateAt(marker: string | FourSlash.Marker) { this.state.goToMarker(marker); - this.state.verifyDocCommentTemplate(/*expected*/ undefined); + this.state.verifyDocCommentTemplate({ newText: "", caretOffset: 0 }); } public rangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void { diff --git a/tests/cases/fourslash/docCommentTemplateEmptyFile.ts b/tests/cases/fourslash/docCommentTemplateEmptyFile.ts index f04653dc328..6dcb5ef832b 100644 --- a/tests/cases/fourslash/docCommentTemplateEmptyFile.ts +++ b/tests/cases/fourslash/docCommentTemplateEmptyFile.ts @@ -3,4 +3,4 @@ // @Filename: emptyFile.ts /////*0*/ -verify.noDocCommentTemplateAt("0"); +verify.emptyDocCommentTemplateAt("0"); diff --git a/tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts b/tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts index 6e749782c7d..dc3da4e7599 100644 --- a/tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts +++ b/tests/cases/fourslash/docCommentTemplateInMultiLineComment.ts @@ -3,4 +3,4 @@ // @Filename: justAComment.ts //// /* /*0*/ */ -verify.noDocCommentTemplateAt("0"); +verify.emptyDocCommentTemplateAt("0"); diff --git a/tests/cases/fourslash/docCommentTemplateInSingleLineComment.ts b/tests/cases/fourslash/docCommentTemplateInSingleLineComment.ts index b60fff2d590..472d417a9ff 100644 --- a/tests/cases/fourslash/docCommentTemplateInSingleLineComment.ts +++ b/tests/cases/fourslash/docCommentTemplateInSingleLineComment.ts @@ -9,5 +9,5 @@ //// // /*2*/ for (const marker of test.markers()) { - verify.noDocCommentTemplateAt(marker); + verify.emptyDocCommentTemplateAt(marker); } diff --git a/tests/cases/fourslash/docCommentTemplateInsideFunctionDeclaration.ts b/tests/cases/fourslash/docCommentTemplateInsideFunctionDeclaration.ts index e0ebc00dc39..13b6ebc0df6 100644 --- a/tests/cases/fourslash/docCommentTemplateInsideFunctionDeclaration.ts +++ b/tests/cases/fourslash/docCommentTemplateInsideFunctionDeclaration.ts @@ -4,5 +4,5 @@ ////f/*0*/unction /*1*/foo/*2*/(/*3*/) /*4*/{ /*5*/} for (const marker of test.markers()) { - verify.noDocCommentTemplateAt(marker); + verify.emptyDocCommentTemplateAt(marker); } diff --git a/tests/cases/fourslash/docCommentTemplateNamespacesAndModules02.ts b/tests/cases/fourslash/docCommentTemplateNamespacesAndModules02.ts index dad2e9745a9..8bb14bef5df 100644 --- a/tests/cases/fourslash/docCommentTemplateNamespacesAndModules02.ts +++ b/tests/cases/fourslash/docCommentTemplateNamespacesAndModules02.ts @@ -11,6 +11,6 @@ verify.docCommentTemplateAt("top", /*indentation*/ 8, * */`); -verify.noDocCommentTemplateAt("n2"); +verify.emptyDocCommentTemplateAt("n2"); -verify.noDocCommentTemplateAt("n3"); +verify.emptyDocCommentTemplateAt("n3"); diff --git a/tests/cases/fourslash/docCommentTemplateRegex.ts b/tests/cases/fourslash/docCommentTemplateRegex.ts index 685c1ca5aef..7a6af09aeb5 100644 --- a/tests/cases/fourslash/docCommentTemplateRegex.ts +++ b/tests/cases/fourslash/docCommentTemplateRegex.ts @@ -4,5 +4,5 @@ ////var regex = /*0*///*1*/asdf/*2*/ /*3*///*4*/; for (const marker of test.markers()) { - verify.noDocCommentTemplateAt(marker); + verify.emptyDocCommentTemplateAt(marker); }