0d3b2df99a8480cb35a7dd6b34e662536eab8db7
[WebKit-https.git] / Source / JavaScriptCore / tests / stress / generator-with-new-target.js
1 function shouldBe(actual, expected) {
2     if (actual !== expected)
3         throw new Error('bad value: ' + actual);
4 }
5
6 function *gen()
7 {
8     yield new.target;
9 }
10
11 var g = gen();
12 shouldBe(g.next().value, undefined);
13
14 var g2 = new gen();
15 shouldBe(g.next().value, undefined);