fixup! Add tests for MethodDefinition forms new to ES6

Update test according to latest change to ES6 spec:
https://twitter.com/awbjs/status/603251578070552576
This commit is contained in:
Mike Pennisi 2015-05-26 14:52:21 -04:00
parent 30a4a5da7d
commit b2a62444fc

View File

@ -3,26 +3,16 @@
/*--- /*---
description: > description: >
When the `yield` keyword occurs within the Initializer of a The Initializer of a SingleNameBinding witihn the FormalParameters of a
SingleNameBinding witihn the FormalParameters of a GeneratorMethod, it GeneratorMethod may not contain the `yield` keyword.
behaves as a YieldExpression.
es6id: 14.4 es6id: 14.4
features: [generators] features: [generators]
flags: [noStrict] flags: [noStrict]
negative: SyntaxError
---*/ ---*/
var yield = 'defaultViaIdentifier'; (function*() {
var obj; ({
var iter = (function*() { *method(x = yield) {}
obj = { });
*method(x = yield) { });
return x;
}
};
}());
iter.next();
iter.next('defaultViaExpression');
assert.sameValue(obj.method().next(), 'defaultViaExpression');