add traceur test suite
This commit is contained in:
15
test/fixtures/traceur/Yield/ForLexicallyNestedGenerator.js
vendored
Normal file
15
test/fixtures/traceur/Yield/ForLexicallyNestedGenerator.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
function* forLexicallyNestedGenerator() {
|
||||
yield* (function*() { yield [1,2,3]; yield* [4,5,6]; })();
|
||||
}
|
||||
|
||||
function accumulate(iterator) {
|
||||
var result = '';
|
||||
for (var value of iterator) {
|
||||
result = result + String(value);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
assert.equal('1,2,3456', accumulate(forLexicallyNestedGenerator()));
|
||||
Reference in New Issue
Block a user