mirror of https://github.com/tc39/test262.git
Improve comments and assertion messages
This commit is contained in:
parent
c03a58ba35
commit
dd47e4e248
|
@ -54,7 +54,8 @@ assert.throws(RangeError, () =>
|
||||||
oneNsDuration.round({
|
oneNsDuration.round({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
smallestUnit: "days",
|
smallestUnit: "days",
|
||||||
})
|
}),
|
||||||
|
"RangeError when days < 0 and sign = 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// NanosecondsToDays.20: days > 0 and sign = -1
|
// NanosecondsToDays.20: days > 0 and sign = -1
|
||||||
|
@ -74,7 +75,8 @@ assert.throws(RangeError, () =>
|
||||||
negOneNsDuration.round({
|
negOneNsDuration.round({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
smallestUnit: "days",
|
smallestUnit: "days",
|
||||||
})
|
}),
|
||||||
|
"RangeError when days > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
||||||
|
@ -93,9 +95,10 @@ zdt = new Temporal.ZonedDateTime(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
assert.throws(RangeError, () =>
|
assert.throws(RangeError, () =>
|
||||||
// Using -1ns duration sets _nanoseocnds_ to -1 and _sign_ to -1
|
// Using -1ns duration sets _nanoseconds_ to -1 and _sign_ to -1
|
||||||
negOneNsDuration.round({
|
negOneNsDuration.round({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
smallestUnit: "days",
|
smallestUnit: "days",
|
||||||
})
|
}),
|
||||||
|
"RangeError when nanoseconds > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,7 +53,8 @@ assert.throws(RangeError, () =>
|
||||||
oneNsDuration.total({
|
oneNsDuration.total({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
unit: "day",
|
unit: "day",
|
||||||
})
|
}),
|
||||||
|
"RangeError when days < 0 and sign = 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// NanosecondsToDays.20: days > 0 and sign = -1
|
// NanosecondsToDays.20: days > 0 and sign = -1
|
||||||
|
@ -72,7 +73,8 @@ assert.throws(RangeError, () =>
|
||||||
negOneNsDuration.total({
|
negOneNsDuration.total({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
unit: "day",
|
unit: "day",
|
||||||
})
|
}),
|
||||||
|
"RangeError when days > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
||||||
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
||||||
|
@ -94,5 +96,6 @@ assert.throws(RangeError, () =>
|
||||||
negOneNsDuration.total({
|
negOneNsDuration.total({
|
||||||
relativeTo: zdt,
|
relativeTo: zdt,
|
||||||
unit: "day",
|
unit: "day",
|
||||||
})
|
}),
|
||||||
|
"RangeError when nanoseconds > 0 and sign = -1"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue