summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/pic/length_array.js
blob: ab77749b762a085830664a8f54c4fe5070773a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// length, string

var expected = "3,6,4,3,6,4,3,6,4,3,6,4,";
var actual = '';

function f() {
  var ss = [ [1, 2, 3], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4] ];

  for (var i = 0; i < 12; ++i) {
    actual += ss[i%3].length + ',';
  }
}

f();

assertEq(actual, expected);