tor-browser

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

closure-pluseq.js (428B)


      1 actual = '';
      2 expected = '3,6,9,12,15,18,';
      3 
      4 function slice(a, b)
      5 {
      6  //return { x: a + ':' + b };
      7  return b;
      8 }
      9 
     10 function f()
     11 {
     12  var length = 20;
     13  var index = 0;
     14 
     15  function get3() {
     16    //appendToActual("get3 " + index);
     17    if (length - index < 3)
     18      return null;
     19    return slice(index, index += 3);
     20  }
     21 
     22  var bytes = null;
     23  while (bytes = get3()) {
     24    appendToActual(bytes);
     25  }
     26 }
     27 
     28 f();
     29 
     30 
     31 assertEq(actual, expected)