Updating some tests for resolved bugs

This commit is contained in:
Dan Quirk 2014-07-14 16:47:50 -07:00
parent e9cd8a0e88
commit 4b1ff742dd
9 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,11 @@
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (3 errors) ====
// classes cannot extend primitives
class C4a extends void {}
~~~~
!!! Identifier expected.
class C5a extends null { }
~~~~
!!! Identifier expected.
~
!!! ';' expected.

View File

@ -0,0 +1,10 @@
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
class C2 extends { foo: string; } { } // error
~
!!! Identifier expected.
class C6 extends []{ } // error
~
!!! Identifier expected.
~
!!! ';' expected.

View File

@ -0,0 +1,8 @@
//// [duplicateVarAndImport.ts]
// no error since module is not instantiated
var a;
module M {}
import a = M;
//// [duplicateVarAndImport.js]
var a;

View File

@ -0,0 +1,7 @@
==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ====
// error since module is instantiated
var a;
module M { export var x = 1; }
import a = M;
~~~~~~~~~~~~~
!!! Import declaration conflicts with local declaration of 'a'

View File

@ -0,0 +1,13 @@
//// [duplicateVarAndImport2.ts]
// error since module is instantiated
var a;
module M { export var x = 1; }
import a = M;
//// [duplicateVarAndImport2.js]
var a;
var M;
(function (M) {
M.x = 1;
})(M || (M = {}));
var a = M;

View File

@ -0,0 +1,4 @@
// no error since module is not instantiated
var a;
module M {}
import a = M;

View File

@ -0,0 +1,4 @@
// error since module is instantiated
var a;
module M { export var x = 1; }
import a = M;

View File

@ -0,0 +1,4 @@
// classes cannot extend primitives
class C4a extends void {}
class C5a extends null { }

View File

@ -0,0 +1,3 @@
class C2 extends { foo: string; } { } // error
class C6 extends []{ } // error