summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js')
-rw-r--r--js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js b/js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js
new file mode 100644
index 0000000000..294ba531ed
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Temporal/PlainTime/prototype/round/rounding-cross-midnight.js
@@ -0,0 +1,17 @@
+// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
+// Copyright (C) 2022 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-temporal.plaintime.prototype.round
+description: Rounding can cross midnight
+includes: [temporalHelpers.js]
+features: [Temporal]
+---*/
+
+const plainTime = Temporal.PlainTime.from("23:59:59.999999999");
+for (const smallestUnit of ["hour", "minute", "second", "millisecond", "microsecond"]) {
+ TemporalHelpers.assertPlainTime(plainTime.round({ smallestUnit }), 0, 0, 0, 0, 0, 0);
+}
+
+reportCompare(0, 0);