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

Side by Side Diff: test/mjsunit/es6/string-codepointat.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/js-perf-test/JSTests.json ('k') | test/mjsunit/es6/string-endswith.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.prototype.codePointAt 6 // https://github.com/mathiasbynens/String.prototype.codePointAt
9 7
10 assertEquals(String.prototype.codePointAt.length, 1); 8 assertEquals(String.prototype.codePointAt.length, 1);
11 assertEquals(String.prototype.propertyIsEnumerable("codePointAt"), false); 9 assertEquals(String.prototype.propertyIsEnumerable("codePointAt"), false);
12 10
13 // String that starts with a BMP symbol 11 // String that starts with a BMP symbol
14 assertEquals("abc\uD834\uDF06def".codePointAt(""), 0x61); 12 assertEquals("abc\uD834\uDF06def".codePointAt(""), 0x61);
15 assertEquals("abc\uD834\uDF06def".codePointAt("_"), 0x61); 13 assertEquals("abc\uD834\uDF06def".codePointAt("_"), 0x61);
16 assertEquals("abc\uD834\uDF06def".codePointAt(), 0x61); 14 assertEquals("abc\uD834\uDF06def".codePointAt(), 0x61);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 assertEquals(String.prototype.codePointAt.call(42, 0), 0x34); 80 assertEquals(String.prototype.codePointAt.call(42, 0), 0x34);
83 assertEquals(String.prototype.codePointAt.call(42, 1), 0x32); 81 assertEquals(String.prototype.codePointAt.call(42, 1), 0x32);
84 assertEquals(String.prototype.codePointAt.call({ 82 assertEquals(String.prototype.codePointAt.call({
85 toString: function() { return "abc"; } 83 toString: function() { return "abc"; }
86 }, 2), 0x63); 84 }, 2), 0x63);
87 var tmp = 0; 85 var tmp = 0;
88 assertEquals(String.prototype.codePointAt.call({ 86 assertEquals(String.prototype.codePointAt.call({
89 toString: function() { ++tmp; return String(tmp); } 87 toString: function() { ++tmp; return String(tmp); }
90 }, 0), 0x31); 88 }, 0), 0x31);
91 assertEquals(tmp, 1); 89 assertEquals(tmp, 1);
OLDNEW
« no previous file with comments | « test/js-perf-test/JSTests.json ('k') | test/mjsunit/es6/string-endswith.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698