blob: e88101100ec99b80d2ee9e80c6ece60d13afe2d0 [file] [log] [blame]
description(
"Tests that we do ToString conversions correctly when String.prototype.valueOf is not what we wanted."
);
function foo(a) {
for (var i = 0; i < 100; ++i)
a = new String(a);
return a;
}
for (var i = 0; i < 100; ++i)
shouldBe("\"\" + foo({toString:function() { debug(\"hello\"); return 42; }})", "\"42\"");