tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

generator.js (578B)


      1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 12.2.5
      5 description: >
      6    computed property names can be used as the name of a generator method in a class
      7 includes: [compareArray.js]
      8 ---*/
      9 class C {
     10  *['a']() {
     11    yield 1;
     12    yield 2;
     13  }
     14 }
     15 assert.sameValue(
     16  Object.keys(C.prototype).length,
     17  0,
     18  "The value of `Object.keys(C.prototype).length` is `0`"
     19 );
     20 assert.compareArray(
     21  Object.getOwnPropertyNames(C.prototype),
     22  ['constructor', 'a']
     23 );
     24 
     25 reportCompare(0, 0);