From e49fc058b08b0d62fe573b20f3eba6f4ac51273e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 17 Mar 2015 13:33:01 -0700 Subject: [PATCH] Added tests. --- .../completionListInUnclosedCommaExpression01.ts | 8 ++++++++ .../completionListInUnclosedCommaExpression02.ts | 8 ++++++++ .../cases/fourslash/completionListInUnclosedForLoop01.ts | 6 ++++++ .../cases/fourslash/completionListInUnclosedForLoop02.ts | 6 ++++++ .../completionListOutsideOfClosedArrowFunction01.ts | 8 ++++++++ .../completionListOutsideOfClosedArrowFunction02.ts | 8 ++++++++ .../completionListOutsideOfClosedFunctionDeclaration01.ts | 8 ++++++++ tests/cases/fourslash/completionListOutsideOfForLoop01.ts | 6 ++++++ tests/cases/fourslash/completionListOutsideOfForLoop02.ts | 6 ++++++ 9 files changed, 64 insertions(+) create mode 100644 tests/cases/fourslash/completionListInUnclosedCommaExpression01.ts create mode 100644 tests/cases/fourslash/completionListInUnclosedCommaExpression02.ts create mode 100644 tests/cases/fourslash/completionListInUnclosedForLoop01.ts create mode 100644 tests/cases/fourslash/completionListInUnclosedForLoop02.ts create mode 100644 tests/cases/fourslash/completionListOutsideOfClosedArrowFunction01.ts create mode 100644 tests/cases/fourslash/completionListOutsideOfClosedArrowFunction02.ts create mode 100644 tests/cases/fourslash/completionListOutsideOfClosedFunctionDeclaration01.ts create mode 100644 tests/cases/fourslash/completionListOutsideOfForLoop01.ts create mode 100644 tests/cases/fourslash/completionListOutsideOfForLoop02.ts diff --git a/tests/cases/fourslash/completionListInUnclosedCommaExpression01.ts b/tests/cases/fourslash/completionListInUnclosedCommaExpression01.ts new file mode 100644 index 00000000000..de0f26eb86e --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedCommaExpression01.ts @@ -0,0 +1,8 @@ +/// + +////// should NOT see a and b +////foo((a, b) => a,/*1*/ + +goTo.marker("1"); +verify.not.completionListContains("a"); +verify.not.completionListContains("b"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInUnclosedCommaExpression02.ts b/tests/cases/fourslash/completionListInUnclosedCommaExpression02.ts new file mode 100644 index 00000000000..e0ea3abbd38 --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedCommaExpression02.ts @@ -0,0 +1,8 @@ +/// + +////// should NOT see a and b +////foo((a, b) => (a,/*1*/ + +goTo.marker("1"); +verify.completionListContains("a"); +verify.completionListContains("b"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInUnclosedForLoop01.ts b/tests/cases/fourslash/completionListInUnclosedForLoop01.ts new file mode 100644 index 00000000000..35e5efdd304 --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedForLoop01.ts @@ -0,0 +1,6 @@ +/// + +////for (let i = 0; /*1*/ + +goTo.marker("1"); +verify.completionListContains("i"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInUnclosedForLoop02.ts b/tests/cases/fourslash/completionListInUnclosedForLoop02.ts new file mode 100644 index 00000000000..e79f428b2b0 --- /dev/null +++ b/tests/cases/fourslash/completionListInUnclosedForLoop02.ts @@ -0,0 +1,6 @@ +/// + +////for (let i = 0; i < 10; i++) /*1*/ + +goTo.marker("1"); +verify.completionListContains("i"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction01.ts b/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction01.ts new file mode 100644 index 00000000000..d775371796f --- /dev/null +++ b/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction01.ts @@ -0,0 +1,8 @@ +/// + +////// no a or b +/////*1*/(a, b) => { } + +goTo.marker("1"); +verify.not.completionListContains("a"); +verify.not.completionListContains("b"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction02.ts b/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction02.ts new file mode 100644 index 00000000000..d9195ce5b97 --- /dev/null +++ b/tests/cases/fourslash/completionListOutsideOfClosedArrowFunction02.ts @@ -0,0 +1,8 @@ +/// + +////// no a or b +////(a, b) => { }/*1*/ + +goTo.marker("1"); +verify.not.completionListContains("a"); +verify.not.completionListContains("b"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListOutsideOfClosedFunctionDeclaration01.ts b/tests/cases/fourslash/completionListOutsideOfClosedFunctionDeclaration01.ts new file mode 100644 index 00000000000..8b6077e0f8b --- /dev/null +++ b/tests/cases/fourslash/completionListOutsideOfClosedFunctionDeclaration01.ts @@ -0,0 +1,8 @@ +/// + +////// no a or b +/////*1*/function f (a, b) {} + +goTo.marker("1"); +verify.not.completionListContains("a"); +verify.not.completionListContains("b"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListOutsideOfForLoop01.ts b/tests/cases/fourslash/completionListOutsideOfForLoop01.ts new file mode 100644 index 00000000000..473a39a453d --- /dev/null +++ b/tests/cases/fourslash/completionListOutsideOfForLoop01.ts @@ -0,0 +1,6 @@ +/// + +////for (let i = 0; i < 10; i++) i;/*1*/ + +goTo.marker("1"); +verify.not.completionListContains("i"); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListOutsideOfForLoop02.ts b/tests/cases/fourslash/completionListOutsideOfForLoop02.ts new file mode 100644 index 00000000000..b1186ac7cce --- /dev/null +++ b/tests/cases/fourslash/completionListOutsideOfForLoop02.ts @@ -0,0 +1,6 @@ +/// + +////for (let i = 0; i < 10; i++);/*1*/ + +goTo.marker("1"); +verify.not.completionListContains("i"); \ No newline at end of file