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

Side by Side Diff: test/mjsunit/es6/string-fromcodepoint.js

Issue 1024813002: Remove harmony-strings flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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/es6/string-endswith.js ('k') | test/mjsunit/es6/string-includes.js » ('j') | 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-strings
6
7 // Tests taken from: 5 // Tests taken from:
8 // https://github.com/mathiasbynens/String.fromCodePoint 6 // https://github.com/mathiasbynens/String.fromCodePoint
9 7
10 assertEquals(String.fromCodePoint.length, 1); 8 assertEquals(String.fromCodePoint.length, 1);
11 assertEquals(String.propertyIsEnumerable("fromCodePoint"), false); 9 assertEquals(String.propertyIsEnumerable("fromCodePoint"), false);
12 10
13 assertEquals(String.fromCodePoint(""), "\0"); 11 assertEquals(String.fromCodePoint(""), "\0");
14 assertEquals(String.fromCodePoint(), ""); 12 assertEquals(String.fromCodePoint(), "");
15 assertEquals(String.fromCodePoint(-0), "\0"); 13 assertEquals(String.fromCodePoint(-0), "\0");
16 assertEquals(String.fromCodePoint(0), "\0"); 14 assertEquals(String.fromCodePoint(0), "\0");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 result.push(0); // one code unit per symbol 51 result.push(0); // one code unit per symbol
54 } 52 }
55 String.fromCodePoint.apply(null, result); // must not throw 53 String.fromCodePoint.apply(null, result); // must not throw
56 54
57 var counter = Math.pow(2, 15) * 3 / 2; 55 var counter = Math.pow(2, 15) * 3 / 2;
58 var result = []; 56 var result = [];
59 while (--counter >= 0) { 57 while (--counter >= 0) {
60 result.push(0xFFFF + 1); // two code units per symbol 58 result.push(0xFFFF + 1); // two code units per symbol
61 } 59 }
62 String.fromCodePoint.apply(null, result); // must not throw 60 String.fromCodePoint.apply(null, result); // must not throw
OLDNEW
« no previous file with comments | « test/mjsunit/es6/string-endswith.js ('k') | test/mjsunit/es6/string-includes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698