test sourceMap

This commit is contained in:
Klaus Meinhardt
2018-07-30 16:22:25 +02:00
parent 3894d0524c
commit 5b122dbad6
4 changed files with 95 additions and 0 deletions

View File

@@ -9,3 +9,4 @@ function a() {
}
var a = _a[0], b = _a[1];
}
//# sourceMappingURL=restParameterWithBindingPattern2.js.map

View File

@@ -0,0 +1,2 @@
//// [restParameterWithBindingPattern2.js.map]
{"version":3,"file":"restParameterWithBindingPattern2.js","sourceRoot":"","sources":["restParameterWithBindingPattern2.ts"],"names":[],"mappings":"AAAA,SAAS,CAAC;IAAC,YAAS;SAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;QAAT,uBAAS;;IAAT,IAAI,SAAC,EAAE,SAAC,CAAC;AAAI,CAAC"}

View File

@@ -0,0 +1,90 @@
===================================================================
JsFile: restParameterWithBindingPattern2.js
mapUrl: restParameterWithBindingPattern2.js.map
sourceRoot:
sources: restParameterWithBindingPattern2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:tests/cases/compiler/restParameterWithBindingPattern2.js
sourceFile:restParameterWithBindingPattern2.ts
-------------------------------------------------------------------
>>>function a() {
1 >
2 >^^^^^^^^^
3 > ^
4 > ^^^^^^^->
1 >
2 >function
3 > a
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0)
3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0)
---
>>> var _a = [];
1->^^^^
2 > ^^^^^^^^^^^^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->(
2 > ...[a, b]
1->Emitted(2, 5) Source(1, 12) + SourceIndex(0)
2 >Emitted(2, 17) Source(1, 21) + SourceIndex(0)
---
>>> for (var _i = 0; _i < arguments.length; _i++) {
1->^^^^^^^^^
2 > ^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^^^^^^^^^^^^^^
5 > ^^
6 > ^^^^
1->
2 > ...[a, b]
3 >
4 > ...[a, b]
5 >
6 > ...[a, b]
1->Emitted(3, 10) Source(1, 12) + SourceIndex(0)
2 >Emitted(3, 20) Source(1, 21) + SourceIndex(0)
3 >Emitted(3, 22) Source(1, 12) + SourceIndex(0)
4 >Emitted(3, 43) Source(1, 21) + SourceIndex(0)
5 >Emitted(3, 45) Source(1, 12) + SourceIndex(0)
6 >Emitted(3, 49) Source(1, 21) + SourceIndex(0)
---
>>> _a[_i] = arguments[_i];
1 >^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^
1 >
2 > ...[a, b]
1 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
2 >Emitted(4, 32) Source(1, 21) + SourceIndex(0)
---
>>> }
>>> var a = _a[0], b = _a[1];
1 >^^^^
2 > ^^^^
3 > ^^^^^^^^^
4 > ^^
5 > ^^^^^^^^^
6 > ^
1 >
2 > ...[
3 > a
4 > ,
5 > b
6 > ]
1 >Emitted(6, 5) Source(1, 12) + SourceIndex(0)
2 >Emitted(6, 9) Source(1, 16) + SourceIndex(0)
3 >Emitted(6, 18) Source(1, 17) + SourceIndex(0)
4 >Emitted(6, 20) Source(1, 19) + SourceIndex(0)
5 >Emitted(6, 29) Source(1, 20) + SourceIndex(0)
6 >Emitted(6, 30) Source(1, 21) + SourceIndex(0)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >) {
2 >}
1 >Emitted(7, 1) Source(1, 25) + SourceIndex(0)
2 >Emitted(7, 2) Source(1, 26) + SourceIndex(0)
---
>>>//# sourceMappingURL=restParameterWithBindingPattern2.js.map

View File

@@ -1 +1,3 @@
// @sourcemap: true
function a(...[a, b]) { }