~ubuntu-branches/ubuntu/trusty/mozjs24/trusty-proposed

« back to all changes in this revision

Viewing changes to js/src/tests/js1_7/geniter/yield-new.js

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-02-11 21:55:34 UTC
  • Revision ID: package-import@ubuntu.com-20140211215534-m1zyq5aj59md3y07
Tags: upstream-24.2.0
ImportĀ upstreamĀ versionĀ 24.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
const K = 20;
 
2
 
 
3
var obj;
 
4
 
 
5
var g = new function() {
 
6
    this.x = "puppies";
 
7
    obj = this;
 
8
    for (var i = 0; i < K; ++i)
 
9
        yield i;
 
10
    yield this;
 
11
}
 
12
 
 
13
var ct = 0;
 
14
for (var i in g)
 
15
    assertEq((ct < K && ct++ == i) || i == obj, true);
 
16
assertEq(i.x, "puppies");
 
17
 
 
18
reportCompare(true,true);