From 6f925acacbf50c491fc55b81dff7aa177852a2f2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 21 May 2015 12:50:22 -0700 Subject: [PATCH] Add rename tests for function expressions. --- .../fourslash/renameInfoForFunctionExpression01.ts | 8 ++++++++ .../renameLocationsForFunctionExpression01.ts | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/cases/fourslash/renameInfoForFunctionExpression01.ts create mode 100644 tests/cases/fourslash/renameLocationsForFunctionExpression01.ts diff --git a/tests/cases/fourslash/renameInfoForFunctionExpression01.ts b/tests/cases/fourslash/renameInfoForFunctionExpression01.ts new file mode 100644 index 00000000000..807c4541f3f --- /dev/null +++ b/tests/cases/fourslash/renameInfoForFunctionExpression01.ts @@ -0,0 +1,8 @@ +/// + +////var x = function /**/[|f|](g: any, h: any) { +//// f(f, g); +////} + +goTo.marker(); +verify.renameInfoSucceeded("f"); \ No newline at end of file diff --git a/tests/cases/fourslash/renameLocationsForFunctionExpression01.ts b/tests/cases/fourslash/renameLocationsForFunctionExpression01.ts new file mode 100644 index 00000000000..b2f54853c7b --- /dev/null +++ b/tests/cases/fourslash/renameLocationsForFunctionExpression01.ts @@ -0,0 +1,12 @@ +/// + +////var x = function /*1*/[|f|](g: any, h: any) { +//// /*2*/[|f|](/*3*/[|f|], g); +////} + +let markers = test.markers() +for (let marker of markers) { + goTo.position(marker.position); + + verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); +} \ No newline at end of file