Lines Matching refs:parseInt
15 assert(parseInt("123") === 123);
16 assert(parseInt("+123") === 123);
17 assert(parseInt("-123") === -123);
18 assert(parseInt("0123") === 123);
19 assert(parseInt(" 123") === 123);
20 assert(parseInt(" \n 123") === 123);
21 assert(parseInt(" \n 123 \t") === 123);
22 assert(parseInt("0x123") === 291);
23 assert(parseInt("0X123") === 291);
24 assert(parseInt("123", 4) === 27);
25 assert(parseInt("ABC", 16) === 2748);
26 assert(parseInt("12A3") === 12);
27 assert(parseInt("12.34") === 12);
28 assert(isNaN(parseInt("AB")));
29 assert(isNaN(parseInt("")));
30 assert(isNaN(parseInt("-")));
31 assert(isNaN(parseInt("-", 11)));
32 assert(parseInt("\u00a0123") === 123);
33 assert(parseInt("\u20291 123\u00D0") === 1);
34 assert(parseInt("\u00a0123", 13) === 198);
35 assert(parseInt("\u2029123 1\u00D0", 11) === 146);
36 assert(isNaN(parseInt("\u0009")));
37 assert(isNaN(parseInt("\u00A0")));
38 assert(parseInt("\u00A0\u00A0-1") === parseInt("-1"));
39 assert(parseInt("\u00A01") === parseInt("1"));
47 assert(isNaN(parseInt(bool, bool)));
48 assert(isNaN(parseInt(bool, obj)));
49 assert(isNaN(parseInt(bool, num)));
50 assert(isNaN(parseInt(bool, arr)));
52 assert(isNaN(parseInt(obj, bool)));
53 assert(isNaN(parseInt(obj, obj)));
54 assert(isNaN(parseInt(obj, num)));
55 assert(isNaN(parseInt(obj, arr)));
57 assert(isNaN(parseInt(num, bool)));
58 assert(parseInt(num, obj) === 8);
59 assert(isNaN(parseInt(num, num)));
60 assert(parseInt(num, arr) === 8);
62 assert(isNaN(parseInt(arr, bool)));
63 assert(parseInt(arr, obj) === 2);
64 assert(parseInt(arr, num) === 2);
65 assert(parseInt(arr, arr) === 2);
67 assert(isNaN(parseInt(undef, bool)));
68 assert(isNaN(parseInt(undef, obj)));
69 assert(isNaN(parseInt(undef, num)));
70 assert(isNaN(parseInt(undef, arr)));
74 parseInt(obj);