Source code

Revision control

Copy as Markdown

Other Tools

/*
* Any copyright is dedicated to the Public Domain.
*/
assertEq(Number.prototype.toFixed.call(-Infinity), "-Infinity");
assertEq(Number.prototype.toFixed.call(Infinity), "Infinity");
assertEq(Number.prototype.toFixed.call(NaN), "NaN");
assertThrowsInstanceOf(() => Number.prototype.toFixed.call(-Infinity, 555), RangeError);
assertThrowsInstanceOf(() => Number.prototype.toFixed.call(Infinity, 555), RangeError);
assertThrowsInstanceOf(() => Number.prototype.toFixed.call(NaN, 555), RangeError);
assertThrowsInstanceOf(() => Number.prototype.toFixed.call("Hello"), TypeError);
if (typeof reportCompare === "function")
reportCompare(true, true);