v8/test/intl/number-format/rounding-increment-resolved-match-v3.js
Frank Tang 7ad9ae1a8c Correct test to sync to PR85 and add test to show problem in v8:12977
https://github.com/tc39/proposal-intl-numberformat-v3/pull/85

Also add test to show the problem while using numberingSystem with formatRange


Bug: v8:12977, v8:10776
Change-Id: I09845b6f04994dc84b9a21e272d39d785db3317a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3708020
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81199}
2022-06-15 21:54:42 +00:00

17 lines
657 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-number-format-v3
let validRoundingIncrements = [
1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000];
let maximumFractionDigits = 3;
let minimumFractionDigits = maximumFractionDigits;
validRoundingIncrements.forEach(function(roundingIncrement) {
let nf = new Intl.NumberFormat(undefined,
{roundingIncrement, minimumFractionDigits, maximumFractionDigits});
assertEquals(roundingIncrement, nf.resolvedOptions().roundingIncrement);
});