Fix a few small issues in generators (#3919)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -69,7 +69,7 @@ check_result(f.throw("throw"), "z", false)
|
||||
check_throw("f.next()", "throw")
|
||||
check_result(f.next(), undefined, true)
|
||||
|
||||
function* gen3() {
|
||||
function/* generator */*/* generator */gen3() {
|
||||
try {
|
||||
return 8
|
||||
} finally {
|
||||
@@ -80,3 +80,15 @@ function* gen3() {
|
||||
f = gen3()
|
||||
check_result(f.next(), 1, false)
|
||||
check_throw("f.throw(2)", 2)
|
||||
|
||||
function
|
||||
/* generator */
|
||||
*
|
||||
/* generator */
|
||||
gen4()
|
||||
{
|
||||
}
|
||||
|
||||
f = gen4()
|
||||
check_result(f.next(), undefined, true)
|
||||
check_throw("f.throw('Str')", "Str")
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
<test id="built-ins/Function/StrictFunction_restricted-properties.js"><reason></reason></test>
|
||||
<test id="built-ins/GeneratorFunction/instance-restricted-properties.js"><reason></reason></test>
|
||||
<test id="built-ins/GeneratorPrototype/next/context-constructor-invocation.js"><reason></reason></test>
|
||||
<test id="built-ins/GeneratorPrototype/throw/from-state-completed.js"><reason></reason></test>
|
||||
<test id="built-ins/Map/prototype/Symbol.iterator.js"><reason></reason></test>
|
||||
<test id="built-ins/Number/15.7.4-1.js"><reason></reason></test>
|
||||
<test id="built-ins/Number/prototype/S15.7.3.1_A2_T1.js"><reason></reason></test>
|
||||
|
||||
Reference in New Issue
Block a user