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

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

Issue 731573004: Implement ES6 String.raw behind --harmony-templates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nits 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
« no previous file with comments | « test/mjsunit/harmony/string-raw.js ('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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 assertEquals(1, calls); 323 assertEquals(1, calls);
324 })(); 324 })();
325 325
326 326
327 (function testUTF16ByteOrderMark() { 327 (function testUTF16ByteOrderMark() {
328 assertEquals("\uFEFFtest", `\uFEFFtest`); 328 assertEquals("\uFEFFtest", `\uFEFFtest`);
329 assertEquals("\uFEFFtest", eval("`\uFEFFtest`")); 329 assertEquals("\uFEFFtest", eval("`\uFEFFtest`"));
330 })(); 330 })();
331 331
332 332
333 (function testStringRawAsTagFn() {
334 assertEquals("\\u0065\\`\\r\\r\\n\\ntestcheck",
335 String.raw`\u0065\`\r\r\n\n${"test"}check`);
336 assertEquals("\\\n\\\n\\\n", eval("String.raw`\\\r\\\r\n\\\n`"));
337 assertEquals("", String.raw``);
338 })();
339
340
333 (function testExtendedArrayPrototype() { 341 (function testExtendedArrayPrototype() {
334 Object.defineProperty(Array.prototype, 0, { 342 Object.defineProperty(Array.prototype, 0, {
335 set: function() { 343 set: function() {
336 assertUnreachable(); 344 assertUnreachable();
337 } 345 }
338 }); 346 });
339 function tag(){} 347 function tag(){}
340 tag`a${1}b`; 348 tag`a${1}b`;
341 })(); 349 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/string-raw.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698