diff --git a/test/built-ins/Array/symbol-species-name.js b/test/built-ins/Array/symbol-species-name.js new file mode 100644 index 0000000000..202f96444c --- /dev/null +++ b/test/built-ins/Array/symbol-species-name.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 22.1.2.5 +description: > + Array[Symbol.species] accessor property get name +info: > + 22.1.2.5 get Array [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Array, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/ArrayBuffer/prototype/byteLength/name.js b/test/built-ins/ArrayBuffer/prototype/byteLength/name.js new file mode 100644 index 0000000000..45f55e2884 --- /dev/null +++ b/test/built-ins/ArrayBuffer/prototype/byteLength/name.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 24.1.4.1 +description: > + get ArrayBuffer.prototype.byteLength + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor( + ArrayBuffer.prototype, 'byteLength' +); + +assert.sameValue( + descriptor.get.name, 'get byteLength', + 'The value of `descriptor.get.name` is `"get byteLength"`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/ArrayBuffer/symbol-species-name.js b/test/built-ins/ArrayBuffer/symbol-species-name.js new file mode 100644 index 0000000000..2c4720871d --- /dev/null +++ b/test/built-ins/ArrayBuffer/symbol-species-name.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 24.1.3.3 +description: > + ArrayBuffer[Symbol.species] accessor property get name +info: > + 24.1.3.3 get ArrayBuffer [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(ArrayBuffer, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/DataView/prototype/buffer/name.js b/test/built-ins/DataView/prototype/buffer/name.js new file mode 100644 index 0000000000..50f4adccb2 --- /dev/null +++ b/test/built-ins/DataView/prototype/buffer/name.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 24.2.4.2 +description: > + get DataView.prototype.buffer + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor( + DataView.prototype, 'buffer' +); + +assert.sameValue( + descriptor.get.name, 'get buffer', + 'The value of `descriptor.get.name` is `"get buffer"`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/DataView/prototype/byteLength/name.js b/test/built-ins/DataView/prototype/byteLength/name.js new file mode 100644 index 0000000000..ca4456f684 --- /dev/null +++ b/test/built-ins/DataView/prototype/byteLength/name.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 24.2.4.2 +description: > + get DataView.prototype.byteLength + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor( + DataView.prototype, 'byteLength' +); + +assert.sameValue( + descriptor.get.name, 'get byteLength', + 'The value of `descriptor.get.name` is `"get byteLength"`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/DataView/prototype/byteOffset/name.js b/test/built-ins/DataView/prototype/byteOffset/name.js new file mode 100644 index 0000000000..0f34382f8e --- /dev/null +++ b/test/built-ins/DataView/prototype/byteOffset/name.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 24.2.4.2 +description: > + get DataView.prototype.byteOffset + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor( + DataView.prototype, 'byteOffset' +); + +assert.sameValue( + descriptor.get.name, 'get byteOffset', + 'The value of `descriptor.get.name` is `"get byteOffset"`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/Map/symbol-species-name.js b/test/built-ins/Map/symbol-species-name.js new file mode 100644 index 0000000000..cbf990be18 --- /dev/null +++ b/test/built-ins/Map/symbol-species-name.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 23.1.2.2 +description: > + Map[Symbol.species] accessor property get name +info: > + 23.1.2.2 get Map [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Map, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +); diff --git a/test/built-ins/Object/prototype/__proto__/get-name.js b/test/built-ins/Object/prototype/__proto__/get-name.js new file mode 100644 index 0000000000..dd71356dd5 --- /dev/null +++ b/test/built-ins/Object/prototype/__proto__/get-name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: B.2.2.1.1 +description: > + get Object.prototype.__proto__ + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__'); + + +assert.sameValue( + descriptor.get.name, 'get __proto__', + 'The value of `descriptor.get.name` is `"get __proto__"`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/Object/prototype/__proto__/set-name.js b/test/built-ins/Object/prototype/__proto__/set-name.js new file mode 100644 index 0000000000..9532fdb244 --- /dev/null +++ b/test/built-ins/Object/prototype/__proto__/set-name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: B.2.2.1.2 +description: > + set Object.prototype.__proto__ + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__'); + + +assert.sameValue( + descriptor.set.name, 'set __proto__', + 'The value of `descriptor.set.name` is `"set __proto__"`' +); + +verifyNotEnumerable(descriptor.set, 'name'); +verifyNotWritable(descriptor.set, 'name'); +verifyConfigurable(descriptor.set, 'name'); diff --git a/test/built-ins/Promise/symbol-species-name.js b/test/built-ins/Promise/symbol-species-name.js new file mode 100644 index 0000000000..35b60e9b20 --- /dev/null +++ b/test/built-ins/Promise/symbol-species-name.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.6 +description: > + Promise[Symbol.species] accessor property get name +info: > + 25.4.4.6 get Promise [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Promise, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +); diff --git a/test/built-ins/RegExp/prototype/flags/name.js b/test/built-ins/RegExp/prototype/flags/name.js new file mode 100644 index 0000000000..cf9b212b7c --- /dev/null +++ b/test/built-ins/RegExp/prototype/flags/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.3 +description: > + RegExp.prototype.flags name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); + +assert.sameValue( + descriptor.get.name, + 'get flags' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/global/name.js b/test/built-ins/RegExp/prototype/global/name.js new file mode 100644 index 0000000000..b9d9ffa400 --- /dev/null +++ b/test/built-ins/RegExp/prototype/global/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.4 +description: > + RegExp.prototype.global name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); + +assert.sameValue( + descriptor.get.name, + 'get global' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/ignoreCase/name.js b/test/built-ins/RegExp/prototype/ignoreCase/name.js new file mode 100644 index 0000000000..659468cc86 --- /dev/null +++ b/test/built-ins/RegExp/prototype/ignoreCase/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.5 +description: > + RegExp.prototype.ignoreCase name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); + +assert.sameValue( + descriptor.get.name, + 'get ignoreCase' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/multiline/name.js b/test/built-ins/RegExp/prototype/multiline/name.js new file mode 100644 index 0000000000..99f9aecc46 --- /dev/null +++ b/test/built-ins/RegExp/prototype/multiline/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.7 +description: > + RegExp.prototype.multiline name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); + +assert.sameValue( + descriptor.get.name, + 'get multiline' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/source/name.js b/test/built-ins/RegExp/prototype/source/name.js new file mode 100644 index 0000000000..871284df8b --- /dev/null +++ b/test/built-ins/RegExp/prototype/source/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.10 +description: > + RegExp.prototype.source name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source'); + +assert.sameValue( + descriptor.get.name, + 'get source' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/sticky/name.js b/test/built-ins/RegExp/prototype/sticky/name.js new file mode 100644 index 0000000000..72dda0528c --- /dev/null +++ b/test/built-ins/RegExp/prototype/sticky/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.12 +description: > + RegExp.prototype.sticky name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'sticky'); + +assert.sameValue( + descriptor.get.name, + 'get sticky' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/prototype/unicode/name.js b/test/built-ins/RegExp/prototype/unicode/name.js new file mode 100644 index 0000000000..2724be58c6 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicode/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.5.17 +description: > + RegExp.prototype.unicode name +info: > + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'unicode'); + +assert.sameValue( + descriptor.get.name, + 'get unicode' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/RegExp/symbol-species-name.js b/test/built-ins/RegExp/symbol-species-name.js new file mode 100644 index 0000000000..cf00448a89 --- /dev/null +++ b/test/built-ins/RegExp/symbol-species-name.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 21.2.4.2 +description: > + RegExp[Symbol.species] accessor property get name +info: > + 21.2.4.2 get RegExp [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(RegExp, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/Set/symbol-species-name.js b/test/built-ins/Set/symbol-species-name.js new file mode 100644 index 0000000000..69b2ba08c3 --- /dev/null +++ b/test/built-ins/Set/symbol-species-name.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 23.2.2.2 +description: > + Set[Symbol.species] accessor property get name +info: > + 23.2.2.2 get Set [ @@species ] + + ... + The value of the name property of this function is "get [Symbol.species]". +features: [Symbol.species] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Set, Symbol.species); + +assert.sameValue( + descriptor.get.name, + 'get [Symbol.species]' +);