mirror of https://github.com/tc39/test262.git
Temporal: Add clarifying assertion messages
normalized-time-duration-to-days-range-errors.js tests for several error cases in the AO NormalizedTimeDurationToDays. Adding assertion messages helps to know which one you are debugging.
This commit is contained in:
parent
0c12b84244
commit
c8a876b1d9
|
@ -62,7 +62,8 @@ assert.throws(RangeError, () =>
|
||||||
start.since(
|
start.since(
|
||||||
oneZDT, // Sets DifferenceZonedDateTime _ns2_
|
oneZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"days < 0 and sign = 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 24: days > 0 and sign = -1
|
// Step 24: days > 0 and sign = -1
|
||||||
|
@ -86,7 +87,8 @@ assert.throws(RangeError, () =>
|
||||||
start.since(
|
start.since(
|
||||||
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"days > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 26: nanoseconds > 0 and sign = -1
|
// Step 26: nanoseconds > 0 and sign = -1
|
||||||
|
@ -110,7 +112,8 @@ assert.throws(RangeError, () =>
|
||||||
start.since(
|
start.since(
|
||||||
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"norm > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 29: day length is an unsafe integer
|
// Step 29: day length is an unsafe integer
|
||||||
|
|
|
@ -62,7 +62,8 @@ assert.throws(RangeError, () =>
|
||||||
start.until(
|
start.until(
|
||||||
oneZDT, // Sets DifferenceZonedDateTime _ns2_
|
oneZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"days < 0 and sign = 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 24: days > 0 and sign = -1
|
// Step 24: days > 0 and sign = -1
|
||||||
|
@ -86,7 +87,8 @@ assert.throws(RangeError, () =>
|
||||||
start.until(
|
start.until(
|
||||||
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"days > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 26: nanoseconds > 0 and sign = -1
|
// Step 26: nanoseconds > 0 and sign = -1
|
||||||
|
@ -110,7 +112,8 @@ assert.throws(RangeError, () =>
|
||||||
start.until(
|
start.until(
|
||||||
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
zeroZDT, // Sets DifferenceZonedDateTime _ns2_
|
||||||
options
|
options
|
||||||
)
|
),
|
||||||
|
"norm > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Step 29: day length is an unsafe integer
|
// Step 29: day length is an unsafe integer
|
||||||
|
|
Loading…
Reference in New Issue