diff --git a/test/built-ins/Array/prototype/Symbol.iterator.js b/test/built-ins/Array/prototype/Symbol.iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..7cdcb81b89259046f2ed39288860535125e88300 --- /dev/null +++ b/test/built-ins/Array/prototype/Symbol.iterator.js @@ -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); diff --git a/test/built-ins/Array/prototype/Symbol.iterator/property-descriptor.js b/test/built-ins/Array/prototype/Symbol.iterator/property-descriptor.js deleted file mode 100644 index f309b02ac4c8cb641c0654c8a1a52447b1601bc9..0000000000000000000000000000000000000000 --- a/test/built-ins/Array/prototype/Symbol.iterator/property-descriptor.js +++ /dev/null @@ -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); diff --git a/test/built-ins/Map/prototype/Symbol.iterator-property-descriptor.js b/test/built-ins/Map/prototype/Symbol.iterator-property-descriptor.js deleted file mode 100644 index c5e0f8ee3c70ce981e161d5866663d78b3a39776..0000000000000000000000000000000000000000 --- a/test/built-ins/Map/prototype/Symbol.iterator-property-descriptor.js +++ /dev/null @@ -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); diff --git a/test/built-ins/Map/prototype/Symbol.iterator.js b/test/built-ins/Map/prototype/Symbol.iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..3c6a1d6e6504f527de38e957294d246983df0800 --- /dev/null +++ b/test/built-ins/Map/prototype/Symbol.iterator.js @@ -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); diff --git a/test/built-ins/Set/prototype/Symbol.iterator.js b/test/built-ins/Set/prototype/Symbol.iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..1ae44d1fc88108d87f8ef9d4c12f8b97ced23338 --- /dev/null +++ b/test/built-ins/Set/prototype/Symbol.iterator.js @@ -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); diff --git a/test/built-ins/Set/prototype/Symbol.iterator/property-descriptor.js b/test/built-ins/Set/prototype/Symbol.iterator/property-descriptor.js deleted file mode 100644 index f41ed267024d6b1a9e0b64f5762dd8899635ad0f..0000000000000000000000000000000000000000 --- a/test/built-ins/Set/prototype/Symbol.iterator/property-descriptor.js +++ /dev/null @@ -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); diff --git a/test/language/arguments-object/mapped/Symbol.iterator/property-descriptor.js b/test/language/arguments-object/mapped/Symbol.iterator.js similarity index 95% rename from test/language/arguments-object/mapped/Symbol.iterator/property-descriptor.js rename to test/language/arguments-object/mapped/Symbol.iterator.js index 3eacb7ad6b4d08492d70a5205dcee314f205ba2d..3c25176392e5cdb5e3b893fbdf89bb09ae99aebe 100644 --- a/test/language/arguments-object/mapped/Symbol.iterator/property-descriptor.js +++ b/test/language/arguments-object/mapped/Symbol.iterator.js @@ -7,6 +7,7 @@ description: > protocol. includes: [propertyHelper.js] flags: [noStrict] +features: [Symbol.iterator] ---*/ (function() { diff --git a/test/language/arguments-object/unmapped/Symbol.iterator/property-descriptor.js b/test/language/arguments-object/unmapped/Symbol.iterator.js similarity index 96% rename from test/language/arguments-object/unmapped/Symbol.iterator/property-descriptor.js rename to test/language/arguments-object/unmapped/Symbol.iterator.js index a2c37c80b930180d61a1de2d61304ab809e69258..0b47c6c8999224949147171a901062b73c24ae3d 100644 --- a/test/language/arguments-object/unmapped/Symbol.iterator/property-descriptor.js +++ b/test/language/arguments-object/unmapped/Symbol.iterator.js @@ -7,6 +7,7 @@ description: > protocol. includes: [propertyHelper.js] flags: [noStrict] +features: [Symbol.iterator] ---*/ (function() {