mirror of
https://github.com/tc39/test262.git
synced 2025-07-30 09:24:41 +02:00
Merge pull request #284 from bocoup/iteration-restructuring
Iteration restructuring
This commit is contained in:
commit
546e594867
20
test/built-ins/Array/prototype/Symbol.iterator.js
vendored
Normal file
20
test/built-ins/Array/prototype/Symbol.iterator.js
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright (C) 2013 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
description: Initial state of the Symbol.iterator property
|
||||||
|
info: >
|
||||||
|
The initial value of the @@iterator property is the same function object as
|
||||||
|
the initial value of the Array.prototype.values property.
|
||||||
|
|
||||||
|
Per ES6 section 17, the method should exist on the Array prototype, and it
|
||||||
|
should be writable and configurable, but not enumerable.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [Symbol.iterator]
|
||||||
|
es6id: 22.1.3.30
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.sameValue(Array.prototype[Symbol.iterator], Array.prototype.values);
|
||||||
|
verifyNotEnumerable(Array.prototype, Symbol.iterator);
|
||||||
|
verifyWritable(Array.prototype, Symbol.iterator);
|
||||||
|
verifyConfigurable(Array.prototype, Symbol.iterator);
|
@ -1,14 +0,0 @@
|
|||||||
// Copyright (C) 2013 the V8 project authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
description: >
|
|
||||||
The method should exist on the Array prototype, and it should be writable
|
|
||||||
and configurable, but not enumerable.
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
es6id: 22.1.3.4
|
|
||||||
---*/
|
|
||||||
|
|
||||||
verifyNotEnumerable(Array.prototype, Symbol.iterator);
|
|
||||||
verifyWritable(Array.prototype, Symbol.iterator);
|
|
||||||
verifyConfigurable(Array.prototype, Symbol.iterator);
|
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Float32Array([3, 1, 2]);
|
var array = new Float32Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Float64Array([3, 1, 2]);
|
var array = new Float64Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Int16Array([3, 1, 2]);
|
var array = new Int16Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Int32Array([3, 1, 2]);
|
var array = new Int32Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Int8Array([3, 1, 2]);
|
var array = new Int8Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Uint16Array([3, 1, 2]);
|
var array = new Uint16Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Uint32Array([3, 1, 2]);
|
var array = new Uint32Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Uint8Array([3, 1, 2]);
|
var array = new Uint8Array([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -5,6 +5,7 @@ es6id: 22.1.5.2.1
|
|||||||
description: >
|
description: >
|
||||||
Visits each element of the array in order and ceases iteration once all
|
Visits each element of the array in order and ceases iteration once all
|
||||||
values have been visited.
|
values have been visited.
|
||||||
|
features: [TypedArray]
|
||||||
---*/
|
---*/
|
||||||
var array = new Uint8ClampedArray([3, 1, 2]);
|
var array = new Uint8ClampedArray([3, 1, 2]);
|
||||||
var iterator = array[Symbol.iterator]();
|
var iterator = array[Symbol.iterator]();
|
@ -1,14 +0,0 @@
|
|||||||
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
description: >
|
|
||||||
The method should exist on the Map prototype, and it should be writable
|
|
||||||
and configurable, but not enumerable.
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
es6id: 23.1.3.12
|
|
||||||
---*/
|
|
||||||
|
|
||||||
verifyNotEnumerable(Map.prototype, Symbol.iterator);
|
|
||||||
verifyWritable(Map.prototype, Symbol.iterator);
|
|
||||||
verifyConfigurable(Map.prototype, Symbol.iterator);
|
|
19
test/built-ins/Map/prototype/Symbol.iterator.js
vendored
Normal file
19
test/built-ins/Map/prototype/Symbol.iterator.js
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
description: Initial state of the Symbol.iterator property
|
||||||
|
info: >
|
||||||
|
The initial value of the @@iterator property is the same function object as
|
||||||
|
the initial value of the entries property.
|
||||||
|
|
||||||
|
Per ES6 section 17, the method should exist on the Array prototype, and it
|
||||||
|
should be writable and configurable, but not enumerable.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [Symbol.iterator]
|
||||||
|
es6id: 23.1.3.12
|
||||||
|
---*/
|
||||||
|
|
||||||
|
verifyNotEnumerable(Map.prototype, Symbol.iterator);
|
||||||
|
verifyWritable(Map.prototype, Symbol.iterator);
|
||||||
|
verifyConfigurable(Map.prototype, Symbol.iterator);
|
20
test/built-ins/Set/prototype/Symbol.iterator.js
vendored
Normal file
20
test/built-ins/Set/prototype/Symbol.iterator.js
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
description: Initial state of the Symbol.iterator property
|
||||||
|
info: >
|
||||||
|
The initial value of the @@iterator property is the same function object as
|
||||||
|
the initial value of the values property.
|
||||||
|
|
||||||
|
Per ES6 section 17, the method should exist on the Set prototype, and it
|
||||||
|
should be writable and configurable, but not enumerable.
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [Symbol.iterator]
|
||||||
|
es6id: 23.2.3.11
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.sameValue(Set.prototype[Symbol.iterator], Set.prototype.values);
|
||||||
|
verifyNotEnumerable(Set.prototype, Symbol.iterator);
|
||||||
|
verifyWritable(Set.prototype, Symbol.iterator);
|
||||||
|
verifyConfigurable(Set.prototype, Symbol.iterator);
|
@ -1,14 +0,0 @@
|
|||||||
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
description: >
|
|
||||||
The method should exist on the Array prototype, and it should be writable
|
|
||||||
and configurable, but not enumerable.
|
|
||||||
includes: [propertyHelper.js]
|
|
||||||
es6id: 23.2.3.11
|
|
||||||
---*/
|
|
||||||
|
|
||||||
verifyNotEnumerable(Set.prototype, Symbol.iterator);
|
|
||||||
verifyWritable(Set.prototype, Symbol.iterator);
|
|
||||||
verifyConfigurable(Set.prototype, Symbol.iterator);
|
|
@ -7,6 +7,7 @@ description: >
|
|||||||
protocol.
|
protocol.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
|
features: [Symbol.iterator]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
@ -7,6 +7,7 @@ description: >
|
|||||||
protocol.
|
protocol.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
|
features: [Symbol.iterator]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
Loading…
x
Reference in New Issue
Block a user