/[jscoverage]/trunk/tests/javascript.expected/javascript-destructuring.js
ViewVC logotype

Diff of /trunk/tests/javascript.expected/javascript-destructuring.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 372 by siliconforks, Fri Oct 24 16:14:43 2008 UTC revision 373 by siliconforks, Mon Oct 27 20:36:44 2008 UTC
# Line 22  Line 22 
22    _$jscoverage['javascript-destructuring.js'][25] = 0;    _$jscoverage['javascript-destructuring.js'][25] = 0;
23    _$jscoverage['javascript-destructuring.js'][26] = 0;    _$jscoverage['javascript-destructuring.js'][26] = 0;
24    _$jscoverage['javascript-destructuring.js'][27] = 0;    _$jscoverage['javascript-destructuring.js'][27] = 0;
25      _$jscoverage['javascript-destructuring.js'][30] = 0;
26      _$jscoverage['javascript-destructuring.js'][31] = 0;
27      _$jscoverage['javascript-destructuring.js'][32] = 0;
28      _$jscoverage['javascript-destructuring.js'][35] = 0;
29  }  }
30  _$jscoverage['javascript-destructuring.js'][3]++;  _$jscoverage['javascript-destructuring.js'][3]++;
31  [a, b] = [b, a];  [a, b] = [b, a];
# Line 62  Line 66 
66    _$jscoverage['javascript-destructuring.js'][27]++;    _$jscoverage['javascript-destructuring.js'][27]++;
67    var [, protocol, fullhost, fullpath] = parsedURL;    var [, protocol, fullhost, fullpath] = parsedURL;
68  }  }
69  _$jscoverage['javascript-destructuring.js'].source = ["<span class=\"c\">// https://developer.mozilla.org/en/New_in_JavaScript_1.7</span>","","<span class=\"k\">[</span>a<span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">[</span>b<span class=\"k\">,</span> a<span class=\"k\">];</span>","","<span class=\"k\">function</span> f<span class=\"k\">()</span> <span class=\"k\">{</span>","  <span class=\"k\">return</span> <span class=\"k\">[</span><span class=\"s\">1</span><span class=\"k\">,</span> <span class=\"s\">2</span><span class=\"k\">];</span>","<span class=\"k\">}</span>","<span class=\"k\">[</span>a<span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","","<span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">let</span> <span class=\"k\">[</span>name<span class=\"k\">,</span> value<span class=\"k\">]</span> <span class=\"k\">in</span> Iterator<span class=\"k\">(</span>obj<span class=\"k\">))</span> <span class=\"k\">{</span>","  print<span class=\"k\">(</span>name<span class=\"k\">);</span>","  print<span class=\"k\">(</span>value<span class=\"k\">);</span>","<span class=\"k\">}</span>","","<span class=\"k\">for</span> each <span class=\"k\">(</span><span class=\"k\">let</span> <span class=\"k\">{</span>name<span class=\"k\">:</span> n<span class=\"k\">,</span> family<span class=\"k\">:</span> <span class=\"k\">{</span> father<span class=\"k\">:</span> f <span class=\"k\">}</span> <span class=\"k\">}</span> <span class=\"k\">in</span> people<span class=\"k\">)</span> <span class=\"k\">{</span>","  print<span class=\"k\">(</span>n<span class=\"k\">);</span>","  print<span class=\"k\">(</span>f<span class=\"k\">);</span>","<span class=\"k\">}</span>","","<span class=\"k\">var</span> <span class=\"k\">[</span>a<span class=\"k\">,</span> <span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","<span class=\"k\">[,,,]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","","<span class=\"k\">function</span> g<span class=\"k\">()</span> <span class=\"k\">{</span>","  <span class=\"k\">var</span> parsedURL <span class=\"k\">=</span> <span class=\"s\">/^(\\w+)\\:\\/\\/([^\\/]+)\\/(.*)$/</span><span class=\"k\">.</span>exec<span class=\"k\">(</span>url<span class=\"k\">);</span>","  <span class=\"k\">if</span> <span class=\"k\">(!</span>parsedURL<span class=\"k\">)</span>","    <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","  <span class=\"k\">var</span> <span class=\"k\">[,</span> protocol<span class=\"k\">,</span> fullhost<span class=\"k\">,</span> fullpath<span class=\"k\">]</span> <span class=\"k\">=</span> parsedURL<span class=\"k\">;</span>","<span class=\"k\">}</span>"];  _$jscoverage['javascript-destructuring.js'][30]++;
70    function h(a, [b, c], {foo: d, "bar": e}) {
71      _$jscoverage['javascript-destructuring.js'][31]++;
72      f();
73      _$jscoverage['javascript-destructuring.js'][32]++;
74      g();
75    }
76    _$jscoverage['javascript-destructuring.js'][35]++;
77    x = function ([a, b]) {
78      return a + b;
79    }
80    ;
81    _$jscoverage['javascript-destructuring.js'].source = ["<span class=\"c\">// https://developer.mozilla.org/en/New_in_JavaScript_1.7</span>","","<span class=\"k\">[</span>a<span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">[</span>b<span class=\"k\">,</span> a<span class=\"k\">];</span>","","<span class=\"k\">function</span> f<span class=\"k\">()</span> <span class=\"k\">{</span>","  <span class=\"k\">return</span> <span class=\"k\">[</span><span class=\"s\">1</span><span class=\"k\">,</span> <span class=\"s\">2</span><span class=\"k\">];</span>","<span class=\"k\">}</span>","<span class=\"k\">[</span>a<span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","","<span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">let</span> <span class=\"k\">[</span>name<span class=\"k\">,</span> value<span class=\"k\">]</span> <span class=\"k\">in</span> Iterator<span class=\"k\">(</span>obj<span class=\"k\">))</span> <span class=\"k\">{</span>","  print<span class=\"k\">(</span>name<span class=\"k\">);</span>","  print<span class=\"k\">(</span>value<span class=\"k\">);</span>","<span class=\"k\">}</span>","","<span class=\"k\">for</span> each <span class=\"k\">(</span><span class=\"k\">let</span> <span class=\"k\">{</span>name<span class=\"k\">:</span> n<span class=\"k\">,</span> family<span class=\"k\">:</span> <span class=\"k\">{</span> father<span class=\"k\">:</span> f <span class=\"k\">}</span> <span class=\"k\">}</span> <span class=\"k\">in</span> people<span class=\"k\">)</span> <span class=\"k\">{</span>","  print<span class=\"k\">(</span>n<span class=\"k\">);</span>","  print<span class=\"k\">(</span>f<span class=\"k\">);</span>","<span class=\"k\">}</span>","","<span class=\"k\">var</span> <span class=\"k\">[</span>a<span class=\"k\">,</span> <span class=\"k\">,</span> b<span class=\"k\">]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","<span class=\"k\">[,,,]</span> <span class=\"k\">=</span> f<span class=\"k\">();</span>","","<span class=\"k\">function</span> g<span class=\"k\">()</span> <span class=\"k\">{</span>","  <span class=\"k\">var</span> parsedURL <span class=\"k\">=</span> <span class=\"s\">/^(\\w+)\\:\\/\\/([^\\/]+)\\/(.*)$/</span><span class=\"k\">.</span>exec<span class=\"k\">(</span>url<span class=\"k\">);</span>","  <span class=\"k\">if</span> <span class=\"k\">(!</span>parsedURL<span class=\"k\">)</span>","    <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","  <span class=\"k\">var</span> <span class=\"k\">[,</span> protocol<span class=\"k\">,</span> fullhost<span class=\"k\">,</span> fullpath<span class=\"k\">]</span> <span class=\"k\">=</span> parsedURL<span class=\"k\">;</span>","<span class=\"k\">}</span>","","<span class=\"k\">function</span> h<span class=\"k\">(</span>a<span class=\"k\">,</span> <span class=\"k\">[</span>b<span class=\"k\">,</span> c<span class=\"k\">],</span> <span class=\"k\">{</span>foo<span class=\"k\">:</span> d<span class=\"k\">,</span> <span class=\"s\">'bar'</span><span class=\"k\">:</span> e<span class=\"k\">}</span><span class=\"k\">)</span> <span class=\"k\">{</span>","  f<span class=\"k\">();</span>","  g<span class=\"k\">();</span>","<span class=\"k\">}</span>","","x <span class=\"k\">=</span> <span class=\"k\">function</span><span class=\"k\">([</span>a<span class=\"k\">,</span> b<span class=\"k\">])</span> a <span class=\"k\">+</span> b<span class=\"k\">;</span>"];

Legend:
Removed from v.372  
changed lines
  Added in v.373

  ViewVC Help
Powered by ViewVC 1.1.24