summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testLengthInString.js
blob: 5950b509f9b5978de1113ad80578f092805ffe04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function testLengthInString()
{
  var s = new String();
  var res = "length" in s;
  for (var i = 0; i < 5; i++)
    res = res && ("length" in s);
  res = res && s.hasOwnProperty("length");
  for (var i = 0; i < 5; i++)
    res = res && s.hasOwnProperty("length");
  return res;
}
assertEq(testLengthInString(), true);