add tests

This commit is contained in:
Arthur Ozga 2017-06-08 19:00:08 -07:00
parent ab8e0d53d0
commit 8a3aaefff4
4 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,8 @@
/// <reference path='fourslash.ts' />
// @noUnusedLocals: true
//// class C1 {
//// [|constructor(private p1: string, public p2: boolean, public p3: any, p5) |] { p5; }
//// }
verify.rangeAfterCodeFix("constructor(private _p1: string, public p2: boolean, public p3: any, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);

View file

@ -0,0 +1,7 @@
/// <reference path='fourslash.ts' />
// @noUnusedParameters: true
////function [|greeter( x) |] {
////}
verify.rangeAfterCodeFix("greeter( _x)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);

View file

@ -0,0 +1,9 @@
/// <reference path='fourslash.ts' />
// @noUnusedLocals: true
// @noUnusedParameters: true
//// function f1() {
//// [|return (x:number) => {} |]
//// }
verify.rangeAfterCodeFix("return (_x:number) => {}", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);

View file

@ -0,0 +1,11 @@
/// <reference path='fourslash.ts' />
// @noUnusedLocals: true
//// function f1 () {
//// for ([|const elem of |]["a", "b", "c"]) {
////
//// }
//// }
verify.rangeAfterCodeFix("const _elem of", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);