d87a375d54c21af833854e85941c24b1174b7052
[WebKit-https.git] / LayoutTests / fast / js / resources / number-tofixed.js
1 description('This test checks a few Number.toFixed cases, including <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=5307">5307: Number.toFixed does not round 0.5 up</a>.');
2
3 shouldBe("(0).toFixed(0)", "'0'");
4
5 shouldBe("0.49.toFixed(0)", "'0'");
6 shouldBe("0.5.toFixed(0)", "'1'");
7 shouldBe("0.51.toFixed(0)", "'1'");
8
9 shouldBe("(-0.49).toFixed(0)", "'-0'");
10 shouldBe("(-0.5).toFixed(0)", "'-1'");
11 shouldBe("(-0.51).toFixed(0)", "'-1'");
12
13 var successfullyParsed = true;