tv-template-character.js (1295B)
1 // Copyright (C) 2014 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 11.8.6.1 5 description: Template values of single characters 6 info: | 7 The TV of TemplateCharacters :: TemplateCharacter is the TV of 8 TemplateCharacter. 9 The TV of TemplateCharacter :: SourceCharacter but not one of ` or \ or $ 10 or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of 11 SourceCharacter. 12 The TV of TemplateCharacter :: $ is the code unit value 0x0024. 13 14 The TRV of TemplateCharacters :: TemplateCharacter is the TRV of 15 TemplateCharacter. 16 The TRV of TemplateCharacter :: SourceCharacter but not one of ` or \ or $ 17 or LineTerminator is the UTF16Encoding (10.1.1) of the code point value of 18 SourceCharacter. 19 The TRV of TemplateCharacter :: $ is the code unit value 0x0024. 20 ---*/ 21 22 var calls; 23 24 calls = 0; 25 (function(s) { 26 calls++; 27 assert.sameValue(s[0], 'a', '`a` character TV'); 28 assert.sameValue(s.raw[0], 'a', '`a` character TRV'); 29 })`a`; 30 assert.sameValue(calls, 1); 31 32 calls = 0; 33 (function(s) { 34 calls++; 35 assert.sameValue(s[0], '$', '`$` character TV'); 36 assert.sameValue(s.raw[0], '$', '`$` character TRV'); 37 })`$`; 38 assert.sameValue(calls, 1); 39 40 reportCompare(0, 0);