mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 16:04:36 +02:00
Add test for built-in accessor properties names
Including: - 21.2.4.2 get RegExp [ @@species ] - 21.2.5.3 get RegExp.prototype.flags - 21.2.5.4 get RegExp.prototype.global - 21.2.5.5 get RegExp.prototype.ignoreCase - 21.2.5.7 get RegExp.prototype.multiline - 21.2.5.10 get RegExp.prototype.source - 21.2.5.12 get RegExp.prototype.sticky - 21.2.5.15 get RegExp.prototype.unicode - 22.1.2.5 get Array [ @@species ] - 23.1.2.2 get Map [ @@species ] - 23.2.2.2 get Set [ @@species ] - 24.1.3.3 get ArrayBuffer [ @@species ] - 24.1.4.1 get ArrayBuffer.prototype.byteLength - 24.2.4.1 get DataView.prototype.buffer - 24.2.4.2 get DataView.prototype.byteLength - 24.2.4.3 get DataView.prototype.byteOffset - 25.4.4.6 get Promise [ @@species ] - B.2.2.1.1 get Object.prototype.__proto__ - B.2.2.1.2 set Object.prototype.__proto__ Skipped TypedArray tests in order to avoid an early test strategy definition for them.
This commit is contained in:
parent
1e80bf22f6
commit
a1de508783
25
test/built-ins/Array/symbol-species-name.js
Normal file
25
test/built-ins/Array/symbol-species-name.js
Normal file
@ -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');
|
27
test/built-ins/ArrayBuffer/prototype/byteLength/name.js
vendored
Normal file
27
test/built-ins/ArrayBuffer/prototype/byteLength/name.js
vendored
Normal file
@ -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');
|
25
test/built-ins/ArrayBuffer/symbol-species-name.js
Normal file
25
test/built-ins/ArrayBuffer/symbol-species-name.js
Normal file
@ -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');
|
27
test/built-ins/DataView/prototype/buffer/name.js
vendored
Normal file
27
test/built-ins/DataView/prototype/buffer/name.js
vendored
Normal file
@ -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');
|
27
test/built-ins/DataView/prototype/byteLength/name.js
vendored
Normal file
27
test/built-ins/DataView/prototype/byteLength/name.js
vendored
Normal file
@ -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');
|
27
test/built-ins/DataView/prototype/byteOffset/name.js
vendored
Normal file
27
test/built-ins/DataView/prototype/byteOffset/name.js
vendored
Normal file
@ -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');
|
20
test/built-ins/Map/symbol-species-name.js
Normal file
20
test/built-ins/Map/symbol-species-name.js
Normal file
@ -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]'
|
||||||
|
);
|
26
test/built-ins/Object/prototype/__proto__/get-name.js
vendored
Normal file
26
test/built-ins/Object/prototype/__proto__/get-name.js
vendored
Normal file
@ -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');
|
26
test/built-ins/Object/prototype/__proto__/set-name.js
vendored
Normal file
26
test/built-ins/Object/prototype/__proto__/set-name.js
vendored
Normal file
@ -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');
|
20
test/built-ins/Promise/symbol-species-name.js
Normal file
20
test/built-ins/Promise/symbol-species-name.js
Normal file
@ -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]'
|
||||||
|
);
|
24
test/built-ins/RegExp/prototype/flags/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/flags/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/global/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/global/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/ignoreCase/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/ignoreCase/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/multiline/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/multiline/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/source/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/source/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/sticky/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/sticky/name.js
vendored
Normal file
@ -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');
|
24
test/built-ins/RegExp/prototype/unicode/name.js
vendored
Normal file
24
test/built-ins/RegExp/prototype/unicode/name.js
vendored
Normal file
@ -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');
|
25
test/built-ins/RegExp/symbol-species-name.js
Normal file
25
test/built-ins/RegExp/symbol-species-name.js
Normal file
@ -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');
|
20
test/built-ins/Set/symbol-species-name.js
Normal file
20
test/built-ins/Set/symbol-species-name.js
Normal file
@ -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]'
|
||||||
|
);
|
Loading…
x
Reference in New Issue
Block a user