From 1e6409a2d6ed482c9ca8ebdd563cb6d86346303d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Fri, 24 Mar 2023 13:23:16 +0100 Subject: [PATCH] Round epoch time getters towards negative infinity Update tests to match . --- .../Temporal/Instant/prototype/epochMicroseconds/basic.js | 2 +- .../Temporal/Instant/prototype/epochMilliseconds/basic.js | 2 +- test/built-ins/Temporal/Instant/prototype/epochSeconds/basic.js | 2 +- .../Temporal/ZonedDateTime/prototype/epochMicroseconds/basic.js | 2 +- .../Temporal/ZonedDateTime/prototype/epochMilliseconds/basic.js | 2 +- .../Temporal/ZonedDateTime/prototype/epochSeconds/basic.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/basic.js b/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/basic.js index ca4a582ab60..48b2dff6ee5 100644 --- a/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/basic.js +++ b/test/built-ins/Temporal/Instant/prototype/epochMicroseconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochMicroseconds, 217175010_123_456n, "epochMicrose assert.sameValue(typeof afterEpoch.epochMicroseconds, "bigint", "epochMicroseconds value is a bigint"); const beforeEpoch = new Temporal.Instant(-217175010_876_543_211n); -assert.sameValue(beforeEpoch.epochMicroseconds, -217175010_876_543n, "epochMicroseconds pre epoch"); +assert.sameValue(beforeEpoch.epochMicroseconds, -217175010_876_544n, "epochMicroseconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochMicroseconds, "bigint", "epochMicroseconds value is a bigint"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/basic.js b/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/basic.js index 418a5a95e4a..e71d5ea34c3 100644 --- a/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/basic.js +++ b/test/built-ins/Temporal/Instant/prototype/epochMilliseconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochMilliseconds, 217175010_123, "epochMilliseconds assert.sameValue(typeof afterEpoch.epochMilliseconds, "number", "epochMilliseconds value is a number"); const beforeEpoch = new Temporal.Instant(-217175010_876_543_211n); -assert.sameValue(beforeEpoch.epochMilliseconds, -217175010_876, "epochMilliseconds pre epoch"); +assert.sameValue(beforeEpoch.epochMilliseconds, -217175010_877, "epochMilliseconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochMilliseconds, "number", "epochMilliseconds value is a number"); diff --git a/test/built-ins/Temporal/Instant/prototype/epochSeconds/basic.js b/test/built-ins/Temporal/Instant/prototype/epochSeconds/basic.js index 7c3e8ab7987..404b01c5581 100644 --- a/test/built-ins/Temporal/Instant/prototype/epochSeconds/basic.js +++ b/test/built-ins/Temporal/Instant/prototype/epochSeconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochSeconds, 217175010, "epochSeconds post epoch"); assert.sameValue(typeof afterEpoch.epochSeconds, "number", "epochSeconds value is a number"); const beforeEpoch = new Temporal.Instant(-217175010_876_543_211n); -assert.sameValue(beforeEpoch.epochSeconds, -217175010, "epochSeconds pre epoch"); +assert.sameValue(beforeEpoch.epochSeconds, -217175011, "epochSeconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochSeconds, "number", "epochSeconds value is a number"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/basic.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/basic.js index 2c31cef34a2..33844e45f4b 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/basic.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMicroseconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochMicroseconds, 217175010_123_456n, "epochMicrose assert.sameValue(typeof afterEpoch.epochMicroseconds, "bigint", "epochMicroseconds value is a bigint"); const beforeEpoch = new Temporal.ZonedDateTime(-217175010_876_543_211n, "UTC"); -assert.sameValue(beforeEpoch.epochMicroseconds, -217175010_876_543n, "epochMicroseconds pre epoch"); +assert.sameValue(beforeEpoch.epochMicroseconds, -217175010_876_544n, "epochMicroseconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochMicroseconds, "bigint", "epochMicroseconds value is a bigint"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/basic.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/basic.js index 2208a5cb8ce..9fc2b0e316b 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/basic.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochMilliseconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochMilliseconds, 217175010_123, "epochMilliseconds assert.sameValue(typeof afterEpoch.epochMilliseconds, "number", "epochMilliseconds value is a number"); const beforeEpoch = new Temporal.ZonedDateTime(-217175010_876_543_211n, "UTC"); -assert.sameValue(beforeEpoch.epochMilliseconds, -217175010_876, "epochMilliseconds pre epoch"); +assert.sameValue(beforeEpoch.epochMilliseconds, -217175010_877, "epochMilliseconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochMilliseconds, "number", "epochMilliseconds value is a number"); diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/basic.js b/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/basic.js index 651c254f89d..7e693d15a0c 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/basic.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/epochSeconds/basic.js @@ -12,5 +12,5 @@ assert.sameValue(afterEpoch.epochSeconds, 217175010, "epochSeconds post epoch"); assert.sameValue(typeof afterEpoch.epochSeconds, "number", "epochSeconds value is a number"); const beforeEpoch = new Temporal.ZonedDateTime(-217175010_876_543_211n, "UTC"); -assert.sameValue(beforeEpoch.epochSeconds, -217175010, "epochSeconds pre epoch"); +assert.sameValue(beforeEpoch.epochSeconds, -217175011, "epochSeconds pre epoch"); assert.sameValue(typeof beforeEpoch.epochSeconds, "number", "epochSeconds value is a number");