michael@0: // getprop, self, 8 shapes michael@0: michael@0: var expected = "0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,"; michael@0: var actual = ''; michael@0: michael@0: function letter(i) { michael@0: return String.fromCharCode(97 + i); michael@0: } michael@0: michael@0: function f() { michael@0: // Build 8 objects with different shapes and x in different slots. michael@0: var oa = []; michael@0: for (var i = 0; i < 8; ++i) { michael@0: var o = {}; michael@0: for (var j = 0; j < 8; ++j) { michael@0: if (j != i) { michael@0: o[letter(j)] = 1000 + i * 10 + j; michael@0: } else { michael@0: o.x = i; michael@0: } michael@0: } michael@0: oa[i] = o; michael@0: } michael@0: michael@0: for (var i = 0; i < 24; ++i) { michael@0: actual += oa[i%8].x + ','; michael@0: } michael@0: } michael@0: michael@0: f(); michael@0: michael@0: assertEq(actual, expected);