tv-hex-escape-sequence.js (833B)
1 // Copyright (C) 2015 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 hex escape sequences 6 info: | 7 The TV of TemplateCharacter :: \ EscapeSequence is the SV of 8 EscapeSequence. 9 The SV of UnicodeEscapeSequence :: u{ HexDigits } is the UTF16Encoding 10 (10.1.1) of the MV of HexDigits. 11 The TRV of UnicodeEscapeSequence :: u{ HexDigits } is the sequence 12 consisting of code unit value 0x0075 followed by code unit value 0x007B 13 followed by TRV of HexDigits followed by code unit value 0x007D. 14 ---*/ 15 16 var calls; 17 18 calls = 0; 19 (function(s) { 20 calls++; 21 assert.sameValue(s[0], 'A', 'TV'); 22 assert.sameValue(s.raw[0], '\\x41', 'TRV'); 23 })`\x41`; 24 assert.sameValue(calls, 1); 25 26 reportCompare(0, 0);