Add test baselines.

This commit is contained in:
Cyrus Najmabadi 2014-11-24 22:45:33 -08:00
parent 2f075a1c06
commit d11eabc81b
94 changed files with 947 additions and 71 deletions

View file

@ -0,0 +1,13 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1.ts(1,11): error TS1136: Property assignment expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1.ts(1,15): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1.ts (3 errors) ====
var v = { [e] };
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName10.ts(2,8): error TS1005: ';' expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName10.ts (1 errors) ====
class C {
[e] = 1
~
!!! error TS1005: ';' expected.
}

View file

@ -0,0 +1,15 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11.ts(2,7): error TS1005: ';' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11.ts(2,8): error TS1109: Expression expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11.ts (3 errors) ====
class C {
[e]();
~
!!! error TS1005: ';' expected.
~
!!! error TS1109: Expression expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,15 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12.ts(2,7): error TS1005: ';' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12.ts(2,10): error TS1005: '=>' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12.ts (3 errors) ====
class C {
[e]() { }
~
!!! error TS1005: ';' expected.
~
!!! error TS1005: '=>' expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName13.ts(1,11): error TS1022: An index signature parameter must have a type annotation.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName13.ts (1 errors) ====
var v: { [e]: number };
~
!!! error TS1022: An index signature parameter must have a type annotation.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName14.ts(1,13): error TS1005: ';' expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName14.ts (1 errors) ====
var v: { [e](): number };
~
!!! error TS1005: ';' expected.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName15.ts(1,32): error TS1022: An index signature parameter must have a type annotation.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName15.ts (1 errors) ====
var v: { [e: number]: string; [e]: number };
~
!!! error TS1022: An index signature parameter must have a type annotation.

View file

@ -0,0 +1,18 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16.ts(2,3): error TS1132: Enum member expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16.ts(3,1): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16.ts(2,3): error TS2364: Invalid left-hand side of assignment expression.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16.ts(2,4): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16.ts (4 errors) ====
enum E {
[e] = 1
~
!!! error TS1132: Enum member expected.
~~~
!!! error TS2364: Invalid left-hand side of assignment expression.
~
!!! error TS2304: Cannot find name 'e'.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,16 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17.ts(1,15): error TS1003: Identifier expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17.ts(1,22): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17.ts(1,26): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17.ts (4 errors) ====
var v = { set [e](v) { } }
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName18.ts(1,13): error TS1005: ';' expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName18.ts (1 errors) ====
var v: { [e]?(): number };
~
!!! error TS1005: ';' expected.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName19.ts(1,13): error TS1005: ';' expected.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName19.ts (1 errors) ====
var v: { [e]? };
~
!!! error TS1005: ';' expected.

View file

@ -0,0 +1,19 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts(1,11): error TS1136: Property assignment expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts(1,14): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts(1,16): error TS1134: Variable declaration expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts(1,18): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2.ts (5 errors) ====
var v = { [e]: 1 };
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1134: Variable declaration expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,16 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3.ts(1,11): error TS1136: Property assignment expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3.ts(1,17): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3.ts(1,21): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3.ts (4 errors) ====
var v = { [e]() { } };
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,16 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4.ts(1,15): error TS1003: Identifier expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4.ts(1,21): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4.ts(1,25): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4.ts (4 errors) ====
var v = { get [e]() { } };
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,19 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts(1,18): error TS1005: ':' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts(1,28): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts(1,32): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts(1,18): error TS2304: Cannot find name 'get'.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5.ts (5 errors) ====
var v = { public get [e]() { } };
~~~
!!! error TS1005: ':' expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~
!!! error TS2304: Cannot find name 'get'.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,28 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,11): error TS1136: Property assignment expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,14): error TS1005: ',' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,16): error TS1134: Variable declaration expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,26): error TS1005: ';' expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,30): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6.ts (8 errors) ====
var v = { [e]: 1, [e + e]: 2 };
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1134: Variable declaration expected.
~
!!! error TS1005: ';' expected.
~
!!! error TS1128: Declaration or statement expected.
~
!!! error TS2304: Cannot find name 'e'.
~
!!! error TS2304: Cannot find name 'e'.
~
!!! error TS2304: Cannot find name 'e'.

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName7.ts(2,5): error TS1022: An index signature parameter must have a type annotation.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName7.ts (1 errors) ====
class C {
[e]
~
!!! error TS1022: An index signature parameter must have a type annotation.
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName8.ts(2,12): error TS1022: An index signature parameter must have a type annotation.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName8.ts (1 errors) ====
class C {
public [e]
~
!!! error TS1022: An index signature parameter must have a type annotation.
}

View file

@ -0,0 +1,12 @@
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9.ts(2,5): error TS1022: An index signature parameter must have a type annotation.
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'.
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9.ts (2 errors) ====
class C {
[e]: Type
~
!!! error TS1022: An index signature parameter must have a type annotation.
~~~~
!!! error TS2304: Cannot find name 'Type'.
}

View file

@ -0,0 +1,7 @@
//// [FunctionDeclaration1.ts]
function * foo() {
}
//// [FunctionDeclaration1.js]
function foo() {
}

View file

@ -0,0 +1,4 @@
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1.ts ===
function * foo() {
>foo : () => void
}

View file

@ -0,0 +1,8 @@
//// [FunctionDeclaration10.ts]
function * foo(a = yield => yield) {
}
//// [FunctionDeclaration10.js]
function foo(a) {
if (a === void 0) { a = function (yield) { return yield; }; }
}

View file

@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10.ts ===
function * foo(a = yield => yield) {
>foo : (a?: (yield: any) => any) => void
>a : (yield: any) => any
>yield => yield : (yield: any) => any
>yield : any
>yield : any
}

View file

@ -0,0 +1,7 @@
//// [FunctionDeclaration11.ts]
function * yield() {
}
//// [FunctionDeclaration11.js]
function yield() {
}

View file

@ -0,0 +1,4 @@
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11.ts ===
function * yield() {
>yield : () => void
}

View file

@ -0,0 +1,13 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12.ts(1,20): error TS1005: '(' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12.ts(1,25): error TS1005: '=' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12.ts(1,28): error TS1005: '=>' expected.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12.ts (3 errors) ====
var v = function * yield() { }
~~~~~
!!! error TS1005: '(' expected.
~
!!! error TS1005: '=' expected.
~
!!! error TS1005: '=>' expected.

View file

@ -0,0 +1,11 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13.ts(3,11): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13.ts (1 errors) ====
function * foo() {
// Legal to use 'yield' in a type context.
var v: yield;
~~~~~
!!! error TS2304: Cannot find name 'yield'.
}

View file

@ -0,0 +1,12 @@
//// [FunctionDeclaration13.ts]
function * foo() {
// Legal to use 'yield' in a type context.
var v: yield;
}
//// [FunctionDeclaration13.js]
function foo() {
// Legal to use 'yield' in a type context.
var v;
}

View file

@ -0,0 +1,7 @@
//// [FunctionDeclaration2.ts]
function f(yield) {
}
//// [FunctionDeclaration2.js]
function f(yield) {
}

View file

@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2.ts ===
function f(yield) {
>f : (yield: any) => void
>yield : any
}

View file

@ -0,0 +1,4 @@
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4.ts ===
function yield() {
>yield : () => void
}

View file

@ -0,0 +1,17 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5.ts(1,14): error TS1138: Parameter declaration expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5.ts(1,19): error TS1005: ';' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5.ts(1,14): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5.ts (4 errors) ====
function*foo(yield) {
~~~~~
!!! error TS1138: Parameter declaration expected.
~
!!! error TS1005: ';' expected.
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
~~~~~
!!! error TS2304: Cannot find name 'yield'.
}

View file

@ -0,0 +1,16 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8.ts(1,11): error TS1136: Property assignment expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8.ts(1,18): error TS1005: ',' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8.ts(1,24): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8.ts(1,12): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8.ts (4 errors) ====
var v = { [yield]: foo }
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~~~
!!! error TS2304: Cannot find name 'yield'.

View file

@ -0,0 +1,15 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9.ts(2,13): error TS1136: Property assignment expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9.ts(2,20): error TS1005: ',' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9.ts (3 errors) ====
function * foo() {
var v = { [yield]: foo }
~
!!! error TS1136: Property assignment expected.
~
!!! error TS1005: ',' expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,6 @@
//// [FunctionExpression1.ts]
var v = function * () { }
//// [FunctionExpression1.js]
var v = function () {
};

View file

@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/functionExpressions/FunctionExpression1.ts ===
var v = function * () { }
>v : () => void
>function * () { } : () => void

View file

@ -0,0 +1,6 @@
//// [FunctionExpression2.ts]
var v = function * foo() { }
//// [FunctionExpression2.js]
var v = function foo() {
};

View file

@ -0,0 +1,6 @@
=== tests/cases/conformance/es6/functionExpressions/FunctionExpression2.ts ===
var v = function * foo() { }
>v : () => void
>function * foo() { } : () => void
>foo : () => void

View file

@ -0,0 +1,6 @@
//// [FunctionPropertyAssignments1.ts]
var v = { *foo() { } }
//// [FunctionPropertyAssignments1.js]
var v = { foo: function () {
} };

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1.ts ===
var v = { *foo() { } }
>v : { foo: () => void; }
>{ *foo() { } } : { foo: () => void; }
>foo : () => void
>*foo() { } : () => void

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2.ts(1,12): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2.ts (1 errors) ====
var v = { *() { } }
~
!!! error TS1003: Identifier expected.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3.ts(1,12): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3.ts (1 errors) ====
var v = { *{ } }
~
!!! error TS1003: Identifier expected.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4.ts(1,13): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4.ts (1 errors) ====
var v = { * }
~
!!! error TS1003: Identifier expected.

View file

@ -0,0 +1,16 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5.ts(1,12): error TS1003: Identifier expected.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5.ts(1,22): error TS1005: ',' expected.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5.ts(1,26): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5.ts(1,13): error TS2304: Cannot find name 'foo'.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5.ts (4 errors) ====
var v = { *[foo()]() { } }
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~
!!! error TS2304: Cannot find name 'foo'.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6.ts(1,12): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6.ts (1 errors) ====
var v = { *<T>() { } }
~
!!! error TS1003: Identifier expected.

View file

@ -0,0 +1,13 @@
//// [MemberFunctionDeclaration1.ts]
class C {
*foo() { }
}
//// [MemberFunctionDeclaration1.js]
var C = (function () {
function C() {
}
C.prototype.foo = function () {
};
return C;
})();

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration1.ts ===
class C {
>C : C
*foo() { }
>foo : () => void
}

View file

@ -0,0 +1,13 @@
//// [MemberFunctionDeclaration2.ts]
class C {
public * foo() { }
}
//// [MemberFunctionDeclaration2.js]
var C = (function () {
function C() {
}
C.prototype.foo = function () {
};
return C;
})();

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration2.ts ===
class C {
>C : C
public * foo() { }
>foo : () => void
}

View file

@ -0,0 +1,18 @@
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration3.ts(2,5): error TS1003: Identifier expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration3.ts(2,10): error TS1005: ';' expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration3.ts(2,13): error TS1005: '=>' expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration3.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration3.ts (4 errors) ====
class C {
*[foo]() { }
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ';' expected.
~
!!! error TS1005: '=>' expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration4.ts(2,5): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration4.ts (1 errors) ====
class C {
*() { }
~
!!! error TS1003: Identifier expected.
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration5.ts(3,1): error TS1003: Identifier expected.
==== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration5.ts (1 errors) ====
class C {
*
}
~
!!! error TS1003: Identifier expected.

View file

@ -0,0 +1,12 @@
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration6.ts(3,1): error TS1005: '(' expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration.
==== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration6.ts (2 errors) ====
class C {
*foo
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
}
~
!!! error TS1005: '(' expected.

View file

@ -0,0 +1,13 @@
//// [MemberFunctionDeclaration7.ts]
class C {
*foo<T>() { }
}
//// [MemberFunctionDeclaration7.js]
var C = (function () {
function C() {
}
C.prototype.foo = function () {
};
return C;
})();

View file

@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration7.ts ===
class C {
>C : C
*foo<T>() { }
>foo : <T>() => void
>T : T
}

View file

@ -0,0 +1,34 @@
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(4,12): error TS1127: Invalid character.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(4,14): error TS1129: Statement expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(4,19): error TS1005: '(' expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(5,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(6,3): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(7,1): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(4,9): error TS2304: Cannot find name 'a'.
tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts(4,16): error TS2391: Function implementation is missing or not immediately following the declaration.
==== tests/cases/conformance/es6/fmmberFunctionDeclarations/MemberFunctionDeclaration8.ts (8 errors) ====
class C {
foo() {
// Make sure we don't think of *bar as the start of a generator method.
if (a) # * bar;
!!! error TS1127: Invalid character.
~
!!! error TS1129: Statement expected.
~
!!! error TS1005: '(' expected.
~
!!! error TS2304: Cannot find name 'a'.
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
return bar;
~~~~~~
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
}
~
!!! error TS1128: Declaration or statement expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -0,0 +1,10 @@
tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,19): error TS1158: Invalid template literal; expected '}'
tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,17): error TS2304: Cannot find name 'a'.
==== tests/cases/conformance/es6/templates/TemplateExpression1.ts (2 errors) ====
var v = `foo ${ a
!!! error TS1158: Invalid template literal; expected '}'
~
!!! error TS2304: Cannot find name 'a'.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression1.ts(1,1): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression1.ts (1 errors) ====
yield;
~~~~~
!!! error TS2304: Cannot find name 'yield'.

View file

@ -0,0 +1,5 @@
//// [YieldExpression1.ts]
yield;
//// [YieldExpression1.js]
yield;

View file

@ -0,0 +1,11 @@
//// [YieldExpression10.ts]
var v = { * foo() {
yield(foo);
}
}
//// [YieldExpression10.js]
var v = { foo: function () {
;
} };

View file

@ -0,0 +1,11 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression10.ts ===
var v = { * foo() {
>v : { foo: () => void; }
>{ * foo() { yield(foo); }} : { foo: () => void; }
>foo : () => void
>* foo() { yield(foo); } : () => void
yield(foo);
}
}

View file

@ -0,0 +1,16 @@
//// [YieldExpression11.ts]
class C {
*foo() {
yield(foo);
}
}
//// [YieldExpression11.js]
var C = (function () {
function C() {
}
C.prototype.foo = function () {
;
};
return C;
})();

View file

@ -0,0 +1,10 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression11.ts ===
class C {
>C : C
*foo() {
>foo : () => void
yield(foo);
}
}

View file

@ -0,0 +1,11 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression12.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression12.ts (1 errors) ====
class C {
constructor() {
yield foo
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
}
}

View file

@ -0,0 +1,7 @@
//// [YieldExpression13.ts]
function* foo() { yield }
//// [YieldExpression13.js]
function foo() {
;
}

View file

@ -0,0 +1,4 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression13.ts ===
function* foo() { yield }
>foo : () => void

View file

@ -0,0 +1,11 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression14.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression14.ts (1 errors) ====
class C {
foo() {
yield foo
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
}
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression15.ts(2,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression15.ts (1 errors) ====
var v = () => {
yield foo
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
}

View file

@ -0,0 +1,11 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression16.ts(3,5): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16.ts (1 errors) ====
function* foo() {
function bar() {
yield foo;
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
}
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression17.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/es6/yieldExpressions/YieldExpression17.ts(1,15): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17.ts (2 errors) ====
var v = { get foo() { yield foo; } }
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.

View file

@ -0,0 +1,8 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression18.ts(2,1): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression18.ts (1 errors) ====
"use strict";
yield(foo);
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.

View file

@ -0,0 +1,17 @@
//// [YieldExpression19.ts]
function*foo() {
function bar() {
function* quux() {
yield(foo);
}
}
}
//// [YieldExpression19.js]
function foo() {
function bar() {
function quux() {
;
}
}
}

View file

@ -0,0 +1,14 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression19.ts ===
function*foo() {
>foo : () => void
function bar() {
>bar : () => void
function* quux() {
>quux : () => void
yield(foo);
}
}
}

View file

@ -0,0 +1,7 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression2.ts(1,1): error TS1163: 'yield' expression must be contained_within a generator declaration.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression2.ts (1 errors) ====
yield foo;
~~~~~
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.

View file

@ -0,0 +1,11 @@
//// [YieldExpression3.ts]
function* foo() {
yield
yield
}
//// [YieldExpression3.js]
function foo() {
;
;
}

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression3.ts ===
function* foo() {
>foo : () => void
yield
yield
}

View file

@ -0,0 +1,11 @@
//// [YieldExpression4.ts]
function* foo() {
yield;
yield;
}
//// [YieldExpression4.js]
function foo() {
;
;
}

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression4.ts ===
function* foo() {
>foo : () => void
yield;
yield;
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression5.ts(3,1): error TS1109: Expression expected.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression5.ts (1 errors) ====
function* foo() {
yield*
}
~
!!! error TS1109: Expression expected.

View file

@ -0,0 +1,9 @@
//// [YieldExpression6.ts]
function* foo() {
yield*foo
}
//// [YieldExpression6.js]
function foo() {
;
}

View file

@ -0,0 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression6.ts ===
function* foo() {
>foo : () => void
yield*foo
}

View file

@ -0,0 +1,9 @@
//// [YieldExpression7.ts]
function* foo() {
yield foo
}
//// [YieldExpression7.js]
function foo() {
;
}

View file

@ -0,0 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression7.ts ===
function* foo() {
>foo : () => void
yield foo
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/es6/yieldExpressions/YieldExpression8.ts(1,1): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression8.ts (1 errors) ====
yield(foo);
~~~~~
!!! error TS2304: Cannot find name 'yield'.
function* foo() {
yield(foo);
}

View file

@ -0,0 +1,11 @@
//// [YieldExpression8.ts]
yield(foo);
function* foo() {
yield(foo);
}
//// [YieldExpression8.js]
yield(foo);
function foo() {
;
}

View file

@ -0,0 +1,9 @@
//// [YieldExpression9.ts]
var v = function*() {
yield(foo);
}
//// [YieldExpression9.js]
var v = function () {
;
};

View file

@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldExpression9.ts ===
var v = function*() {
>v : () => void
>function*() { yield(foo);} : () => void
yield(foo);
}

View file

@ -1,20 +0,0 @@
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS1003: Identifier expected.
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,15): error TS1005: ';' expected.
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,11): error TS2304: Cannot find name 'gen'.
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(3,13): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (4 errors) ====
function* gen {
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ';' expected.
~~~
!!! error TS2304: Cannot find name 'gen'.
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;
~~~~~
!!! error TS2304: Cannot find name 'yield'.
}

View file

@ -0,0 +1,12 @@
//// [templateStringInYieldKeyword.ts]
function* gen() {
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;
}
//// [templateStringInYieldKeyword.js]
function gen() {
// Once this is supported, the inner expression does not need to be parenthesized.
var x = ;
}

View file

@ -0,0 +1,9 @@
=== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts ===
function* gen() {
>gen : () => void
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;
>x : unknown
}

View file

@ -1,29 +1,11 @@
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,9): error TS1003: Identifier expected.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: ';' expected.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,26): error TS1158: Invalid template literal; expected '}'
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(5,1): error TS1160: Unterminated template literal.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS2304: Cannot find name 'gen'.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,20): error TS2304: Cannot find name 'yield'.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,30): error TS2304: Cannot find name 'def'.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected.
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts (7 errors) ====
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts (1 errors) ====
function* gen {
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ';' expected.
~~~
!!! error TS2304: Cannot find name 'gen'.
!!! error TS1005: '(' expected.
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
~~
!!! error TS1158: Invalid template literal; expected '}'
~~~~~
!!! error TS2304: Cannot find name 'yield'.
~~~
!!! error TS2304: Cannot find name 'def'.
}
!!! error TS1160: Unterminated template literal.

View file

@ -1,29 +0,0 @@
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS1003: Identifier expected.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,17): error TS1005: ';' expected.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,26): error TS1158: Invalid template literal; expected '}'
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(5,1): error TS1160: Unterminated template literal.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,11): error TS2304: Cannot find name 'gen'.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,20): error TS2304: Cannot find name 'yield'.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,30): error TS2304: Cannot find name 'def'.
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (7 errors) ====
function* gen() {
~
!!! error TS1003: Identifier expected.
~
!!! error TS1005: ';' expected.
~~~
!!! error TS2304: Cannot find name 'gen'.
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
~~
!!! error TS1158: Invalid template literal; expected '}'
~~~~~
!!! error TS2304: Cannot find name 'yield'.
~~~
!!! error TS2304: Cannot find name 'def'.
}
!!! error TS1160: Unterminated template literal.

View file

@ -0,0 +1,12 @@
//// [templateStringWithEmbeddedYieldKeywordES6.ts]
function* gen() {
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
}
//// [templateStringWithEmbeddedYieldKeywordES6.js]
function gen() {
// Once this is supported, yield *must* be parenthesized.
var x = `abc${}def`;
}

View file

@ -0,0 +1,9 @@
=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts ===
function* gen() {
>gen : () => void
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
>x : string
}