Skip to content

Commit 8a3aaef

Browse files
committed
add tests
1 parent ab8e0d5 commit 8a3aaef

4 files changed

+35
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedLocals: true
4+
//// class C1 {
5+
//// [|constructor(private p1: string, public p2: boolean, public p3: any, p5) |] { p5; }
6+
//// }
7+
8+
verify.rangeAfterCodeFix("constructor(private _p1: string, public p2: boolean, public p3: any, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedParameters: true
4+
////function [|greeter( x) |] {
5+
////}
6+
7+
verify.rangeAfterCodeFix("greeter( _x)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedLocals: true
4+
// @noUnusedParameters: true
5+
//// function f1() {
6+
//// [|return (x:number) => {} |]
7+
//// }
8+
9+
verify.rangeAfterCodeFix("return (_x:number) => {}", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedLocals: true
4+
//// function f1 () {
5+
//// for ([|const elem of |]["a", "b", "c"]) {
6+
////
7+
//// }
8+
//// }
9+
10+
verify.rangeAfterCodeFix("const _elem of", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
11+

0 commit comments

Comments
 (0)