mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Test change in PluralRules default options semantics (#1350)
The change is done in the following patch, where default options
have a null prototype. This matches what other Intl objects have.
1abe8af440
This commit is contained in:
parent
fe1b7e2a74
commit
1702336a77
18
test/intl402/PluralRules/default-options-object-prototype.js
Normal file
18
test/intl402/PluralRules/default-options-object-prototype.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2017 Igalia, S. L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-initializepluralrules
|
||||
description: >
|
||||
Monkey-patching Object.prototype does not change the default
|
||||
options for PluralRules as a null prototype is used.
|
||||
info: >
|
||||
InitializePluralRules ( collator, locales, options )
|
||||
|
||||
1. If _options_ is *undefined*, then
|
||||
1. Let _options_ be ObjectCreate(*null*).
|
||||
---*/
|
||||
|
||||
Object.prototype.type = "ordinal";
|
||||
let pluralRules = new Intl.PluralRules("en");
|
||||
assert.sameValue(pluralRules.resolvedOptions().type, "cardinal");
|
Loading…
x
Reference in New Issue
Block a user