mirror of https://github.com/tc39/test262.git
Temporal: Add assertion messages to PlainTime/p/{add,subtract}/argument-object.js
This made debugging these tests easier.
This commit is contained in:
parent
eaf85892fb
commit
c44b6e3e76
|
@ -10,28 +10,28 @@ features: [Temporal]
|
|||
|
||||
const plainTime = new Temporal.PlainTime(15, 23, 30, 123, 456, 789);
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ hours: 16 }),
|
||||
7, 23, 30, 123, 456, 789);
|
||||
7, 23, 30, 123, 456, 789, "add 16 hours across midnight boundary");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ minutes: 45 }),
|
||||
16, 8, 30, 123, 456, 789);
|
||||
16, 8, 30, 123, 456, 789, "add 45 minutes");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ seconds: 800 }),
|
||||
15, 36, 50, 123, 456, 789);
|
||||
15, 36, 50, 123, 456, 789, "add 800 seconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ milliseconds: 800 }),
|
||||
15, 23, 30, 923, 456, 789);
|
||||
15, 23, 30, 923, 456, 789, "add 800 milliseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ microseconds: 800 }),
|
||||
15, 23, 30, 124, 256, 789);
|
||||
15, 23, 30, 124, 256, 789, "add 800 microseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ nanoseconds: 300 }),
|
||||
15, 23, 30, 123, 457, 89);
|
||||
15, 23, 30, 123, 457, 89, "add 300 nanoseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("07:23:30.123456789").add({ hours: -16 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -16 hours across midnight boundary");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("16:08:30.123456789").add({ minutes: -45 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -45 minutes");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:36:50.123456789").add({ seconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -800 seconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:30.923456789").add({ milliseconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -800 milliseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:30.124256789").add({ microseconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -800 microseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:30.123457089").add({ nanoseconds: -300 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "add -300 nanoseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.add({ minute: 1, hours: 1 }),
|
||||
16, 23, 30, 123, 456, 789);
|
||||
16, 23, 30, 123, 456, 789, "misspelled property is ignored");
|
||||
|
|
|
@ -10,28 +10,28 @@ features: [Temporal]
|
|||
|
||||
const plainTime = new Temporal.PlainTime(15, 23, 30, 123, 456, 789);
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ hours: 16 }),
|
||||
23, 23, 30, 123, 456, 789);
|
||||
23, 23, 30, 123, 456, 789, "subtract 16 hours across midnight boundary");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ minutes: 45 }),
|
||||
14, 38, 30, 123, 456, 789);
|
||||
14, 38, 30, 123, 456, 789, "subtract 45 minutes");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ seconds: 45 }),
|
||||
15, 22, 45, 123, 456, 789);
|
||||
15, 22, 45, 123, 456, 789, "subtract 45 seconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ milliseconds: 800 }),
|
||||
15, 23, 29, 323, 456, 789);
|
||||
15, 23, 29, 323, 456, 789, "subtract 800 milliseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ microseconds: 800 }),
|
||||
15, 23, 30, 122, 656, 789);
|
||||
15, 23, 30, 122, 656, 789, "subtract 800 microseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ nanoseconds: 800 }),
|
||||
15, 23, 30, 123, 455, 989);
|
||||
15, 23, 30, 123, 455, 989, "subtract 800 nanoseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("23:23:30.123456789").subtract({ hours: -16 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -16 hours across midnight boundary");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("14:38:30.123456789").subtract({ minutes: -45 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -45 minutes");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:22:45.123456789").subtract({ seconds: -45 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -45 seconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:29.323456789").subtract({ milliseconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -800 milliseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:30.122656789").subtract({ microseconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -800 microseconds");
|
||||
TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("15:23:30.123455989").subtract({ nanoseconds: -800 }),
|
||||
15, 23, 30, 123, 456, 789);
|
||||
15, 23, 30, 123, 456, 789, "subtract -800 nanoseconds");
|
||||
TemporalHelpers.assertPlainTime(plainTime.subtract({ minute: 1, hours: 1 }),
|
||||
14, 23, 30, 123, 456, 789);
|
||||
14, 23, 30, 123, 456, 789, "misspelled property is ignored");
|
||||
|
|
Loading…
Reference in New Issue