Ticket #1632: Test-HUnit-Text.html

File Test-HUnit-Text.html, 12.9 KB (added by himself@…, 7 years ago)

HTML docs produced by Haddock

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--Rendered using the Haskell Html Library v0.2-->
3<HTML
4><HEAD
5><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
6><TITLE
7>Test.HUnit.Text</TITLE
8>
9<style type="text/css">
10/* -------- Global things --------- */
11
12BODY { 
13  background-color: #ffffff;
14  color: #000000;
15  font-family: sans-serif;
16  } 
17
18A:link    { color: #0000e0; text-decoration: none }
19A:visited { color: #0000a0; text-decoration: none }
20A:hover   { background-color: #e0e0ff; text-decoration: none }
21
22TABLE.vanilla {
23  width: 100%;
24  border-width: 0px;
25  /* I can't seem to specify cellspacing or cellpadding properly using CSS... */
26}
27
28TABLE.vanilla2 {
29  border-width: 0px;
30}
31
32/* <TT> font is a little too small in MSIE */
33TT  { font-size: 100%; }
34PRE { font-size: 100%; }
35
36LI P { margin: 0pt } 
37
38TD {
39  border-width: 0px;
40}
41
42TABLE.narrow {
43  border-width: 0px;
44}
45
46TD.s8  {  height: 8px;  }
47TD.s15 {  height: 15px; }
48
49SPAN.keyword { text-decoration: underline; }
50
51/* Resize the buttom image to match the text size */
52IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }
53
54/* --------- Contents page ---------- */
55
56DIV.node {
57  padding-left: 3em;
58}
59
60DIV.cnode {
61  padding-left: 1.75em;
62}
63
64SPAN.pkg {
65  position: absolute;
66  left: 50em;
67}
68
69/* --------- Documentation elements ---------- */
70
71TD.children {
72  padding-left: 25px;
73  }
74
75TD.synopsis {
76  padding: 2px;
77  background-color: #f0f0f0;
78  font-family: monospace
79 }
80
81TD.decl { 
82  padding: 2px;
83  background-color: #f0f0f0; 
84  font-family: monospace;
85  vertical-align: top;
86  }
87
88TD.topdecl {
89  padding: 2px;
90  background-color: #f0f0f0;
91  font-family: monospace;
92  vertical-align: top;
93}
94
95TABLE.declbar {
96  border-spacing: 0px;
97 }
98
99TD.declname {
100  width: 100%;
101 }
102
103TD.declbut {
104  padding-left: 5px;
105  padding-right: 5px;
106  border-left-width: 1px;
107  border-left-color: #000099;
108  border-left-style: solid;
109  white-space: nowrap;
110  font-size: small;
111 }
112
113/*
114  arg is just like decl, except that wrapping is not allowed.  It is
115  used for function and constructor arguments which have a text box
116  to the right, where if wrapping is allowed the text box squashes up
117  the declaration by wrapping it.
118*/
119TD.arg { 
120  padding: 2px;
121  background-color: #f0f0f0; 
122  font-family: monospace;
123  vertical-align: top;
124  white-space: nowrap;
125  }
126
127TD.recfield { padding-left: 20px }
128
129TD.doc  { 
130  padding-top: 2px;
131  padding-left: 10px;
132  }
133
134TD.ndoc  { 
135  padding: 2px;
136  }
137
138TD.rdoc  { 
139  padding: 2px;
140  padding-left: 10px;
141  width: 100%;
142  }
143
144TD.body  { 
145  padding-left: 10px
146  }
147
148TD.pkg {
149  width: 100%;
150  padding-left: 10px
151}
152
153TD.indexentry {
154  vertical-align: top;
155  padding-right: 10px
156  }
157
158TD.indexannot {
159  vertical-align: top;
160  padding-left: 20px;
161  white-space: nowrap
162  }
163
164TD.indexlinks {
165  width: 100%
166  }
167
168/* ------- Section Headings ------- */
169
170TD.section1 {
171  padding-top: 15px;
172  font-weight: bold;
173  font-size: 150%
174  }
175
176TD.section2 {
177  padding-top: 10px;
178  font-weight: bold;
179  font-size: 130%
180  }
181
182TD.section3 {
183  padding-top: 5px;
184  font-weight: bold;
185  font-size: 110%
186  }
187
188TD.section4 {
189  font-weight: bold;
190  font-size: 100%
191  }
192
193/* -------------- The title bar at the top of the page */
194
195TD.infohead {
196  color: #ffffff;
197  font-weight: bold;
198  padding-right: 10px;
199  text-align: left;
200}
201
202TD.infoval {
203  color: #ffffff;
204  padding-right: 10px;
205  text-align: left;
206}
207
208TD.topbar {
209  background-color: #000099;
210  padding: 5px;
211}
212
213TD.title {
214  color: #ffffff;
215  padding-left: 10px;
216  width: 100%
217  }
218
219TD.topbut {
220  padding-left: 5px;
221  padding-right: 5px;
222  border-left-width: 1px;
223  border-left-color: #ffffff;
224  border-left-style: solid;
225  white-space: nowrap;
226  }
227
228TD.topbut A:link {
229  color: #ffffff
230  }
231
232TD.topbut A:visited {
233  color: #ffff00
234  }
235
236TD.topbut A:hover {
237  background-color: #6060ff;
238  }
239
240TD.topbut:hover {
241  background-color: #6060ff
242  }
243
244TD.modulebar { 
245  background-color: #0077dd;
246  padding: 5px;
247  border-top-width: 1px;
248  border-top-color: #ffffff;
249  border-top-style: solid;
250  }
251
252/* --------- The page footer --------- */
253
254TD.botbar {
255  background-color: #000099;
256  color: #ffffff;
257  padding: 5px
258  }
259TD.botbar A:link {
260  color: #ffffff;
261  text-decoration: underline
262  }
263TD.botbar A:visited {
264  color: #ffff00
265  }
266TD.botbar A:hover {
267  background-color: #6060ff
268  }
269</style>
270<SCRIPT TYPE="text/javascript">
271//<!--
272// Haddock JavaScript utilities
273function toggle(button,id)
274{
275   var n = document.getElementById(id).style;
276   if (n.display == "none")
277   {
278        button.src = "minus.gif";
279        n.display = "block";
280   }
281   else
282   {
283        button.src = "plus.gif";
284        n.display = "none";
285   }
286}
287//-->
288</SCRIPT>
289</HEAD
290><BODY
291><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
292><TR
293><TD CLASS="topbar"
294><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
295><TR
296><TD
297><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
298></TD
299><TD CLASS="title"
300></TD
301><TD CLASS="topbut"
302><A HREF="index.html"
303>Contents</A
304></TD
305><TD CLASS="topbut"
306><A HREF="doc-index.html"
307>Index</A
308></TD
309></TR
310></TABLE
311></TD
312></TR
313><TR
314><TD CLASS="modulebar"
315><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
316><TR
317><TD
318><FONT SIZE="6"
319>Test.HUnit.Text</FONT
320></TD
321></TR
322></TABLE
323></TD
324></TR
325><TR
326><TD CLASS="s15"
327></TD
328></TR
329><TR
330><TD CLASS="section1"
331>Description</TD
332></TR
333><TR
334><TD CLASS="doc"
335>Text-based test controller for running HUnit tests and reporting
336   results as text, usually to a terminal.
337</TD
338></TR
339><TR
340><TD CLASS="s15"
341></TD
342></TR
343><TR
344><TD CLASS="section1"
345>Synopsis</TD
346></TR
347><TR
348><TD CLASS="s15"
349></TD
350></TR
351><TR
352><TD CLASS="body"
353><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
354><TR
355><TD CLASS="decl"
356><SPAN CLASS="keyword"
357>data</SPAN
358> <A HREF="#t%3APutText"
359>PutText</A
360> st = <A HREF="#v%3APutText"
361>PutText</A
362> (String -&gt; Bool -&gt; st -&gt; IO st) st</TD
363></TR
364><TR
365><TD CLASS="s8"
366></TD
367></TR
368><TR
369><TD CLASS="decl"
370><A HREF="#v%3AputTextToHandle"
371>putTextToHandle</A
372> :: Handle -&gt; Bool -&gt; <A HREF="Test-HUnit-Text.html#t%3APutText"
373>PutText</A
374> Int</TD
375></TR
376><TR
377><TD CLASS="s8"
378></TD
379></TR
380><TR
381><TD CLASS="decl"
382><A HREF="#v%3AputTextToShowS"
383>putTextToShowS</A
384> :: <A HREF="Test-HUnit-Text.html#t%3APutText"
385>PutText</A
386> ShowS</TD
387></TR
388><TR
389><TD CLASS="s8"
390></TD
391></TR
392><TR
393><TD CLASS="decl"
394><A HREF="#v%3ArunTestText"
395>runTestText</A
396> :: <A HREF="Test-HUnit-Text.html#t%3APutText"
397>PutText</A
398> st -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
399>Test</A
400> -&gt; IO (<A HREF="Test-HUnit-Base.html#t%3ACounts"
401>Counts</A
402>, st)</TD
403></TR
404><TR
405><TD CLASS="s8"
406></TD
407></TR
408><TR
409><TD CLASS="decl"
410><A HREF="#v%3AshowPath"
411>showPath</A
412> :: <A HREF="Test-HUnit-Base.html#t%3APath"
413>Path</A
414> -&gt; String</TD
415></TR
416><TR
417><TD CLASS="s8"
418></TD
419></TR
420><TR
421><TD CLASS="decl"
422><A HREF="#v%3AshowCounts"
423>showCounts</A
424> :: <A HREF="Test-HUnit-Base.html#t%3ACounts"
425>Counts</A
426> -&gt; String</TD
427></TR
428><TR
429><TD CLASS="s8"
430></TD
431></TR
432><TR
433><TD CLASS="decl"
434><A HREF="#v%3ArunTestTT"
435>runTestTT</A
436> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
437>Test</A
438> -&gt; IO <A HREF="Test-HUnit-Base.html#t%3ACounts"
439>Counts</A
440></TD
441></TR
442></TABLE
443></TD
444></TR
445><TR
446><TD CLASS="s15"
447></TD
448></TR
449><TR
450><TD CLASS="section1"
451>Documentation</TD
452></TR
453><TR
454><TD CLASS="s15"
455></TD
456></TR
457><TR
458><TD CLASS="decl"
459><SPAN CLASS="keyword"
460>data</SPAN
461> <A NAME="t%3APutText"
462></A
463><B
464>PutText</B
465> st</TD
466></TR
467><TR
468><TD CLASS="body"
469><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
470><TR
471><TD CLASS="ndoc"
472><P
473>As the general text-based test controller (<TT
474><A HREF="Test-HUnit-Text.html#v%3ArunTestText"
475>runTestText</A
476></TT
477>) executes a
478   test, it reports each test case start, error, and failure by
479   constructing a string and passing it to the function embodied in a
480   <TT
481><A HREF="Test-HUnit-Text.html#t%3APutText"
482>PutText</A
483></TT
484>.  A report string is known as a &quot;line&quot;, although it includes
485   no line terminator; the function in a <TT
486><A HREF="Test-HUnit-Text.html#t%3APutText"
487>PutText</A
488></TT
489> is responsible for
490   terminating lines appropriately.  Besides the line, the function
491   receives a flag indicating the intended &quot;persistence&quot; of the line:
492   True indicates that the line should be part of the final overall
493   report; False indicates that the line merely indicates progress of
494   the test execution.  Each progress line shows the current values of
495   the cumulative test execution counts; a final, persistent line shows
496   the final count values.
497</P
498><P
499>The <TT
500><A HREF="Test-HUnit-Text.html#t%3APutText"
501>PutText</A
502></TT
503> function is also passed, and returns, an arbitrary state
504   value (called st here).  The initial state value is given in the
505   <TT
506><A HREF="Test-HUnit-Text.html#t%3APutText"
507>PutText</A
508></TT
509>; the final value is returned by <TT
510><A HREF="Test-HUnit-Text.html#v%3ArunTestText"
511>runTestText</A
512></TT
513>.
514</P
515></TD
516></TR
517><TR
518><TD CLASS="section4"
519>Constructors</TD
520></TR
521><TR
522><TD CLASS="body"
523><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
524><TR
525><TD CLASS="arg"
526><A NAME="v%3APutText"
527></A
528><B
529>PutText</B
530> (String -&gt; Bool -&gt; st -&gt; IO st) st</TD
531><TD CLASS="rdoc"
532></TD
533></TR
534></TABLE
535></TD
536></TR
537></TABLE
538></TD
539></TR
540><TR
541><TD CLASS="s15"
542></TD
543></TR
544><TR
545><TD CLASS="decl"
546><A NAME="v%3AputTextToHandle"
547></A
548><B
549>putTextToHandle</B
550> :: Handle -&gt; Bool -&gt; <A HREF="Test-HUnit-Text.html#t%3APutText"
551>PutText</A
552> Int</TD
553></TR
554><TR
555><TD CLASS="doc"
556>writes persistent lines to the given handle, following each by a newline
557   character.  In addition, if the given flag is True, it writes progress
558   lines to the handle as well.  A progress line is written with no line
559   termination, so that it can be  overwritten by the next report line.
560   As overwriting involves writing carriage return and blank characters, its
561   proper effect is usually only obtained on terminal devices.
562</TD
563></TR
564><TR
565><TD CLASS="s15"
566></TD
567></TR
568><TR
569><TD CLASS="decl"
570><A NAME="v%3AputTextToShowS"
571></A
572><B
573>putTextToShowS</B
574> :: <A HREF="Test-HUnit-Text.html#t%3APutText"
575>PutText</A
576> ShowS</TD
577></TR
578><TR
579><TD CLASS="doc"
580>accumulates persistent lines (dropping progess lines) for return by
581   <TT
582><A HREF="Test-HUnit-Text.html#v%3ArunTestText"
583>runTestText</A
584></TT
585>.  The accumulated lines are represented by a
586   <TT
587>ShowS (String -&gt; String)</TT
588> function whose first argument is the
589   string to be appended to the accumulated report lines.
590</TD
591></TR
592><TR
593><TD CLASS="s15"
594></TD
595></TR
596><TR
597><TD CLASS="decl"
598><A NAME="v%3ArunTestText"
599></A
600><B
601>runTestText</B
602> :: <A HREF="Test-HUnit-Text.html#t%3APutText"
603>PutText</A
604> st -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
605>Test</A
606> -&gt; IO (<A HREF="Test-HUnit-Base.html#t%3ACounts"
607>Counts</A
608>, st)</TD
609></TR
610><TR
611><TD CLASS="doc"
612>executes a test, processing each report line according to the given
613   reporting scheme.  The reporting scheme's state is threaded through calls
614   to the reporting scheme's function and finally returned, along with final
615   count values.
616</TD
617></TR
618><TR
619><TD CLASS="s15"
620></TD
621></TR
622><TR
623><TD CLASS="decl"
624><A NAME="v%3AshowPath"
625></A
626><B
627>showPath</B
628> :: <A HREF="Test-HUnit-Base.html#t%3APath"
629>Path</A
630> -&gt; String</TD
631></TR
632><TR
633><TD CLASS="doc"
634>converts a test case path to a string, separating adjacent elements by
635   the colon (':'). An element of the path is quoted (as with show) when
636   there is potential ambiguity.
637</TD
638></TR
639><TR
640><TD CLASS="s15"
641></TD
642></TR
643><TR
644><TD CLASS="decl"
645><A NAME="v%3AshowCounts"
646></A
647><B
648>showCounts</B
649> :: <A HREF="Test-HUnit-Base.html#t%3ACounts"
650>Counts</A
651> -&gt; String</TD
652></TR
653><TR
654><TD CLASS="doc"
655>converts test execution counts to a string.
656</TD
657></TR
658><TR
659><TD CLASS="s15"
660></TD
661></TR
662><TR
663><TD CLASS="decl"
664><A NAME="v%3ArunTestTT"
665></A
666><B
667>runTestTT</B
668> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
669>Test</A
670> -&gt; IO <A HREF="Test-HUnit-Base.html#t%3ACounts"
671>Counts</A
672></TD
673></TR
674><TR
675><TD CLASS="doc"
676><P
677>provides the &quot;standard&quot; text-based test controller. Reporting is made to
678   standard error, and progress reports are included. For possible
679   programmatic use, the final counts are returned.
680</P
681><P
682>The &quot;TT&quot; in the name suggests &quot;Text-based reporting to the Terminal&quot;.
683</P
684></TD
685></TR
686><TR
687><TD CLASS="s15"
688></TD
689></TR
690><TR
691><TD CLASS="botbar"
692>Produced by <A HREF="http://www.haskell.org/haddock/"
693>Haddock</A
694> version 0.8</TD
695></TR
696></TABLE
697></BODY
698></HTML
699>