summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/Segmenter/instance/prototype.js
blob: 4a5af5c73e6c44dd0d7c687330930ec4c135ccce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |reftest| skip-if(!Intl.Segmenter) -- Intl.Segmenter is not enabled unconditionally
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-Intl.Segmenter
description: Intl.Segmenter instance object is created from %SegmenterPrototype%.
info: |
    Intl.Segmenter ([ locales [ , options ]])

    2. Let segmenter be ? OrdinaryCreateFromConstructor(NewTarget, "%SegmenterPrototype%", « [[InitializedSegmenter]] »).
features: [Intl.Segmenter]
---*/

const value = new Intl.Segmenter();
assert.sameValue(
  Object.getPrototypeOf(value),
  Intl.Segmenter.prototype,
  "Object.getPrototypeOf(value) equals the value of Intl.Segmenter.prototype"
);

reportCompare(0, 0);