From 935b895ac11277cf3cfdf70f794d641cbd966007 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 27 Jul 2017 14:55:29 -0700 Subject: [PATCH] Added/augmented tests. --- .../compiler/errorForUsingPropertyOfTypeAsType01.ts | 9 ++++++++- ...tiveReplaceQualifiedNameWithIndexedAccessType01.ts | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/codeFixNegativeReplaceQualifiedNameWithIndexedAccessType01.ts diff --git a/tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts b/tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts index c20102881ea..8ce16b6fcd7 100644 --- a/tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts +++ b/tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts @@ -4,6 +4,7 @@ namespace Test1 { } var x: Foo.bar = ""; + var y: Test1.Foo.bar = ""; } namespace Test2 { @@ -12,6 +13,7 @@ namespace Test2 { } var x: Foo.bar = ""; + var y: Test2.Foo.bar = ""; } namespace Test3 { @@ -20,6 +22,7 @@ namespace Test3 { } var x: Foo.bar = ""; + var y: Test3.Foo.bar = ""; } namespace Test4 { @@ -27,6 +30,7 @@ namespace Test4 { | { bar: string } var x: Foo.bar = ""; + var y: Test4.Foo.bar = ""; } namespace Test5 { @@ -34,4 +38,7 @@ namespace Test5 { | { wat: string } var x: Foo.bar = ""; -} \ No newline at end of file + var y: Test5.Foo.bar = ""; +} + +import lol = Test5.Foo. \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixNegativeReplaceQualifiedNameWithIndexedAccessType01.ts b/tests/cases/fourslash/codeFixNegativeReplaceQualifiedNameWithIndexedAccessType01.ts new file mode 100644 index 00000000000..683e45f056a --- /dev/null +++ b/tests/cases/fourslash/codeFixNegativeReplaceQualifiedNameWithIndexedAccessType01.ts @@ -0,0 +1,11 @@ +/// + + +//// namespace Container { +//// export interface Foo { +//// bar: string; +//// } +//// } +//// const x: [|Container.Foo.bar|] = "" + +verify.not.codeFixAvailable();