blob: 86f0617691f531a43fb2898e43075533ac72b6f0 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var object = {};
object.__proto__ = {
toString: undefined,
valueOf: function () {
return 42;
}
};
shouldBe(object + 42, 84);
shouldBe(object + 42, 84);
object.__proto__.valueOf = function () {
return 43;
};
shouldBe(object + 42, 85);