diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts index b3b5deaf83d..f8c05f47e6b 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts @@ -1,4 +1,5 @@ -var temp: any; +// @target: es5 +var temp: any; delete --temp ** 3; delete ++temp ** 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts index f79b22fedd7..80fe91ee462 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts @@ -1,28 +1,46 @@ -var t1 = 10; +// @target: es5 + +var t1 = 10; var t2 = 10; var s; -`Exp: ${t1 ** t2} abc`; -`Exp: ${t1 ** t2 ** t1} abc`; -`Exp: ${t1 + t2 ** t1} abc`; -`Exp: ${t1 - t2 ** t1} abc`; -`Exp: ${t1 ** t2 + t1} abc`; -`Exp: ${t1 ** t2 - t1} abc`; -`Exp: ${t1 + t2 ** t2 + t1} abc`; -`Exp: ${t1 - t2 ** t2 - t1} abc`; -`Exp: ${-t1 ** t2 - t1} abc`; -`Exp: ${+t1 ** t2 - t1} abc`; -`Exp: ${-++t1 ** t2 - t1} abc`; -`Exp: ${+--t1 ** t2 - t1} abc`; -`Exp: ${-t1++ ** t2 - t1} abc`; -`Exp: ${-t1-- ** t2 - t1} abc`; -`Exp: ${+t1++ ** t2 - t1} abc`; -`Exp: ${+t1-- ** t2 - t1} abc`; -`Exp: ${typeof t1 ** t2 ** t1} abc`; -`Exp: ${typeof t1 ** t2 + t1} abc`; -`Exp: ${typeof t1 ** (t2 - t1)} abc`; -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; -`Exp: ${!t1 ** t2 ** t1} abc`; -`Exp: ${!t1 ** t2 ** ++t1} abc`; -`Exp: ${!t1 ** t2 ** --t1} abc`; + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1}`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file