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 78c07f0c87..cf95775e33 100644 --- a/test/built-ins/Temporal/Duration/compare/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/compare/order-of-operations.js @@ -109,7 +109,6 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -134,6 +133,8 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "get options.relativeTo.year.valueOf", "call options.relativeTo.year.valueOf", "call options.relativeTo.calendar.dateFromFields", + // lookup in Duration.compare + "get options.relativeTo.calendar.dateAdd", ]); const plainRelativeTo = TemporalHelpers.propertyBagObserver(actual, { @@ -176,7 +177,6 @@ actual.splice(0); // clear // to days: const expectedOpsForPlainDayBalancing = expectedOpsForPlainRelativeTo.concat( [ - "get options.relativeTo.calendar.dateAdd", // UnbalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 11.a.iii.1 MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.a.iv.1 MoveRelativeDate @@ -264,6 +264,8 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", + // lookup in Duration.compare + "get options.relativeTo.calendar.dateAdd", ]); const zonedRelativeTo = TemporalHelpers.propertyBagObserver(actual, { @@ -323,7 +325,6 @@ Temporal.Duration.compare( assert.compareArray( actual, expectedOpsForZonedRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", // AddZonedDateTime on first argument "call options.relativeTo.calendar.dateAdd", 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 dac72fc4ae..d59a7cf0b8 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 @@ -92,7 +92,6 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -119,7 +118,7 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "call options.relativeTo.year.valueOf", // InterpretTemporalDateTimeFields "call options.relativeTo.calendar.dateFromFields", - // lookup 2 + // lookup in AddDurationToOrSubtractDurationFromDuration "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // AddDuration @@ -231,6 +230,9 @@ const expectedOpsForPlainRelativeToNoCalendarOperations = [ "call options.relativeTo.year.valueOf", // InterpretTemporalDateTimeFields "call options.relativeTo.calendar.dateFromFields", + // lookup in AddDurationToOrSubtractDurationFromDuration + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const noCalendarInstance = new Temporal.Duration(0, 0, 0, 4, 5, 6, 7, 987, 654, 321); @@ -273,7 +275,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -323,7 +324,7 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup 2 + // lookup in AddDurationToOrSubtractDurationFromDuration "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // AddDuration @@ -419,7 +420,6 @@ const expectedOpsForZonedRelativeToNoDaysOperations = [ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -469,6 +469,9 @@ const expectedOpsForZonedRelativeToNoDaysOperations = [ "get options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", + // lookup in AddDurationToOrSubtractDurationFromDuration + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const noDaysInstance = new Temporal.Duration(0, 0, 0, 0, 5, 6, 7, 987, 654, 321); 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 2a0629a109..4b35cca85e 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 @@ -102,6 +102,9 @@ const expectedOpsForPlainRelativeTo = [ "get options.smallestUnit", "get options.smallestUnit.toString", "call options.smallestUnit.toString", + // lookup in Duration.p.round + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const plainRelativeTo = TemporalHelpers.propertyBagObserver(actual, { @@ -119,8 +122,6 @@ actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year, with minimal calendar calls: const expectedMinimalOpsForYearRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", // 7.e and 7.g not called because years, months, weeks are 0 "call options.relativeTo.calendar.dateUntil", // 7.o // 7.s not called because years, months, weeks are 0 @@ -132,8 +133,6 @@ actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year: const expectedOpsForYearRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateAdd", // 7.e "call options.relativeTo.calendar.dateAdd", // 7.g "call options.relativeTo.calendar.dateUntil", // 7.o @@ -152,8 +151,6 @@ actual.splice(0); // clear // code path through Duration.prototype.round that rounds to the nearest month: const expectedOpsForMonthRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", // UnbalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 9.d.i "call options.relativeTo.calendar.dateUntil", // 9.d.iv @@ -172,7 +169,6 @@ actual.splice(0); // clear // code path through Duration.prototype.round that rounds to the nearest week: const expectedOpsForWeekRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", // UnbalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 10.c.i MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 10.d.i MoveRelativeDate @@ -189,7 +185,6 @@ actual.splice(0); // clear // code path through UnbalanceDurationRelative that rounds to the nearest day: const expectedOpsForDayRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", // 11.a.iii.1 MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.a.iv.1 MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.a.v.1 MoveRelativeDate @@ -201,8 +196,6 @@ actual.splice(0); // clear // code path through BalanceDurationRelative balancing from days up to years: const expectedOpsForDayToYearBalancing = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateAdd", // 10.b MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 10.e.iv MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 10.f MoveRelativeDate @@ -217,8 +210,6 @@ actual.splice(0); // clear // code path through Duration.prototype.round balancing from months up to years: const expectedOpsForMonthToYearBalancing = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", // RoundDuration "call options.relativeTo.calendar.dateAdd", // 10.c "call options.relativeTo.calendar.dateAdd", // 10.e @@ -237,7 +228,6 @@ assert.compareArray(actual, expectedOpsForMonthToYearBalancing, "order of operat actual.splice(0); // clear const expectedOpsForDayToMonthBalancing = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", // BalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 11.b MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.e.iv MoveRelativeDate @@ -248,7 +238,6 @@ assert.compareArray(actual, expectedOpsForDayToMonthBalancing, "order of operati actual.splice(0); // clear const expectedOpsForDayToWeekBalancing = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", // BalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 12.c MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 12.f.iv MoveRelativeDate @@ -360,14 +349,17 @@ const zonedRelativeTo = TemporalHelpers.propertyBagObserver(actual, { // basic order of operations with ZonedDateTime relativeTo: instance.round(createOptionsObserver({ relativeTo: zonedRelativeTo })); -assert.compareArray(actual, expectedOpsForZonedRelativeTo, "order of operations for ZonedDateTime relativeTo"); +assert.compareArray(actual, expectedOpsForZonedRelativeTo.concat([ + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", +]), "order of operations for ZonedDateTime relativeTo"); actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year with minimal calendar operations: const expectedOpsForMinimalYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.round "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // NanosecondsToDays @@ -395,7 +387,7 @@ actual.splice(0); // clear const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.round "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // MoveRelativeZonedDateTime → AddZonedDateTime @@ -432,8 +424,9 @@ actual.splice(0); // clear const expectedOpsForUnbalanceRoundBalance = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.round "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", // No user code calls in UnbalanceDurationRelative // RoundDuration → MoveRelativeZonedDateTime → AddZonedDateTime "call options.relativeTo.calendar.dateAdd", 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 32e313f195..107a1a7bae 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 @@ -92,7 +92,6 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -119,7 +118,7 @@ const expectedOpsForPlainRelativeTo = expected.concat([ "call options.relativeTo.year.valueOf", // InterpretTemporalDateTimeFields "call options.relativeTo.calendar.dateFromFields", - // lookup 2 + // lookup in AddDurationToOrSubtractDurationFromDuration "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // AddDuration @@ -231,6 +230,9 @@ const expectedOpsForPlainRelativeToNoCalendarOperations = [ "call options.relativeTo.year.valueOf", // InterpretTemporalDateTimeFields "call options.relativeTo.calendar.dateFromFields", + // lookup in AddDurationToOrSubtractDurationFromDuration + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const noCalendarInstance = new Temporal.Duration(0, 0, 0, 4, 5, 6, 7, 987, 654, 321); @@ -273,7 +275,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -323,7 +324,7 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup 2 + // lookup in AddDurationToOrSubtractDurationFromDuration "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // AddDuration @@ -419,7 +420,6 @@ const expectedOpsForZonedRelativeToNoDaysOperations = [ "has options.relativeTo.calendar.year", "has options.relativeTo.calendar.yearMonthFromFields", "has options.relativeTo.calendar.yearOfWeek", - // lookup "get options.relativeTo.calendar.dateFromFields", "get options.relativeTo.calendar.fields", "call options.relativeTo.calendar.fields", @@ -469,6 +469,9 @@ const expectedOpsForZonedRelativeToNoDaysOperations = [ "get options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getPossibleInstantsFor", "call options.relativeTo.timeZone.getOffsetNanosecondsFor", + // lookup in AddDurationToOrSubtractDurationFromDuration + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const noDaysInstance = new Temporal.Duration(0, 0, 0, 0, 5, 6, 7, 987, 654, 321); 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 d66f675b9c..c33f7cfe20 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 @@ -85,6 +85,9 @@ const expectedOpsForPlainRelativeTo = [ "get options.unit", "get options.unit.toString", "call options.unit.toString", + // lookup in Duration.p.total + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", ]; const plainRelativeTo = TemporalHelpers.propertyBagObserver(actual, { @@ -102,9 +105,6 @@ actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year with minimal calendar calls: const expectedOpsForMinimalYearRounding = expectedOpsForPlainRelativeTo.concat([ - // lookup - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", // 7.e and 7.g not called because years, months, weeks are 0 "call options.relativeTo.calendar.dateUntil", // 7.o // 7.s not called because years, months, weeks are 0 @@ -116,8 +116,6 @@ actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year: const expectedOpsForYearRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateAdd", // 7.d "call options.relativeTo.calendar.dateAdd", // 7.f "call options.relativeTo.calendar.dateUntil", // 7.n @@ -131,8 +129,6 @@ actual.splice(0); // clear // code path through Duration.prototype.total that rounds to the nearest month: const expectedOpsForMonthRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", - "get options.relativeTo.calendar.dateUntil", // UnbalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 9.d.i "call options.relativeTo.calendar.dateUntil", // 9.d.iv @@ -148,7 +144,6 @@ actual.splice(0); // clear // code path through Duration.prototype.total that rounds to the nearest week: const expectedOpsForWeekRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", // UnbalanceDurationRelative "call options.relativeTo.calendar.dateAdd", // 10.c.i MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 10.d.i MoveRelativeDate @@ -162,7 +157,6 @@ actual.splice(0); // clear // code path through UnbalanceDurationRelative that rounds to the nearest day: const expectedOpsForDayRounding = expectedOpsForPlainRelativeTo.concat([ - "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", // 11.a.iii.1 MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.a.iv.1 MoveRelativeDate "call options.relativeTo.calendar.dateAdd", // 11.a.v.1 MoveRelativeDate @@ -267,14 +261,18 @@ const zonedRelativeTo = TemporalHelpers.propertyBagObserver(actual, { // basic order of observable operations, without rounding: instance.total(createOptionsObserver({ unit: "nanoseconds", relativeTo: zonedRelativeTo })); -assert.compareArray(actual, expectedOpsForZonedRelativeTo, "order of operations for ZonedDateTime relativeTo"); +assert.compareArray(actual, expectedOpsForZonedRelativeTo.concat([ + "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", +]), "order of operations for ZonedDateTime relativeTo"); actual.splice(0); // clear // code path through RoundDuration that rounds to the nearest year with minimal calendar operations: const expectedOpsForMinimalYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - "get options.relativeTo.calendar.dateAdd", // lookup + // lookup in Duration.p.total + "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // BalancePossiblyInfiniteDuration → NanosecondsToDays "call options.relativeTo.timeZone.getOffsetNanosecondsFor", // 7. GetPlainDateTimeFor @@ -304,7 +302,7 @@ actual.splice(0); // clear const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.total "get options.relativeTo.calendar.dateAdd", "get options.relativeTo.calendar.dateUntil", // MoveRelativeZonedDateTime → AddZonedDateTime @@ -339,8 +337,9 @@ actual.splice(0); // clear const expectedOpsForUnbalanceRound = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.total "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", // No user code calls in UnbalanceDateDurationRelative // MoveRelativeZonedDateTime → AddZonedDateTime "call options.relativeTo.calendar.dateAdd", @@ -365,8 +364,9 @@ actual.splice(0); // clear const expectedOpsForBalanceRound = expectedOpsForZonedRelativeTo.concat([ // ToTemporalDate "call options.relativeTo.timeZone.getOffsetNanosecondsFor", - // lookup + // lookup in Duration.p.total "get options.relativeTo.calendar.dateAdd", + "get options.relativeTo.calendar.dateUntil", // No user code calls in UnbalanceDateDurationRelative // No user code calls in AddZonedDateTime (years, months, weeks = 0) // BalanceTimeDurationRelative diff --git a/test/built-ins/Temporal/PlainDate/prototype/add/order-of-operations.js b/test/built-ins/Temporal/PlainDate/prototype/add/order-of-operations.js index 137fa40103..c1f29fad5c 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDate/prototype/add/order-of-operations.js @@ -103,6 +103,7 @@ const noCalendarExpected = [ "call fields.seconds.valueOf", "get fields.weeks", "get fields.years", + "get this.calendar.dateAdd", // AddDate "get options.overflow", "get options.overflow.toString", diff --git a/test/built-ins/Temporal/PlainDate/prototype/since/order-of-operations.js b/test/built-ins/Temporal/PlainDate/prototype/since/order-of-operations.js index aa45194b3a..78662c847c 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDate/prototype/since/order-of-operations.js @@ -105,6 +105,7 @@ actual.splice(0); instance.since(otherDatePropertyBag, createOptionsObserver({ largestUnit: "years" })); assert.compareArray(actual, expected.concat([ // lookup + "get this.calendar.dateAdd", "get this.calendar.dateUntil", // CalendarDateUntil "call this.calendar.dateUntil", diff --git a/test/built-ins/Temporal/PlainDate/prototype/subtract/order-of-operations.js b/test/built-ins/Temporal/PlainDate/prototype/subtract/order-of-operations.js index cdf0f2d089..317b7b6831 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/subtract/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDate/prototype/subtract/order-of-operations.js @@ -103,6 +103,7 @@ const noCalendarExpected = [ "call fields.seconds.valueOf", "get fields.weeks", "get fields.years", + "get this.calendar.dateAdd", // AddDate "get options.overflow", "get options.overflow.toString", diff --git a/test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js b/test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js index 373072e626..19e506ca8a 100644 --- a/test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js @@ -105,6 +105,7 @@ actual.splice(0); instance.until(otherDatePropertyBag, createOptionsObserver({ largestUnit: "years" })); assert.compareArray(actual, expected.concat([ // lookup + "get this.calendar.dateAdd", "get this.calendar.dateUntil", // CalendarDateUntil "call this.calendar.dateUntil", diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/add/order-of-operations.js b/test/built-ins/Temporal/PlainDateTime/prototype/add/order-of-operations.js index 33cff70280..5230e93b7b 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/add/order-of-operations.js @@ -101,6 +101,7 @@ const noCalendarExpected = [ "call fields.seconds.valueOf", "get fields.weeks", "get fields.years", + "get this.calendar.dateAdd", // AddDateTime -> AddDate "get options.overflow", "get options.overflow.toString", diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/since/order-of-operations.js b/test/built-ins/Temporal/PlainDateTime/prototype/since/order-of-operations.js index 048024860f..0e00b3ef21 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/since/order-of-operations.js @@ -129,6 +129,7 @@ actual.splice(0); instance.since(otherDateTimePropertyBag, createOptionsObserver({ largestUnit: "years" })); assert.compareArray(actual, expected.concat([ // lookup + "get this.calendar.dateAdd", "get this.calendar.dateUntil", // CalendarDateUntil "call this.calendar.dateUntil", diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/subtract/order-of-operations.js b/test/built-ins/Temporal/PlainDateTime/prototype/subtract/order-of-operations.js index 42a149df20..d58bbb9edd 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/subtract/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/subtract/order-of-operations.js @@ -101,6 +101,7 @@ const noCalendarExpected = [ "call fields.seconds.valueOf", "get fields.weeks", "get fields.years", + "get this.calendar.dateAdd", // AddDateTime -> AddDate "get options.overflow", "get options.overflow.toString", diff --git a/test/built-ins/Temporal/PlainDateTime/prototype/until/order-of-operations.js b/test/built-ins/Temporal/PlainDateTime/prototype/until/order-of-operations.js index 026a443b57..c469f85213 100644 --- a/test/built-ins/Temporal/PlainDateTime/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/PlainDateTime/prototype/until/order-of-operations.js @@ -129,6 +129,7 @@ actual.splice(0); instance.until(otherDateTimePropertyBag, createOptionsObserver({ largestUnit: "years" })); assert.compareArray(actual, expected.concat([ // lookup + "get this.calendar.dateAdd", "get this.calendar.dateUntil", // CalendarDateUntil "call this.calendar.dateUntil", diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations.js b/test/built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations.js index 11c45cd6c5..00d50ea89f 100644 --- a/test/built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations.js @@ -43,6 +43,7 @@ const expected = [ // lookup "get this.calendar.dateAdd", "get this.calendar.dateFromFields", + "get this.calendar.day", "get this.calendar.fields", "get this.calendar.yearMonthFromFields", // CalendarFields @@ -129,7 +130,9 @@ const noCalendarExpected = [ "get fields.weeks", "get fields.years", // lookup + "get this.calendar.dateAdd", "get this.calendar.dateFromFields", + "get this.calendar.day", "get this.calendar.fields", "get this.calendar.yearMonthFromFields", // CalendarFields diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations.js b/test/built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations.js index 5757cce9f5..3a68f69065 100644 --- a/test/built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations.js @@ -123,28 +123,7 @@ actual.splice(0); // code path that skips RoundDuration: instance.since(otherYearMonthPropertyBag, createOptionsObserver({ smallestUnit: "months", roundingIncrement: 1 })); -assert.compareArray(actual, expectedMinimal.concat([ - // lookup - "get this.calendar.dateFromFields", - "get this.calendar.dateUntil", - "get this.calendar.fields", - // CalendarFields - "call this.calendar.fields", - // PrepareTemporalFields / CalendarDateFromFields (receiver) - "get this.calendar.monthCode", - "call this.calendar.monthCode", - "get this.calendar.year", - "call this.calendar.year", - "call this.calendar.dateFromFields", - // PrepareTemporalFields / CalendarDateFromFields (argument) - "get other.calendar.monthCode", - "call other.calendar.monthCode", - "get other.calendar.year", - "call other.calendar.year", - "call this.calendar.dateFromFields", - // CalendarDateUntil - "call this.calendar.dateUntil", -]), "order of operations with no rounding"); +assert.compareArray(actual, expected, "order of operations with no rounding"); actual.splice(0); // clear // short-circuit for identical objects: diff --git a/test/built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations.js b/test/built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations.js index 11c3d93769..50d4360601 100644 --- a/test/built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations.js @@ -123,28 +123,7 @@ actual.splice(0); // code path that skips RoundDuration: instance.since(otherYearMonthPropertyBag, createOptionsObserver({ smallestUnit: "months", roundingIncrement: 1 })); -assert.compareArray(actual, expectedMinimal.concat([ - // lookup - "get this.calendar.dateFromFields", - "get this.calendar.dateUntil", - "get this.calendar.fields", - // CalendarFields - "call this.calendar.fields", - // PrepareTemporalFields / CalendarDateFromFields (receiver) - "get this.calendar.monthCode", - "call this.calendar.monthCode", - "get this.calendar.year", - "call this.calendar.year", - "call this.calendar.dateFromFields", - // PrepareTemporalFields / CalendarDateFromFields (argument) - "get other.calendar.monthCode", - "call other.calendar.monthCode", - "get other.calendar.year", - "call other.calendar.year", - "call this.calendar.dateFromFields", - // CalendarDateUntil - "call this.calendar.dateUntil", -]), "order of operations with no rounding"); +assert.compareArray(actual, expected, "order of operations with no rounding"); actual.splice(0); // clear // short-circuit for identical objects: 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 a31fcd718f..73be2534fd 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 @@ -42,7 +42,7 @@ const expected = [ "has calendar.year", "has calendar.yearMonthFromFields", "has calendar.yearOfWeek", - // lookup + // lookup in ToTemporalZonedDateTime "get calendar.dateFromFields", "get calendar.fields", // CalendarFields 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 c342ce158e..4b4266dece 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 @@ -48,7 +48,7 @@ const expected = [ "has calendar.year", "has calendar.yearMonthFromFields", "has calendar.yearOfWeek", - // lookup + // lookup in ToTemporalZonedDateTime "get calendar.dateFromFields", "get calendar.fields", // CalendarFields 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 6023c1e87d..c94e7fbdb9 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 @@ -48,7 +48,7 @@ const expected = [ "has calendar.year", "has calendar.yearMonthFromFields", "has calendar.yearOfWeek", - // lookup + // lookup in ToTemporalZonedDateTime "get calendar.dateFromFields", "get calendar.fields", // CalendarFields 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 41fb871b4f..16fcfab56f 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 @@ -48,7 +48,7 @@ const expected = [ "has calendar.year", "has calendar.yearMonthFromFields", "has calendar.yearOfWeek", - // lookup + // lookup in ToTemporalZonedDateTime "get calendar.dateFromFields", "get calendar.fields", // CalendarFields