From 7d82e15ee50c3a8235875d9e2ffa99c9e9bc7ba5 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 16 Feb 2017 17:10:33 -0800 Subject: [PATCH] Add tests --- .../codeFixClassExtendAbstractGetter.ts | 11 ---------- .../codeFixClassExtendAbstractGetterSetter.ts | 22 +++++++++++++++---- .../codeFixClassExtendAbstractProperty.ts | 4 ++++ .../codeFixClassExtendAbstractSetter.ts | 11 ---------- 4 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 tests/cases/fourslash/codeFixClassExtendAbstractGetter.ts delete mode 100644 tests/cases/fourslash/codeFixClassExtendAbstractSetter.ts diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetter.ts deleted file mode 100644 index 8d79cce710e..00000000000 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetter.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// - -//// abstract class A { -//// abstract get b(): number; -//// } -//// -//// class C extends A {[| |]} - -verify.rangeAfterCodeFix(` - b: number; -`); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts index fc0ac400623..4bddfb799f2 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts @@ -2,9 +2,17 @@ //// abstract class A { //// private _a: string; -//// -//// abstract get a(): string; -//// abstract set a(newName: string); +//// +//// abstract get a(): number | string; +//// abstract get b(): this; +//// abstract get c(): A; +//// +//// abstract set d(arg: number | string); +//// abstract set e(arg: this); +//// abstract set f(arg: A); +//// +//// abstract get g(): string; +//// abstract set g(newName: string); //// } //// //// // Don't need to add anything in this case. @@ -13,5 +21,11 @@ //// class C extends A {[| |]} verify.rangeAfterCodeFix(` - a: string; + a: string | number; + b: this; + c: A; + d: string | number; + e: this; + f: A; + g: string; `); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts index 3160a3b9a08..b7300acf5ae 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts @@ -2,6 +2,8 @@ //// abstract class A { //// abstract x: number; +//// abstract y: this; +//// abstract z: A; //// abstract foo(): number; //// } //// @@ -10,6 +12,8 @@ verify.rangeAfterCodeFix(` x: number; + y: this; + z: A; foo(): number { throw new Error('Method not implemented.'); } diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractSetter.ts deleted file mode 100644 index e8cb55fa660..00000000000 --- a/tests/cases/fourslash/codeFixClassExtendAbstractSetter.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// - -//// abstract class A { -//// abstract set c(arg: number | string); -//// } -//// -//// class C extends A {[| |]} - -verify.rangeAfterCodeFix(` - c: string | number; -`); \ No newline at end of file