0f0ead74b0
Spec: https://tc39.es/proposal-intl-locale-info/ Design Doc: https://docs.google.com/document/d/1OwEsvs8VQwvR-ug01xLyIwpgcvUfaP24u9owc7aBKJ4/edit# https://www.chromestatus.com/feature/5566859262820352 Behind flag --harmony_intl_locale_info Bug: v8:11638 Change-Id: Ie616b3394d047c99d95ae46f112b5f0b367afe74 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2570218 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#74394}
24 lines
783 B
JavaScript
24 lines
783 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --harmony_intl_locale_info
|
|
|
|
// Check getter properties against the spec.
|
|
function checkProperties(property) {
|
|
let desc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, property);
|
|
assertEquals(`get ${property}`, desc.get.name);
|
|
assertEquals('function', typeof desc.get)
|
|
assertEquals(undefined, desc.set);
|
|
assertFalse(desc.enumerable);
|
|
assertTrue(desc.configurable);
|
|
}
|
|
|
|
checkProperties('calendars');
|
|
checkProperties('collations');
|
|
checkProperties('hourCycles');
|
|
checkProperties('numberingSystems');
|
|
checkProperties('textInfo');
|
|
checkProperties('timeZones');
|
|
checkProperties('weekInfo');
|