summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/annexB/built-ins/RegExp/legacy-accessors/input/prop-desc.js
blob: e5f0c85603f206c4896f78432a5bf780bcb2e1ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// |reftest| skip -- legacy-regexp is not supported
// Copyright (C) 2020 ExE Boss. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: Property descriptor for RegExp.input
info: |
  RegExp.input is an accessor property with attributes:
  {
    [[Enumerable]]: false,
    [[Configurable]]: true,
  }

  get RegExp.input

  1. Return ? GetLegacyRegExpStaticProperty(%RegExp%, this value, [[RegExpInput]]).

  set RegExp.input = val

  1. Return ? SetLegacyRegExpStaticProperty(%RegExp%, this value, [[RegExpInput]], val).
includes: [propertyHelper.js]
features: [legacy-regexp]
---*/

var desc = Object.getOwnPropertyDescriptor(RegExp, "input");

assert.sameValue(typeof desc.get, "function", "`get` property");
assert.sameValue(typeof desc.set, "function", "`set` property");

verifyProperty(RegExp, "input", {
  enumerable: false,
  configurable: true
});

desc = Object.getOwnPropertyDescriptor(RegExp, "$_");

assert.sameValue(typeof desc.get, "function", "`get` property");
assert.sameValue(typeof desc.set, "function", "`set` property");

verifyProperty(RegExp, "$_", {
  enumerable: false,
  configurable: true
});

reportCompare(0, 0);