diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-03 22:46:38 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-03 22:46:38 +0100 |
commit | fb47a873400d7a5483abc8ffdd1939f08180bd16 (patch) | |
tree | 554f3c73f58a062d2e372e871e07a1cbcbd0b040 /Userland/Libraries/LibJS | |
parent | 3c1594e9cae287cc1f5de6a047e08126398fe222 (diff) | |
download | serenity-fb47a873400d7a5483abc8ffdd1939f08180bd16.zip |
LibJS: Add previously skipped assertion in RegulateTime
The spec issue preventing us from doing this in the past has long been
fixed.
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp index 4715e0330b..a25e5583a1 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp @@ -160,8 +160,7 @@ ThrowCompletionOr<TemporalTime> regulate_time(GlobalObject& global_object, doubl auto& vm = global_object.vm(); // 1. Assert: hour, minute, second, millisecond, microsecond and nanosecond are integers. - // NOTE: As the spec is currently written this assertion can fail, these are either integers _or_ infinity. - // See https://github.com/tc39/proposal-temporal/issues/1672. + VERIFY(trunc(hour) == hour && trunc(minute) == minute && trunc(second) == second && trunc(millisecond) == millisecond && trunc(microsecond) == microsecond && trunc(nanosecond) == nanosecond); // 2. Assert: overflow is either "constrain" or "reject". // NOTE: Asserted by the VERIFY_NOT_REACHED at the end |