Add parser tests for let/const.

This commit is contained in:
Cyrus Najmabadi 2014-11-28 14:50:58 -08:00
parent 05fd2e9fb3
commit 29ced53a4d
22 changed files with 90 additions and 0 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -0,0 +1 @@
let a: number = 1

View file

@ -0,0 +1,2 @@
"use strict";
let

View file

@ -0,0 +1 @@
const a = 1

View file

@ -0,0 +1 @@
const a: number

View file

@ -0,0 +1 @@
const a: number = 1

View file

@ -0,0 +1 @@
let a: number