diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-plaindatetime.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-plaindatetime.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-plaindatetime.js b/js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-plaindatetime.js new file mode 100644 index 0000000000..920c3150ac --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-plaindatetime.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.from +description: Fast path for converting Temporal.PlainDateTime to Temporal.PlainTime by reading internal slots +includes: [compareArray.js, temporalHelpers.js] +features: [Temporal] +---*/ + +TemporalHelpers.checkPlainDateTimeConversionFastPath((plainDateTime) => { + const result = Temporal.PlainTime.from(plainDateTime); + TemporalHelpers.assertPlainTime(result, 12, 34, 56, 987, 654, 321); +}); + +reportCompare(0, 0); |