blob: d5c254c67d53a0c99b2e1c3bd40bbbdeaa0e0e3c [file] [log] [blame]
This test checks a few Number.toFixed cases, including 5307: Number.toFixed does not round 0.5 up and 5308: Number.toFixed does not include leading zero.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS (0).toFixed(0) is '0'
PASS (0.49).toFixed(0) is '0'
PASS (0.5).toFixed(0) is '1'
PASS (0.51).toFixed(0) is '1'
PASS (-0.49).toFixed(0) is '-0'
PASS (-0.5).toFixed(0) is '-1'
PASS (-0.51).toFixed(0) is '-1'
PASS (0).toFixed(1) is '0.0'
PASS (0.449).toFixed(1) is '0.4'
PASS (0.45).toFixed(1) is '0.5'
PASS (0.451).toFixed(1) is '0.5'
PASS (0.5).toFixed(1) is '0.5'
PASS (0.549).toFixed(1) is '0.5'
PASS (0.55).toFixed(1) is '0.6'
PASS (0.551).toFixed(1) is '0.6'
PASS (-0.449).toFixed(1) is '-0.4'
PASS (-0.45).toFixed(1) is '-0.5'
PASS (-0.451).toFixed(1) is '-0.5'
PASS (-0.5).toFixed(1) is '-0.5'
PASS (-0.549).toFixed(1) is '-0.5'
PASS (-0.55).toFixed(1) is '-0.6'
PASS (-0.551).toFixed(1) is '-0.6'
PASS successfullyParsed is true
TEST COMPLETE