diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js new file mode 100644 index 00000000000..bda3f8be251 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTempalteString4ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; + +//// [emitExponentiationOperatorInTempalteString4ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +`${Math.pow(t1, -t2)} world`; +`${Math.pow((-t1), t2) - t1} world`; +`${Math.pow((-++t1), t2) - t1} world`; +`${Math.pow((-t1++), t2) - t1} world`; +`${Math.pow((~t1), Math.pow(t2, --t1))} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +// TempateHead & TemplateTail are empt +`${Math.pow(t1, -t2)} hello world ${Math.pow(t1, -t2)}`; +`${Math.pow((-t1), t2) - t1} hello world ${Math.pow((-t1), t2) - t1}`; +`${Math.pow((-++t1), t2) - t1} hello world ${Math.pow(t1, Math.pow((-++t1), -t1))}`; +`${Math.pow((-t1++), t2) - t1} hello world ${Math.pow(t2, Math.pow((-t1++), -t1))}`; +`${Math.pow((~t1), Math.pow(t2, --t1))} hello world ${Math.pow((~t1), Math.pow(t2, --t1))}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +// With templateHead +`hello ${Math.pow((-t1), t2) - t1}`; +`hello ${Math.pow((-++t1), t2) - t1}`; +`hello ${Math.pow((-t1++), t2) - t1}`; +`hello ${Math.pow((~t1), Math.pow(t2, --t1))}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols new file mode 100644 index 00000000000..1f4cd74502b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols @@ -0,0 +1,114 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 3, 3)) + +// With TemplateTail +`${t1 ** -t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +`${(-t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(-++t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(-t1++) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types new file mode 100644 index 00000000000..ed2f4b522e9 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types @@ -0,0 +1,233 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** -t2} world`; +>`${t1 ** -t2} world` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} world`; +>`${(-t1) ** t2 - t1} world` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} world`; +>`${(-++t1) ** t2 - t1} world` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-t1++) ** t2 - t1} world`; +>`${(-t1++) ** t2 - t1} world` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } world`; +>`${(~t1) ** t2 ** --t1 } world` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** (-++t1) **- t1 : number +>t1 : number +>(-++t1) **- t1 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>- t1 : number +>t1 : number + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number +>t2 ** (-t1++) ** - t1 : number +>t2 : number +>(-t1++) ** - t1 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>- t1 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>`hello ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-++t1) ** t2 - t1}`; +>`hello ${(-++t1) ** t2 - t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-t1++) ** t2 - t1}`; +>`hello ${(-t1++) ** t2 - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(~t1) ** t2 ** --t1 }`; +>`hello ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1)}`; +>`hello ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +