summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js')
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js b/js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js
deleted file mode 100644
index d75f51b14a..0000000000
--- a/js/src/tests/test262/intl402/DurationFormat/prototype/format/style-digital-fractionalDigits.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// |reftest| skip -- Intl.DurationFormat is not supported
-// Copyright (C) 2023 Igalia, S.L. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-esid: sec-partitiondurationformatpattern
-description: >
- Test to ensure that correct number of fractional digits is displayed if fractionalDigits is explicitly specified.
-
-info: |
- 4. If durationFormat.[[FractionalDigits]] is undefined, then
- a. Perform ! CreateDataPropertyOrThrow(nfOpts, "maximumFractionDigits", 9).
- b. Perform ! CreateDataPropertyOrThrow(nfOpts, "minimumFractionDigits", 0).
- 5. Else,
- a. Perform ! CreateDataPropertyOrThrow(nfOpts, "maximumFractionDigits", durationFormat.[[FractionalDigits]]).
- b. Perform ! CreateDataPropertyOrThrow(nfOpts, "minimumFractionDigits", durationFormat.[[FractionalDigits]]).
-features: [Intl.DurationFormat]
----*/
-
-const duration = {
- hours: 1,
- minutes: 22,
- seconds: 33,
- milliseconds: 111,
- microseconds: 222,
- nanoseconds: 333,
-};
-
-
-const style = "digital";
-const df = new Intl.DurationFormat(undefined, {style, fractionalDigits: 0});
-const dfMilli = new Intl.DurationFormat(undefined, {style, fractionalDigits: 3});
-const dfFourDigits = new Intl.DurationFormat(undefined, {style, fractionalDigits: 4});
-const dfMicro = new Intl.DurationFormat(undefined, {style, fractionalDigits: 6});
-const dfEightDigits = new Intl.DurationFormat(undefined, {style, fractionalDigits: 8});
-const dfNano = new Intl.DurationFormat(undefined, {style, fractionalDigits: 9});
-
-assert.sameValue(df.format(duration), "1:22:33", `format output without sub-second digits using ${style} style option`);
-
-assert.sameValue(dfMilli.format(duration), "1:22:33.111", `format output with sub-second digits and fractionalDigits: 3 using ${style} style option`);
-
-assert.sameValue(dfFourDigits.format(duration), "1:22:33.1112", `format output with sub-second digits and fractionalDigits: 4 using ${style} style option`);
-
-assert.sameValue(dfMicro.format(duration), "1:22:33.111222", `format output with sub-second digits and fractionalDigits: 6 using ${style} style option`);
-
-assert.sameValue(dfEightDigits.format(duration), "1:22:33.11122233", `format output with sub-second digits and fractionalDigits: 8 using ${style} style option`);
-
-assert.sameValue(dfNano.format(duration), "1:22:33.111222333", `format output with sub-second digits and fractionalDigits: 9 using ${style} style option`);
-
-reportCompare(0, 0);