diff --git a/test/built-ins/GeneratorPrototype/throw/try-finally-following-finally.js b/test/built-ins/GeneratorPrototype/throw/try-finally-following-finally.js index 7db1bbca3a31aa2f2cc0b5e70069a5bf45a5e31e..0c7c06101943cba69dcd0245145432706bc9aae8 100644 --- a/test/built-ins/GeneratorPrototype/throw/try-finally-following-finally.js +++ b/test/built-ins/GeneratorPrototype/throw/try-finally-following-finally.js @@ -16,6 +16,7 @@ function* g() { yield 3; } yield 4; + $ERROR('This code is unreachable'); } var iter = g(); var result; @@ -28,10 +29,14 @@ result = iter.next(); assert.sameValue(result.value, 2, 'Second result `value`'); assert.sameValue(result.done, false, 'Second result `done` flag'); -result = iter.throw(new Error()); +result = iter.next(); assert.sameValue(result.value, 3, 'Third result `value`'); assert.sameValue(result.done, false, 'Third result `done` flag'); +result = iter.next(); +assert.sameValue(result.value, 4, 'Third result `value`'); +assert.sameValue(result.done, false, 'Third result `done` flag'); + assert.throws(Test262Error, function() { iter.throw(new Test262Error()); }); result = iter.next();