From c0893e153f0ea1a7606c6ebefe61d869bff24b59 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 22 Oct 2014 15:48:22 -0700 Subject: [PATCH] Added tests and baselines for templates. --- .../reference/templateStringInArray.js | 5 +++ .../reference/templateStringInArray.types | 5 +++ .../templateStringInArrowFunction.js | 5 +++ .../templateStringInArrowFunction.types | 7 ++++ .../templateStringInArrowFunctionES6.js | 5 +++ .../templateStringInArrowFunctionES6.types | 7 ++++ .../templateStringInBinaryAddition.js | 5 +++ .../templateStringInBinaryAddition.types | 5 +++ .../templateStringInBinaryAdditionES6.js | 5 +++ .../templateStringInBinaryAdditionES6.types | 5 +++ .../reference/templateStringInConditional.js | 5 +++ .../templateStringInConditional.types | 5 +++ .../templateStringInConditionalES6.js | 5 +++ .../templateStringInConditionalES6.types | 5 +++ .../templateStringInDeleteExpression.js | 5 +++ .../templateStringInDeleteExpression.types | 4 ++ .../templateStringInDeleteExpressionES6.js | 5 +++ .../templateStringInDeleteExpressionES6.types | 4 ++ .../templateStringInDivision.errors.txt | 7 ++++ .../reference/templateStringInDivision.js | 5 +++ .../templateStringInEqualityChecks.js | 8 ++++ .../templateStringInEqualityChecks.types | 17 +++++++++ .../templateStringInEqualityChecksES6.js | 8 ++++ .../templateStringInEqualityChecksES6.types | 17 +++++++++ .../templateStringInFunctionExpression.js | 11 ++++++ .../templateStringInFunctionExpression.types | 9 +++++ .../templateStringInFunctionExpressionES6.js | 11 ++++++ ...emplateStringInFunctionExpressionES6.types | 9 +++++ ...teStringInFunctionParameterType.errors.txt | 20 ++++++++++ ...tringInFunctionParameterTypeES6.errors.txt | 20 ++++++++++ .../reference/templateStringInInOperator.js | 5 +++ .../templateStringInInOperator.types | 8 ++++ .../templateStringInInOperatorES6.js | 5 +++ .../templateStringInInOperatorES6.types | 8 ++++ .../templateStringInIndexExpression.js | 5 +++ .../templateStringInIndexExpression.types | 4 ++ .../templateStringInIndexExpressionES6.js | 5 +++ .../templateStringInIndexExpressionES6.types | 4 ++ .../templateStringInInstanceOf.errors.txt | 7 ++++ .../reference/templateStringInInstanceOf.js | 5 +++ .../templateStringInInstanceOfES6.errors.txt | 7 ++++ .../templateStringInInstanceOfES6.js | 5 +++ .../templateStringInModuleName.errors.txt | 38 +++++++++++++++++++ .../templateStringInModuleNameES6.errors.txt | 38 +++++++++++++++++++ .../templateStringInModulo.errors.txt | 7 ++++ .../reference/templateStringInModulo.js | 5 +++ .../templateStringInModuloES6.errors.txt | 7 ++++ .../reference/templateStringInModuloES6.js | 5 +++ .../templateStringInMultiplication.errors.txt | 7 ++++ .../templateStringInMultiplication.js | 5 +++ ...mplateStringInMultiplicationES6.errors.txt | 7 ++++ .../templateStringInMultiplicationES6.js | 5 +++ .../templateStringInNewOperator.errors.txt | 7 ++++ .../reference/templateStringInNewOperator.js | 5 +++ .../templateStringInNewOperatorES6.errors.txt | 7 ++++ .../templateStringInNewOperatorES6.js | 5 +++ .../templateStringInObjectLiteral.errors.txt | 16 ++++++++ ...emplateStringInObjectLiteralES6.errors.txt | 16 ++++++++ .../reference/templateStringInParentheses.js | 5 +++ .../templateStringInParentheses.types | 5 +++ .../templateStringInParenthesesES6.js | 5 +++ .../templateStringInParenthesesES6.types | 5 +++ .../templateStringInSwitchAndCase.js | 15 ++++++++ .../templateStringInSwitchAndCase.types | 8 ++++ .../templateStringInSwitchAndCaseES6.js | 15 ++++++++ .../templateStringInSwitchAndCaseES6.types | 8 ++++ .../templateStringInTypeAssertion.js | 5 +++ .../templateStringInTypeAssertion.types | 5 +++ .../templateStringInTypeAssertionES6.js | 5 +++ .../templateStringInTypeAssertionES6.types | 5 +++ .../reference/templateStringInTypeOf.js | 5 +++ .../reference/templateStringInTypeOf.types | 5 +++ .../reference/templateStringInTypeOfES6.js | 5 +++ .../reference/templateStringInTypeOfES6.types | 5 +++ .../reference/templateStringInUnaryPlus.js | 5 +++ .../reference/templateStringInUnaryPlus.types | 5 +++ .../reference/templateStringInUnaryPlusES6.js | 5 +++ .../templateStringInUnaryPlusES6.types | 5 +++ .../reference/templateStringInWhile.js | 9 +++++ .../reference/templateStringInWhile.types | 5 +++ .../reference/templateStringInWhileES6.js | 9 +++++ .../reference/templateStringInWhileES6.types | 5 +++ .../templateStringInYieldKeyword.errors.txt | 23 +++++++++++ .../templateStringWithEmbeddedAddition.js | 5 +++ .../templateStringWithEmbeddedAddition.types | 5 +++ .../templateStringWithEmbeddedAdditionES6.js | 5 +++ ...emplateStringWithEmbeddedAdditionES6.types | 5 +++ .../templateStringWithEmbeddedArray.js | 5 +++ .../templateStringWithEmbeddedArray.types | 5 +++ .../templateStringWithEmbeddedArrayES6.js | 5 +++ .../templateStringWithEmbeddedArrayES6.types | 5 +++ ...templateStringWithEmbeddedArrowFunction.js | 5 +++ ...plateStringWithEmbeddedArrowFunction.types | 7 ++++ ...plateStringWithEmbeddedArrowFunctionES6.js | 5 +++ ...teStringWithEmbeddedArrowFunctionES6.types | 7 ++++ .../templateStringWithEmbeddedComments.js | 16 ++++++++ .../templateStringWithEmbeddedComments.types | 14 +++++++ .../templateStringWithEmbeddedCommentsES6.js | 16 ++++++++ ...emplateStringWithEmbeddedCommentsES6.types | 14 +++++++ ...teStringWithEmbeddedConditional.errors.txt | 7 ++++ .../templateStringWithEmbeddedConditional.js | 5 +++ ...tringWithEmbeddedConditionalES6.errors.txt | 7 ++++ ...emplateStringWithEmbeddedConditionalES6.js | 5 +++ .../templateStringWithEmbeddedDivision.js | 5 +++ .../templateStringWithEmbeddedDivision.types | 5 +++ .../templateStringWithEmbeddedDivisionES6.js | 5 +++ ...emplateStringWithEmbeddedDivisionES6.types | 5 +++ ...ateStringWithEmbeddedFunctionExpression.js | 7 ++++ ...StringWithEmbeddedFunctionExpression.types | 7 ++++ ...StringWithEmbeddedFunctionExpressionES6.js | 7 ++++ ...ingWithEmbeddedFunctionExpressionES6.types | 7 ++++ .../templateStringWithEmbeddedInOperator.js | 5 +++ ...templateStringWithEmbeddedInOperator.types | 8 ++++ ...templateStringWithEmbeddedInOperatorES6.js | 5 +++ ...plateStringWithEmbeddedInOperatorES6.types | 8 ++++ ...ateStringWithEmbeddedInstanceOf.errors.txt | 7 ++++ .../templateStringWithEmbeddedInstanceOf.js | 5 +++ ...StringWithEmbeddedInstanceOfES6.errors.txt | 7 ++++ ...templateStringWithEmbeddedInstanceOfES6.js | 5 +++ .../templateStringWithEmbeddedModulo.js | 5 +++ .../templateStringWithEmbeddedModulo.types | 5 +++ .../templateStringWithEmbeddedModuloES6.js | 5 +++ .../templateStringWithEmbeddedModuloES6.types | 5 +++ ...emplateStringWithEmbeddedMultiplication.js | 5 +++ ...lateStringWithEmbeddedMultiplication.types | 5 +++ ...lateStringWithEmbeddedMultiplicationES6.js | 5 +++ ...eStringWithEmbeddedMultiplicationES6.types | 5 +++ .../templateStringWithEmbeddedNewOperator.js | 5 +++ ...emplateStringWithEmbeddedNewOperator.types | 6 +++ ...emplateStringWithEmbeddedNewOperatorES6.js | 5 +++ ...lateStringWithEmbeddedNewOperatorES6.types | 6 +++ ...templateStringWithEmbeddedObjectLiteral.js | 5 +++ ...plateStringWithEmbeddedObjectLiteral.types | 7 ++++ ...plateStringWithEmbeddedObjectLiteralES6.js | 5 +++ ...teStringWithEmbeddedObjectLiteralES6.types | 7 ++++ ...emplateStringWithEmbeddedTemplateString.js | 5 +++ ...lateStringWithEmbeddedTemplateString.types | 4 ++ ...lateStringWithEmbeddedTemplateStringES6.js | 5 +++ ...eStringWithEmbeddedTemplateStringES6.types | 4 ++ ...ringWithEmbeddedTypeAssertionOnAddition.js | 5 +++ ...gWithEmbeddedTypeAssertionOnAddition.types | 7 ++++ ...gWithEmbeddedTypeAssertionOnAdditionES6.js | 5 +++ ...thEmbeddedTypeAssertionOnAdditionES6.types | 7 ++++ ...emplateStringWithEmbeddedTypeOfOperator.js | 5 +++ ...lateStringWithEmbeddedTypeOfOperator.types | 5 +++ ...lateStringWithEmbeddedTypeOfOperatorES6.js | 5 +++ ...eStringWithEmbeddedTypeOfOperatorES6.types | 5 +++ .../templateStringWithEmbeddedUnaryPlus.js | 5 +++ .../templateStringWithEmbeddedUnaryPlus.types | 6 +++ .../templateStringWithEmbeddedUnaryPlusES6.js | 5 +++ ...mplateStringWithEmbeddedUnaryPlusES6.types | 6 +++ ...eStringWithEmbeddedYieldKeyword.errors.txt | 34 +++++++++++++++++ ...ringWithEmbeddedYieldKeywordES6.errors.txt | 34 +++++++++++++++++ ...ateStringWithOpenCommentInStringPortion.js | 5 +++ ...StringWithOpenCommentInStringPortion.types | 3 ++ ...StringWithOpenCommentInStringPortionES6.js | 5 +++ ...ingWithOpenCommentInStringPortionES6.types | 3 ++ .../templateStringWithPropertyAccess.js | 5 +++ .../templateStringWithPropertyAccess.types | 6 +++ .../templateStringWithPropertyAccessES6.js | 5 +++ .../templateStringWithPropertyAccessES6.types | 6 +++ .../es6/templates/templateStringInArray.ts | 1 + .../templateStringInArrowFunction.ts | 1 + .../templateStringInArrowFunctionES6.ts | 2 + .../templateStringInBinaryAddition.ts | 1 + .../templateStringInBinaryAdditionES6.ts | 2 + .../templates/templateStringInConditional.ts | 1 + .../templateStringInConditionalES6.ts | 2 + .../templateStringInDeleteExpression.ts | 1 + .../templateStringInDeleteExpressionES6.ts | 2 + .../es6/templates/templateStringInDivision.ts | 1 + .../templateStringInEqualityChecks.ts | 4 ++ .../templateStringInEqualityChecksES6.ts | 5 +++ .../templateStringInFunctionExpression.ts | 4 ++ .../templateStringInFunctionExpressionES6.ts | 5 +++ .../templateStringInFunctionParameterType.ts | 5 +++ ...emplateStringInFunctionParameterTypeES6.ts | 6 +++ .../templates/templateStringInInOperator.ts | 1 + .../templateStringInInOperatorES6.ts | 2 + .../templateStringInIndexExpression.ts | 1 + .../templateStringInIndexExpressionES6.ts | 2 + .../templates/templateStringInInstanceOf.ts | 1 + .../templateStringInInstanceOfES6.ts | 2 + .../templates/templateStringInModuleName.ts | 5 +++ .../templateStringInModuleNameES6.ts | 6 +++ .../es6/templates/templateStringInModulo.ts | 1 + .../templates/templateStringInModuloES6.ts | 2 + .../templateStringInMultiplication.ts | 1 + .../templateStringInMultiplicationES6.ts | 2 + .../templates/templateStringInNewOperator.ts | 1 + .../templateStringInNewOperatorES6.ts | 2 + .../templateStringInObjectLiteral.ts | 4 ++ .../templateStringInObjectLiteralES6.ts | 5 +++ .../templates/templateStringInParentheses.ts | 1 + .../templateStringInParenthesesES6.ts | 2 + .../templateStringInSwitchAndCase.ts | 6 +++ .../templateStringInSwitchAndCaseES6.ts | 7 ++++ .../templateStringInTypeAssertion.ts | 1 + .../templateStringInTypeAssertionES6.ts | 2 + .../es6/templates/templateStringInTypeOf.ts | 1 + .../templates/templateStringInTypeOfES6.ts | 2 + .../templates/templateStringInUnaryPlus.ts | 1 + .../templates/templateStringInUnaryPlusES6.ts | 2 + .../es6/templates/templateStringInWhile.ts | 3 ++ .../es6/templates/templateStringInWhileES6.ts | 4 ++ .../templates/templateStringInYieldKeyword.ts | 4 ++ .../templateStringWithEmbeddedAddition.ts | 1 + .../templateStringWithEmbeddedAdditionES6.ts | 2 + .../templateStringWithEmbeddedArray.ts | 1 + .../templateStringWithEmbeddedArrayES6.ts | 2 + ...templateStringWithEmbeddedArrowFunction.ts | 1 + ...plateStringWithEmbeddedArrowFunctionES6.ts | 2 + .../templateStringWithEmbeddedComments.ts | 12 ++++++ .../templateStringWithEmbeddedCommentsES6.ts | 12 ++++++ .../templateStringWithEmbeddedConditional.ts | 1 + ...emplateStringWithEmbeddedConditionalES6.ts | 2 + .../templateStringWithEmbeddedDivision.ts | 1 + .../templateStringWithEmbeddedDivisionES6.ts | 2 + ...ateStringWithEmbeddedFunctionExpression.ts | 1 + ...StringWithEmbeddedFunctionExpressionES6.ts | 2 + .../templateStringWithEmbeddedInOperator.ts | 1 + ...templateStringWithEmbeddedInOperatorES6.ts | 2 + .../templateStringWithEmbeddedInstanceOf.ts | 1 + ...templateStringWithEmbeddedInstanceOfES6.ts | 2 + .../templateStringWithEmbeddedModulo.ts | 1 + .../templateStringWithEmbeddedModuloES6.ts | 2 + ...emplateStringWithEmbeddedMultiplication.ts | 1 + ...lateStringWithEmbeddedMultiplicationES6.ts | 2 + .../templateStringWithEmbeddedNewOperator.ts | 1 + ...emplateStringWithEmbeddedNewOperatorES6.ts | 2 + ...templateStringWithEmbeddedObjectLiteral.ts | 1 + ...plateStringWithEmbeddedObjectLiteralES6.ts | 2 + ...emplateStringWithEmbeddedTemplateString.ts | 1 + ...lateStringWithEmbeddedTemplateStringES6.ts | 2 + ...ringWithEmbeddedTypeAssertionOnAddition.ts | 1 + ...gWithEmbeddedTypeAssertionOnAdditionES6.ts | 2 + ...emplateStringWithEmbeddedTypeOfOperator.ts | 1 + ...lateStringWithEmbeddedTypeOfOperatorES6.ts | 2 + .../templateStringWithEmbeddedUnaryPlus.ts | 1 + .../templateStringWithEmbeddedUnaryPlusES6.ts | 2 + .../templateStringWithEmbeddedYieldKeyword.ts | 4 ++ ...mplateStringWithEmbeddedYieldKeywordES6.ts | 5 +++ ...ateStringWithOpenCommentInStringPortion.ts | 1 + ...StringWithOpenCommentInStringPortionES6.ts | 2 + .../templateStringWithPropertyAccess.ts | 1 + .../templateStringWithPropertyAccessES6.ts | 2 + 246 files changed, 1385 insertions(+) create mode 100644 tests/baselines/reference/templateStringInArray.js create mode 100644 tests/baselines/reference/templateStringInArray.types create mode 100644 tests/baselines/reference/templateStringInArrowFunction.js create mode 100644 tests/baselines/reference/templateStringInArrowFunction.types create mode 100644 tests/baselines/reference/templateStringInArrowFunctionES6.js create mode 100644 tests/baselines/reference/templateStringInArrowFunctionES6.types create mode 100644 tests/baselines/reference/templateStringInBinaryAddition.js create mode 100644 tests/baselines/reference/templateStringInBinaryAddition.types create mode 100644 tests/baselines/reference/templateStringInBinaryAdditionES6.js create mode 100644 tests/baselines/reference/templateStringInBinaryAdditionES6.types create mode 100644 tests/baselines/reference/templateStringInConditional.js create mode 100644 tests/baselines/reference/templateStringInConditional.types create mode 100644 tests/baselines/reference/templateStringInConditionalES6.js create mode 100644 tests/baselines/reference/templateStringInConditionalES6.types create mode 100644 tests/baselines/reference/templateStringInDeleteExpression.js create mode 100644 tests/baselines/reference/templateStringInDeleteExpression.types create mode 100644 tests/baselines/reference/templateStringInDeleteExpressionES6.js create mode 100644 tests/baselines/reference/templateStringInDeleteExpressionES6.types create mode 100644 tests/baselines/reference/templateStringInDivision.errors.txt create mode 100644 tests/baselines/reference/templateStringInDivision.js create mode 100644 tests/baselines/reference/templateStringInEqualityChecks.js create mode 100644 tests/baselines/reference/templateStringInEqualityChecks.types create mode 100644 tests/baselines/reference/templateStringInEqualityChecksES6.js create mode 100644 tests/baselines/reference/templateStringInEqualityChecksES6.types create mode 100644 tests/baselines/reference/templateStringInFunctionExpression.js create mode 100644 tests/baselines/reference/templateStringInFunctionExpression.types create mode 100644 tests/baselines/reference/templateStringInFunctionExpressionES6.js create mode 100644 tests/baselines/reference/templateStringInFunctionExpressionES6.types create mode 100644 tests/baselines/reference/templateStringInFunctionParameterType.errors.txt create mode 100644 tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInInOperator.js create mode 100644 tests/baselines/reference/templateStringInInOperator.types create mode 100644 tests/baselines/reference/templateStringInInOperatorES6.js create mode 100644 tests/baselines/reference/templateStringInInOperatorES6.types create mode 100644 tests/baselines/reference/templateStringInIndexExpression.js create mode 100644 tests/baselines/reference/templateStringInIndexExpression.types create mode 100644 tests/baselines/reference/templateStringInIndexExpressionES6.js create mode 100644 tests/baselines/reference/templateStringInIndexExpressionES6.types create mode 100644 tests/baselines/reference/templateStringInInstanceOf.errors.txt create mode 100644 tests/baselines/reference/templateStringInInstanceOf.js create mode 100644 tests/baselines/reference/templateStringInInstanceOfES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInInstanceOfES6.js create mode 100644 tests/baselines/reference/templateStringInModuleName.errors.txt create mode 100644 tests/baselines/reference/templateStringInModuleNameES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInModulo.errors.txt create mode 100644 tests/baselines/reference/templateStringInModulo.js create mode 100644 tests/baselines/reference/templateStringInModuloES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInModuloES6.js create mode 100644 tests/baselines/reference/templateStringInMultiplication.errors.txt create mode 100644 tests/baselines/reference/templateStringInMultiplication.js create mode 100644 tests/baselines/reference/templateStringInMultiplicationES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInMultiplicationES6.js create mode 100644 tests/baselines/reference/templateStringInNewOperator.errors.txt create mode 100644 tests/baselines/reference/templateStringInNewOperator.js create mode 100644 tests/baselines/reference/templateStringInNewOperatorES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInNewOperatorES6.js create mode 100644 tests/baselines/reference/templateStringInObjectLiteral.errors.txt create mode 100644 tests/baselines/reference/templateStringInObjectLiteralES6.errors.txt create mode 100644 tests/baselines/reference/templateStringInParentheses.js create mode 100644 tests/baselines/reference/templateStringInParentheses.types create mode 100644 tests/baselines/reference/templateStringInParenthesesES6.js create mode 100644 tests/baselines/reference/templateStringInParenthesesES6.types create mode 100644 tests/baselines/reference/templateStringInSwitchAndCase.js create mode 100644 tests/baselines/reference/templateStringInSwitchAndCase.types create mode 100644 tests/baselines/reference/templateStringInSwitchAndCaseES6.js create mode 100644 tests/baselines/reference/templateStringInSwitchAndCaseES6.types create mode 100644 tests/baselines/reference/templateStringInTypeAssertion.js create mode 100644 tests/baselines/reference/templateStringInTypeAssertion.types create mode 100644 tests/baselines/reference/templateStringInTypeAssertionES6.js create mode 100644 tests/baselines/reference/templateStringInTypeAssertionES6.types create mode 100644 tests/baselines/reference/templateStringInTypeOf.js create mode 100644 tests/baselines/reference/templateStringInTypeOf.types create mode 100644 tests/baselines/reference/templateStringInTypeOfES6.js create mode 100644 tests/baselines/reference/templateStringInTypeOfES6.types create mode 100644 tests/baselines/reference/templateStringInUnaryPlus.js create mode 100644 tests/baselines/reference/templateStringInUnaryPlus.types create mode 100644 tests/baselines/reference/templateStringInUnaryPlusES6.js create mode 100644 tests/baselines/reference/templateStringInUnaryPlusES6.types create mode 100644 tests/baselines/reference/templateStringInWhile.js create mode 100644 tests/baselines/reference/templateStringInWhile.types create mode 100644 tests/baselines/reference/templateStringInWhileES6.js create mode 100644 tests/baselines/reference/templateStringInWhileES6.types create mode 100644 tests/baselines/reference/templateStringInYieldKeyword.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedAddition.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedAddition.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedAdditionES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArray.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArray.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrayES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrayES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedComments.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedComments.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedCommentsES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedConditional.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedConditional.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedConditionalES6.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedConditionalES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedDivision.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedDivision.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedDivisionES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInOperator.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInOperator.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInstanceOf.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInstanceOf.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedModulo.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedModulo.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedModuloES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedModuloES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedMultiplication.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedMultiplication.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedNewOperator.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedNewOperator.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTemplateString.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTemplateString.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.js create mode 100644 tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types create mode 100644 tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.errors.txt create mode 100644 tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt create mode 100644 tests/baselines/reference/templateStringWithOpenCommentInStringPortion.js create mode 100644 tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types create mode 100644 tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.js create mode 100644 tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types create mode 100644 tests/baselines/reference/templateStringWithPropertyAccess.js create mode 100644 tests/baselines/reference/templateStringWithPropertyAccess.types create mode 100644 tests/baselines/reference/templateStringWithPropertyAccessES6.js create mode 100644 tests/baselines/reference/templateStringWithPropertyAccessES6.types create mode 100644 tests/cases/conformance/es6/templates/templateStringInArray.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInBinaryAddition.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInBinaryAdditionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInConditional.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInDivision.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInInOperator.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInModuleName.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInModulo.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInModuloES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInMultiplication.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInNewOperator.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInParentheses.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInTypeOf.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInWhile.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInWhileES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts diff --git a/tests/baselines/reference/templateStringInArray.js b/tests/baselines/reference/templateStringInArray.js new file mode 100644 index 00000000000..97d0b1a636b --- /dev/null +++ b/tests/baselines/reference/templateStringInArray.js @@ -0,0 +1,5 @@ +//// [templateStringInArray.ts] +var x = [1, 2, `abc${ 123 }def`]; + +//// [templateStringInArray.js] +var x = [1, 2, ("abc" + 123 + "def")]; diff --git a/tests/baselines/reference/templateStringInArray.types b/tests/baselines/reference/templateStringInArray.types new file mode 100644 index 00000000000..4934bece9f4 --- /dev/null +++ b/tests/baselines/reference/templateStringInArray.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInArray.ts === +var x = [1, 2, `abc${ 123 }def`]; +>x : {}[] +>[1, 2, `abc${ 123 }def`] : {}[] + diff --git a/tests/baselines/reference/templateStringInArrowFunction.js b/tests/baselines/reference/templateStringInArrowFunction.js new file mode 100644 index 00000000000..4c4890633e1 --- /dev/null +++ b/tests/baselines/reference/templateStringInArrowFunction.js @@ -0,0 +1,5 @@ +//// [templateStringInArrowFunction.ts] +var x = x => `abc${ x }def`; + +//// [templateStringInArrowFunction.js] +var x = function (x) { return ("abc" + x + "def"); }; diff --git a/tests/baselines/reference/templateStringInArrowFunction.types b/tests/baselines/reference/templateStringInArrowFunction.types new file mode 100644 index 00000000000..e17f4d6d2ea --- /dev/null +++ b/tests/baselines/reference/templateStringInArrowFunction.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts === +var x = x => `abc${ x }def`; +>x : (x: any) => string +>x => `abc${ x }def` : (x: any) => string +>x : any +>x : unknown + diff --git a/tests/baselines/reference/templateStringInArrowFunctionES6.js b/tests/baselines/reference/templateStringInArrowFunctionES6.js new file mode 100644 index 00000000000..633b96e9da4 --- /dev/null +++ b/tests/baselines/reference/templateStringInArrowFunctionES6.js @@ -0,0 +1,5 @@ +//// [templateStringInArrowFunctionES6.ts] +var x = x => `abc${ x }def`; + +//// [templateStringInArrowFunctionES6.js] +var x = function (x) { return `abc${x}def`; }; diff --git a/tests/baselines/reference/templateStringInArrowFunctionES6.types b/tests/baselines/reference/templateStringInArrowFunctionES6.types new file mode 100644 index 00000000000..38fca60e647 --- /dev/null +++ b/tests/baselines/reference/templateStringInArrowFunctionES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts === +var x = x => `abc${ x }def`; +>x : (x: any) => string +>x => `abc${ x }def` : (x: any) => string +>x : any +>x : unknown + diff --git a/tests/baselines/reference/templateStringInBinaryAddition.js b/tests/baselines/reference/templateStringInBinaryAddition.js new file mode 100644 index 00000000000..0e1f728005c --- /dev/null +++ b/tests/baselines/reference/templateStringInBinaryAddition.js @@ -0,0 +1,5 @@ +//// [templateStringInBinaryAddition.ts] +var x = 10 + `abc${ 10 }def`; + +//// [templateStringInBinaryAddition.js] +var x = 10 + ("abc" + 10 + "def"); diff --git a/tests/baselines/reference/templateStringInBinaryAddition.types b/tests/baselines/reference/templateStringInBinaryAddition.types new file mode 100644 index 00000000000..f722ff696f4 --- /dev/null +++ b/tests/baselines/reference/templateStringInBinaryAddition.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInBinaryAddition.ts === +var x = 10 + `abc${ 10 }def`; +>x : string +>10 + `abc${ 10 }def` : string + diff --git a/tests/baselines/reference/templateStringInBinaryAdditionES6.js b/tests/baselines/reference/templateStringInBinaryAdditionES6.js new file mode 100644 index 00000000000..7a40d4cc54f --- /dev/null +++ b/tests/baselines/reference/templateStringInBinaryAdditionES6.js @@ -0,0 +1,5 @@ +//// [templateStringInBinaryAdditionES6.ts] +var x = 10 + `abc${ 10 }def`; + +//// [templateStringInBinaryAdditionES6.js] +var x = 10 + `abc${10}def`; diff --git a/tests/baselines/reference/templateStringInBinaryAdditionES6.types b/tests/baselines/reference/templateStringInBinaryAdditionES6.types new file mode 100644 index 00000000000..b421d7dc70e --- /dev/null +++ b/tests/baselines/reference/templateStringInBinaryAdditionES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInBinaryAdditionES6.ts === +var x = 10 + `abc${ 10 }def`; +>x : string +>10 + `abc${ 10 }def` : string + diff --git a/tests/baselines/reference/templateStringInConditional.js b/tests/baselines/reference/templateStringInConditional.js new file mode 100644 index 00000000000..8ffcf24e5f4 --- /dev/null +++ b/tests/baselines/reference/templateStringInConditional.js @@ -0,0 +1,5 @@ +//// [templateStringInConditional.ts] +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; + +//// [templateStringInConditional.js] +var x = "abc" + " " + "def" ? "abc" + " " + "def" : "abc" + " " + "def"; diff --git a/tests/baselines/reference/templateStringInConditional.types b/tests/baselines/reference/templateStringInConditional.types new file mode 100644 index 00000000000..b4ff36b3891 --- /dev/null +++ b/tests/baselines/reference/templateStringInConditional.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInConditional.ts === +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; +>x : string +>`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string + diff --git a/tests/baselines/reference/templateStringInConditionalES6.js b/tests/baselines/reference/templateStringInConditionalES6.js new file mode 100644 index 00000000000..d212b5c7717 --- /dev/null +++ b/tests/baselines/reference/templateStringInConditionalES6.js @@ -0,0 +1,5 @@ +//// [templateStringInConditionalES6.ts] +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; + +//// [templateStringInConditionalES6.js] +var x = `abc${" "}def` ? `abc${" "}def` : `abc${" "}def`; diff --git a/tests/baselines/reference/templateStringInConditionalES6.types b/tests/baselines/reference/templateStringInConditionalES6.types new file mode 100644 index 00000000000..c211ced2583 --- /dev/null +++ b/tests/baselines/reference/templateStringInConditionalES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts === +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; +>x : string +>`abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def` : string + diff --git a/tests/baselines/reference/templateStringInDeleteExpression.js b/tests/baselines/reference/templateStringInDeleteExpression.js new file mode 100644 index 00000000000..e8da2e2ba32 --- /dev/null +++ b/tests/baselines/reference/templateStringInDeleteExpression.js @@ -0,0 +1,5 @@ +//// [templateStringInDeleteExpression.ts] +delete `abc${0}abc`; + +//// [templateStringInDeleteExpression.js] +delete ("abc" + 0 + "abc"); diff --git a/tests/baselines/reference/templateStringInDeleteExpression.types b/tests/baselines/reference/templateStringInDeleteExpression.types new file mode 100644 index 00000000000..88693e5a9bb --- /dev/null +++ b/tests/baselines/reference/templateStringInDeleteExpression.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts === +delete `abc${0}abc`; +>delete `abc${0}abc` : boolean + diff --git a/tests/baselines/reference/templateStringInDeleteExpressionES6.js b/tests/baselines/reference/templateStringInDeleteExpressionES6.js new file mode 100644 index 00000000000..19f5d51b021 --- /dev/null +++ b/tests/baselines/reference/templateStringInDeleteExpressionES6.js @@ -0,0 +1,5 @@ +//// [templateStringInDeleteExpressionES6.ts] +delete `abc${0}abc`; + +//// [templateStringInDeleteExpressionES6.js] +delete `abc${0}abc`; diff --git a/tests/baselines/reference/templateStringInDeleteExpressionES6.types b/tests/baselines/reference/templateStringInDeleteExpressionES6.types new file mode 100644 index 00000000000..d67d4d8c703 --- /dev/null +++ b/tests/baselines/reference/templateStringInDeleteExpressionES6.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts === +delete `abc${0}abc`; +>delete `abc${0}abc` : boolean + diff --git a/tests/baselines/reference/templateStringInDivision.errors.txt b/tests/baselines/reference/templateStringInDivision.errors.txt new file mode 100644 index 00000000000..32cc4830399 --- /dev/null +++ b/tests/baselines/reference/templateStringInDivision.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInDivision.ts(1,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/templates/templateStringInDivision.ts (1 errors) ==== + var x = `abc${ 1 }def` / 1; + ~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInDivision.js b/tests/baselines/reference/templateStringInDivision.js new file mode 100644 index 00000000000..d624d73f6bb --- /dev/null +++ b/tests/baselines/reference/templateStringInDivision.js @@ -0,0 +1,5 @@ +//// [templateStringInDivision.ts] +var x = `abc${ 1 }def` / 1; + +//// [templateStringInDivision.js] +var x = ("abc" + 1 + "def") / 1; diff --git a/tests/baselines/reference/templateStringInEqualityChecks.js b/tests/baselines/reference/templateStringInEqualityChecks.js new file mode 100644 index 00000000000..54f5fa610c2 --- /dev/null +++ b/tests/baselines/reference/templateStringInEqualityChecks.js @@ -0,0 +1,8 @@ +//// [templateStringInEqualityChecks.ts] +var x = `abc${0}abc` === `abc` || + `abc` !== `abc${0}abc` && + `abc${0}abc` == "abc0abc" && + "abc0abc" !== `abc${0}abc`; + +//// [templateStringInEqualityChecks.js] +var x = "abc" + 0 + "abc" === "abc" || "abc" !== "abc" + 0 + "abc" && "abc" + 0 + "abc" == "abc0abc" && "abc0abc" !== "abc" + 0 + "abc"; diff --git a/tests/baselines/reference/templateStringInEqualityChecks.types b/tests/baselines/reference/templateStringInEqualityChecks.types new file mode 100644 index 00000000000..a942d4bce98 --- /dev/null +++ b/tests/baselines/reference/templateStringInEqualityChecks.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts === +var x = `abc${0}abc` === `abc` || +>x : boolean +>`abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean +>`abc${0}abc` === `abc` : boolean + + `abc` !== `abc${0}abc` && +>`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean +>`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" : boolean +>`abc` !== `abc${0}abc` : boolean + + `abc${0}abc` == "abc0abc" && +>`abc${0}abc` == "abc0abc" : boolean + + "abc0abc" !== `abc${0}abc`; +>"abc0abc" !== `abc${0}abc` : boolean + diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.js b/tests/baselines/reference/templateStringInEqualityChecksES6.js new file mode 100644 index 00000000000..317db1ab366 --- /dev/null +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.js @@ -0,0 +1,8 @@ +//// [templateStringInEqualityChecksES6.ts] +var x = `abc${0}abc` === `abc` || + `abc` !== `abc${0}abc` && + `abc${0}abc` == "abc0abc" && + "abc0abc" !== `abc${0}abc`; + +//// [templateStringInEqualityChecksES6.js] +var x = `abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc`; diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.types b/tests/baselines/reference/templateStringInEqualityChecksES6.types new file mode 100644 index 00000000000..ffe300ccd38 --- /dev/null +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts === +var x = `abc${0}abc` === `abc` || +>x : boolean +>`abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean +>`abc${0}abc` === `abc` : boolean + + `abc` !== `abc${0}abc` && +>`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc` : boolean +>`abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" : boolean +>`abc` !== `abc${0}abc` : boolean + + `abc${0}abc` == "abc0abc" && +>`abc${0}abc` == "abc0abc" : boolean + + "abc0abc" !== `abc${0}abc`; +>"abc0abc" !== `abc${0}abc` : boolean + diff --git a/tests/baselines/reference/templateStringInFunctionExpression.js b/tests/baselines/reference/templateStringInFunctionExpression.js new file mode 100644 index 00000000000..9711b2edc3a --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionExpression.js @@ -0,0 +1,11 @@ +//// [templateStringInFunctionExpression.ts] +var x = function y() { + `abc${ 0 }def` + return `abc${ 0 }def`; +}; + +//// [templateStringInFunctionExpression.js] +var x = function y() { + "abc" + 0 + "def"; + return "abc" + 0 + "def"; +}; diff --git a/tests/baselines/reference/templateStringInFunctionExpression.types b/tests/baselines/reference/templateStringInFunctionExpression.types new file mode 100644 index 00000000000..1ec389488ec --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionExpression.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts === +var x = function y() { +>x : () => string +>function y() { `abc${ 0 }def` return `abc${ 0 }def`;} : () => string +>y : () => string + + `abc${ 0 }def` + return `abc${ 0 }def`; +}; diff --git a/tests/baselines/reference/templateStringInFunctionExpressionES6.js b/tests/baselines/reference/templateStringInFunctionExpressionES6.js new file mode 100644 index 00000000000..e7cffe1471b --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionExpressionES6.js @@ -0,0 +1,11 @@ +//// [templateStringInFunctionExpressionES6.ts] +var x = function y() { + `abc${ 0 }def` + return `abc${ 0 }def`; +}; + +//// [templateStringInFunctionExpressionES6.js] +var x = function y() { + `abc${0}def`; + return `abc${0}def`; +}; diff --git a/tests/baselines/reference/templateStringInFunctionExpressionES6.types b/tests/baselines/reference/templateStringInFunctionExpressionES6.types new file mode 100644 index 00000000000..a31558fbe37 --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionExpressionES6.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts === +var x = function y() { +>x : () => string +>function y() { `abc${ 0 }def` return `abc${ 0 }def`;} : () => string +>y : () => string + + `abc${ 0 }def` + return `abc${ 0 }def`; +}; diff --git a/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt new file mode 100644 index 00000000000..e0c35e3f19f --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionParameterType.errors.txt @@ -0,0 +1,20 @@ +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,19): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + +==== tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts (4 errors) ==== + function f(`hello`); + ~~~~~~~ +!!! error TS1138: Parameter declaration expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~ +!!! error TS2394: Overload signature is not compatible with function implementation. + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + function f(x: string); + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt new file mode 100644 index 00000000000..948c9ccc6cd --- /dev/null +++ b/tests/baselines/reference/templateStringInFunctionParameterTypeES6.errors.txt @@ -0,0 +1,20 @@ +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,19): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,1): error TS2394: Overload signature is not compatible with function implementation. +tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. + + +==== tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts (4 errors) ==== + function f(`hello`); + ~~~~~~~ +!!! error TS1138: Parameter declaration expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~ +!!! error TS2394: Overload signature is not compatible with function implementation. + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + function f(x: string); + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInInOperator.js b/tests/baselines/reference/templateStringInInOperator.js new file mode 100644 index 00000000000..18890c9858a --- /dev/null +++ b/tests/baselines/reference/templateStringInInOperator.js @@ -0,0 +1,5 @@ +//// [templateStringInInOperator.ts] +var x = `${ "hi" }` in { hi: 10, hello: 20}; + +//// [templateStringInInOperator.js] +var x = "" + "hi" + "" in { hi: 10, hello: 20 }; diff --git a/tests/baselines/reference/templateStringInInOperator.types b/tests/baselines/reference/templateStringInInOperator.types new file mode 100644 index 00000000000..da35bdc499c --- /dev/null +++ b/tests/baselines/reference/templateStringInInOperator.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringInInOperator.ts === +var x = `${ "hi" }` in { hi: 10, hello: 20}; +>x : boolean +>`${ "hi" }` in { hi: 10, hello: 20} : boolean +>{ hi: 10, hello: 20} : { hi: number; hello: number; } +>hi : number +>hello : number + diff --git a/tests/baselines/reference/templateStringInInOperatorES6.js b/tests/baselines/reference/templateStringInInOperatorES6.js new file mode 100644 index 00000000000..bd4daef3b6d --- /dev/null +++ b/tests/baselines/reference/templateStringInInOperatorES6.js @@ -0,0 +1,5 @@ +//// [templateStringInInOperatorES6.ts] +var x = `${ "hi" }` in { hi: 10, hello: 20}; + +//// [templateStringInInOperatorES6.js] +var x = `${"hi"}` in { hi: 10, hello: 20 }; diff --git a/tests/baselines/reference/templateStringInInOperatorES6.types b/tests/baselines/reference/templateStringInInOperatorES6.types new file mode 100644 index 00000000000..7af0d7a2f48 --- /dev/null +++ b/tests/baselines/reference/templateStringInInOperatorES6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts === +var x = `${ "hi" }` in { hi: 10, hello: 20}; +>x : boolean +>`${ "hi" }` in { hi: 10, hello: 20} : boolean +>{ hi: 10, hello: 20} : { hi: number; hello: number; } +>hi : number +>hello : number + diff --git a/tests/baselines/reference/templateStringInIndexExpression.js b/tests/baselines/reference/templateStringInIndexExpression.js new file mode 100644 index 00000000000..680cfb49f47 --- /dev/null +++ b/tests/baselines/reference/templateStringInIndexExpression.js @@ -0,0 +1,5 @@ +//// [templateStringInIndexExpression.ts] +`abc${0}abc`[`0`]; + +//// [templateStringInIndexExpression.js] +("abc" + 0 + "abc")["0"]; diff --git a/tests/baselines/reference/templateStringInIndexExpression.types b/tests/baselines/reference/templateStringInIndexExpression.types new file mode 100644 index 00000000000..a0270b850ab --- /dev/null +++ b/tests/baselines/reference/templateStringInIndexExpression.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts === +`abc${0}abc`[`0`]; +>`abc${0}abc`[`0`] : any + diff --git a/tests/baselines/reference/templateStringInIndexExpressionES6.js b/tests/baselines/reference/templateStringInIndexExpressionES6.js new file mode 100644 index 00000000000..c1c87211a05 --- /dev/null +++ b/tests/baselines/reference/templateStringInIndexExpressionES6.js @@ -0,0 +1,5 @@ +//// [templateStringInIndexExpressionES6.ts] +`abc${0}abc`[`0`]; + +//// [templateStringInIndexExpressionES6.js] +`abc${0}abc`[`0`]; diff --git a/tests/baselines/reference/templateStringInIndexExpressionES6.types b/tests/baselines/reference/templateStringInIndexExpressionES6.types new file mode 100644 index 00000000000..aceb22da529 --- /dev/null +++ b/tests/baselines/reference/templateStringInIndexExpressionES6.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts === +`abc${0}abc`[`0`]; +>`abc${0}abc`[`0`] : any + diff --git a/tests/baselines/reference/templateStringInInstanceOf.errors.txt b/tests/baselines/reference/templateStringInInstanceOf.errors.txt new file mode 100644 index 00000000000..04d2584712b --- /dev/null +++ b/tests/baselines/reference/templateStringInInstanceOf.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts(1,9): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + + +==== tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts (1 errors) ==== + var x = `abc${ 0 }def` instanceof String; + ~~~~~~~~~~~~~~ +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInInstanceOf.js b/tests/baselines/reference/templateStringInInstanceOf.js new file mode 100644 index 00000000000..ccf022cc703 --- /dev/null +++ b/tests/baselines/reference/templateStringInInstanceOf.js @@ -0,0 +1,5 @@ +//// [templateStringInInstanceOf.ts] +var x = `abc${ 0 }def` instanceof String; + +//// [templateStringInInstanceOf.js] +var x = "abc" + 0 + "def" instanceof String; diff --git a/tests/baselines/reference/templateStringInInstanceOfES6.errors.txt b/tests/baselines/reference/templateStringInInstanceOfES6.errors.txt new file mode 100644 index 00000000000..0fc8c81ab92 --- /dev/null +++ b/tests/baselines/reference/templateStringInInstanceOfES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts(1,9): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + + +==== tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts (1 errors) ==== + var x = `abc${ 0 }def` instanceof String; + ~~~~~~~~~~~~~~ +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInInstanceOfES6.js b/tests/baselines/reference/templateStringInInstanceOfES6.js new file mode 100644 index 00000000000..793c183d137 --- /dev/null +++ b/tests/baselines/reference/templateStringInInstanceOfES6.js @@ -0,0 +1,5 @@ +//// [templateStringInInstanceOfES6.ts] +var x = `abc${ 0 }def` instanceof String; + +//// [templateStringInInstanceOfES6.js] +var x = `abc${0}def` instanceof String; diff --git a/tests/baselines/reference/templateStringInModuleName.errors.txt b/tests/baselines/reference/templateStringInModuleName.errors.txt new file mode 100644 index 00000000000..4aa06a6232b --- /dev/null +++ b/tests/baselines/reference/templateStringInModuleName.errors.txt @@ -0,0 +1,38 @@ +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,9): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,16): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,21): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,9): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,16): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,24): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,1): error TS2304: Cannot find name 'declare'. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,9): error TS2304: Cannot find name 'module'. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,1): error TS2304: Cannot find name 'declare'. +tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,9): error TS2304: Cannot find name 'module'. + + +==== tests/cases/conformance/es6/templates/templateStringInModuleName.ts (10 errors) ==== + declare module `M1` { + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS2304: Cannot find name 'module'. + } + + declare module `M${2}` { + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS2304: Cannot find name 'module'. + } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInModuleNameES6.errors.txt b/tests/baselines/reference/templateStringInModuleNameES6.errors.txt new file mode 100644 index 00000000000..fa2bed3d474 --- /dev/null +++ b/tests/baselines/reference/templateStringInModuleNameES6.errors.txt @@ -0,0 +1,38 @@ +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,9): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,16): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,21): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,9): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,16): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,24): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,1): error TS2304: Cannot find name 'declare'. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,9): error TS2304: Cannot find name 'module'. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,1): error TS2304: Cannot find name 'declare'. +tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,9): error TS2304: Cannot find name 'module'. + + +==== tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts (10 errors) ==== + declare module `M1` { + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS2304: Cannot find name 'module'. + } + + declare module `M${2}` { + ~~~~~~ +!!! error TS1005: ';' expected. + ~~~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS2304: Cannot find name 'module'. + } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInModulo.errors.txt b/tests/baselines/reference/templateStringInModulo.errors.txt new file mode 100644 index 00000000000..f9f0b0257d6 --- /dev/null +++ b/tests/baselines/reference/templateStringInModulo.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInModulo.ts(1,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/templates/templateStringInModulo.ts (1 errors) ==== + var x = 1 % `abc${ 1 }def`; + ~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInModulo.js b/tests/baselines/reference/templateStringInModulo.js new file mode 100644 index 00000000000..65d5ec7eaab --- /dev/null +++ b/tests/baselines/reference/templateStringInModulo.js @@ -0,0 +1,5 @@ +//// [templateStringInModulo.ts] +var x = 1 % `abc${ 1 }def`; + +//// [templateStringInModulo.js] +var x = 1 % ("abc" + 1 + "def"); diff --git a/tests/baselines/reference/templateStringInModuloES6.errors.txt b/tests/baselines/reference/templateStringInModuloES6.errors.txt new file mode 100644 index 00000000000..db410876b91 --- /dev/null +++ b/tests/baselines/reference/templateStringInModuloES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInModuloES6.ts(1,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/templates/templateStringInModuloES6.ts (1 errors) ==== + var x = 1 % `abc${ 1 }def`; + ~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInModuloES6.js b/tests/baselines/reference/templateStringInModuloES6.js new file mode 100644 index 00000000000..2fae209b85f --- /dev/null +++ b/tests/baselines/reference/templateStringInModuloES6.js @@ -0,0 +1,5 @@ +//// [templateStringInModuloES6.ts] +var x = 1 % `abc${ 1 }def`; + +//// [templateStringInModuloES6.js] +var x = 1 % `abc${1}def`; diff --git a/tests/baselines/reference/templateStringInMultiplication.errors.txt b/tests/baselines/reference/templateStringInMultiplication.errors.txt new file mode 100644 index 00000000000..11a4ea9985e --- /dev/null +++ b/tests/baselines/reference/templateStringInMultiplication.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInMultiplication.ts(1,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/templates/templateStringInMultiplication.ts (1 errors) ==== + var x = 1 * `abc${ 1 }def`; + ~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInMultiplication.js b/tests/baselines/reference/templateStringInMultiplication.js new file mode 100644 index 00000000000..e48db6e1715 --- /dev/null +++ b/tests/baselines/reference/templateStringInMultiplication.js @@ -0,0 +1,5 @@ +//// [templateStringInMultiplication.ts] +var x = 1 * `abc${ 1 }def`; + +//// [templateStringInMultiplication.js] +var x = 1 * ("abc" + 1 + "def"); diff --git a/tests/baselines/reference/templateStringInMultiplicationES6.errors.txt b/tests/baselines/reference/templateStringInMultiplicationES6.errors.txt new file mode 100644 index 00000000000..ee27091778f --- /dev/null +++ b/tests/baselines/reference/templateStringInMultiplicationES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts(1,13): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts (1 errors) ==== + var x = 1 * `abc${ 1 }def`; + ~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInMultiplicationES6.js b/tests/baselines/reference/templateStringInMultiplicationES6.js new file mode 100644 index 00000000000..f890e900301 --- /dev/null +++ b/tests/baselines/reference/templateStringInMultiplicationES6.js @@ -0,0 +1,5 @@ +//// [templateStringInMultiplicationES6.ts] +var x = 1 * `abc${ 1 }def`; + +//// [templateStringInMultiplicationES6.js] +var x = 1 * `abc${1}def`; diff --git a/tests/baselines/reference/templateStringInNewOperator.errors.txt b/tests/baselines/reference/templateStringInNewOperator.errors.txt new file mode 100644 index 00000000000..eed7415e5d2 --- /dev/null +++ b/tests/baselines/reference/templateStringInNewOperator.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInNewOperator.ts(1,9): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + +==== tests/cases/conformance/es6/templates/templateStringInNewOperator.ts (1 errors) ==== + var x = new `abc${ 1 }def`; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInNewOperator.js b/tests/baselines/reference/templateStringInNewOperator.js new file mode 100644 index 00000000000..8d76d59f7ee --- /dev/null +++ b/tests/baselines/reference/templateStringInNewOperator.js @@ -0,0 +1,5 @@ +//// [templateStringInNewOperator.ts] +var x = new `abc${ 1 }def`; + +//// [templateStringInNewOperator.js] +var x = new ("abc" + 1 + "def"); diff --git a/tests/baselines/reference/templateStringInNewOperatorES6.errors.txt b/tests/baselines/reference/templateStringInNewOperatorES6.errors.txt new file mode 100644 index 00000000000..f4363d9ff20 --- /dev/null +++ b/tests/baselines/reference/templateStringInNewOperatorES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts(1,9): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + +==== tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts (1 errors) ==== + var x = new `abc${ 1 }def`; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInNewOperatorES6.js b/tests/baselines/reference/templateStringInNewOperatorES6.js new file mode 100644 index 00000000000..066978f736b --- /dev/null +++ b/tests/baselines/reference/templateStringInNewOperatorES6.js @@ -0,0 +1,5 @@ +//// [templateStringInNewOperatorES6.ts] +var x = new `abc${ 1 }def`; + +//// [templateStringInNewOperatorES6.js] +var x = new `abc${1}def`; diff --git a/tests/baselines/reference/templateStringInObjectLiteral.errors.txt b/tests/baselines/reference/templateStringInObjectLiteral.errors.txt new file mode 100644 index 00000000000..60fa4f99894 --- /dev/null +++ b/tests/baselines/reference/templateStringInObjectLiteral.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(3,5): error TS1136: Property assignment expected. +tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(3,8): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts(4,1): error TS1128: Declaration or statement expected. + + +==== tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts (3 errors) ==== + var x = { + a: `abc${ 123 }def`, + `b`: 321 + ~~~ +!!! error TS1136: Property assignment expected. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInObjectLiteralES6.errors.txt b/tests/baselines/reference/templateStringInObjectLiteralES6.errors.txt new file mode 100644 index 00000000000..6514356aedc --- /dev/null +++ b/tests/baselines/reference/templateStringInObjectLiteralES6.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(3,5): error TS1136: Property assignment expected. +tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(3,8): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts(4,1): error TS1128: Declaration or statement expected. + + +==== tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts (3 errors) ==== + var x = { + a: `abc${ 123 }def`, + `b`: 321 + ~~~ +!!! error TS1136: Property assignment expected. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInParentheses.js b/tests/baselines/reference/templateStringInParentheses.js new file mode 100644 index 00000000000..381e8ffd800 --- /dev/null +++ b/tests/baselines/reference/templateStringInParentheses.js @@ -0,0 +1,5 @@ +//// [templateStringInParentheses.ts] +var x = (`abc${0}abc`); + +//// [templateStringInParentheses.js] +var x = (("abc" + 0 + "abc")); diff --git a/tests/baselines/reference/templateStringInParentheses.types b/tests/baselines/reference/templateStringInParentheses.types new file mode 100644 index 00000000000..7e597dc0108 --- /dev/null +++ b/tests/baselines/reference/templateStringInParentheses.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInParentheses.ts === +var x = (`abc${0}abc`); +>x : string +>(`abc${0}abc`) : string + diff --git a/tests/baselines/reference/templateStringInParenthesesES6.js b/tests/baselines/reference/templateStringInParenthesesES6.js new file mode 100644 index 00000000000..0776ea594d2 --- /dev/null +++ b/tests/baselines/reference/templateStringInParenthesesES6.js @@ -0,0 +1,5 @@ +//// [templateStringInParenthesesES6.ts] +var x = (`abc${0}abc`); + +//// [templateStringInParenthesesES6.js] +var x = (`abc${0}abc`); diff --git a/tests/baselines/reference/templateStringInParenthesesES6.types b/tests/baselines/reference/templateStringInParenthesesES6.types new file mode 100644 index 00000000000..3afb3530dee --- /dev/null +++ b/tests/baselines/reference/templateStringInParenthesesES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts === +var x = (`abc${0}abc`); +>x : string +>(`abc${0}abc`) : string + diff --git a/tests/baselines/reference/templateStringInSwitchAndCase.js b/tests/baselines/reference/templateStringInSwitchAndCase.js new file mode 100644 index 00000000000..67f182f8012 --- /dev/null +++ b/tests/baselines/reference/templateStringInSwitchAndCase.js @@ -0,0 +1,15 @@ +//// [templateStringInSwitchAndCase.ts] +switch (`abc${0}abc`) { + case `abc`: + case `123`: + case `abc${0}abc`: + `def${1}def`; +} + +//// [templateStringInSwitchAndCase.js] +switch ("abc" + 0 + "abc") { + case "abc": + case "123": + case "abc" + 0 + "abc": + "def" + 1 + "def"; +} diff --git a/tests/baselines/reference/templateStringInSwitchAndCase.types b/tests/baselines/reference/templateStringInSwitchAndCase.types new file mode 100644 index 00000000000..26ec05dbca6 --- /dev/null +++ b/tests/baselines/reference/templateStringInSwitchAndCase.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts === +switch (`abc${0}abc`) { +No type information for this code. case `abc`: +No type information for this code. case `123`: +No type information for this code. case `abc${0}abc`: +No type information for this code. `def${1}def`; +No type information for this code.} +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInSwitchAndCaseES6.js b/tests/baselines/reference/templateStringInSwitchAndCaseES6.js new file mode 100644 index 00000000000..b52cb48cfde --- /dev/null +++ b/tests/baselines/reference/templateStringInSwitchAndCaseES6.js @@ -0,0 +1,15 @@ +//// [templateStringInSwitchAndCaseES6.ts] +switch (`abc${0}abc`) { + case `abc`: + case `123`: + case `abc${0}abc`: + `def${1}def`; +} + +//// [templateStringInSwitchAndCaseES6.js] +switch (`abc${0}abc`) { + case `abc`: + case `123`: + case `abc${0}abc`: + `def${1}def`; +} diff --git a/tests/baselines/reference/templateStringInSwitchAndCaseES6.types b/tests/baselines/reference/templateStringInSwitchAndCaseES6.types new file mode 100644 index 00000000000..6bd8772ff49 --- /dev/null +++ b/tests/baselines/reference/templateStringInSwitchAndCaseES6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts === +switch (`abc${0}abc`) { +No type information for this code. case `abc`: +No type information for this code. case `123`: +No type information for this code. case `abc${0}abc`: +No type information for this code. `def${1}def`; +No type information for this code.} +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInTypeAssertion.js b/tests/baselines/reference/templateStringInTypeAssertion.js new file mode 100644 index 00000000000..94533248b6d --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeAssertion.js @@ -0,0 +1,5 @@ +//// [templateStringInTypeAssertion.ts] +var x = `abc${ 123 }def`; + +//// [templateStringInTypeAssertion.js] +var x = ("abc" + 123 + "def"); diff --git a/tests/baselines/reference/templateStringInTypeAssertion.types b/tests/baselines/reference/templateStringInTypeAssertion.types new file mode 100644 index 00000000000..006ba12c1c6 --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeAssertion.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts === +var x = `abc${ 123 }def`; +>x : any +>`abc${ 123 }def` : any + diff --git a/tests/baselines/reference/templateStringInTypeAssertionES6.js b/tests/baselines/reference/templateStringInTypeAssertionES6.js new file mode 100644 index 00000000000..08331911c7d --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeAssertionES6.js @@ -0,0 +1,5 @@ +//// [templateStringInTypeAssertionES6.ts] +var x = `abc${ 123 }def`; + +//// [templateStringInTypeAssertionES6.js] +var x = `abc${123}def`; diff --git a/tests/baselines/reference/templateStringInTypeAssertionES6.types b/tests/baselines/reference/templateStringInTypeAssertionES6.types new file mode 100644 index 00000000000..26d7ccc2e60 --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeAssertionES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts === +var x = `abc${ 123 }def`; +>x : any +>`abc${ 123 }def` : any + diff --git a/tests/baselines/reference/templateStringInTypeOf.js b/tests/baselines/reference/templateStringInTypeOf.js new file mode 100644 index 00000000000..2543091df88 --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeOf.js @@ -0,0 +1,5 @@ +//// [templateStringInTypeOf.ts] +var x = typeof `abc${ 123 }def`; + +//// [templateStringInTypeOf.js] +var x = typeof ("abc" + 123 + "def"); diff --git a/tests/baselines/reference/templateStringInTypeOf.types b/tests/baselines/reference/templateStringInTypeOf.types new file mode 100644 index 00000000000..8b94bc7ea1a --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeOf.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInTypeOf.ts === +var x = typeof `abc${ 123 }def`; +>x : string +>typeof `abc${ 123 }def` : string + diff --git a/tests/baselines/reference/templateStringInTypeOfES6.js b/tests/baselines/reference/templateStringInTypeOfES6.js new file mode 100644 index 00000000000..e8566277449 --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeOfES6.js @@ -0,0 +1,5 @@ +//// [templateStringInTypeOfES6.ts] +var x = typeof `abc${ 123 }def`; + +//// [templateStringInTypeOfES6.js] +var x = typeof `abc${123}def`; diff --git a/tests/baselines/reference/templateStringInTypeOfES6.types b/tests/baselines/reference/templateStringInTypeOfES6.types new file mode 100644 index 00000000000..457af8de0de --- /dev/null +++ b/tests/baselines/reference/templateStringInTypeOfES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts === +var x = typeof `abc${ 123 }def`; +>x : string +>typeof `abc${ 123 }def` : string + diff --git a/tests/baselines/reference/templateStringInUnaryPlus.js b/tests/baselines/reference/templateStringInUnaryPlus.js new file mode 100644 index 00000000000..83f107b3ac2 --- /dev/null +++ b/tests/baselines/reference/templateStringInUnaryPlus.js @@ -0,0 +1,5 @@ +//// [templateStringInUnaryPlus.ts] +var x = +`abc${ 123 }def`; + +//// [templateStringInUnaryPlus.js] +var x = +("abc" + 123 + "def"); diff --git a/tests/baselines/reference/templateStringInUnaryPlus.types b/tests/baselines/reference/templateStringInUnaryPlus.types new file mode 100644 index 00000000000..4746f2c1fc7 --- /dev/null +++ b/tests/baselines/reference/templateStringInUnaryPlus.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts === +var x = +`abc${ 123 }def`; +>x : number +>+`abc${ 123 }def` : number + diff --git a/tests/baselines/reference/templateStringInUnaryPlusES6.js b/tests/baselines/reference/templateStringInUnaryPlusES6.js new file mode 100644 index 00000000000..efeed300f7c --- /dev/null +++ b/tests/baselines/reference/templateStringInUnaryPlusES6.js @@ -0,0 +1,5 @@ +//// [templateStringInUnaryPlusES6.ts] +var x = +`abc${ 123 }def`; + +//// [templateStringInUnaryPlusES6.js] +var x = +`abc${123}def`; diff --git a/tests/baselines/reference/templateStringInUnaryPlusES6.types b/tests/baselines/reference/templateStringInUnaryPlusES6.types new file mode 100644 index 00000000000..67ad03fc53c --- /dev/null +++ b/tests/baselines/reference/templateStringInUnaryPlusES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts === +var x = +`abc${ 123 }def`; +>x : number +>+`abc${ 123 }def` : number + diff --git a/tests/baselines/reference/templateStringInWhile.js b/tests/baselines/reference/templateStringInWhile.js new file mode 100644 index 00000000000..31f7dba45d1 --- /dev/null +++ b/tests/baselines/reference/templateStringInWhile.js @@ -0,0 +1,9 @@ +//// [templateStringInWhile.ts] +while (`abc${0}abc`) { + `def${1}def`; +} + +//// [templateStringInWhile.js] +while ("abc" + 0 + "abc") { + "def" + 1 + "def"; +} diff --git a/tests/baselines/reference/templateStringInWhile.types b/tests/baselines/reference/templateStringInWhile.types new file mode 100644 index 00000000000..1b080f31f1c --- /dev/null +++ b/tests/baselines/reference/templateStringInWhile.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInWhile.ts === +while (`abc${0}abc`) { +No type information for this code. `def${1}def`; +No type information for this code.} +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInWhileES6.js b/tests/baselines/reference/templateStringInWhileES6.js new file mode 100644 index 00000000000..a4f19b80d0a --- /dev/null +++ b/tests/baselines/reference/templateStringInWhileES6.js @@ -0,0 +1,9 @@ +//// [templateStringInWhileES6.ts] +while (`abc${0}abc`) { + `def${1}def`; +} + +//// [templateStringInWhileES6.js] +while (`abc${0}abc`) { + `def${1}def`; +} diff --git a/tests/baselines/reference/templateStringInWhileES6.types b/tests/baselines/reference/templateStringInWhileES6.types new file mode 100644 index 00000000000..d4ef3b02fe2 --- /dev/null +++ b/tests/baselines/reference/templateStringInWhileES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringInWhileES6.ts === +while (`abc${0}abc`) { +No type information for this code. `def${1}def`; +No type information for this code.} +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInYieldKeyword.errors.txt b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt new file mode 100644 index 00000000000..61a9ddf3934 --- /dev/null +++ b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt @@ -0,0 +1,23 @@ +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS1003: Identifier expected. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,15): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(3,19): error TS1005: ',' expected. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,11): error TS2304: Cannot find name 'gen'. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(3,13): error TS2304: Cannot find name 'yield'. + + +==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (5 errors) ==== + function* gen { + ~ +!!! error TS1003: Identifier expected. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name 'gen'. + // Once this is supported, the inner expression does not need to be parenthesized. + var x = yield `abc${ x }def`; + ~~~~~~ +!!! error TS1005: ',' expected. + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedAddition.js b/tests/baselines/reference/templateStringWithEmbeddedAddition.js new file mode 100644 index 00000000000..2cf74941600 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedAddition.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedAddition.ts] +var x = `abc${ 10 + 10 }def`; + +//// [templateStringWithEmbeddedAddition.js] +var x = "abc" + (10 + 10) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedAddition.types b/tests/baselines/reference/templateStringWithEmbeddedAddition.types new file mode 100644 index 00000000000..3a6bf864cb6 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedAddition.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts === +var x = `abc${ 10 + 10 }def`; +>x : string +>10 + 10 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.js b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.js new file mode 100644 index 00000000000..72beea32d57 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedAdditionES6.ts] +var x = `abc${ 10 + 10 }def`; + +//// [templateStringWithEmbeddedAdditionES6.js] +var x = `abc${10 + 10}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types new file mode 100644 index 00000000000..699162a3783 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedAdditionES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts === +var x = `abc${ 10 + 10 }def`; +>x : string +>10 + 10 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedArray.js b/tests/baselines/reference/templateStringWithEmbeddedArray.js new file mode 100644 index 00000000000..1fb6512db47 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArray.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedArray.ts] +var x = `abc${ [1,2,3] }def`; + +//// [templateStringWithEmbeddedArray.js] +var x = "abc" + [1, 2, 3] + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArray.types b/tests/baselines/reference/templateStringWithEmbeddedArray.types new file mode 100644 index 00000000000..4c022d8a401 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArray.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts === +var x = `abc${ [1,2,3] }def`; +>x : string +>[1,2,3] : number[] + diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js new file mode 100644 index 00000000000..804ef7a4e78 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedArrayES6.ts] +var x = `abc${ [1,2,3] }def`; + +//// [templateStringWithEmbeddedArrayES6.js] +var x = `abc${[1, 2, 3]}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types new file mode 100644 index 00000000000..06876fa3f0e --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts === +var x = `abc${ [1,2,3] }def`; +>x : string +>[1,2,3] : number[] + diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js new file mode 100644 index 00000000000..eb2579b0cc3 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedArrowFunction.ts] +var x = `abc${ x => x }def`; + +//// [templateStringWithEmbeddedArrowFunction.js] +var x = "abc" + function (x) { return x; } + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types new file mode 100644 index 00000000000..d6f25761999 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts === +var x = `abc${ x => x }def`; +>x : string +>x => x : (x: any) => any +>x : any +>x : any + diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js new file mode 100644 index 00000000000..f6f068aaa37 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedArrowFunctionES6.ts] +var x = `abc${ x => x }def`; + +//// [templateStringWithEmbeddedArrowFunctionES6.js] +var x = `abc${function (x) { return x; }}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types new file mode 100644 index 00000000000..748f457f22b --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunctionES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts === +var x = `abc${ x => x }def`; +>x : string +>x => x : (x: any) => any +>x : any +>x : any + diff --git a/tests/baselines/reference/templateStringWithEmbeddedComments.js b/tests/baselines/reference/templateStringWithEmbeddedComments.js new file mode 100644 index 00000000000..58a73e89ba7 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedComments.js @@ -0,0 +1,16 @@ +//// [templateStringWithEmbeddedComments.ts] +`head${ // single line comment +10 +} +middle${ +/* Multi- + * line + * comment + */ + 20 + // closing comment +} +tail`; + +//// [templateStringWithEmbeddedComments.js] +"head" + 10 + "\nmiddle" + 20 + "\ntail"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedComments.types b/tests/baselines/reference/templateStringWithEmbeddedComments.types new file mode 100644 index 00000000000..a375ef6ab6f --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedComments.types @@ -0,0 +1,14 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts === +`head${ // single line comment +No type information for this code.10 +No type information for this code.} +No type information for this code.middle${ +No type information for this code./* Multi- +No type information for this code. * line +No type information for this code. * comment +No type information for this code. */ +No type information for this code. 20 +No type information for this code. // closing comment +No type information for this code.} +No type information for this code.tail`; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.js b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.js new file mode 100644 index 00000000000..c6b3649ad2a --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.js @@ -0,0 +1,16 @@ +//// [templateStringWithEmbeddedCommentsES6.ts] +`head${ // single line comment +10 +} +middle${ +/* Multi- + * line + * comment + */ + 20 + // closing comment +} +tail`; + +//// [templateStringWithEmbeddedCommentsES6.js] +"head" + 10 + "\nmiddle" + 20 + "\ntail"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types new file mode 100644 index 00000000000..0c79ee294d9 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedCommentsES6.types @@ -0,0 +1,14 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts === +`head${ // single line comment +No type information for this code.10 +No type information for this code.} +No type information for this code.middle${ +No type information for this code./* Multi- +No type information for this code. * line +No type information for this code. * comment +No type information for this code. */ +No type information for this code. 20 +No type information for this code. // closing comment +No type information for this code.} +No type information for this code.tail`; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditional.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedConditional.errors.txt new file mode 100644 index 00000000000..5b21885a60f --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedConditional.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts(1,16): error TS2367: No best common type exists between 'boolean' and 'string'. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts (1 errors) ==== + var x = `abc${ true ? false : " " }def`; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2367: No best common type exists between 'boolean' and 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditional.js b/tests/baselines/reference/templateStringWithEmbeddedConditional.js new file mode 100644 index 00000000000..5b03f56a019 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedConditional.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedConditional.ts] +var x = `abc${ true ? false : " " }def`; + +//// [templateStringWithEmbeddedConditional.js] +var x = "abc" + (true ? false : " ") + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.errors.txt new file mode 100644 index 00000000000..2fc26fd24b7 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts(1,16): error TS2367: No best common type exists between 'boolean' and 'string'. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts (1 errors) ==== + var x = `abc${ true ? false : " " }def`; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2367: No best common type exists between 'boolean' and 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.js b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.js new file mode 100644 index 00000000000..f6cae50a511 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedConditionalES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedConditionalES6.ts] +var x = `abc${ true ? false : " " }def`; + +//// [templateStringWithEmbeddedConditionalES6.js] +var x = `abc${true ? false : " "}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivision.js b/tests/baselines/reference/templateStringWithEmbeddedDivision.js new file mode 100644 index 00000000000..f9996ae035d --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedDivision.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedDivision.ts] +var x = `abc${ 1 / 1 }def`; + +//// [templateStringWithEmbeddedDivision.js] +var x = "abc" + 1 / 1 + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivision.types b/tests/baselines/reference/templateStringWithEmbeddedDivision.types new file mode 100644 index 00000000000..e742733a23c --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedDivision.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts === +var x = `abc${ 1 / 1 }def`; +>x : string +>1 / 1 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.js b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.js new file mode 100644 index 00000000000..47715d3f31b --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedDivisionES6.ts] +var x = `abc${ 1 / 1 }def`; + +//// [templateStringWithEmbeddedDivisionES6.js] +var x = `abc${1 / 1}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types new file mode 100644 index 00000000000..20bdc9449d1 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedDivisionES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts === +var x = `abc${ 1 / 1 }def`; +>x : string +>1 / 1 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js new file mode 100644 index 00000000000..3447ff87ac3 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js @@ -0,0 +1,7 @@ +//// [templateStringWithEmbeddedFunctionExpression.ts] +var x = `abc${ function y() { return y; } }def`; + +//// [templateStringWithEmbeddedFunctionExpression.js] +var x = "abc" + function y() { + return y; +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types new file mode 100644 index 00000000000..e66313848a6 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts === +var x = `abc${ function y() { return y; } }def`; +>x : string +>function y() { return y; } : () => any +>y : () => any +>y : () => any + diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js new file mode 100644 index 00000000000..46e37c0ac18 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js @@ -0,0 +1,7 @@ +//// [templateStringWithEmbeddedFunctionExpressionES6.ts] +var x = `abc${ function y() { return y; } }def`; + +//// [templateStringWithEmbeddedFunctionExpressionES6.js] +var x = `abc${function y() { + return y; +}}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types new file mode 100644 index 00000000000..e5c55c2736c --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts === +var x = `abc${ function y() { return y; } }def`; +>x : string +>function y() { return y; } : () => any +>y : () => any +>y : () => any + diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.js b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js new file mode 100644 index 00000000000..091843ea52e --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedInOperator.ts] +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; + +//// [templateStringWithEmbeddedInOperator.js] +var x = "abc" + ("hi" in { hi: 10, hello: 20 }) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.types b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types new file mode 100644 index 00000000000..bff1ea66e1d --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts === +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; +>x : string +>"hi" in { hi: 10, hello: 20} : boolean +>{ hi: 10, hello: 20} : { hi: number; hello: number; } +>hi : number +>hello : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js new file mode 100644 index 00000000000..f6510c2fab9 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedInOperatorES6.ts] +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; + +//// [templateStringWithEmbeddedInOperatorES6.js] +var x = `abc${"hi" in { hi: 10, hello: 20 }}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types new file mode 100644 index 00000000000..6bba79af40d --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts === +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; +>x : string +>"hi" in { hi: 10, hello: 20} : boolean +>{ hi: 10, hello: 20} : { hi: number; hello: number; } +>hi : number +>hello : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.errors.txt new file mode 100644 index 00000000000..08c8c21b5ee --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts(1,16): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts (1 errors) ==== + var x = `abc${ "hello" instanceof String }def`; + ~~~~~~~ +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.js b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.js new file mode 100644 index 00000000000..009f6bf988d --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOf.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedInstanceOf.ts] +var x = `abc${ "hello" instanceof String }def`; + +//// [templateStringWithEmbeddedInstanceOf.js] +var x = "abc" + ("hello" instanceof String) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.errors.txt new file mode 100644 index 00000000000..85ebb9966ca --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts(1,16): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts (1 errors) ==== + var x = `abc${ "hello" instanceof String }def`; + ~~~~~~~ +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.js b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.js new file mode 100644 index 00000000000..16a2d2c6797 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedInstanceOfES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedInstanceOfES6.ts] +var x = `abc${ "hello" instanceof String }def`; + +//// [templateStringWithEmbeddedInstanceOfES6.js] +var x = `abc${"hello" instanceof String}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedModulo.js b/tests/baselines/reference/templateStringWithEmbeddedModulo.js new file mode 100644 index 00000000000..6fe9be64314 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedModulo.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedModulo.ts] +var x = `abc${ 1 % 1 }def`; + +//// [templateStringWithEmbeddedModulo.js] +var x = "abc" + 1 % 1 + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedModulo.types b/tests/baselines/reference/templateStringWithEmbeddedModulo.types new file mode 100644 index 00000000000..0c24f566846 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedModulo.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts === +var x = `abc${ 1 % 1 }def`; +>x : string +>1 % 1 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedModuloES6.js b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.js new file mode 100644 index 00000000000..0226277d987 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedModuloES6.ts] +var x = `abc${ 1 % 1 }def`; + +//// [templateStringWithEmbeddedModuloES6.js] +var x = `abc${1 % 1}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types new file mode 100644 index 00000000000..02f42a956b9 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedModuloES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts === +var x = `abc${ 1 % 1 }def`; +>x : string +>1 % 1 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplication.js b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.js new file mode 100644 index 00000000000..7ac4b1b534c --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedMultiplication.ts] +var x = `abc${ 7 * 6 }def`; + +//// [templateStringWithEmbeddedMultiplication.js] +var x = "abc" + 7 * 6 + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types new file mode 100644 index 00000000000..60c7bab0d1e --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplication.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts === +var x = `abc${ 7 * 6 }def`; +>x : string +>7 * 6 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.js b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.js new file mode 100644 index 00000000000..3624fe7878a --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedMultiplicationES6.ts] +var x = `abc${ 7 * 6 }def`; + +//// [templateStringWithEmbeddedMultiplicationES6.js] +var x = `abc${7 * 6}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types new file mode 100644 index 00000000000..5c078b9c1ed --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedMultiplicationES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts === +var x = `abc${ 7 * 6 }def`; +>x : string +>7 * 6 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.js b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.js new file mode 100644 index 00000000000..480fbe2573d --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedNewOperator.ts] +var x = `abc${ new String("Hi") }def`; + +//// [templateStringWithEmbeddedNewOperator.js] +var x = "abc" + new String("Hi") + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types new file mode 100644 index 00000000000..00bf3533003 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts === +var x = `abc${ new String("Hi") }def`; +>x : string +>new String("Hi") : String +>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; } + diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.js b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.js new file mode 100644 index 00000000000..8549e4c6e34 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedNewOperatorES6.ts] +var x = `abc${ new String("Hi") }def`; + +//// [templateStringWithEmbeddedNewOperatorES6.js] +var x = `abc${new String("Hi")}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types new file mode 100644 index 00000000000..36c28473d56 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === +var x = `abc${ new String("Hi") }def`; +>x : string +>new String("Hi") : String +>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; } + diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js new file mode 100644 index 00000000000..40ecf486245 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedObjectLiteral.ts] +var x = `abc${ { x: 10, y: 20 } }def`; + +//// [templateStringWithEmbeddedObjectLiteral.js] +var x = "abc" + { x: 10, y: 20 } + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types new file mode 100644 index 00000000000..0b053e532d8 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts === +var x = `abc${ { x: 10, y: 20 } }def`; +>x : string +>{ x: 10, y: 20 } : { x: number; y: number; } +>x : number +>y : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js new file mode 100644 index 00000000000..dbc3837e133 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedObjectLiteralES6.ts] +var x = `abc${ { x: 10, y: 20 } }def`; + +//// [templateStringWithEmbeddedObjectLiteralES6.js] +var x = `abc${{ x: 10, y: 20 }}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types new file mode 100644 index 00000000000..1cf1783fec8 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts === +var x = `abc${ { x: 10, y: 20 } }def`; +>x : string +>{ x: 10, y: 20 } : { x: number; y: number; } +>x : number +>y : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.js b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.js new file mode 100644 index 00000000000..c0059dbb950 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTemplateString.ts] +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; + +//// [templateStringWithEmbeddedTemplateString.js] +var x = "123" + "456 " + " | " + " 654" + "321 123" + "456 " + " | " + " 654" + "321"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types new file mode 100644 index 00000000000..f63f684222e --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateString.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts === +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; +>x : string + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.js b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.js new file mode 100644 index 00000000000..0d1fec18af1 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTemplateStringES6.ts] +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; + +//// [templateStringWithEmbeddedTemplateStringES6.js] +var x = `123${`456 ${" | "} 654`}321 123${`456 ${" | "} 654`}321`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types new file mode 100644 index 00000000000..05816bbcbce --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTemplateStringES6.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts === +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; +>x : string + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.js b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.js new file mode 100644 index 00000000000..89d9ba6940c --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTypeAssertionOnAddition.ts] +var x = `abc${ (10 + 10) }def`; + +//// [templateStringWithEmbeddedTypeAssertionOnAddition.js] +var x = "abc" + (10 + 10) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types new file mode 100644 index 00000000000..8b0b5ab37d0 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAddition.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts === +var x = `abc${ (10 + 10) }def`; +>x : string +>(10 + 10) : any +>(10 + 10) : number +>10 + 10 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.js b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.js new file mode 100644 index 00000000000..c6422679f3f --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts] +var x = `abc${ (10 + 10) }def`; + +//// [templateStringWithEmbeddedTypeAssertionOnAdditionES6.js] +var x = `abc${(10 + 10)}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types new file mode 100644 index 00000000000..007fdb64736 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeAssertionOnAdditionES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts === +var x = `abc${ (10 + 10) }def`; +>x : string +>(10 + 10) : any +>(10 + 10) : number +>10 + 10 : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.js b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.js new file mode 100644 index 00000000000..10450707b11 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTypeOfOperator.ts] +var x = `abc${ typeof "hi" }def`; + +//// [templateStringWithEmbeddedTypeOfOperator.js] +var x = "abc" + typeof "hi" + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types new file mode 100644 index 00000000000..ebf391981f1 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts === +var x = `abc${ typeof "hi" }def`; +>x : string +>typeof "hi" : string + diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.js b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.js new file mode 100644 index 00000000000..8d148744fae --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedTypeOfOperatorES6.ts] +var x = `abc${ typeof "hi" }def`; + +//// [templateStringWithEmbeddedTypeOfOperatorES6.js] +var x = `abc${typeof "hi"}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types new file mode 100644 index 00000000000..cf14a0a0880 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts === +var x = `abc${ typeof "hi" }def`; +>x : string +>typeof "hi" : string + diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.js b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.js new file mode 100644 index 00000000000..a4a9c1a8508 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedUnaryPlus.ts] +var x = `abc${ +Infinity }def`; + +//// [templateStringWithEmbeddedUnaryPlus.js] +var x = "abc" + +Infinity + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types new file mode 100644 index 00000000000..62ffab420ad --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts === +var x = `abc${ +Infinity }def`; +>x : string +>+Infinity : number +>Infinity : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.js b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.js new file mode 100644 index 00000000000..4b42bc1083a --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithEmbeddedUnaryPlusES6.ts] +var x = `abc${ +Infinity }def`; + +//// [templateStringWithEmbeddedUnaryPlusES6.js] +var x = `abc${+Infinity}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types new file mode 100644 index 00000000000..7a002d79b6f --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts === +var x = `abc${ +Infinity }def`; +>x : string +>+Infinity : number +>Infinity : number + diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.errors.txt new file mode 100644 index 00000000000..40709f4a7b5 --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,9): error TS1003: Identifier expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,26): error TS1159: Invalid template literal; expected '}' +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,33): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(5,1): error TS1126: Unexpected end of text. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS2304: Cannot find name 'gen'. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,20): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts(3,30): error TS2304: Cannot find name 'def'. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts (8 errors) ==== + function* gen { + ~ +!!! error TS1003: Identifier expected. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name 'gen'. + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; + ~~ +!!! error TS1159: Invalid template literal; expected '}' + ~~ + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~~~ +!!! error TS2304: Cannot find name 'def'. + } + ~ + + +!!! error TS1005: ';' expected. + +!!! error TS1126: Unexpected end of text. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt new file mode 100644 index 00000000000..51917ac4e6c --- /dev/null +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS1003: Identifier expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,17): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,26): error TS1159: Invalid template literal; expected '}' +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,33): error TS1005: ';' expected. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(5,1): error TS1126: Unexpected end of text. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,11): error TS2304: Cannot find name 'gen'. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,20): error TS2304: Cannot find name 'yield'. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(3,30): error TS2304: Cannot find name 'def'. + + +==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (8 errors) ==== + function* gen() { + ~ +!!! error TS1003: Identifier expected. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name 'gen'. + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; + ~~ +!!! error TS1159: Invalid template literal; expected '}' + ~~ + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~~~ +!!! error TS2304: Cannot find name 'def'. + } + ~ + + +!!! error TS1005: ';' expected. + +!!! error TS1126: Unexpected end of text. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.js b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.js new file mode 100644 index 00000000000..233ab78a195 --- /dev/null +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.js @@ -0,0 +1,5 @@ +//// [templateStringWithOpenCommentInStringPortion.ts] +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` + +//// [templateStringWithOpenCommentInStringPortion.js] +" /**head " + 10 + " // still middle " + 20 + " /* still tail "; diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types new file mode 100644 index 00000000000..66070a70ec7 --- /dev/null +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortion.types @@ -0,0 +1,3 @@ +=== tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts === +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.js b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.js new file mode 100644 index 00000000000..45d2d86e97e --- /dev/null +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithOpenCommentInStringPortionES6.ts] +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` + +//// [templateStringWithOpenCommentInStringPortionES6.js] +` /**head ${10} // still middle ${20} /* still tail `; diff --git a/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types new file mode 100644 index 00000000000..08b5484f3ab --- /dev/null +++ b/tests/baselines/reference/templateStringWithOpenCommentInStringPortionES6.types @@ -0,0 +1,3 @@ +=== tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts === +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWithPropertyAccess.js b/tests/baselines/reference/templateStringWithPropertyAccess.js new file mode 100644 index 00000000000..9866b6bd53b --- /dev/null +++ b/tests/baselines/reference/templateStringWithPropertyAccess.js @@ -0,0 +1,5 @@ +//// [templateStringWithPropertyAccess.ts] +`abc${0}abc`.indexOf(`abc`); + +//// [templateStringWithPropertyAccess.js] +("abc" + 0 + "abc").indexOf("abc"); diff --git a/tests/baselines/reference/templateStringWithPropertyAccess.types b/tests/baselines/reference/templateStringWithPropertyAccess.types new file mode 100644 index 00000000000..ae9dbb5249d --- /dev/null +++ b/tests/baselines/reference/templateStringWithPropertyAccess.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts === +`abc${0}abc`.indexOf(`abc`); +>`abc${0}abc`.indexOf(`abc`) : number +>`abc${0}abc`.indexOf : (searchString: string, position?: number) => number +>indexOf : (searchString: string, position?: number) => number + diff --git a/tests/baselines/reference/templateStringWithPropertyAccessES6.js b/tests/baselines/reference/templateStringWithPropertyAccessES6.js new file mode 100644 index 00000000000..72f3a16b5c4 --- /dev/null +++ b/tests/baselines/reference/templateStringWithPropertyAccessES6.js @@ -0,0 +1,5 @@ +//// [templateStringWithPropertyAccessES6.ts] +`abc${0}abc`.indexOf(`abc`); + +//// [templateStringWithPropertyAccessES6.js] +`abc${0}abc`.indexOf(`abc`); diff --git a/tests/baselines/reference/templateStringWithPropertyAccessES6.types b/tests/baselines/reference/templateStringWithPropertyAccessES6.types new file mode 100644 index 00000000000..80ea8a0ef8b --- /dev/null +++ b/tests/baselines/reference/templateStringWithPropertyAccessES6.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts === +`abc${0}abc`.indexOf(`abc`); +>`abc${0}abc`.indexOf(`abc`) : number +>`abc${0}abc`.indexOf : (searchString: string, position?: number) => number +>indexOf : (searchString: string, position?: number) => number + diff --git a/tests/cases/conformance/es6/templates/templateStringInArray.ts b/tests/cases/conformance/es6/templates/templateStringInArray.ts new file mode 100644 index 00000000000..2d2e5e323b5 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInArray.ts @@ -0,0 +1 @@ +var x = [1, 2, `abc${ 123 }def`]; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts b/tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts new file mode 100644 index 00000000000..9820edb2ac3 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInArrowFunction.ts @@ -0,0 +1 @@ +var x = x => `abc${ x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts b/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts new file mode 100644 index 00000000000..066fc1c74b1 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = x => `abc${ x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInBinaryAddition.ts b/tests/cases/conformance/es6/templates/templateStringInBinaryAddition.ts new file mode 100644 index 00000000000..7f00313ca86 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInBinaryAddition.ts @@ -0,0 +1 @@ +var x = 10 + `abc${ 10 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInBinaryAdditionES6.ts b/tests/cases/conformance/es6/templates/templateStringInBinaryAdditionES6.ts new file mode 100644 index 00000000000..5f44e3cb9d4 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInBinaryAdditionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = 10 + `abc${ 10 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInConditional.ts b/tests/cases/conformance/es6/templates/templateStringInConditional.ts new file mode 100644 index 00000000000..aff80b60efc --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInConditional.ts @@ -0,0 +1 @@ +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts b/tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts new file mode 100644 index 00000000000..c0b800259f3 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInConditionalES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ " " }def` ? `abc${ " " }def` : `abc${ " " }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts b/tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts new file mode 100644 index 00000000000..f3af01582a5 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts @@ -0,0 +1 @@ +delete `abc${0}abc`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts b/tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts new file mode 100644 index 00000000000..cd81c11453a --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +delete `abc${0}abc`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInDivision.ts b/tests/cases/conformance/es6/templates/templateStringInDivision.ts new file mode 100644 index 00000000000..9650f5e2455 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInDivision.ts @@ -0,0 +1 @@ +var x = `abc${ 1 }def` / 1; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts b/tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts new file mode 100644 index 00000000000..37b8511368e --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts @@ -0,0 +1,4 @@ +var x = `abc${0}abc` === `abc` || + `abc` !== `abc${0}abc` && + `abc${0}abc` == "abc0abc" && + "abc0abc" !== `abc${0}abc`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts b/tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts new file mode 100644 index 00000000000..5254474b82b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInEqualityChecksES6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +var x = `abc${0}abc` === `abc` || + `abc` !== `abc${0}abc` && + `abc${0}abc` == "abc0abc" && + "abc0abc" !== `abc${0}abc`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts b/tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts new file mode 100644 index 00000000000..5f0c5a4c96f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInFunctionExpression.ts @@ -0,0 +1,4 @@ +var x = function y() { + `abc${ 0 }def` + return `abc${ 0 }def`; +}; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts b/tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts new file mode 100644 index 00000000000..729ecbd0744 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInFunctionExpressionES6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +var x = function y() { + `abc${ 0 }def` + return `abc${ 0 }def`; +}; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts b/tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts new file mode 100644 index 00000000000..628ba29081b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts @@ -0,0 +1,5 @@ +function f(`hello`); +function f(x: string); +function f(x: string) { + return x; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts b/tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts new file mode 100644 index 00000000000..03fb0a7de88 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +function f(`hello`); +function f(x: string); +function f(x: string) { + return x; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInInOperator.ts b/tests/cases/conformance/es6/templates/templateStringInInOperator.ts new file mode 100644 index 00000000000..cc50b275144 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInInOperator.ts @@ -0,0 +1 @@ +var x = `${ "hi" }` in { hi: 10, hello: 20}; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts b/tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts new file mode 100644 index 00000000000..5a23a0b4e3f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInInOperatorES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `${ "hi" }` in { hi: 10, hello: 20}; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts b/tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts new file mode 100644 index 00000000000..792e92a4dc7 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInIndexExpression.ts @@ -0,0 +1 @@ +`abc${0}abc`[`0`]; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts b/tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts new file mode 100644 index 00000000000..6a431b3bb13 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInIndexExpressionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +`abc${0}abc`[`0`]; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts b/tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts new file mode 100644 index 00000000000..12ec4e7baf7 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts @@ -0,0 +1 @@ +var x = `abc${ 0 }def` instanceof String; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts b/tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts new file mode 100644 index 00000000000..6afe22b74b6 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 0 }def` instanceof String; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInModuleName.ts b/tests/cases/conformance/es6/templates/templateStringInModuleName.ts new file mode 100644 index 00000000000..8ed5038ffbf --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInModuleName.ts @@ -0,0 +1,5 @@ +declare module `M1` { +} + +declare module `M${2}` { +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts b/tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts new file mode 100644 index 00000000000..44d3999febc --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts @@ -0,0 +1,6 @@ +// @target: ES6 +declare module `M1` { +} + +declare module `M${2}` { +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInModulo.ts b/tests/cases/conformance/es6/templates/templateStringInModulo.ts new file mode 100644 index 00000000000..69d7faeda75 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInModulo.ts @@ -0,0 +1 @@ +var x = 1 % `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInModuloES6.ts b/tests/cases/conformance/es6/templates/templateStringInModuloES6.ts new file mode 100644 index 00000000000..0d05c3570ba --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInModuloES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = 1 % `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInMultiplication.ts b/tests/cases/conformance/es6/templates/templateStringInMultiplication.ts new file mode 100644 index 00000000000..a8ba70bf102 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInMultiplication.ts @@ -0,0 +1 @@ +var x = 1 * `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts b/tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts new file mode 100644 index 00000000000..c0ffa96d98c --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInMultiplicationES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = 1 * `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInNewOperator.ts b/tests/cases/conformance/es6/templates/templateStringInNewOperator.ts new file mode 100644 index 00000000000..f53dd3023d2 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInNewOperator.ts @@ -0,0 +1 @@ +var x = new `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts b/tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts new file mode 100644 index 00000000000..aad17d31ae2 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = new `abc${ 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts b/tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts new file mode 100644 index 00000000000..e1ce34a20db --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts @@ -0,0 +1,4 @@ +var x = { + a: `abc${ 123 }def`, + `b`: 321 +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts b/tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts new file mode 100644 index 00000000000..9ef032e4c88 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInObjectLiteralES6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +var x = { + a: `abc${ 123 }def`, + `b`: 321 +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInParentheses.ts b/tests/cases/conformance/es6/templates/templateStringInParentheses.ts new file mode 100644 index 00000000000..de5948e2bc2 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInParentheses.ts @@ -0,0 +1 @@ +var x = (`abc${0}abc`); \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts b/tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts new file mode 100644 index 00000000000..856392e7c14 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInParenthesesES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = (`abc${0}abc`); \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts b/tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts new file mode 100644 index 00000000000..3b88a23c298 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts @@ -0,0 +1,6 @@ +switch (`abc${0}abc`) { + case `abc`: + case `123`: + case `abc${0}abc`: + `def${1}def`; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts b/tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts new file mode 100644 index 00000000000..c1872816ccc --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts @@ -0,0 +1,7 @@ +// @target: ES6 +switch (`abc${0}abc`) { + case `abc`: + case `123`: + case `abc${0}abc`: + `def${1}def`; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts b/tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts new file mode 100644 index 00000000000..b5a29156f56 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInTypeAssertion.ts @@ -0,0 +1 @@ +var x = `abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts b/tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts new file mode 100644 index 00000000000..e1fc20728a0 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInTypeAssertionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInTypeOf.ts b/tests/cases/conformance/es6/templates/templateStringInTypeOf.ts new file mode 100644 index 00000000000..da69e86c0b7 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInTypeOf.ts @@ -0,0 +1 @@ +var x = typeof `abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts b/tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts new file mode 100644 index 00000000000..a5f96923daa --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = typeof `abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts b/tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts new file mode 100644 index 00000000000..3f9b667d51d --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInUnaryPlus.ts @@ -0,0 +1 @@ +var x = +`abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts b/tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts new file mode 100644 index 00000000000..4baba61696d --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInUnaryPlusES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = +`abc${ 123 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInWhile.ts b/tests/cases/conformance/es6/templates/templateStringInWhile.ts new file mode 100644 index 00000000000..8baeaeadc97 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInWhile.ts @@ -0,0 +1,3 @@ +while (`abc${0}abc`) { + `def${1}def`; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInWhileES6.ts b/tests/cases/conformance/es6/templates/templateStringInWhileES6.ts new file mode 100644 index 00000000000..d30cdb4ec2a --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInWhileES6.ts @@ -0,0 +1,4 @@ +// @target: ES6 +while (`abc${0}abc`) { + `def${1}def`; +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts b/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts new file mode 100644 index 00000000000..4a80e452251 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts @@ -0,0 +1,4 @@ +function* gen { + // Once this is supported, the inner expression does not need to be parenthesized. + var x = yield `abc${ x }def`; +} diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts new file mode 100644 index 00000000000..73f9c6b6b84 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAddition.ts @@ -0,0 +1 @@ +var x = `abc${ 10 + 10 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts new file mode 100644 index 00000000000..12cda7856fa --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedAdditionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 10 + 10 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts new file mode 100644 index 00000000000..77ea762070b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts @@ -0,0 +1 @@ +var x = `abc${ [1,2,3] }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts new file mode 100644 index 00000000000..2be90b5abfa --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrayES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ [1,2,3] }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts new file mode 100644 index 00000000000..8d879732c79 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunction.ts @@ -0,0 +1 @@ +var x = `abc${ x => x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts new file mode 100644 index 00000000000..946bd41470f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ x => x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts new file mode 100644 index 00000000000..2cb295bbfeb --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts @@ -0,0 +1,12 @@ +`head${ // single line comment +10 +} +middle${ +/* Multi- + * line + * comment + */ + 20 + // closing comment +} +tail`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts new file mode 100644 index 00000000000..2cb295bbfeb --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts @@ -0,0 +1,12 @@ +`head${ // single line comment +10 +} +middle${ +/* Multi- + * line + * comment + */ + 20 + // closing comment +} +tail`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts new file mode 100644 index 00000000000..6c70bbc9b04 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditional.ts @@ -0,0 +1 @@ +var x = `abc${ true ? false : " " }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts new file mode 100644 index 00000000000..b1366210a28 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedConditionalES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ true ? false : " " }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts new file mode 100644 index 00000000000..82ea537dc13 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts @@ -0,0 +1 @@ +var x = `abc${ 1 / 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts new file mode 100644 index 00000000000..04f3740e3ae --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivisionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 1 / 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts new file mode 100644 index 00000000000..05c69d962e5 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpression.ts @@ -0,0 +1 @@ +var x = `abc${ function y() { return y; } }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts new file mode 100644 index 00000000000..3aab00817ee --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedFunctionExpressionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ function y() { return y; } }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts new file mode 100644 index 00000000000..0e823e0ee11 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperator.ts @@ -0,0 +1 @@ +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts new file mode 100644 index 00000000000..c678d542467 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts new file mode 100644 index 00000000000..b8cd9ba5740 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOf.ts @@ -0,0 +1 @@ +var x = `abc${ "hello" instanceof String }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts new file mode 100644 index 00000000000..a6598788b92 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInstanceOfES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ "hello" instanceof String }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts new file mode 100644 index 00000000000..675627cb25d --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModulo.ts @@ -0,0 +1 @@ +var x = `abc${ 1 % 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts new file mode 100644 index 00000000000..8b6d3ed7ef2 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedModuloES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 1 % 1 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts new file mode 100644 index 00000000000..09a99646fc8 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplication.ts @@ -0,0 +1 @@ +var x = `abc${ 7 * 6 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts new file mode 100644 index 00000000000..1378909e1c6 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedMultiplicationES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ 7 * 6 }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts new file mode 100644 index 00000000000..0f2652f892b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts @@ -0,0 +1 @@ +var x = `abc${ new String("Hi") }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts new file mode 100644 index 00000000000..4313531575a --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ new String("Hi") }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts new file mode 100644 index 00000000000..bfdbb3d6a34 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteral.ts @@ -0,0 +1 @@ +var x = `abc${ { x: 10, y: 20 } }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts new file mode 100644 index 00000000000..9927f5fe95e --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedObjectLiteralES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ { x: 10, y: 20 } }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts new file mode 100644 index 00000000000..4fc2778aa4f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateString.ts @@ -0,0 +1 @@ +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts new file mode 100644 index 00000000000..4f8063ab03b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts new file mode 100644 index 00000000000..90a0e3561a3 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAddition.ts @@ -0,0 +1 @@ +var x = `abc${ (10 + 10) }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts new file mode 100644 index 00000000000..9c0537b6489 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ (10 + 10) }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts new file mode 100644 index 00000000000..1a93e586bda --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperator.ts @@ -0,0 +1 @@ +var x = `abc${ typeof "hi" }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts new file mode 100644 index 00000000000..534cd667f43 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ typeof "hi" }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts new file mode 100644 index 00000000000..f97583812e4 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts @@ -0,0 +1 @@ +var x = `abc${ +Infinity }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts new file mode 100644 index 00000000000..7b724dba579 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +var x = `abc${ +Infinity }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts new file mode 100644 index 00000000000..cbf7f272581 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts @@ -0,0 +1,4 @@ +function* gen { + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; +} diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts new file mode 100644 index 00000000000..5a7409aef79 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts @@ -0,0 +1,5 @@ +// @target: ES6 +function* gen() { + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; +} diff --git a/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts b/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts new file mode 100644 index 00000000000..9101c8e3e6b --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortion.ts @@ -0,0 +1 @@ +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts new file mode 100644 index 00000000000..cb7f76540cc --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithOpenCommentInStringPortionES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +` /**head ${ 10 } // still middle ${ 20 } /* still tail ` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts b/tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts new file mode 100644 index 00000000000..87682fff572 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts @@ -0,0 +1 @@ +`abc${0}abc`.indexOf(`abc`); \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts b/tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts new file mode 100644 index 00000000000..261ea75bde6 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts @@ -0,0 +1,2 @@ +// @target: ES6 +`abc${0}abc`.indexOf(`abc`); \ No newline at end of file