summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testToStringBeforeValueOf.js
blob: b3550371ee9f9853f07e52c16364cf711550dcd0 (plain)
1
2
3
4
5
6
7
8
9
function testToStringBeforeValueOf()
{
    var o = {toString: function() { return "s"; }, valueOf: function() { return "v"; } };
    var a = [];
    for (var i = 0; i < 10; i++)
        a.push(String(o));
    return a.join(",");
}
assertEq(testToStringBeforeValueOf(), "s,s,s,s,s,s,s,s,s,s");