// Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- description: > Only passes when the provided date is exactly the specified number of milliseconds from the Unix epoch includes: [assertRelativeDateMs.js]
---*/
thrown = null; try {
assertRelativeDateMs(new Date(1), 0);
} catch (err) {
thrown = err;
} if (!thrown) { thrownew Error('Expected error, but no error was thrown.');
} elseif (thrown.constructor !== Test262Error) { thrownew Error('Expected error of type Test262Error.');
}
thrown = null; try {
assertRelativeDateMs(new Date(-1), 0);
} catch (err) {
thrown = err;
} if (!thrown) { thrownew Error('Expected error, but no error was thrown.');
} elseif (thrown.constructor !== Test262Error) { thrownew Error('Expected error of type Test262Error.');
}
thrown = null; try {
assertRelativeDateMs(new Date(1970, 0), 1);
} catch (err) {
thrown = err;
} if (!thrown) { thrownew Error('Expected error, but no error was thrown.');
} elseif (thrown.constructor !== Test262Error) { thrownew Error('Expected error of type Test262Error.');
}
thrown = null; try {
assertRelativeDateMs(new Date(1970, 0), -1);
} catch (err) {
thrown = err;
} if (!thrown) { thrownew Error('Expected error, but no error was thrown.');
} elseif (thrown.constructor !== Test262Error) { thrownew Error('Expected error of type Test262Error.');
}
thrown = null; try {
assertRelativeDateMs(new Date('invalid'), NaN);
} catch (err) {
thrown = err;
} if (!thrown) { thrownew Error('Expected error, but no error was thrown.');
} elseif (thrown.constructor !== Test262Error) { thrownew Error('Expected error of type Test262Error.');
}
reportCompare(0, 0);
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
(vorverarbeitet am 2026-04-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.