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

Side by Side Diff: test/mjsunit/es7/array-includes.js

Issue 2033263002: [es7] Array.prototype.includes should be unscopable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/js/array.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 // Largely ported from 5 // Largely ported from
6 // https://github.com/tc39/Array.prototype.includes/tree/master/test 6 // https://github.com/tc39/Array.prototype.includes/tree/master/test
7 // using https://www.npmjs.org/package/test262-to-mjsunit with further edits 7 // using https://www.npmjs.org/package/test262-to-mjsunit with further edits
8 8
9 9
10 // Array.prototype.includes sees a new element added by a getter that is hit 10 // Array.prototype.includes sees a new element added by a getter that is hit
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 (function() { 666 (function() {
667 assertTrue(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2)); 667 assertTrue(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2));
668 668
669 assertTrue( 669 assertTrue(
670 Array.prototype.includes.call(new Float32Array([2.5, 3.14, Math.PI]), 3.1415 927410125732) 670 Array.prototype.includes.call(new Float32Array([2.5, 3.14, Math.PI]), 3.1415 927410125732)
671 ); 671 );
672 672
673 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4)); 673 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4));
674 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2, 2)); 674 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2, 2));
675 })(); 675 })();
676
677
678 (function testUnscopable() {
679 assertTrue(Array.prototype[Symbol.unscopables].includes);
680 })();
OLDNEW
« no previous file with comments | « src/js/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698