michael@0: // getprop, proto, 3 shapes michael@0: michael@0: var expected = "22,202,202,22,202,202,22,202,202,"; michael@0: var actual = ''; michael@0: michael@0: var protoB = { a: 11, b: 22, c: 33 }; michael@0: michael@0: function B() { michael@0: } michael@0: B.prototype = protoB; michael@0: michael@0: var protoC = { a: 101, b: 202, c: 303 }; michael@0: michael@0: function C() { michael@0: } michael@0: C.prototype = protoC; michael@0: michael@0: function f() { michael@0: var o1 = new B(); michael@0: var o2 = new C(); michael@0: var o3 = new C(); michael@0: o3.q = 99; michael@0: var oa = [ o1, o2, o3 ]; michael@0: michael@0: for (var i = 0; i < 9; ++i) { michael@0: actual += oa[i%3].b + ','; michael@0: } michael@0: } michael@0: michael@0: f(); michael@0: michael@0: assertEq(actual, expected);