summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testObjectToString.js
blob: ba47d00f0bd0f1edf3da681f051907cf5e837285 (plain)
1
2
3
4
5
6
7
8
function testObjectToString() {
    var o = {toString: () => "foo"};
    var s = "";
    for (var i = 0; i < 10; i++)
        s += o;
    return s;
}
assertEq(testObjectToString(), "foofoofoofoofoofoofoofoofoofoo");