blob: 92d03051b4c082df3aeb989584dd132bff33e13d [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test() {
function* generator() {
return this;
}
var g = generator();
shouldBe(g.__proto__, generator.prototype);
return g;
}
for (var i = 0; i < 1e6; ++i) {
var g1 = test();
var g2 = test();
shouldBe(g1.__proto__ != g2.__proto__, true);
}