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

Side by Side Diff: test/mjsunit/harmony/typed-array-iterator.js

Issue 658423002: Unship ES6 iteration and unscopables on 3.28 (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/harmony/string-iterator.js ('k') | test/mjsunit/harmony/unscopables.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-iteration
6
5 7
6 var constructors = [Uint8Array, Int8Array, 8 var constructors = [Uint8Array, Int8Array,
7 Uint16Array, Int16Array, 9 Uint16Array, Int16Array,
8 Uint32Array, Int32Array, 10 Uint32Array, Int32Array,
9 Float32Array, Float64Array, 11 Float32Array, Float64Array,
10 Uint8ClampedArray]; 12 Uint8ClampedArray];
11 13
12 function TestTypedArrayPrototype(constructor) { 14 function TestTypedArrayPrototype(constructor) {
13 assertTrue(constructor.prototype.hasOwnProperty('entries')); 15 assertTrue(constructor.prototype.hasOwnProperty('entries'));
14 assertTrue(constructor.prototype.hasOwnProperty('values')); 16 assertTrue(constructor.prototype.hasOwnProperty('values'));
(...skipping 15 matching lines...) Expand all
30 32
31 function TestTypedArrayValues(constructor) { 33 function TestTypedArrayValues(constructor) {
32 var array = [1, 2, 3]; 34 var array = [1, 2, 3];
33 var i = 0; 35 var i = 0;
34 for (var value of new constructor(array)) { 36 for (var value of new constructor(array)) {
35 assertEquals(array[i++], value); 37 assertEquals(array[i++], value);
36 } 38 }
37 assertEquals(i, array.length); 39 assertEquals(i, array.length);
38 } 40 }
39 constructors.forEach(TestTypedArrayValues); 41 constructors.forEach(TestTypedArrayValues);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/string-iterator.js ('k') | test/mjsunit/harmony/unscopables.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698