Some test cases to verify that declaration file overwrite is reported correctly

This commit is contained in:
Sheetal Nandi 2015-10-20 16:08:07 -07:00
parent ff933be5ff
commit bf05ea3b2f
6 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,12 @@
error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files.
!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files.
==== tests/cases/compiler/a.d.ts (0 errors) ====
declare class c {
}
==== tests/cases/compiler/a.ts (0 errors) ====
class d {
}

View file

@ -0,0 +1,17 @@
//// [tests/cases/compiler/declarationFileOverwriteError.ts] ////
//// [a.d.ts]
declare class c {
}
//// [a.ts]
class d {
}
//// [a.js]
var d = (function () {
function d() {
}
return d;
})();

View file

@ -0,0 +1,12 @@
error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' which is one of the input files.
!!! error TS5055: Cannot write file 'out.d.ts' which is one of the input files.
==== tests/cases/compiler/out.d.ts (0 errors) ====
declare class c {
}
==== tests/cases/compiler/a.ts (0 errors) ====
class d {
}

View file

@ -0,0 +1,17 @@
//// [tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts] ////
//// [out.d.ts]
declare class c {
}
//// [a.ts]
class d {
}
//// [out.js]
var d = (function () {
function d() {
}
return d;
})();

View file

@ -0,0 +1,9 @@
// @declaration: true
// @Filename: a.d.ts
declare class c {
}
// @FileName: a.ts
class d {
}

View file

@ -0,0 +1,10 @@
// @declaration: true
// @out: tests/cases/compiler/out.js
// @Filename: out.d.ts
declare class c {
}
// @FileName: a.ts
class d {
}