Debian Codegraph @

js/src/tests/test262/annexB/built-ins/RegExp/legacy-accessors/input/prop-desc.js

raw
1 // |reftest| skip -- legacy-regexp is not supported
2 // Copyright (C) 2020 ExE Boss. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: pending
6 description: Property descriptor for RegExp.input
7 info: |
8 RegExp.input is an accessor property with attributes:
9 {
10 [[Enumerable]]: false,
11 [[Configurable]]: true,
12 }
13
14 get RegExp.input
15
16 1. Return ? GetLegacyRegExpStaticProperty(%RegExp%, this value, [[RegExpInput]]).
17
18 set RegExp.input = val
19
20 1. Return ? SetLegacyRegExpStaticProperty(%RegExp%, this value, [[RegExpInput]], val).
21 includes: [propertyHelper.js]
22 features: [legacy-regexp]
23 ---*/
24
25 var desc = Object.getOwnPropertyDescriptor(RegExp, "input");
26
27 assert.sameValue(typeof desc.get, "function", "`get` property");
28 assert.sameValue(typeof desc.set, "function", "`set` property");
29
30 verifyProperty(RegExp, "input", {
31 enumerable: false,
32 configurable: true
33 });
34
35 desc = Object.getOwnPropertyDescriptor(RegExp, "$_");
36
37 assert.sameValue(typeof desc.get, "function", "`get` property");
38 assert.sameValue(typeof desc.set, "function", "`set` property");
39
40 verifyProperty(RegExp, "$_", {
41 enumerable: false,
42 configurable: true
43 });
44
45 reportCompare(0, 0);