Skip to content

Commit

Permalink
Merge pull request #2 from Microsoft/TestUpdatesForResolvedBugs
Browse files Browse the repository at this point in the history
Updating some tests for resolved bugs
  • Loading branch information
danquirk committed Jul 15, 2014
2 parents e9cd8a0 + da4547f commit 5ecd78e
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/baselines/reference/classExtendingPrimitive2.errors.txt
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions tests/baselines/reference/classExtendsEveryObjectType2.errors.txt
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//// [duplicateVarAndImport.ts]
// no error since module is not instantiated

var a;
module M { }
import a = M;

//// [duplicateVarAndImport.js]
var a;
7 changes: 7 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport2.errors.txt
Original file line number Diff line number Diff line change
@@ -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'
13 changes: 13 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport2.js
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 5 additions & 0 deletions tests/cases/compiler/duplicateVarAndImport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// no error since module is not instantiated

var a;
module M { }
import a = M;
4 changes: 4 additions & 0 deletions tests/cases/compiler/duplicateVarAndImport2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// error since module is instantiated
var a;
module M { export var x = 1; }
import a = M;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// classes cannot extend primitives

class C4a extends void {}
class C5a extends null { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class C2 extends { foo: string; } { } // error

class C6 extends []{ } // error

0 comments on commit 5ecd78e

Please sign in to comment.