summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testStringObjectLength.js
blob: d908ff63a8fe35752da7102e1532a8775fb86b09 (plain)
1
2
3
4
5
6
7
function testStringObjectLength() {
    var x = new String("foo"), y = 0;
    for (var i = 0; i < 10; ++i)
        y = x.length;
    return y;
}
assertEq(testStringObjectLength(), 3);