summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/generator.es6
blob: 431fd76f2213f8134e5efce74e426e2a42360b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function * generator() {
  yield 1;
  yield 2;
}

function fn() {
  var iterator = generator();
  iterator.next();
  iterator.next();
  return iterator.next().done;
}

assertEqual(fn(), true);
test(fn);