« Bugzilla Issues Index

#1527 — Coverage: Missing tests for Number.prototype.toFixed and toPrecision

Bug 1526 mentions problems with the rounding behavior in Number.prototype.toFixed in some implementations. There are no tests for this behavior, which seems a serious gap. The Test402 test suite has a test 11.3.2_TRP, from which a test for toFixed could be derived (note however that toFixed uses exponential format in some case, while Intl.NumberFormat.prototype.format doesn't).

The description should have said toPrecision rather than toFixed. But the same problem exists for toFixed - neither have adequate test coverage.