summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNumToString.js
blob: 96f3cc725f60a7893888bbfe5279c3963e4f6f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function testNumToString() {
    var r = [];
    var d = 123456789;
    for (var i = 0; i < 10; ++i) {
        r = [
             d.toString(),
             (-d).toString(),
             d.toString(10),
             (-d).toString(10),
             d.toString(16),
             (-d).toString(16),
             d.toString(36),
             (-d).toString(36)
            ];
    }
    return r.join(",");
}
assertEq(testNumToString(), "123456789,-123456789,123456789,-123456789,75bcd15,-75bcd15,21i3v9,-21i3v9");