diff --git a/test/built-ins/Temporal/Duration/compare/order-of-operations.js b/test/built-ins/Temporal/Duration/compare/order-of-operations.js index 0a00122399..1fd253d2a2 100644 --- a/test/built-ins/Temporal/Duration/compare/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/compare/order-of-operations.js @@ -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" diff --git a/test/built-ins/Temporal/Duration/compare/relativeto-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/Duration/compare/relativeto-propertybag-ambiguous-wall-clock-time.js index 15cfaef9a6..af49b28b64 100644 --- a/test/built-ins/Temporal/Duration/compare/relativeto-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/Duration/compare/relativeto-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js index c459a25e53..c6b721dd38 100644 --- a/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js @@ -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", ]); diff --git a/test/built-ins/Temporal/Duration/prototype/add/relativeto-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/Duration/prototype/add/relativeto-propertybag-ambiguous-wall-clock-time.js index a4c7e3e2f7..7279c28efd 100644 --- a/test/built-ins/Temporal/Duration/prototype/add/relativeto-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/Duration/prototype/add/relativeto-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js index 5d7e8f3210..c4a71cf996 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-ambiguous-wall-clock-time.js index 5f232ff2c5..ce37402bc7 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js index f9cdbb5891..a16d7c6892 100644 --- a/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js @@ -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", ]); diff --git a/test/built-ins/Temporal/Duration/prototype/subtract/relativeto-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/Duration/prototype/subtract/relativeto-propertybag-ambiguous-wall-clock-time.js index ca3938dd12..32f30df171 100644 --- a/test/built-ins/Temporal/Duration/prototype/subtract/relativeto-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/Duration/prototype/subtract/relativeto-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js index 3a8ddbd129..310927578c 100644 --- a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-ambiguous-wall-clock-time.js index 1134a8ba7c..62965eaa77 100644 --- a/test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/order-of-operations.js b/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/order-of-operations.js index 093c68baf7..d74be5601b 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/order-of-operations.js b/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/order-of-operations.js index 8d024ce4a2..df24874182 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/toZonedDateTime/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/order-of-operations.js b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/order-of-operations.js index 5f2622396a..1d14a2344c 100644 --- a/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/order-of-operations.js +++ b/test/built-ins/Temporal/PlainTime/prototype/toZonedDateTime/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-ambiguous-wall-clock-time.js index dbd661ecb1..319458de03 100644 --- a/test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/ZonedDateTime/compare/argument-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-ambiguous-wall-clock-time.js index c08780dffe..81c0b04a7d 100644 --- a/test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-ambiguous-wall-clock-time.js @@ -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", diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/add/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/add/order-of-operations.js index edafee0ec3..15688034a5 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/add/order-of-operations.js @@ -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 = []; diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-ambiguous-wall-clock-time.js index 11ef9d460f..c84154cfbe 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/equals/argument-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/order-of-operations.js index 63e93affa6..e4d6b60e46 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/hoursInDay/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js index ab25a4977f..e578ba3a6f 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js @@ -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", ]; diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-ambiguous-wall-clock-time.js index 389cebfac9..afb30d1ece 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js index 23d2f72993..8c10c2d44c 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js @@ -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", ]; diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/order-of-operations.js index 3f47efd994..04d218b63d 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/startOfDay/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/order-of-operations.js index 66e4487e53..075aa14900 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/subtract/order-of-operations.js @@ -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 = []; diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-ambiguous-wall-clock-time.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-ambiguous-wall-clock-time.js index be4ffb470a..0b96db742c 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-ambiguous-wall-clock-time.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/argument-propertybag-ambiguous-wall-clock-time.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js index a5aa73a17a..61722229e6 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js @@ -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", ]; diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/with/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/with/order-of-operations.js index d200fa2196..3faca3a078 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/with/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/with/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/order-of-operations.js index be5fd898f5..9924c091a0 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainDate/order-of-operations.js @@ -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 diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/order-of-operations.js index 7ef452f219..182d50d9b4 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/withPlainTime/order-of-operations.js @@ -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