blob: 4c993905bf913a63ece45ca81d9c7a29678eefca [file] [log] [blame]
function test() {
var sent;
function * generator(){
sent = [yield 5, yield 6];
};
var iterator = generator();
iterator.next();
iterator.next("foo");
iterator.next("bar");
return sent[0] === "foo" && sent[1] === "bar";
}
if (!test())
throw new Error("Test failed");