From da356b075a4829e616bebe26196c5944ac9393c9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 11 Nov 2016 01:25:50 -0800 Subject: [PATCH] Added tests for missing 'this' property accesses. --- tests/cases/fourslash/codeFixAddForgottenThis01.ts | 10 ++++++++++ tests/cases/fourslash/codeFixAddForgottenThis02.ts | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/cases/fourslash/codeFixAddForgottenThis01.ts create mode 100644 tests/cases/fourslash/codeFixAddForgottenThis02.ts diff --git a/tests/cases/fourslash/codeFixAddForgottenThis01.ts b/tests/cases/fourslash/codeFixAddForgottenThis01.ts new file mode 100644 index 00000000000..90d191b6ba5 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddForgottenThis01.ts @@ -0,0 +1,10 @@ +/// + +////class C { +//// foo: number; +//// constructor() { +//// [|foo = 10|]; +//// } +////} + +verify.rangeAfterCodeFix("this.foo = 10"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddForgottenThis02.ts b/tests/cases/fourslash/codeFixAddForgottenThis02.ts new file mode 100644 index 00000000000..b387f349073 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddForgottenThis02.ts @@ -0,0 +1,9 @@ +/// + +////class C { +//// constructor(public foo) { +//// } +//// bar() { [|foo = 10|] }; +////} + +verify.rangeAfterCodeFix("this.foo = 10"); \ No newline at end of file