Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: test/mjsunit/harmony/templates.js

Issue 745233002: Fix raw TemplateLiteral spans with non-ascii characters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-templates 5 // Flags: --harmony-templates
6 6
7 var num = 5; 7 var num = 5;
8 var str = "str"; 8 var str = "str";
9 function fn() { return "result"; } 9 function fn() { return "result"; }
10 var obj = { 10 var obj = {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 callSites = []; 395 callSites = [];
396 396
397 tag`\uc548\ub155`; 397 tag`\uc548\ub155`;
398 tag`안녕`; 398 tag`안녕`;
399 assertEquals(2, callSites.length); 399 assertEquals(2, callSites.length);
400 assertTrue(callSites[0] !== callSites[1]); 400 assertTrue(callSites[0] !== callSites[1]);
401 assertEquals("안녕", callSites[0][0]); 401 assertEquals("안녕", callSites[0][0]);
402 assertEquals("\\uc548\\ub155", callSites[0].raw[0]); 402 assertEquals("\\uc548\\ub155", callSites[0].raw[0]);
403 assertEquals("안녕", callSites[1][0]); 403 assertEquals("안녕", callSites[1][0]);
404 // TODO(caitp, arv): blocked on correctly generating raw strings from 404 assertEquals("안녕", callSites[1].raw[0]);
mathias 2014/11/25 14:45:00 May want to test UTF-8 encoded symbols that take u
caitp (gmail) 2014/11/26 14:12:01 It's not necessarily guaranteed that there is any
405 // multi-byte UTF8.
406 // assertEquals("안녕", callSites[1].raw[0]);
407 })(); 405 })();
408 406
409 407
410 (function testExtendedArrayPrototype() { 408 (function testExtendedArrayPrototype() {
411 Object.defineProperty(Array.prototype, 0, { 409 Object.defineProperty(Array.prototype, 0, {
412 set: function() { 410 set: function() {
413 assertUnreachable(); 411 assertUnreachable();
414 } 412 }
415 }); 413 });
416 function tag(){} 414 function tag(){}
417 tag`a${1}b`; 415 tag`a${1}b`;
418 })(); 416 })();
OLDNEW
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698