From 29ced53a4d13ee1076afa8039187533233c20d15 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 28 Nov 2014 14:50:58 -0800 Subject: [PATCH] Add parser tests for let/const. --- .../reference/VariableDeclaration10_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration11_es6.errors.txt | 8 ++++++++ .../reference/VariableDeclaration1_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration2_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration3_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration4_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration5_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration6_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration7_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration8_es6.errors.txt | 7 +++++++ .../reference/VariableDeclaration9_es6.errors.txt | 7 +++++++ .../es6/variableDeclarations/VariableDeclaration10_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration11_es6.ts | 2 ++ .../es6/variableDeclarations/VariableDeclaration1_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration2_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration3_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration4_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration5_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration6_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration7_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration8_es6.ts | 1 + .../es6/variableDeclarations/VariableDeclaration9_es6.ts | 1 + 22 files changed, 90 insertions(+) create mode 100644 tests/baselines/reference/VariableDeclaration10_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration11_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration1_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration2_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration3_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration4_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration5_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration6_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration7_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration8_es6.errors.txt create mode 100644 tests/baselines/reference/VariableDeclaration9_es6.errors.txt create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts create mode 100644 tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts diff --git a/tests/baselines/reference/VariableDeclaration10_es6.errors.txt b/tests/baselines/reference/VariableDeclaration10_es6.errors.txt new file mode 100644 index 0000000000..91c071903c --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration10_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts (1 errors) ==== + let a: number = 1 + ~ +!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration11_es6.errors.txt b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt new file mode 100644 index 0000000000..8c0ef5f869 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt @@ -0,0 +1,8 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,4): error TS1123: Variable declaration list cannot be empty. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts (1 errors) ==== + "use strict"; + let + +!!! error TS1123: Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration1_es6.errors.txt b/tests/baselines/reference/VariableDeclaration1_es6.errors.txt new file mode 100644 index 0000000000..f4413e151c --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration1_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts(1,6): error TS1123: Variable declaration list cannot be empty. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts (1 errors) ==== + const + +!!! error TS1123: Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt new file mode 100644 index 0000000000..362b68dbb3 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ==== + const a + ~ +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration3_es6.errors.txt b/tests/baselines/reference/VariableDeclaration3_es6.errors.txt new file mode 100644 index 0000000000..e563c4f3ea --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration3_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts (1 errors) ==== + const a = 1 + ~ +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt new file mode 100644 index 0000000000..ae03582531 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ==== + const a: number + ~ +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration5_es6.errors.txt b/tests/baselines/reference/VariableDeclaration5_es6.errors.txt new file mode 100644 index 0000000000..e55f5a2654 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration5_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts (1 errors) ==== + const a: number = 1 + ~ +!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration6_es6.errors.txt b/tests/baselines/reference/VariableDeclaration6_es6.errors.txt new file mode 100644 index 0000000000..6217297336 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration6_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts(1,4): error TS1123: Variable declaration list cannot be empty. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts (1 errors) ==== + let + +!!! error TS1123: Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration7_es6.errors.txt b/tests/baselines/reference/VariableDeclaration7_es6.errors.txt new file mode 100644 index 0000000000..5de31099e5 --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration7_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts (1 errors) ==== + let a + ~ +!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration8_es6.errors.txt b/tests/baselines/reference/VariableDeclaration8_es6.errors.txt new file mode 100644 index 0000000000..5409c6657c --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration8_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts (1 errors) ==== + let a = 1 + ~ +!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration9_es6.errors.txt b/tests/baselines/reference/VariableDeclaration9_es6.errors.txt new file mode 100644 index 0000000000..0a2a25858b --- /dev/null +++ b/tests/baselines/reference/VariableDeclaration9_es6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. + + +==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts (1 errors) ==== + let a: number + ~ +!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher. \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts new file mode 100644 index 0000000000..2b6e9657ef --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts @@ -0,0 +1 @@ +let a: number = 1 \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts new file mode 100644 index 0000000000..aca6070823 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts @@ -0,0 +1,2 @@ +"use strict"; +let \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts new file mode 100644 index 0000000000..8baacf4ea5 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts @@ -0,0 +1 @@ +const \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts new file mode 100644 index 0000000000..06871c9a45 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts @@ -0,0 +1 @@ +const a \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts new file mode 100644 index 0000000000..6779cd775c --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts @@ -0,0 +1 @@ +const a = 1 \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts new file mode 100644 index 0000000000..f96229b7ea --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts @@ -0,0 +1 @@ +const a: number \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts new file mode 100644 index 0000000000..4a05e895a3 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts @@ -0,0 +1 @@ +const a: number = 1 \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts new file mode 100644 index 0000000000..33ae002d85 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts @@ -0,0 +1 @@ +let \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts new file mode 100644 index 0000000000..7350ac02e7 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts @@ -0,0 +1 @@ +let a \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts new file mode 100644 index 0000000000..067c6699cf --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts @@ -0,0 +1 @@ +let a = 1 \ No newline at end of file diff --git a/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts new file mode 100644 index 0000000000..aab3d49c18 --- /dev/null +++ b/tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts @@ -0,0 +1 @@ +let a: number \ No newline at end of file