blob: 0b802bc572695690f2752e4bfcb3fd6dffebedde [file] [log] [blame] [edit]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test(string) {
return string.replace("Hello", "World");
}
noInline(test);
for (var i = 0; i < testLoopCount; ++i)
shouldBe(test("Hello"), "World");
String.prototype[Symbol.replace] = function () { return "Changed"; };
for (var i = 0; i < testLoopCount; ++i)
shouldBe(test("Hello"), "World");