summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNullToString.js
blob: c80feb1da1a01521d7649619d5575560329cf839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function testNullToString()
{
    var a = [];
    for (var i = 0; i < 10; i++)
        a.push(String(null));
    for (i = 0; i < 10; i++) {
        var t = typeof a[i];
        if (t != "string")
           a.push(t);
    }
    return a.join(",");
}
assertEq(testNullToString(), "null,null,null,null,null,null,null,null,null,null");