From bf5312b6c762807e295f8bc55d5121803b26aca6 Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Wed, 22 Apr 2020 22:21:54 -0700 Subject: [PATCH] [intl] Add failing test for v8:10437 Pick handful of failure cases from https://bugs.chromium.org/p/v8/issues/detail?id=10437 Mark the test fail The bug should be fixed by ICU67.1 and will be landed soon. Bug: v8:10437 Change-Id: Iac309dd48b2220da777c006c7a35fac24e454430 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2161510 Commit-Queue: Frank Tang Reviewed-by: Jakob Kummerow Cr-Commit-Position: refs/heads/master@{#67345} --- test/intl/intl.status | 3 +++ test/intl/regress-10437.js | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/intl/regress-10437.js diff --git a/test/intl/intl.status b/test/intl/intl.status index eeab557064..253874d04b 100644 --- a/test/intl/intl.status +++ b/test/intl/intl.status @@ -36,6 +36,9 @@ # http://crbug/v8/9930 'date-format/format_range_hour_cycle': [FAIL], + + # http://crbug/v8/10437 + 'regress-10437': [FAIL], }], # ALWAYS ['variant == no_wasm_traps', { diff --git a/test/intl/regress-10437.js b/test/intl/regress-10437.js new file mode 100644 index 0000000000..1bdd356660 --- /dev/null +++ b/test/intl/regress-10437.js @@ -0,0 +1,18 @@ +// Copyright 2020 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. + +assertDoesNotThrow(() => (new Intl.NumberFormat( + 'ar', {style: 'unit', unit: 'acre-per-degree'})).format(0)); + +assertDoesNotThrow(() => (new Intl.NumberFormat( + 'ar', {style: 'unit', unit: 'millimeter-per-mile'})).format(0)); + +assertDoesNotThrow(() => (new Intl.NumberFormat( + 'ar', {style: 'unit', unit: 'centimeter-per-acre'})).format(1)); + +assertDoesNotThrow(() => (new Intl.NumberFormat( + 'ar', {style: 'unit', unit: 'minute-per-yard'})).format(1)); + +assertDoesNotThrow(() => (new Intl.NumberFormat( + 'ar', {style: 'unit', unit: 'foot-per-fluid-ounce'})).format(2));