Lines Matching refs:parseInt

24 Tests for the parseInt function.
29 PASS parseInt('123') is 123
30 PASS parseInt('123x4') is 123
31 PASS parseInt('-123') is -123
32 PASS parseInt('0x123') is 0x123
33 PASS parseInt('0x123x4') is 0x123
34 PASS parseInt('-0x123x4') is -0x123
35 PASS parseInt('-') is Number.NaN
36 PASS parseInt('0x') is Number.NaN
37 PASS parseInt('-0x') is Number.NaN
38 PASS parseInt('123', undefined) is 123
39 PASS parseInt('123', null) is 123
40 PASS parseInt('123', 0) is 123
41 PASS parseInt('123', 10) is 123
42 PASS parseInt('123', 16) is 0x123
43 PASS parseInt('0x123', undefined) is 0x123
44 PASS parseInt('0x123', null) is 0x123
45 PASS parseInt('0x123', 0) is 0x123
46 PASS parseInt('0x123', 10) is 0
47 PASS parseInt('0x123', 16) is 0x123
48 PASS parseInt(Math.pow(10, 20)) is 100000000000000000000
49 PASS parseInt(Math.pow(10, 21)) is 1
50 PASS parseInt(Math.pow(10, -6)) is 0
51 PASS parseInt(Math.pow(10, -7)) is 1
52 PASS parseInt(-Math.pow(10, 20)) is -100000000000000000000
53 PASS parseInt(-Math.pow(10, 21)) is -1
54 PASS parseInt(-Math.pow(10, -6)) is -0
55 PASS parseInt(-Math.pow(10, -7)) is -1
56 PASS parseInt('0') is 0
57 PASS parseInt('-0') is -0
58 PASS parseInt(0) is 0
59 PASS parseInt(-0) is 0
60 PASS parseInt(2147483647) is 2147483647
61 PASS parseInt(2147483648) is 2147483648
62 PASS parseInt('2147483647') is 2147483647
63 PASS parseInt('2147483648') is 2147483648
64 PASS state = null; try { parseInt('123', throwingRadix); } catch (e) {} state; is "throwingRadix"
65 PASS state = null; try { parseInt(throwingString, throwingRadix); } catch (e) {} state; is "throwin…