blob: fe208f581296f9ae08a6bfb398b48225742d6b78 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function *gen()
{
var test = 42;
yield 32;
yield 33;
yield test;
}
var g = gen();
shouldBe(g.next().value, 32);
shouldBe(g.next().value, 33);
shouldBe(g.next().value, 42);