Round epoch time getters towards negative infinity

Update tests to match <https://github.com/tc39/proposal-temporal/pull/2424>.
This commit is contained in:
André Bargull 2023-03-24 13:23:16 +01:00 committed by Ms2ger
parent f756ff63c8
commit 886656756f
6 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");