blob: f0cc9893124ce2f78b7513cfda54c94d9848e47d [file] [log] [blame]
description(
"Tests that defining a setter on the Array prototype works with ArrayPush."
);
var ouches = 0;
Array.prototype.__defineSetter__("3", function() { ouches++; });
function foo() {
var result = [];
for (var i = 0; i < 5; ++i)
result.push(i);
return result;
}
var numRuns = dfgShouldBe(foo, "foo().join(\",\")", "\"0,1,2,,4\"");
shouldBe("ouches", "numRuns");