mirror of https://github.com/tc39/test262.git
Temporal: Look up time zone methods only once
This commit is contained in:
parent
c1281dba45
commit
911fe9612e
|
@ -260,9 +260,9 @@ const expectedOpsForZonedRelativeTo = expected.concat([
|
|||
"has options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"has options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"has options.relativeTo.timeZone.id",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
]);
|
||||
|
||||
|
@ -291,13 +291,10 @@ Temporal.Duration.compare(
|
|||
assert.compareArray(
|
||||
actual,
|
||||
expectedOpsForZonedRelativeTo.concat([
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDaysToZonedDateTime on first argument
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDaysToZonedDateTime on second argument
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
]),
|
||||
"order of operations with ZonedDateTime relativeTo and no calendar units except days"
|
||||
|
@ -326,17 +323,14 @@ Temporal.Duration.compare(
|
|||
assert.compareArray(
|
||||
actual,
|
||||
expectedOpsForZonedRelativeTo.concat([
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddZonedDateTime on first argument
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddZonedDateTime on second argument
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
]),
|
||||
"order of operations with ZonedDateTime relativeTo and calendar units"
|
||||
|
|
|
@ -58,17 +58,17 @@ const expected = [
|
|||
"has timeZone.getOffsetNanosecondsFor",
|
||||
"has timeZone.getPossibleInstantsFor",
|
||||
"has timeZone.id",
|
||||
// lookup
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -81,14 +81,9 @@ actual.splice(0); // clear
|
|||
relativeTo = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
Temporal.Duration.compare(duration1, duration2, {relativeTo: relativeTo});
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToRelativeTemporalObject
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToRelativeTemporalObject
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -316,27 +316,22 @@ const expectedOpsForZonedRelativeTo = expected.concat([
|
|||
"has options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"has options.relativeTo.timeZone.id",
|
||||
// InterpretISODateTimeOffset
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → AddZonedDateTime 1
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → AddZonedDateTime 2
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → DifferenceISODateTime
|
||||
"get options.relativeTo.calendar.dateUntil",
|
||||
|
@ -344,18 +339,13 @@ const expectedOpsForZonedRelativeTo = expected.concat([
|
|||
// AddDuration → DifferenceZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 1
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 2
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
|
||||
|
|
|
@ -57,17 +57,17 @@ const expected = [
|
|||
"has timeZone.getOffsetNanosecondsFor",
|
||||
"has timeZone.getPossibleInstantsFor",
|
||||
"has timeZone.id",
|
||||
// lookup
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -80,14 +80,9 @@ actual.splice(0); // clear
|
|||
relativeTo = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.add(new Temporal.Duration(0, 0, 0, 0, -24), { relativeTo });
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToRelativeTemporalObject
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToRelativeTemporalObject
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -333,10 +333,10 @@ const expectedOpsForZonedRelativeTo = [
|
|||
"has options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"has options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"has options.relativeTo.timeZone.id",
|
||||
// InterpretISODateTimeOffset
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.roundingIncrement",
|
||||
"get options.roundingIncrement.valueOf",
|
||||
|
@ -373,18 +373,13 @@ actual.splice(0); // clear
|
|||
// code path through RoundDuration that rounds to the nearest year with minimal calendar operations:
|
||||
const expectedOpsForMinimalYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// RoundDuration
|
||||
"get options.relativeTo.calendar.dateAdd", // 7.c
|
||||
|
@ -405,23 +400,17 @@ actual.splice(0); // clear
|
|||
// code path through RoundDuration that rounds to the nearest year:
|
||||
const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 8. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 9. GetPlainDateTimeFor
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.calendar.dateAdd", // 7.c
|
||||
"call options.relativeTo.calendar.dateAdd", // 7.e
|
||||
|
@ -450,14 +439,12 @@ actual.splice(0); // clear
|
|||
// BalanceDateDurationRelative
|
||||
const expectedOpsForUnbalanceRoundBalance = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// No user code calls in UnbalanceDurationRelative
|
||||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd", // 8.
|
||||
"get options.relativeTo.calendar.dateAdd", // 11.
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // 13. GetInstantFor
|
||||
// RoundDuration
|
||||
"get options.relativeTo.calendar.dateAdd", // 8.e.i
|
||||
"call options.relativeTo.calendar.dateAdd", // 8.g MoveRelativeDate
|
||||
|
|
|
@ -57,17 +57,17 @@ const expected = [
|
|||
"has timeZone.getOffsetNanosecondsFor",
|
||||
"has timeZone.getPossibleInstantsFor",
|
||||
"has timeZone.id",
|
||||
// lookup
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -80,14 +80,9 @@ actual.splice(0); // clear
|
|||
relativeTo = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.round({ largestUnit: "years", relativeTo });
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToRelativeTemporalObject
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToRelativeTemporalObject
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -316,27 +316,22 @@ const expectedOpsForZonedRelativeTo = expected.concat([
|
|||
"has options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"has options.relativeTo.timeZone.id",
|
||||
// InterpretISODateTimeOffset
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → AddZonedDateTime 1
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → AddZonedDateTime 2
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → DifferenceISODateTime
|
||||
"get options.relativeTo.calendar.dateUntil",
|
||||
|
@ -344,18 +339,13 @@ const expectedOpsForZonedRelativeTo = expected.concat([
|
|||
// AddDuration → DifferenceZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 1
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 2
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
|
||||
|
|
|
@ -57,17 +57,17 @@ const expected = [
|
|||
"has timeZone.getOffsetNanosecondsFor",
|
||||
"has timeZone.getPossibleInstantsFor",
|
||||
"has timeZone.id",
|
||||
// lookup
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -80,14 +80,9 @@ actual.splice(0); // clear
|
|||
relativeTo = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.subtract(new Temporal.Duration(0, 0, 0, 0, 24), { relativeTo });
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToRelativeTemporalObject
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToRelativeTemporalObject
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -239,10 +239,10 @@ const expectedOpsForZonedRelativeTo = [
|
|||
"has options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"has options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"has options.relativeTo.timeZone.id",
|
||||
// InterpretISODateTimeOffset
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// GetTemporalUnit
|
||||
"get options.unit",
|
||||
|
@ -274,23 +274,17 @@ actual.splice(0); // clear
|
|||
// code path through RoundDuration that rounds to the nearest year with minimal calendar operations:
|
||||
const expectedOpsForMinimalYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// BalancePossiblyInfiniteDuration → NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
// BalancePossiblyInfiniteDuration → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// BalancePossiblyInfiniteDuration → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
], [
|
||||
// code path through RoundDuration that rounds to the nearest year:
|
||||
// MoveRelativeZonedDateTime → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"get options.relativeTo.calendar.dateAdd", // 7.c
|
||||
// 7.e and 7.g not called because years, months, weeks are 0
|
||||
|
@ -310,28 +304,21 @@ actual.splice(0); // clear
|
|||
// code path through RoundDuration that rounds to the nearest year:
|
||||
const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// BalancePossiblyInfiniteTimeDurationRelative → NanosecondsToDays
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 11. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 8. GetPlainDateTimeFor
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 9. GetPlainDateTimeFor
|
||||
// BalancePossiblyInfiniteTimeDurationRelative → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// BalancePossiblyInfiniteTimeDurationRelative → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd",
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
// RoundDuration
|
||||
"get options.relativeTo.calendar.dateAdd", // 7.c
|
||||
|
@ -353,19 +340,16 @@ actual.splice(0); // clear
|
|||
// code path that hits UnbalanceDateDurationRelative and RoundDuration
|
||||
const expectedOpsForUnbalanceRound = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// No user code calls in UnbalanceDateDurationRelative
|
||||
// MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd", // 8.
|
||||
"get options.relativeTo.calendar.dateAdd", // 11.
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // 13. GetInstantFor
|
||||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.calendar.dateAdd", // 8.
|
||||
"get options.relativeTo.calendar.dateAdd", // 11.
|
||||
"call options.relativeTo.calendar.dateAdd",
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // 13. GetInstantFor
|
||||
// RoundDuration
|
||||
"get options.relativeTo.calendar.dateAdd", // 7.d.i
|
||||
"call options.relativeTo.calendar.dateAdd", // 7.f
|
||||
|
@ -383,24 +367,17 @@ actual.splice(0); // clear
|
|||
// code path that avoids converting Zoned twice in BalanceTimeDurationRelative
|
||||
const expectedOpsForBalanceRound = expectedOpsForZonedRelativeTo.concat([
|
||||
// ToTemporalDate
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
// No user code calls in UnbalanceDateDurationRelative
|
||||
// No user code calls in AddZonedDateTime (years, months, weeks = 0)
|
||||
// BalanceTimeDurationRelative
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 4.a
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // 4.b
|
||||
"get options.relativeTo.timeZone.getOffsetNanosecondsFor",
|
||||
"call options.relativeTo.timeZone.getOffsetNanosecondsFor", // NanosecondsToDays 9
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // NanosecondsToDays 26
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // NanosecondsToDays 31.a
|
||||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor",
|
||||
"call options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor
|
||||
// RoundDuration
|
||||
"get options.relativeTo.calendar.dateAdd", // 10.d.i
|
||||
"call options.relativeTo.calendar.dateAdd", // 10.f
|
||||
|
|
|
@ -57,17 +57,17 @@ const expected = [
|
|||
"has timeZone.getOffsetNanosecondsFor",
|
||||
"has timeZone.getPossibleInstantsFor",
|
||||
"has timeZone.id",
|
||||
// lookup
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -80,14 +80,9 @@ actual.splice(0); // clear
|
|||
relativeTo = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.total({ unit: "days", relativeTo });
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToRelativeTemporalObject
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToRelativeTemporalObject
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -89,7 +89,6 @@ assert.compareArray(actual, expected.concat([
|
|||
"get item.timeZone.getOffsetNanosecondsFor",
|
||||
"call item.timeZone.getOffsetNanosecondsFor",
|
||||
"call item.timeZone.getOffsetNanosecondsFor",
|
||||
"get item.timeZone.getPossibleInstantsFor",
|
||||
"call item.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -51,7 +51,6 @@ assert.compareArray(actual, expected.concat([
|
|||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -110,7 +110,6 @@ assert.compareArray(actual, expected.concat([
|
|||
"get item.timeZone.getOffsetNanosecondsFor",
|
||||
"call item.timeZone.getOffsetNanosecondsFor",
|
||||
"call item.timeZone.getOffsetNanosecondsFor",
|
||||
"get item.timeZone.getPossibleInstantsFor",
|
||||
"call item.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -57,6 +57,10 @@ const expectedOne = [
|
|||
// InterpretTemporalDateTimeFields
|
||||
"get one.calendar.dateFromFields",
|
||||
"call one.calendar.dateFromFields",
|
||||
// lookup
|
||||
"get one.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call one.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedTwo = [
|
||||
|
@ -92,6 +96,10 @@ const expectedTwo = [
|
|||
// InterpretTemporalDateTimeFields
|
||||
"get two.calendar.dateFromFields",
|
||||
"call two.calendar.dateFromFields",
|
||||
// lookup
|
||||
"get two.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call two.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
Temporal.ZonedDateTime.compare(
|
||||
|
@ -100,24 +108,16 @@ Temporal.ZonedDateTime.compare(
|
|||
);
|
||||
|
||||
const expectedSpringForward = expectedOne.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get one.timeZone.getPossibleInstantsFor",
|
||||
"call one.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get one.timeZone.getOffsetNanosecondsFor",
|
||||
"call one.timeZone.getOffsetNanosecondsFor",
|
||||
"call one.timeZone.getOffsetNanosecondsFor",
|
||||
"get one.timeZone.getPossibleInstantsFor",
|
||||
"call one.timeZone.getPossibleInstantsFor",
|
||||
], expectedTwo, [
|
||||
// InterpretISODateTimeOffset
|
||||
"get two.timeZone.getPossibleInstantsFor",
|
||||
"call two.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get two.timeZone.getOffsetNanosecondsFor",
|
||||
"call two.timeZone.getOffsetNanosecondsFor",
|
||||
"call two.timeZone.getOffsetNanosecondsFor",
|
||||
"get two.timeZone.getPossibleInstantsFor",
|
||||
"call two.timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(actual, expectedSpringForward, "order of operations converting property bags at skipped wall-clock time");
|
||||
|
@ -128,14 +128,6 @@ Temporal.ZonedDateTime.compare(
|
|||
{ year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: timeZone2, calendar: calendar2 },
|
||||
);
|
||||
|
||||
const expectedFallBack = expectedOne.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get one.timeZone.getPossibleInstantsFor",
|
||||
"call one.timeZone.getPossibleInstantsFor",
|
||||
], expectedTwo, [
|
||||
// InterpretISODateTimeOffset
|
||||
"get two.timeZone.getPossibleInstantsFor",
|
||||
"call two.timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
const expectedFallBack = expectedOne.concat(expectedTwo);
|
||||
assert.compareArray(actual, expectedFallBack, "order of operations converting property bags at repeated wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -66,14 +66,14 @@ Temporal.ZonedDateTime.from(
|
|||
{ offset: "ignore" }
|
||||
);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations converting property bag at skipped wall-clock time with offset: ignore");
|
||||
actual.splice(0); // clear
|
||||
|
@ -83,14 +83,14 @@ Temporal.ZonedDateTime.from(
|
|||
{ offset: "prefer" }
|
||||
);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations converting property bag at skipped wall-clock time with offset: prefer");
|
||||
actual.splice(0); // clear
|
||||
|
@ -107,8 +107,9 @@ Temporal.ZonedDateTime.from(
|
|||
{ offset: "ignore" }
|
||||
);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations converting property bag at repeated wall-clock time with offset: ignore");
|
||||
actual.splice(0); // clear
|
||||
|
@ -118,8 +119,9 @@ Temporal.ZonedDateTime.from(
|
|||
{ offset: "prefer" }
|
||||
);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
|
@ -132,8 +134,9 @@ Temporal.ZonedDateTime.from(
|
|||
{ offset: "reject" }
|
||||
);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
|
|
|
@ -40,8 +40,10 @@ const expected = [
|
|||
"get duration.years",
|
||||
"get duration.years.valueOf",
|
||||
"call duration.years.valueOf",
|
||||
// AddZonedDateTime
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// AddZonedDateTime
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
|
@ -50,7 +52,6 @@ const expected = [
|
|||
"get options.overflow.toString",
|
||||
"call options.overflow.toString",
|
||||
// AddZonedDateTime again
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
const actual = [];
|
||||
|
|
|
@ -58,17 +58,17 @@ const expected = [
|
|||
// InterpretTemporalDateTimeFields
|
||||
"get calendar.dateFromFields",
|
||||
"call calendar.dateFromFields",
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -81,14 +81,9 @@ actual.splice(0); // clear
|
|||
arg = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.equals(arg);
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -10,14 +10,14 @@ features: [Temporal]
|
|||
|
||||
const actual = [];
|
||||
const expected = [
|
||||
// GetPlainDateTimeFor
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
@ -82,28 +82,24 @@ actual.splice(0); // clear
|
|||
|
||||
springForwardInstance.hoursInDay;
|
||||
assert.compareArray(actual, [
|
||||
// GetPlainDateTimeFor
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// Note, no call to dateAdd as addition takes place in the ISO calendar
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// Note, no call to dateAdd here either
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
], "order of operations with both midnights at skipped wall-clock times");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -18,19 +18,17 @@ const expected = [
|
|||
"get options.smallestUnit",
|
||||
"get options.smallestUnit.toString",
|
||||
"call options.smallestUnit.toString",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor on preceding midnight
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
];
|
||||
const actual = [];
|
||||
|
@ -95,25 +93,21 @@ const expectedSkippedDateTime = [
|
|||
"get options.smallestUnit",
|
||||
"get options.smallestUnit.toString",
|
||||
"call options.smallestUnit.toString",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor on preceding midnight
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// AddZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
];
|
||||
|
||||
|
@ -131,29 +125,24 @@ const expectedSkippedResult = [
|
|||
"get options.smallestUnit",
|
||||
"get options.smallestUnit.toString",
|
||||
"call options.smallestUnit.toString",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor on receiver's instant
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor on preceding midnight
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
|
|
@ -58,17 +58,17 @@ const expected = [
|
|||
// InterpretTemporalDateTimeFields
|
||||
"get calendar.dateFromFields",
|
||||
"call calendar.dateFromFields",
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -81,14 +81,9 @@ actual.splice(0); // clear
|
|||
arg = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.since(arg);
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -297,18 +297,16 @@ assert.compareArray(actual, [
|
|||
// TimeZoneEquals
|
||||
"get this.timeZone.id",
|
||||
"get other.timeZone.id",
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// DifferenceZonedDateTime
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
], "order of operations with identical wall-clock times and largestUnit a calendar unit");
|
||||
actual.splice(0); // clear
|
||||
|
@ -318,11 +316,12 @@ const expectedOpsForCalendarDifference = [
|
|||
// TimeZoneEquals
|
||||
"get this.timeZone.id",
|
||||
"get other.timeZone.id",
|
||||
// precalculate PlainDateTime
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// precalculate PlainDateTime
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// DifferenceZonedDateTime
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// DifferenceISODateTime
|
||||
"get this.calendar.dateUntil",
|
||||
|
@ -330,17 +329,12 @@ const expectedOpsForCalendarDifference = [
|
|||
// AddZonedDateTime
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
@ -348,15 +342,11 @@ const expectedOpsForCalendarRounding = [
|
|||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// RoundDuration → NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// RoundDuration → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
|
|
@ -9,11 +9,12 @@ features: [Temporal]
|
|||
---*/
|
||||
|
||||
const expected = [
|
||||
// GetPlainDateTimeFor
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor on preceding midnight
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
const actual = [];
|
||||
|
@ -58,10 +59,8 @@ actual.splice(0); // clear
|
|||
springForwardInstance.startOfDay();
|
||||
assert.compareArray(actual, expected.concat([
|
||||
// DisambiguatePossibleInstants
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations with preceding midnight at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -40,8 +40,10 @@ const expected = [
|
|||
"get duration.years",
|
||||
"get duration.years.valueOf",
|
||||
"call duration.years.valueOf",
|
||||
// AddZonedDateTime
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// AddZonedDateTime
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
|
@ -50,7 +52,6 @@ const expected = [
|
|||
"get options.overflow.toString",
|
||||
"call options.overflow.toString",
|
||||
// AddZonedDateTime again
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
const actual = [];
|
||||
|
|
|
@ -58,17 +58,17 @@ const expected = [
|
|||
// InterpretTemporalDateTimeFields
|
||||
"get calendar.dateFromFields",
|
||||
"call calendar.dateFromFields",
|
||||
// lookup
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
// InterpretISODateTimeOffset
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
const expectedSpringForward = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
// DisambiguatePossibleInstants
|
||||
"get timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"call timeZone.getOffsetNanosecondsFor",
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
|
@ -81,14 +81,9 @@ actual.splice(0); // clear
|
|||
arg = { year: 2000, month: 10, day: 29, hour: 1, minute: 30, timeZone: dstTimeZoneObserver, calendar };
|
||||
instance.until(arg);
|
||||
|
||||
const expectedFallBack = expected.concat([
|
||||
// InterpretISODateTimeOffset
|
||||
"get timeZone.getPossibleInstantsFor",
|
||||
"call timeZone.getPossibleInstantsFor",
|
||||
]);
|
||||
assert.compareArray(
|
||||
actual.slice(0, expectedFallBack.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expectedFallBack,
|
||||
actual.slice(0, expected.length), // ignore operations after ToTemporalZonedDateTime
|
||||
expected,
|
||||
"order of operations converting property bag at repeated wall-clock time"
|
||||
);
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -297,18 +297,16 @@ assert.compareArray(actual, [
|
|||
// TimeZoneEquals
|
||||
"get this.timeZone.id",
|
||||
"get other.timeZone.id",
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// DifferenceZonedDateTime
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
], "order of operations with identical wall-clock times and largestUnit a calendar unit");
|
||||
actual.splice(0); // clear
|
||||
|
@ -318,11 +316,12 @@ const expectedOpsForCalendarDifference = [
|
|||
// TimeZoneEquals
|
||||
"get this.timeZone.id",
|
||||
"get other.timeZone.id",
|
||||
// precalculate PlainDateTime
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// precalculate PlainDateTime
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// DifferenceZonedDateTime
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// DifferenceISODateTime
|
||||
"get this.calendar.dateUntil",
|
||||
|
@ -330,17 +329,12 @@ const expectedOpsForCalendarDifference = [
|
|||
// AddZonedDateTime
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
@ -348,15 +342,11 @@ const expectedOpsForCalendarRounding = [
|
|||
// RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime
|
||||
"get this.calendar.dateAdd",
|
||||
"call this.calendar.dateAdd",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
// RoundDuration → NanosecondsToDays
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// RoundDuration → NanosecondsToDays → AddDaysToZonedDateTime
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
|
|
@ -22,8 +22,10 @@ const expected = [
|
|||
"get options.offset",
|
||||
"getOwnPropertyDescriptor options.extra",
|
||||
"get options.extra",
|
||||
// GetOffsetNanosecondsFor on receiver
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetOffsetNanosecondsFor on receiver
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// CalendarFields
|
||||
"get this.calendar.fields",
|
||||
|
@ -84,9 +86,7 @@ const expected = [
|
|||
"get this.calendar.dateFromFields",
|
||||
"call this.calendar.dateFromFields",
|
||||
// InterpretISODateTimeOffset
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
];
|
||||
const actual = [];
|
||||
|
@ -168,7 +168,6 @@ dstInstance.with(springForwardFields, options);
|
|||
assert.compareArray(actual, expected.concat([
|
||||
// DisambiguatePossibleInstants
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -49,14 +49,15 @@ const expected = [
|
|||
"call plainDateLike.year.valueOf",
|
||||
"get plainDateLike.calendar.dateFromFields",
|
||||
"call plainDateLike.calendar.dateFromFields",
|
||||
// GetPlainDateTimeFor
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// ConsolidateCalendars
|
||||
"get this.calendar.id",
|
||||
"get plainDateLike.calendar.id",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
@ -103,10 +104,8 @@ const springForwardPlainDateLike = TemporalHelpers.propertyBagObserver(actual, {
|
|||
}, "plainDateLike");
|
||||
instance.withPlainDate(springForwardPlainDateLike);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
|
@ -29,11 +29,12 @@ const expected = [
|
|||
"get plainTimeLike.second",
|
||||
"get plainTimeLike.second.valueOf",
|
||||
"call plainTimeLike.second.valueOf",
|
||||
// GetPlainDateTimeFor
|
||||
// lookup
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
// GetPlainDateTimeFor
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
// GetInstantFor
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
];
|
||||
|
||||
|
@ -77,10 +78,8 @@ actual.splice(0); // clear
|
|||
|
||||
springForwardInstance.withPlainTime(plainTimeLike);
|
||||
assert.compareArray(actual, expected.concat([
|
||||
"get this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"call this.timeZone.getOffsetNanosecondsFor",
|
||||
"get this.timeZone.getPossibleInstantsFor",
|
||||
"call this.timeZone.getPossibleInstantsFor",
|
||||
]), "order of operations at skipped wall-clock time");
|
||||
actual.splice(0); // clear
|
||||
|
|
Loading…
Reference in New Issue