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({
|
||||
relativeTo: zdt,
|
||||
smallestUnit: "days",
|
||||
})
|
||||
}),
|
||||
"RangeError when days < 0 and sign = 1"
|
||||
);
|
||||
|
||||
// NanosecondsToDays.20: days > 0 and sign = -1
|
||||
|
@ -74,7 +75,8 @@ assert.throws(RangeError, () =>
|
|||
negOneNsDuration.round({
|
||||
relativeTo: zdt,
|
||||
smallestUnit: "days",
|
||||
})
|
||||
}),
|
||||
"RangeError when days > 0 and sign = -1"
|
||||
);
|
||||
|
||||
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
||||
|
@ -93,9 +95,10 @@ zdt = new Temporal.ZonedDateTime(
|
|||
)
|
||||
);
|
||||
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({
|
||||
relativeTo: zdt,
|
||||
smallestUnit: "days",
|
||||
})
|
||||
}),
|
||||
"RangeError when nanoseconds > 0 and sign = -1"
|
||||
);
|
||||
|
|
|
@ -53,7 +53,8 @@ assert.throws(RangeError, () =>
|
|||
oneNsDuration.total({
|
||||
relativeTo: zdt,
|
||||
unit: "day",
|
||||
})
|
||||
}),
|
||||
"RangeError when days < 0 and sign = 1"
|
||||
);
|
||||
|
||||
// NanosecondsToDays.20: days > 0 and sign = -1
|
||||
|
@ -72,7 +73,8 @@ assert.throws(RangeError, () =>
|
|||
negOneNsDuration.total({
|
||||
relativeTo: zdt,
|
||||
unit: "day",
|
||||
})
|
||||
}),
|
||||
"RangeError when days > 0 and sign = -1"
|
||||
);
|
||||
|
||||
// NanosecondsToDays.22: nanoseconds > 0 and sign = -1
|
||||
|
@ -94,5 +96,6 @@ assert.throws(RangeError, () =>
|
|||
negOneNsDuration.total({
|
||||
relativeTo: zdt,
|
||||
unit: "day",
|
||||
})
|
||||
}),
|
||||
"RangeError when nanoseconds > 0 and sign = -1"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue