From 666d62a27f8aa1e4c4bda69c5be10dd6726de020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Thu, 25 Nov 2021 05:19:09 -0800 Subject: [PATCH] Correct negative-zero sign display tests The negative sign is computed after rounding, so when the input `-0.0001` is rounded to `-0`, the expected result should be `"0"` instead of `"-0"`. --- .../prototype/format/signDisplay-negative-currency-de-DE.js | 2 +- .../prototype/format/signDisplay-negative-currency-en-US.js | 2 +- .../prototype/format/signDisplay-negative-currency-ja-JP.js | 2 +- .../prototype/format/signDisplay-negative-currency-ko-KR.js | 2 +- .../prototype/format/signDisplay-negative-currency-zh-TW.js | 4 ++-- .../prototype/format/signDisplay-negative-de-DE.js | 2 +- .../prototype/format/signDisplay-negative-en-US.js | 2 +- .../prototype/format/signDisplay-negative-ja-JP.js | 2 +- .../prototype/format/signDisplay-negative-ko-KR.js | 2 +- .../prototype/format/signDisplay-negative-zh-TW.js | 2 +- .../formatToParts/signDisplay-negative-currency-de-DE.js | 2 +- .../formatToParts/signDisplay-negative-currency-en-US.js | 2 +- .../formatToParts/signDisplay-negative-currency-ja-JP.js | 2 +- .../formatToParts/signDisplay-negative-currency-ko-KR.js | 2 +- .../formatToParts/signDisplay-negative-currency-zh-TW.js | 2 +- .../prototype/formatToParts/signDisplay-negative-de-DE.js | 3 ++- .../prototype/formatToParts/signDisplay-negative-en-US.js | 3 ++- .../prototype/formatToParts/signDisplay-negative-ja-JP.js | 3 ++- .../prototype/formatToParts/signDisplay-negative-ko-KR.js | 3 ++- .../prototype/formatToParts/signDisplay-negative-zh-TW.js | 3 ++- 20 files changed, 26 insertions(+), 21 deletions(-) diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-de-DE.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-de-DE.js index f63da27066..9572dfd444 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-de-DE.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-de-DE.js @@ -10,7 +10,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("de-DE", { style: "currency", currency: "USD", currencySign: "accounting", signDisplay: "negative" }); assert.sameValue(nf.format(-987), "-987,00 $"); -assert.sameValue(nf.format(-0.0001), "-0,00 $"); +assert.sameValue(nf.format(-0.0001), "0,00 $"); assert.sameValue(nf.format(-0), "0,00 $"); assert.sameValue(nf.format(0), "0,00 $"); assert.sameValue(nf.format(0.0001), "0,00 $"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-en-US.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-en-US.js index c8e889c8aa..30420f2f3b 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-en-US.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-en-US.js @@ -10,7 +10,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", currencySign: "accounting", signDisplay: "negative" }); assert.sameValue(nf.format(-987), "($987.00)"); -assert.sameValue(nf.format(-0.0001), "($0.00)"); +assert.sameValue(nf.format(-0.0001), "$0.00"); assert.sameValue(nf.format(-0), "$0.00"); assert.sameValue(nf.format(0), "$0.00"); assert.sameValue(nf.format(0.0001), "$0.00"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ja-JP.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ja-JP.js index f7d2a3a6cc..a4b415a6d7 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ja-JP.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ja-JP.js @@ -10,7 +10,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("ja-JP", { style: "currency", currency: "USD", currencySign: "accounting", signDisplay: "negative" }); assert.sameValue(nf.format(-987), "($987.00)"); -assert.sameValue(nf.format(-0.0001), "($0.00)"); +assert.sameValue(nf.format(-0.0001), "$0.00"); assert.sameValue(nf.format(-0), "$0.00"); assert.sameValue(nf.format(0), "$0.00"); assert.sameValue(nf.format(0.0001), "$0.00"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ko-KR.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ko-KR.js index 173b7ae593..39a4c093c5 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ko-KR.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ko-KR.js @@ -10,7 +10,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("ko-KR", { style: "currency", currency: "USD", currencySign: "accounting", signDisplay: "negative" }); assert.sameValue(nf.format(-987), "(US$987.00)"); -assert.sameValue(nf.format(-0.0001), "(US$0.00)"); +assert.sameValue(nf.format(-0.0001), "US$0.00"); assert.sameValue(nf.format(-0), "US$0.00"); assert.sameValue(nf.format(0), "US$0.00"); assert.sameValue(nf.format(0.0001), "US$0.00"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-zh-TW.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-zh-TW.js index bd50c29649..44c01fe4da 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-zh-TW.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-currency-zh-TW.js @@ -10,8 +10,8 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("zh-TW", { style: "currency", currency: "USD", currencySign: "accounting", signDisplay: "negative" }); assert.sameValue(nf.format(-987), "(US$987.00)"); -assert.sameValue(nf.format(-0.0001), "(US$0.00)"); +assert.sameValue(nf.format(-0.0001), "US$0.00"); assert.sameValue(nf.format(-0), "US$0.00"); assert.sameValue(nf.format(0), "US$0.00"); assert.sameValue(nf.format(0.0001), "US$0.00"); -assert.sameValue(nf.format(987), "US$0.00"); +assert.sameValue(nf.format(987), "US$987.00"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-de-DE.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-de-DE.js index 913c5b6d64..565f8c484e 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-de-DE.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-de-DE.js @@ -11,7 +11,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("de-DE", {signDisplay: "negative"}); assert.sameValue(nf.format(-Infinity), "-∞", "-Infinity"); assert.sameValue(nf.format(-987), "-987", "-987"); -assert.sameValue(nf.format(-0.0001), "-0", "-0.0001"); +assert.sameValue(nf.format(-0.0001), "0", "-0.0001"); assert.sameValue(nf.format(-0), "0", "-0"); assert.sameValue(nf.format(0), "0", "0"); assert.sameValue(nf.format(0.0001), "0", "0.0001"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-en-US.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-en-US.js index a4c21bc014..684e5c291c 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-en-US.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-en-US.js @@ -11,7 +11,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("en-US", {signDisplay: "negative"}); assert.sameValue(nf.format(-Infinity), "-∞", "-Infinity"); assert.sameValue(nf.format(-987), "-987", "-987"); -assert.sameValue(nf.format(-0.0001), "-0", "-0.0001"); +assert.sameValue(nf.format(-0.0001), "0", "-0.0001"); assert.sameValue(nf.format(-0), "0", "-0"); assert.sameValue(nf.format(0), "0", "0"); assert.sameValue(nf.format(0.0001), "0", "0.0001"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ja-JP.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ja-JP.js index 9eeedcf522..315bb76bac 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ja-JP.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ja-JP.js @@ -11,7 +11,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("ja-JP", {signDisplay: "negative"}); assert.sameValue(nf.format(-Infinity), "-∞", "-Infinity"); assert.sameValue(nf.format(-987), "-987", "-987"); -assert.sameValue(nf.format(-0.0001), "-0", "-0.0001"); +assert.sameValue(nf.format(-0.0001), "0", "-0.0001"); assert.sameValue(nf.format(-0), "0", "-0"); assert.sameValue(nf.format(0), "0", "0"); assert.sameValue(nf.format(0.0001), "0", "0.0001"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ko-KR.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ko-KR.js index 1a48e0959f..975f51eb66 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ko-KR.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-ko-KR.js @@ -11,7 +11,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("ko-KR", {signDisplay: "negative"}); assert.sameValue(nf.format(-Infinity), "-∞", "-Infinity"); assert.sameValue(nf.format(-987), "-987", "-987"); -assert.sameValue(nf.format(-0.0001), "-0", "-0.0001"); +assert.sameValue(nf.format(-0.0001), "0", "-0.0001"); assert.sameValue(nf.format(-0), "0", "-0"); assert.sameValue(nf.format(0), "0", "0"); assert.sameValue(nf.format(0.0001), "0", "0.0001"); diff --git a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-zh-TW.js b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-zh-TW.js index f368d7bd0e..068550a343 100644 --- a/test/intl402/NumberFormat/prototype/format/signDisplay-negative-zh-TW.js +++ b/test/intl402/NumberFormat/prototype/format/signDisplay-negative-zh-TW.js @@ -11,7 +11,7 @@ features: [Intl.NumberFormat-v3] const nf = new Intl.NumberFormat("zh-TW", {signDisplay: "negative"}); assert.sameValue(nf.format(-Infinity), "-∞", "-Infinity"); assert.sameValue(nf.format(-987), "-987", "-987"); -assert.sameValue(nf.format(-0.0001), "-0", "-0.0001"); +assert.sameValue(nf.format(-0.0001), "0", "-0.0001"); assert.sameValue(nf.format(-0), "0", "-0"); assert.sameValue(nf.format(0), "0", "0"); assert.sameValue(nf.format(0.0001), "0", "0.0001"); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-de-DE.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-de-DE.js index 554390cc98..797d72d684 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-de-DE.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-de-DE.js @@ -28,7 +28,7 @@ verifyFormatParts( ); verifyFormatParts( nf.formatToParts(-0.0001), - [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"},{"type":"decimal","value":","},{"type":"fraction","value":"00"},{"type":"literal","value":" "},{"type":"currency","value":"$"}], + [{"type":"integer","value":"0"},{"type":"decimal","value":","},{"type":"fraction","value":"00"},{"type":"literal","value":" "},{"type":"currency","value":"$"}], "negativeNearZero" ); verifyFormatParts( diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-en-US.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-en-US.js index b90bfb5471..a7a4e3a06f 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-en-US.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-en-US.js @@ -28,7 +28,7 @@ verifyFormatParts( ); verifyFormatParts( nf.formatToParts(-0.0001), - [{"type":"literal","value":"("},{"type":"currency","value":"$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"},{"type":"literal","value":")"}], + [{"type":"currency","value":"$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"}], "negativeNearZero" ); verifyFormatParts( diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ja-JP.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ja-JP.js index 986a7e70bf..e7060acef8 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ja-JP.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ja-JP.js @@ -28,7 +28,7 @@ verifyFormatParts( ); verifyFormatParts( nf.formatToParts(-0.0001), - [{"type":"literal","value":"("},{"type":"currency","value":"$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"},{"type":"literal","value":")"}], + [{"type":"currency","value":"$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"}], "negativeNearZero" ); verifyFormatParts( diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ko-KR.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ko-KR.js index 4c8fef8a13..a2154bd677 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ko-KR.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ko-KR.js @@ -28,7 +28,7 @@ verifyFormatParts( ); verifyFormatParts( nf.formatToParts(-0.0001), - [{"type":"literal","value":"("},{"type":"currency","value":"US$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"},{"type":"literal","value":")"}], + [{"type":"currency","value":"US$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"}], "negativeNearZero" ); verifyFormatParts( diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-zh-TW.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-zh-TW.js index 4f29126973..20d7996589 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-zh-TW.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-zh-TW.js @@ -28,7 +28,7 @@ verifyFormatParts( ); verifyFormatParts( nf.formatToParts(-0.0001), - [{"type":"literal","value":"("},{"type":"currency","value":"US$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"},{"type":"literal","value":")"}], + [{"type":"currency","value":"US$"},{"type":"integer","value":"0"},{"type":"decimal","value":"."},{"type":"fraction","value":"00"}], "negativeNearZero" ); verifyFormatParts( diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-de-DE.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-de-DE.js index 2041a4cc4b..801f5a13ab 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-de-DE.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-de-DE.js @@ -19,11 +19,12 @@ function verifyFormatParts(actual, expected, message) { } } +const signDisplay = "negative"; const nf = new Intl.NumberFormat("de-DE", {signDisplay: "negative"}); verifyFormatParts(nf.formatToParts(-Infinity), [{"type":"minusSign","value":"-"},{"type":"infinity","value":"∞"}], `-Infinity (${signDisplay})`); verifyFormatParts(nf.formatToParts(-987), [{"type":"minusSign","value":"-"},{"type":"integer","value":"987"}], `-987 (${signDisplay})`); -verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); +verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); verifyFormatParts(nf.formatToParts(-0), [{"type":"integer","value":"0"}], `-0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0), [{"type":"integer","value":"0"}], `0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0.0001), [{"type":"integer","value":"0"}], `0.0001 (${signDisplay})`); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-en-US.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-en-US.js index cd1d599c27..4fa6772d64 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-en-US.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-en-US.js @@ -19,11 +19,12 @@ function verifyFormatParts(actual, expected, message) { } } +const signDisplay = "negative"; const nf = new Intl.NumberFormat("en-US", {signDisplay: "negative"}); verifyFormatParts(nf.formatToParts(-Infinity), [{"type":"minusSign","value":"-"},{"type":"infinity","value":"∞"}], `-Infinity (${signDisplay})`); verifyFormatParts(nf.formatToParts(-987), [{"type":"minusSign","value":"-"},{"type":"integer","value":"987"}], `-987 (${signDisplay})`); -verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); +verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); verifyFormatParts(nf.formatToParts(-0), [{"type":"integer","value":"0"}], `-0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0), [{"type":"integer","value":"0"}], `0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0.0001), [{"type":"integer","value":"0"}], `0.0001 (${signDisplay})`); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ja-JP.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ja-JP.js index 3a462c6ee8..1b8eeb4def 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ja-JP.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ja-JP.js @@ -19,11 +19,12 @@ function verifyFormatParts(actual, expected, message) { } } +const signDisplay = "negative"; const nf = new Intl.NumberFormat("ja-JP", {signDisplay: "negative"}); verifyFormatParts(nf.formatToParts(-Infinity), [{"type":"minusSign","value":"-"},{"type":"infinity","value":"∞"}], `-Infinity (${signDisplay})`); verifyFormatParts(nf.formatToParts(-987), [{"type":"minusSign","value":"-"},{"type":"integer","value":"987"}], `-987 (${signDisplay})`); -verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); +verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); verifyFormatParts(nf.formatToParts(-0), [{"type":"integer","value":"0"}], `-0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0), [{"type":"integer","value":"0"}], `0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0.0001), [{"type":"integer","value":"0"}], `0.0001 (${signDisplay})`); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ko-KR.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ko-KR.js index 7836b9362a..23d5e567bb 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ko-KR.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ko-KR.js @@ -19,11 +19,12 @@ function verifyFormatParts(actual, expected, message) { } } +const signDisplay = "negative"; const nf = new Intl.NumberFormat("ko-KR", {signDisplay: "negative"}); verifyFormatParts(nf.formatToParts(-Infinity), [{"type":"minusSign","value":"-"},{"type":"infinity","value":"∞"}], `-Infinity (${signDisplay})`); verifyFormatParts(nf.formatToParts(-987), [{"type":"minusSign","value":"-"},{"type":"integer","value":"987"}], `-987 (${signDisplay})`); -verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); +verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); verifyFormatParts(nf.formatToParts(-0), [{"type":"integer","value":"0"}], `-0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0), [{"type":"integer","value":"0"}], `0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0.0001), [{"type":"integer","value":"0"}], `0.0001 (${signDisplay})`); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-zh-TW.js b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-zh-TW.js index 8563a21a14..cf8187762a 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-zh-TW.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-zh-TW.js @@ -19,11 +19,12 @@ function verifyFormatParts(actual, expected, message) { } } +const signDisplay = "negative"; const nf = new Intl.NumberFormat("zh-TW", {signDisplay: "negative"}); verifyFormatParts(nf.formatToParts(-Infinity), [{"type":"minusSign","value":"-"},{"type":"infinity","value":"∞"}], `-Infinity (${signDisplay})`); verifyFormatParts(nf.formatToParts(-987), [{"type":"minusSign","value":"-"},{"type":"integer","value":"987"}], `-987 (${signDisplay})`); -verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"minusSign","value":"-"},{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); +verifyFormatParts(nf.formatToParts(-0.0001), [{"type":"integer","value":"0"}], `-0.0001 (${signDisplay})`); verifyFormatParts(nf.formatToParts(-0), [{"type":"integer","value":"0"}], `-0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0), [{"type":"integer","value":"0"}], `0 (${signDisplay})`); verifyFormatParts(nf.formatToParts(0.0001), [{"type":"integer","value":"0"}], `0.0001 (${signDisplay})`);