Lines Matching refs:toFixed
24 This test checks a few Number.toFixed cases, including 5307: Number.toFixed does not round 0.5 up a…
29 PASS (0).toFixed(0) is '0'
30 PASS (0.49).toFixed(0) is '0'
31 PASS (0.5).toFixed(0) is '1'
32 PASS (0.51).toFixed(0) is '1'
33 PASS (-0.49).toFixed(0) is '-0'
34 PASS (-0.5).toFixed(0) is '-1'
35 PASS (-0.51).toFixed(0) is '-1'
36 PASS (0).toFixed(1) is '0.0'
37 PASS (0.449).toFixed(1) is '0.4'
38 PASS (0.45).toFixed(1) is '0.5'
39 PASS (0.451).toFixed(1) is '0.5'
40 PASS (0.5).toFixed(1) is '0.5'
41 PASS (0.549).toFixed(1) is '0.5'
42 PASS (0.55).toFixed(1) is '0.6'
43 PASS (0.551).toFixed(1) is '0.6'
44 PASS (-0.449).toFixed(1) is '-0.4'
45 PASS (-0.45).toFixed(1) is '-0.5'
46 PASS (-0.451).toFixed(1) is '-0.5'
47 PASS (-0.5).toFixed(1) is '-0.5'
48 PASS (-0.549).toFixed(1) is '-0.5'
49 PASS (-0.55).toFixed(1) is '-0.6'
50 PASS (-0.551).toFixed(1) is '-0.6'
51 PASS (0.0).toFixed(4) is "0.0000"
52 PASS (-0.0).toFixed(4) is "0.0000"
53 PASS (0.0).toFixed() is "0"
54 PASS (-0.0).toFixed() is "0"
55 PASS (1234.567).toFixed() is "1235"
56 PASS (1234.567).toFixed(0) is "1235"
57 PASS (1234.567).toFixed(null) is "1235"
58 PASS (1234.567).toFixed(false) is "1235"
59 PASS (1234.567).toFixed('foo') is "1235"
60 PASS (1234.567).toFixed(nan) is "1235"
61 PASS (1234.567).toFixed(1) is "1234.6"
62 PASS (1234.567).toFixed(true) is "1234.6"
63 PASS (1234.567).toFixed('1') is "1234.6"
64 PASS (1234.567).toFixed(2) is "1234.57"
65 PASS (1234.567).toFixed(2.9) is "1234.57"
66 PASS (1234.567).toFixed(5) is "1234.56700"
67 PASS (1234.567).toFixed(20) is "1234.56700000000000727596"
68 PASS (1234.567).toFixed(21) threw exception RangeError: toFixed() digits argument must be between 0…
69 PASS (1234.567).toFixed(100) threw exception RangeError: toFixed() digits argument must be between …
70 PASS (1234.567).toFixed(101) threw exception RangeError: toFixed() digits argument must be between …
71 PASS (1234.567).toFixed(-1) threw exception RangeError: toFixed() digits argument must be between 0…
72 PASS (1234.567).toFixed(-4) threw exception RangeError: toFixed() digits argument must be between 0…
73 PASS (1234.567).toFixed(-5) threw exception RangeError: toFixed() digits argument must be between 0…
74 PASS (1234.567).toFixed(-20) threw exception RangeError: toFixed() digits argument must be between …
75 PASS (1234.567).toFixed(-21) threw exception RangeError: toFixed() digits argument must be between …
76 PASS (1234.567).toFixed(posInf) threw exception RangeError: toFixed() digits argument must be betwe…
77 PASS (1234.567).toFixed(negInf) threw exception RangeError: toFixed() digits argument must be betwe…
78 PASS posInf.toFixed() is "Infinity"
79 PASS negInf.toFixed() is "-Infinity"
80 PASS nan.toFixed() is "NaN"