| Index: test/mjsunit/harmony/array-iterator.js
|
| diff --git a/test/mjsunit/harmony/array-iterator.js b/test/mjsunit/harmony/array-iterator.js
|
| index 2642d7b2318e3355ccd0a547207fbe089c1217f8..896878acf638a91db51d00b182d354039d40276b 100644
|
| --- a/test/mjsunit/harmony/array-iterator.js
|
| +++ b/test/mjsunit/harmony/array-iterator.js
|
| @@ -36,6 +36,8 @@ function TestArrayPrototype() {
|
| assertFalse(Array.prototype.propertyIsEnumerable('entries'));
|
| assertFalse(Array.prototype.propertyIsEnumerable('values'));
|
| assertFalse(Array.prototype.propertyIsEnumerable('keys'));
|
| +
|
| + assertEquals(Array.prototype.values, Array.prototype[Symbol.iterator]);
|
| }
|
| TestArrayPrototype();
|
|
|
| @@ -216,6 +218,24 @@ function TestForArrayEntries() {
|
| TestForArrayEntries();
|
|
|
|
|
| +function TestForArray() {
|
| + var buffer = [];
|
| + var array = [0, 'a', true, false, null, /* hole */, undefined, NaN];
|
| + var i = 0;
|
| + for (var value of array) {
|
| + buffer[i++] = value;
|
| + }
|
| +
|
| + assertEquals(8, buffer.length);
|
| +
|
| + for (var i = 0; i < buffer.length - 1; i++) {
|
| + assertEquals(array[i], buffer[i]);
|
| + }
|
| + assertTrue(isNaN(buffer[buffer.length - 1]));
|
| +}
|
| +TestForArrayValues();
|
| +
|
| +
|
| function TestNonOwnSlots() {
|
| var array = [0];
|
| var iterator = array.values();
|
|
|