Skip to content

Commit 7e407a6

Browse files
committed
Use assertPlainMonthDay for ISO-like calendars
1 parent 1dcf1d7 commit 7e407a6

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

test/intl402/Temporal/PlainMonthDay/from/gregory-month-codes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ for (const { monthCode, daysInMonth } of TemporalHelpers.ISOMonths) {
2626
{ calendar, monthCode, day: daysInMonth + 1 },
2727
{ overflow: "constrain" }
2828
);
29-
assert.sameValue(constrained.monthCode, monthCode, `${monthCode} should be preserved with constrain`);
30-
assert.sameValue(constrained.day, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
29+
TemporalHelpers.assertPlainMonthDay(constrained, monthCode, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
3130

3231
// Test reject overflow
3332
assert.throws(RangeError, () => {

test/intl402/Temporal/PlainMonthDay/from/japanese-month-codes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ for (const { monthCode, daysInMonth } of TemporalHelpers.ISOMonths) {
2626
{ calendar, monthCode, day: daysInMonth + 1 },
2727
{ overflow: "constrain" }
2828
);
29-
assert.sameValue(constrained.monthCode, monthCode, `${monthCode} should be preserved with constrain`);
30-
assert.sameValue(constrained.day, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
29+
TemporalHelpers.assertPlainMonthDay(constrained, monthCode, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
3130

3231
// Test reject overflow
3332
assert.throws(RangeError, () => {

test/intl402/Temporal/PlainMonthDay/from/roc-month-codes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ for (const { monthCode, daysInMonth } of TemporalHelpers.ISOMonths) {
2626
{ calendar, monthCode, day: daysInMonth + 1 },
2727
{ overflow: "constrain" }
2828
);
29-
assert.sameValue(constrained.monthCode, monthCode, `${monthCode} should be preserved with constrain`);
30-
assert.sameValue(constrained.day, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
29+
TemporalHelpers.assertPlainMonthDay(constrained, monthCode, daysInMonth, `day ${daysInMonth + 1} should be constrained to ${daysInMonth} for ${monthCode}`);
3130

3231
// Test reject overflow
3332
assert.throws(RangeError, () => {

0 commit comments

Comments
 (0)