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