PageRenderTime 73ms CodeModel.GetById 50ms app.highlight 7ms RepoModel.GetById 13ms app.codeStats 1ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/tests/javascript.expected/javascript-generator-expression.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 45 lines | 44 code | 0 blank | 1 comment | 10 complexity | 13aedfd274e2df06080df4169948b352 MD5 | raw file
 1/* automatically generated by JSCoverage - do not edit */
 2if (! top._$jscoverage) {
 3  top._$jscoverage = {};
 4}
 5var _$jscoverage = top._$jscoverage;
 6if (! _$jscoverage['javascript-generator-expression.js']) {
 7  _$jscoverage['javascript-generator-expression.js'] = [];
 8  _$jscoverage['javascript-generator-expression.js'][3] = 0;
 9  _$jscoverage['javascript-generator-expression.js'][4] = 0;
10  _$jscoverage['javascript-generator-expression.js'][5] = 0;
11  _$jscoverage['javascript-generator-expression.js'][6] = 0;
12  _$jscoverage['javascript-generator-expression.js'][9] = 0;
13  _$jscoverage['javascript-generator-expression.js'][12] = 0;
14  _$jscoverage['javascript-generator-expression.js'][13] = 0;
15  _$jscoverage['javascript-generator-expression.js'][14] = 0;
16  _$jscoverage['javascript-generator-expression.js'][16] = 0;
17  _$jscoverage['javascript-generator-expression.js'][18] = 0;
18}
19_$jscoverage['javascript-generator-expression.js'][3]++;
20var it = (i + 3 for (i in someObj));
21_$jscoverage['javascript-generator-expression.js'][4]++;
22try {
23  _$jscoverage['javascript-generator-expression.js'][5]++;
24  while (true) {
25    _$jscoverage['javascript-generator-expression.js'][6]++;
26    document.write(it.next() + "<br>\n");
27}
28}
29catch (err if err instanceof StopIteration) {
30  _$jscoverage['javascript-generator-expression.js'][9]++;
31  document.write("End of record.<br>\n");
32}
33_$jscoverage['javascript-generator-expression.js'][12]++;
34function handleResults(results) {
35  _$jscoverage['javascript-generator-expression.js'][13]++;
36  for (let i in results) {
37    _$jscoverage['javascript-generator-expression.js'][14]++;
38    ;
39}
40}
41_$jscoverage['javascript-generator-expression.js'][16]++;
42handleResults((i for (i in obj) if (i > 3)));
43_$jscoverage['javascript-generator-expression.js'][18]++;
44it = (1 for (a in x) for (b in y));
45_$jscoverage['javascript-generator-expression.js'].source = ["<span class=\"c\">// https://developer.mozilla.org/en/New_in_JavaScript_1.8</span>","","<span class=\"k\">let</span> it <span class=\"k\">=</span> <span class=\"k\">(</span>i <span class=\"k\">+</span> <span class=\"s\">3</span> <span class=\"k\">for</span> <span class=\"k\">(</span>i <span class=\"k\">in</span> someObj<span class=\"k\">));</span>","<span class=\"k\">try</span> <span class=\"k\">{</span>","  <span class=\"k\">while</span> <span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">)</span> <span class=\"k\">{</span>","    document<span class=\"k\">.</span>write<span class=\"k\">(</span>it<span class=\"k\">.</span>next<span class=\"k\">()</span> <span class=\"k\">+</span> <span class=\"s\">\"&lt;br&gt;</span><span class=\"t\">\\n</span><span class=\"s\">\"</span><span class=\"k\">);</span>","  <span class=\"k\">}</span>","<span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span>err <span class=\"k\">if</span> err <span class=\"k\">instanceof</span> StopIteration<span class=\"k\">)</span> <span class=\"k\">{</span>","  document<span class=\"k\">.</span>write<span class=\"k\">(</span><span class=\"s\">\"End of record.&lt;br&gt;</span><span class=\"t\">\\n</span><span class=\"s\">\"</span><span class=\"k\">);</span>","<span class=\"k\">}</span>","","<span class=\"k\">function</span> handleResults<span class=\"k\">(</span> results <span class=\"k\">)</span> <span class=\"k\">{</span>","  <span class=\"k\">for</span> <span class=\"k\">(</span> <span class=\"k\">let</span> i <span class=\"k\">in</span> results <span class=\"k\">)</span>","    <span class=\"k\">;</span>","<span class=\"k\">}</span>","handleResults<span class=\"k\">(</span> i <span class=\"k\">for</span> <span class=\"k\">(</span> i <span class=\"k\">in</span> obj <span class=\"k\">)</span> <span class=\"k\">if</span> <span class=\"k\">(</span> i <span class=\"k\">&gt;</span> <span class=\"s\">3</span> <span class=\"k\">)</span> <span class=\"k\">);</span>","","it <span class=\"k\">=</span> <span class=\"k\">(</span><span class=\"s\">1</span> <span class=\"k\">for</span><span class=\"k\">(</span>a <span class=\"k\">in</span> x<span class=\"k\">)</span> <span class=\"k\">for</span><span class=\"k\">(</span>b <span class=\"k\">in</span> y<span class=\"k\">));</span>"];