tor-browser

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

cptn-value.js (792B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-let-and-const-declarations-runtime-semantics-evaluation
      5 es6id: 13.3.1.4
      6 description: Returns an empty completion
      7 info: |
      8  LexicalDeclaration : LetOrConst BindingList ;
      9 
     10  1. Let next be the result of evaluating BindingList.
     11  2. ReturnIfAbrupt(next).
     12  3. Return NormalCompletion(empty).
     13 ---*/
     14 
     15 assert.sameValue(
     16  eval('const test262id1 = 1;'), undefined, 'Single declaration'
     17 );
     18 assert.sameValue(
     19  eval('const test262id2 = 2, test262id3 = 3;'),
     20  undefined,
     21  'Multiple declarations'
     22 );
     23 
     24 assert.sameValue(eval('4; const test262id5 = 5;'), 4);
     25 assert.sameValue(eval('6; let test262id7 = 7, test262id8 = 8;'), 6);
     26 
     27 reportCompare(0, 0);