File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// @Filename : emptyFile.ts
44/////*0*/
55
6- verify . DocCommentScaffolding ( 0 , { newText : "/** */" , cursorOffset : 3 } ) ;
6+ verify . DocCommentScaffolding ( "/** */" , 3 ) ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @Filename : emptyFile.ts
4+ /////*0*/
5+ //// /*1*/
6+ //// function foo(x: number, y: string): boolean {}
7+
8+ const noIndentEmptyScaffolding = "/**\n * \n * @param x \n * @param y\n */" ;
9+ const oneIndentEmptyScaffolding = "/**\n * \n * @param x \n * @param y\n */" ;
10+ const noIndentOffset = 7 ;
11+ const oneIndentOffset = noIndentOffset + 4 ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @Filename : emptyFile.ts
4+ //// /* /*0*/ */
5+ goTo . marker ( "0" ) ;
6+ verify . DocCommentScaffolding ( "/**" , 3 ) ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @Filename : emptyFile.ts
4+ //// // We want to check off-by-one errors in assessing the end of the comment, so we check twice,
5+ //// // first with a trailing space and then without.
6+ //// // /*0*/
7+ //// // /*1*/
8+ /////*2*/
9+ //// // We also want to check EOF handling at the end of a comment
10+ //// // /*3*/
11+
12+ goTo . marker ( "0" ) ;
13+ verify . DocCommentScaffolding ( "/**" , 3 ) ;
14+
15+ goTo . marker ( "1" ) ;
16+ verify . DocCommentScaffolding ( "/**" , 3 ) ;
17+
18+ goTo . marker ( "2" ) ;
19+ verify . DocCommentScaffolding ( "/** */" , 3 ) ;
20+
21+ goTo . marker ( "3" ) ;
22+ verify . DocCommentScaffolding ( "/**" , 3 ) ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @Filename : emptyFile.ts
4+ /////*0*/
5+ //// /*1*/
6+ //// /*2*/function /*3*/foo/*4*/(/*5*/) /*6*/{ /*7*/}/*8*/
7+
8+ const noIndentEmptyScaffolding = "/**\n * \n */" ;
9+ const oneIndentEmptyScaffolding = "/**\n * \n */" ;
10+ const twoIndentEmptyScaffolding = "/**\n * \n */" ;
11+ const noIndentOffset = 7 ;
12+ const oneIndentOffset = noIndentOffset + 4 ;
13+ const twoIndentOffset = oneIndentOffset + 4 ;
14+
15+ goTo . marker ( "0" ) ;
16+ verify . DocCommentScaffolding ( noIndentEmptyScaffolding , noIndentOffset ) ;
17+
18+ goTo . marker ( "1" ) ;
19+ verify . DocCommentScaffolding ( oneIndentEmptyScaffolding , oneIndentOffset ) ;
20+
21+ goTo . marker ( "2" ) ;
22+ verify . DocCommentScaffolding ( twoIndentEmptyScaffolding , twoIndentOffset ) ;
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @Filename : emptyFile.ts
4+ ////function /*0*/foo/*1*/(/*2*/) /*3*/{ /*4*/}/*5*/
5+
6+ const emptyCompletion = "/** */" ;
7+ const emptyIndent = 3 ;
8+
9+ goTo . marker ( "0" ) ;
10+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
11+
12+ goTo . marker ( "1" ) ;
13+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
14+
15+ goTo . marker ( "2" ) ;
16+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
17+
18+ goTo . marker ( "3" ) ;
19+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
20+
21+ goTo . marker ( "4" ) ;
22+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
23+
24+ goTo . marker ( "5" ) ;
25+ verify . DocCommentScaffolding ( emptyCompletion , emptyIndent ) ;
You can’t perform that action at this time.
0 commit comments