Skip to content

Commit 5c91798

Browse files
author
Arthur Ozga
committed
add tests
1 parent f17a612 commit 5c91798

4 files changed

+52
-0
lines changed
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+
//// [| namespace greeter {
5+
//// class class1 {
6+
//// }
7+
//// } |]
8+
9+
verify.rangeAfterCodeFix(`namespace greeter {
10+
class _class1 { }
11+
}`, /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedLocals: true
4+
// @noUnusedParameters:true
5+
//// [| namespace Validation {
6+
//// var function1 = function() {
7+
//// }
8+
////} |]
9+
10+
verify.rangeAfterCodeFix(`namespace Validation {
11+
var _function1 = function() {
12+
}
13+
} `, /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// @noUnusedLocals: true
4+
// @noUnusedParameters: true
5+
////class greeter {
6+
//// [|constructor() {
7+
//// var unused = 20;
8+
//// var used = "dummy";
9+
//// used = used + "second part";
10+
//// } |]
11+
////}
12+
13+
verify.rangeAfterCodeFix(`
14+
constructor() {
15+
var _unused = 20;
16+
var used = "dummy";
17+
used = used + "second part";
18+
}
19+
`, /*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+
////[|class greeter<X, Y, Z> |] {
5+
//// public a: X;
6+
//// public b: Z;
7+
////}
8+
9+
verify.rangeAfterCodeFix("class greeter<X, _Y, Z>", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);

0 commit comments

Comments
 (0)