Add rootDir tests

This commit is contained in:
Mohamed Hegazy
2015-04-14 22:19:59 -07:00
parent 261adffe50
commit 99c0adbc2a
45 changed files with 797 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
declare class C {
}

View File

@@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View File

@@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View File

@@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View File

@@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: specify rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/FolderC/fileC.d.ts",
"outdir/simple/FolderB/fileB.js",
"outdir/simple/FolderB/fileB.d.ts"
]
}

View File

@@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot:
sources: ../../../../FolderA/FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot:
sources: ../../../FolderA/FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:../../../FolderA/FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1,2 @@
declare class C {
}

View File

@@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View File

@@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View File

@@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View File

@@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: specify rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/FolderC/fileC.d.ts",
"outdir/simple/FolderB/fileB.js",
"outdir/simple/FolderB/fileB.d.ts"
]
}

View File

@@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot:
sources: ../../../../FolderA/FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot:
sources: ../../../FolderA/FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:../../../FolderA/FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1,2 @@
declare class C {
}

View File

@@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View File

@@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View File

@@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View File

@@ -0,0 +1,14 @@
error TS6059: File 'FolderA/FolderB/fileB.ts' is not under rootDir 'FolderA/FolderB/FolderC'. RootDir is expected to contain all source files.
!!! error TS6059: File 'fileB.ts' is not under rootDir 'FolderA/FolderB/FolderC'. RootDir is expected to contain all source files.
==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ====
class C {
}
==== FolderA/FolderB/fileB.ts (0 errors) ====
/// <reference path='FolderC/fileC.ts'/>
class B {
public c: C;
}

View File

@@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: Files outside the rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA/FolderB/FolderC",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderC/fileC.js",
"outdir/simple/FolderC/fileC.d.ts",
"outdir/simple/fileB.js",
"outdir/simple/fileB.d.ts"
]
}

View File

@@ -0,0 +1,2 @@
declare class C {
}

View File

@@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View File

@@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View File

@@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View File

@@ -0,0 +1,14 @@
error TS6059: File 'FolderA/FolderB/fileB.ts' is not under rootDir 'FolderA/FolderB/FolderC'. RootDir is expected to contain all source files.
!!! error TS6059: File 'fileB.ts' is not under rootDir 'FolderA/FolderB/FolderC'. RootDir is expected to contain all source files.
==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ====
class C {
}
==== FolderA/FolderB/fileB.ts (0 errors) ====
/// <reference path='FolderC/fileC.ts'/>
class B {
public c: C;
}

View File

@@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: Files outside the rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA/FolderB/FolderC",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderC/fileC.js",
"outdir/simple/FolderC/fileC.d.ts",
"outdir/simple/fileB.js",
"outdir/simple/fileB.d.ts"
]
}

View File

@@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View File

@@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View File

@@ -0,0 +1,23 @@
{
"scenario": "rootDirectory: specify rootDirectory with sourceRoot",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"sourceRoot": "SourceRootPath",
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js"
]
}

View File

@@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot: SourceRootPath/
sources: FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot: SourceRootPath/
sources: FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View File

@@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View File

@@ -0,0 +1,23 @@
{
"scenario": "rootDirectory: specify rootDirectory with sourceRoot",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"sourceRoot": "SourceRootPath",
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js"
]
}

View File

@@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot: SourceRootPath/
sources: FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot: SourceRootPath/
sources: FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View File

@@ -0,0 +1,12 @@
{
"scenario": "rootDirectory: specify rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"rootDir": "FolderA",
"sourceMap": true,
"declaration": true,
"baselineCheck": true
}

View File

@@ -0,0 +1,11 @@
{
"scenario": "rootDirectory: Files outside the rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"rootDir": "FolderA/FolderB/FolderC",
"declaration": true,
"baselineCheck": true
}

View File

@@ -0,0 +1,12 @@
{
"scenario": "rootDirectory: specify rootDirectory with sourceRoot",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"rootDir": "FolderA",
"sourceMap": true,
"sourceRoot": "SourceRootPath",
"baselineCheck": true
}

View File

@@ -0,0 +1,2 @@
class C {
}

View File

@@ -0,0 +1,4 @@
/// <reference path='FolderC/fileC.ts'/>
class B {
public c: C;
}