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

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

Issue 1513843006: Remove --harmony-array-includes flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/typedarray.js ('k') | test/mjsunit/es7/array-includes-to-object-sloppy.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-array-includes
6
7 // Largely ported from 5 // Largely ported from
8 // https://github.com/tc39/Array.prototype.includes/tree/master/test 6 // https://github.com/tc39/Array.prototype.includes/tree/master/test
9 // 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
10 8
11 9
12 // 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
13 // during iteration 11 // during iteration
14 (function() { 12 (function() {
15 var arrayLike = { 13 var arrayLike = {
16 length: 5, 14 length: 5,
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 (function() { 666 (function() {
669 assertTrue(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2)); 667 assertTrue(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 2));
670 668
671 assertTrue( 669 assertTrue(
672 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)
673 ); 671 );
674 672
675 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4)); 673 assertFalse(Array.prototype.includes.call(new Uint8Array([1, 2, 3]), 4));
676 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));
677 })(); 675 })();
OLDNEW
« no previous file with comments | « src/js/typedarray.js ('k') | test/mjsunit/es7/array-includes-to-object-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698