blob: 45899e7c78b76a63c44755c97de223019cb4d0bd [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
async function* gen()
{
}
var originalPrototype = gen.prototype;
for (var i = 0; i < 1e6; ++i) {
var g = gen();
shouldBe(g.__proto__, gen.prototype);
}
gen.prototype = {};
var g = gen();
shouldBe(g.__proto__, gen.prototype);
shouldBe(g.__proto__ !== originalPrototype, true);