mirror of https://github.com/tc39/test262.git
Refactor tests for built-in @@iterator methods
Assert the value of the properties and update the test frontmatter to include the `Symbol.iterator` feature.
This commit is contained in:
parent
eefc23df50
commit
e0387bcee8
|
@ -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);
|
|
|
@ -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);
|
|
|
@ -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);
|
|
@ -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…
Reference in New Issue