06d918ed0f9969ef874a4f1424274a9477ea251c
[packages/hpc.git] / tests / function / tough.stdout
1 "Hello"
2 "Hello"
3 badCase
4 badCase
5 "Bark"
6 "Hello"
7 (1,2,3)
8
9
10  71% expressions used (68/95)
11  14% boolean coverage (1/7)
12        0% guards (0/4), 3 always True, 1 always False
13       33% 'if' conditions (1/3), 1 always True, 1 always False
14      100% qualifiers (0/0)
15  58% alternatives used (7/12)
16 100% local declarations used (0/0)
17  83% top-level declarations used (5/6)
18
19
20 -----<module Main>-----
21  71% expressions used (68/95)
22  14% boolean coverage (1/7)
23        0% guards (0/4), 3 always True, 1 always False
24       33% 'if' conditions (1/3), 1 always True, 1 always False
25      100% qualifiers (0/0)
26  58% alternatives used (7/12)
27 100% local declarations used (0/0)
28  83% top-level declarations used (5/6)
29
30
31 Writing: Main.hs.html
32 <html><style type="text/css">
33 span.lineno { color: white; background: #aaaaaa; border-right: solid white 12px }
34 span.nottickedoff { background: yellow}
35 span.istickedoff { background: white }
36 span.tickonlyfalse { margin: -1px; border: 1px solid #f20913; background: #f20913 }
37 span.tickonlytrue  { margin: -1px; border: 1px solid #60de51; background: #60de51 }
38 span.funcount { font-size: small; color: orange; z-index: 2; position: absolute; right: 20 }
39 span.decl { font-weight: bold }
40 span.spaces    { background: white }
41 </style>
42 <pre>
43 <span class="lineno">    1 </span>import Control.Exception as E
44 <span class="lineno">    2 </span>
45 <span class="lineno">    3 </span>-- This test shows what hpc can really do.
46 <span class="lineno">    4 </span>
47 <span class="lineno">    5 </span><span class="decl"><span class="istickedoff">main = do</span>
48 <span class="lineno">    6 </span><span class="spaces">  </span><span class="istickedoff">print (&quot;Hello&quot;)</span>
49 <span class="lineno">    7 </span><span class="spaces">  </span><span class="istickedoff">foo &quot;Hello&quot;</span>
50 <span class="lineno">    8 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">44</span>))</span>
51 <span class="lineno">    9 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>
52 <span class="lineno">   10 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">(error &quot;Foo&quot;)</span>))</span>
53 <span class="lineno">   11 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>
54 <span class="lineno">   12 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print &quot;Bark&quot;)</span>
55 <span class="lineno">   13 </span><span class="spaces">          </span><span class="istickedoff"><span class="nottickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span></span>
56 <span class="lineno">   14 </span><span class="spaces">  </span><span class="istickedoff">(_,_) &lt;- return $ (<span class="nottickedoff">&quot;Hello&quot;</span>,<span class="nottickedoff">&quot;World&quot;</span>)</span>
57 <span class="lineno">   15 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span>
58 <span class="lineno">   16 </span><span class="spaces">  </span><span class="istickedoff">() &lt;- return ()</span>
59 <span class="lineno">   17 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
60 <span class="lineno">   18 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwoz</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>
61 <span class="lineno">   19 </span><span class="spaces">    </span><span class="istickedoff">_             -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
62 <span class="lineno">   20 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
63 <span class="lineno">   21 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>
64 <span class="lineno">   22 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
65 <span class="lineno">   23 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
66 <span class="lineno">   24 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> </span>
67 <span class="lineno">   25 </span><span class="spaces">      </span><span class="istickedoff">, <span class="tickonlyfalse">False</span>      -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
68 <span class="lineno">   26 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; return &quot;Hello&quot;</span>
69 <span class="lineno">   27 </span><span class="spaces">  </span><span class="istickedoff">print t</span>
70 <span class="lineno">   28 </span><span class="spaces">  </span><span class="istickedoff">print foo2</span></span>
71 <span class="lineno">   29 </span>
72 <span class="lineno">   30 </span><span class="decl"><span class="istickedoff">foo x = do</span>
73 <span class="lineno">   31 </span><span class="spaces">  </span><span class="istickedoff">print x</span>
74 <span class="lineno">   32 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span></span>
75 <span class="lineno">   33 </span>
76 <span class="lineno">   34 </span><span class="decl"><span class="nottickedoff">unused_ a = a</span></span>
77 <span class="lineno">   35 </span>
78 <span class="lineno">   36 </span>badCase :: Int -&gt; Int -&gt; Int
79 <span class="lineno">   37 </span><span class="decl"><span class="istickedoff">badCase a b = </span>
80 <span class="lineno">   38 </span><span class="spaces">        </span><span class="istickedoff">if a &gt; 100 </span>
81 <span class="lineno">   39 </span><span class="spaces">        </span><span class="istickedoff">then error &quot;badCase&quot; </span>
82 <span class="lineno">   40 </span><span class="spaces">        </span><span class="istickedoff">else if <span class="tickonlyfalse">a &gt; 1000</span> </span>
83 <span class="lineno">   41 </span><span class="spaces">             </span><span class="istickedoff">then <span class="nottickedoff">1</span> </span>
84 <span class="lineno">   42 </span><span class="spaces">             </span><span class="istickedoff">else badCase (a + 1) <span class="nottickedoff">(b - 1)</span></span></span>
85 <span class="lineno">   43 </span>
86 <span class="lineno">   44 </span>
87 <span class="lineno">   45 </span><span class="decl"><span class="istickedoff">foo2 = (1,2, if <span class="tickonlytrue">True</span> then 3 else <span class="nottickedoff">4</span>)</span></span>
88 <span class="lineno">   46 </span>
89 <span class="lineno">   47 </span><span class="decl"><span class="istickedoff">otherwoz = True</span></span>
90
91 </pre>
92 </html>
93 Writing: hpc_index.html
94 <html><style type="text/css">table.bar { background-color: #f25913; }
95 td.bar { background-color: #60de51;  }
96 td.invbar { background-color: #f25913;  }
97 table.dashboard { border-collapse: collapse  ; border: solid 1px black }
98 .dashboard td { border: solid 1px black }
99 .dashboard th { border: solid 1px black }
100 </style>
101 <table class="dashboard" width="100%" border=1>
102 <tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
103 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
104 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
105 <tr></tr><tr style="background: #e0e0e0">
106 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
107 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
108 </table></html>
109 Writing: hpc_index_fun.html
110 <html><style type="text/css">table.bar { background-color: #f25913; }
111 td.bar { background-color: #60de51;  }
112 td.invbar { background-color: #f25913;  }
113 table.dashboard { border-collapse: collapse  ; border: solid 1px black }
114 .dashboard td { border: solid 1px black }
115 .dashboard th { border: solid 1px black }
116 </style>
117 <table class="dashboard" width="100%" border=1>
118 <tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
119 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
120 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
121 <tr></tr><tr style="background: #e0e0e0">
122 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
123 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
124 </table></html>
125 Writing: hpc_index_alt.html
126 <html><style type="text/css">table.bar { background-color: #f25913; }
127 td.bar { background-color: #60de51;  }
128 td.invbar { background-color: #f25913;  }
129 table.dashboard { border-collapse: collapse  ; border: solid 1px black }
130 .dashboard td { border: solid 1px black }
131 .dashboard th { border: solid 1px black }
132 </style>
133 <table class="dashboard" width="100%" border=1>
134 <tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
135 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
136 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
137 <tr></tr><tr style="background: #e0e0e0">
138 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
139 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
140 </table></html>
141 Writing: hpc_index_exp.html
142 <html><style type="text/css">table.bar { background-color: #f25913; }
143 td.bar { background-color: #60de51;  }
144 td.invbar { background-color: #f25913;  }
145 table.dashboard { border-collapse: collapse  ; border: solid 1px black }
146 .dashboard td { border: solid 1px black }
147 .dashboard th { border: solid 1px black }
148 </style>
149 <table class="dashboard" width="100%" border=1>
150 <tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
151 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
152 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
153 <tr></tr><tr style="background: #e0e0e0">
154 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
155 <td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
156 </table></html>
157
158