Ticket #1632: Test-HUnit-Base.html

File Test-HUnit-Base.html, 39.3 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.Base</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.Base</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
331><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
332><TR
333><TD CLASS="section4"
334><B
335>Contents</B
336></TD
337></TR
338><TR
339><TD
340><DL
341><DT
342><A HREF="#1"
343>Declaring tests
344</A
345></DT
346><DT
347><A HREF="#2"
348>Making assertions
349</A
350></DT
351><DT
352><A HREF="#3"
353>Extending the assertion functionality
354</A
355></DT
356><DT
357><A HREF="#4"
358>Test execution
359</A
360></DT
361></DL
362></TD
363></TR
364></TABLE
365></TD
366></TR
367><TR
368><TD CLASS="s15"
369></TD
370></TR
371><TR
372><TD CLASS="section1"
373>Description</TD
374></TR
375><TR
376><TD CLASS="doc"
377><P
378>Basic definitions for the HUnit library.
379</P
380><P
381>This module contains what you need to create assertions and test cases and
382   combine them into test suites. It also provides infrastructure for
383   implementing test controllers (which are used to execute tests). For an
384   exemplary implementation of a test controller, see <A HREF="Test-HUnit-Text.html"
385>Test.HUnit.Text</A
386>.
387</P
388></TD
389></TR
390><TR
391><TD CLASS="s15"
392></TD
393></TR
394><TR
395><TD CLASS="section1"
396>Synopsis</TD
397></TR
398><TR
399><TD CLASS="s15"
400></TD
401></TR
402><TR
403><TD CLASS="body"
404><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
405><TR
406><TD CLASS="decl"
407><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
408><TR
409><TD CLASS="decl"
410><SPAN CLASS="keyword"
411>data</SPAN
412> <A HREF="#t%3ATest"
413>Test</A
414> </TD
415></TR
416><TR
417><TD CLASS="body"
418><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
419><TR
420><TD CLASS="decl"
421>= <A HREF="#v%3ATestCase"
422>TestCase</A
423> <A HREF="Test-HUnit-Base.html#t%3AAssertion"
424>Assertion</A
425></TD
426></TR
427><TR
428><TD CLASS="decl"
429>| <A HREF="#v%3ATestList"
430>TestList</A
431> [<A HREF="Test-HUnit-Base.html#t%3ATest"
432>Test</A
433>]</TD
434></TR
435><TR
436><TD CLASS="decl"
437>| <A HREF="#v%3ATestLabel"
438>TestLabel</A
439> String <A HREF="Test-HUnit-Base.html#t%3ATest"
440>Test</A
441></TD
442></TR
443></TABLE
444></TD
445></TR
446></TABLE
447></TD
448></TR
449><TR
450><TD CLASS="s8"
451></TD
452></TR
453><TR
454><TD CLASS="decl"
455><A HREF="#v%3A~%3D%3F"
456>(~=?)</A
457> :: (Eq a, Show a) =&gt; a -&gt; a -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
458>Test</A
459></TD
460></TR
461><TR
462><TD CLASS="s8"
463></TD
464></TR
465><TR
466><TD CLASS="decl"
467><A HREF="#v%3A~%3F%3D"
468>(~?=)</A
469> :: (Eq a, Show a) =&gt; a -&gt; a -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
470>Test</A
471></TD
472></TR
473><TR
474><TD CLASS="s8"
475></TD
476></TR
477><TR
478><TD CLASS="decl"
479><A HREF="#v%3A~%3A"
480>(~:)</A
481> :: <A HREF="Test-HUnit-Base.html#t%3ATestable"
482>Testable</A
483> t =&gt; String -&gt; t -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
484>Test</A
485></TD
486></TR
487><TR
488><TD CLASS="s8"
489></TD
490></TR
491><TR
492><TD CLASS="decl"
493><A HREF="#v%3A~%3F"
494>(~?)</A
495> :: <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
496>AssertionPredicable</A
497> t =&gt; t -&gt; String -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
498>Test</A
499></TD
500></TR
501><TR
502><TD CLASS="s8"
503></TD
504></TR
505><TR
506><TD CLASS="decl"
507><A HREF="#v%3AassertBool"
508>assertBool</A
509> :: String -&gt; Bool -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
510>Assertion</A
511></TD
512></TR
513><TR
514><TD CLASS="s8"
515></TD
516></TR
517><TR
518><TD CLASS="decl"
519><A HREF="#v%3AassertEqual"
520>assertEqual</A
521> :: (Eq a, Show a) =&gt; String -&gt; a -&gt; a -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
522>Assertion</A
523></TD
524></TR
525><TR
526><TD CLASS="s8"
527></TD
528></TR
529><TR
530><TD CLASS="decl"
531><A HREF="#v%3AassertString"
532>assertString</A
533> :: String -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
534>Assertion</A
535></TD
536></TR
537><TR
538><TD CLASS="s8"
539></TD
540></TR
541><TR
542><TD CLASS="decl"
543><A HREF="#v%3AassertFailure"
544>assertFailure</A
545> :: String -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
546>Assertion</A
547></TD
548></TR
549><TR
550><TD CLASS="s8"
551></TD
552></TR
553><TR
554><TD CLASS="decl"
555><SPAN CLASS="keyword"
556>type</SPAN
557> <A HREF="#t%3AAssertion"
558>Assertion</A
559> = IO ()</TD
560></TR
561><TR
562><TD CLASS="s8"
563></TD
564></TR
565><TR
566><TD CLASS="decl"
567><A HREF="#v%3A%40%3D%3F"
568>(@=?)</A
569> :: (Eq a, Show a) =&gt; a -&gt; a -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
570>Assertion</A
571></TD
572></TR
573><TR
574><TD CLASS="s8"
575></TD
576></TR
577><TR
578><TD CLASS="decl"
579><A HREF="#v%3A%40%3F%3D"
580>(@?=)</A
581> :: (Eq a, Show a) =&gt; a -&gt; a -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
582>Assertion</A
583></TD
584></TR
585><TR
586><TD CLASS="s8"
587></TD
588></TR
589><TR
590><TD CLASS="decl"
591><A HREF="#v%3A%40%3F"
592>(@?)</A
593> :: <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
594>AssertionPredicable</A
595> t =&gt; t -&gt; String -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
596>Assertion</A
597></TD
598></TR
599><TR
600><TD CLASS="s8"
601></TD
602></TR
603><TR
604><TD CLASS="decl"
605><SPAN CLASS="keyword"
606>class</SPAN
607> <A HREF="#t%3AAssertable"
608>Assertable</A
609> t  <SPAN CLASS="keyword"
610>where</SPAN
611></TD
612></TR
613><TR
614><TD CLASS="body"
615><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
616><TR
617><TD CLASS="decl"
618><A HREF="#v%3Aassert"
619>assert</A
620> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
621>Assertion</A
622></TD
623></TR
624></TABLE
625></TD
626></TR
627><TR
628><TD CLASS="s8"
629></TD
630></TR
631><TR
632><TD CLASS="decl"
633><SPAN CLASS="keyword"
634>class</SPAN
635> <A HREF="#t%3AListAssertable"
636>ListAssertable</A
637> t  <SPAN CLASS="keyword"
638>where</SPAN
639></TD
640></TR
641><TR
642><TD CLASS="body"
643><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
644><TR
645><TD CLASS="decl"
646><A HREF="#v%3AlistAssert"
647>listAssert</A
648> :: [t] -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
649>Assertion</A
650></TD
651></TR
652></TABLE
653></TD
654></TR
655><TR
656><TD CLASS="s8"
657></TD
658></TR
659><TR
660><TD CLASS="decl"
661><SPAN CLASS="keyword"
662>type</SPAN
663> <A HREF="#t%3AAssertionPredicate"
664>AssertionPredicate</A
665> = IO Bool</TD
666></TR
667><TR
668><TD CLASS="s8"
669></TD
670></TR
671><TR
672><TD CLASS="decl"
673><SPAN CLASS="keyword"
674>class</SPAN
675> <A HREF="#t%3AAssertionPredicable"
676>AssertionPredicable</A
677> t  <SPAN CLASS="keyword"
678>where</SPAN
679></TD
680></TR
681><TR
682><TD CLASS="body"
683><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
684><TR
685><TD CLASS="decl"
686><A HREF="#v%3AassertionPredicate"
687>assertionPredicate</A
688> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicate"
689>AssertionPredicate</A
690></TD
691></TR
692></TABLE
693></TD
694></TR
695><TR
696><TD CLASS="s8"
697></TD
698></TR
699><TR
700><TD CLASS="decl"
701><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
702><TR
703><TD CLASS="decl"
704><SPAN CLASS="keyword"
705>data</SPAN
706> <A HREF="#t%3ANode"
707>Node</A
708> </TD
709></TR
710><TR
711><TD CLASS="body"
712><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
713><TR
714><TD CLASS="decl"
715>= <A HREF="#v%3AListItem"
716>ListItem</A
717> Int</TD
718></TR
719><TR
720><TD CLASS="decl"
721>| <A HREF="#v%3ALabel"
722>Label</A
723> String</TD
724></TR
725></TABLE
726></TD
727></TR
728></TABLE
729></TD
730></TR
731><TR
732><TD CLASS="s8"
733></TD
734></TR
735><TR
736><TD CLASS="decl"
737><SPAN CLASS="keyword"
738>type</SPAN
739> <A HREF="#t%3APath"
740>Path</A
741> = [<A HREF="Test-HUnit-Base.html#t%3ANode"
742>Node</A
743>]</TD
744></TR
745><TR
746><TD CLASS="s8"
747></TD
748></TR
749><TR
750><TD CLASS="decl"
751><A HREF="#v%3AtestCaseCount"
752>testCaseCount</A
753> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
754>Test</A
755> -&gt; Int</TD
756></TR
757><TR
758><TD CLASS="s8"
759></TD
760></TR
761><TR
762><TD CLASS="decl"
763><SPAN CLASS="keyword"
764>class</SPAN
765> <A HREF="#t%3ATestable"
766>Testable</A
767> t  <SPAN CLASS="keyword"
768>where</SPAN
769></TD
770></TR
771><TR
772><TD CLASS="body"
773><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
774><TR
775><TD CLASS="decl"
776><A HREF="#v%3Atest"
777>test</A
778> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
779>Test</A
780></TD
781></TR
782></TABLE
783></TD
784></TR
785><TR
786><TD CLASS="s8"
787></TD
788></TR
789><TR
790><TD CLASS="decl"
791><SPAN CLASS="keyword"
792>data</SPAN
793> <A HREF="#t%3ACounts"
794>Counts</A
795>  = <A HREF="#v%3ACounts"
796>Counts</A
797> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
798><TR
799><TD CLASS="recfield"
800><A HREF="#v%3Acases"
801>cases</A
802>, <A HREF="#v%3Atried"
803>tried</A
804>, <A HREF="#v%3Aerrors"
805>errors</A
806>, <A HREF="#v%3Afailures"
807>failures</A
808> :: Int</TD
809></TR
810></TABLE
811>}</TD
812></TR
813><TR
814><TD CLASS="s8"
815></TD
816></TR
817><TR
818><TD CLASS="decl"
819><SPAN CLASS="keyword"
820>data</SPAN
821> <A HREF="#t%3AState"
822>State</A
823>  = <A HREF="#v%3AState"
824>State</A
825> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
826><TR
827><TD CLASS="recfield"
828><A HREF="#v%3Apath"
829>path</A
830> :: <A HREF="Test-HUnit-Base.html#t%3APath"
831>Path</A
832></TD
833></TR
834><TR
835><TD CLASS="recfield"
836><A HREF="#v%3Acounts"
837>counts</A
838> :: <A HREF="Test-HUnit-Base.html#t%3ACounts"
839>Counts</A
840></TD
841></TR
842></TABLE
843>}</TD
844></TR
845><TR
846><TD CLASS="s8"
847></TD
848></TR
849><TR
850><TD CLASS="decl"
851><SPAN CLASS="keyword"
852>type</SPAN
853> <A HREF="#t%3AReportStart"
854>ReportStart</A
855> us = <A HREF="Test-HUnit-Base.html#t%3AState"
856>State</A
857> -&gt; us -&gt; IO us</TD
858></TR
859><TR
860><TD CLASS="s8"
861></TD
862></TR
863><TR
864><TD CLASS="decl"
865><SPAN CLASS="keyword"
866>type</SPAN
867> <A HREF="#t%3AReportProblem"
868>ReportProblem</A
869> us = String -&gt; <A HREF="Test-HUnit-Base.html#t%3AState"
870>State</A
871> -&gt; us -&gt; IO us</TD
872></TR
873><TR
874><TD CLASS="s8"
875></TD
876></TR
877><TR
878><TD CLASS="decl"
879><A HREF="#v%3AtestCasePaths"
880>testCasePaths</A
881> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
882>Test</A
883> -&gt; [<A HREF="Test-HUnit-Base.html#t%3APath"
884>Path</A
885>]</TD
886></TR
887><TR
888><TD CLASS="s8"
889></TD
890></TR
891><TR
892><TD CLASS="decl"
893><A HREF="#v%3AperformTest"
894>performTest</A
895> :: <A HREF="Test-HUnit-Base.html#t%3AReportStart"
896>ReportStart</A
897> us -&gt; <A HREF="Test-HUnit-Base.html#t%3AReportProblem"
898>ReportProblem</A
899> us -&gt; <A HREF="Test-HUnit-Base.html#t%3AReportProblem"
900>ReportProblem</A
901> us -&gt; us -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
902>Test</A
903> -&gt; IO (<A HREF="Test-HUnit-Base.html#t%3ACounts"
904>Counts</A
905>, us)</TD
906></TR
907></TABLE
908></TD
909></TR
910><TR
911><TD CLASS="s15"
912></TD
913></TR
914><TR
915><TD CLASS="s15"
916></TD
917></TR
918><TR
919><TD CLASS="section2"
920><A NAME="1"
921>Declaring tests
922</A
923></TD
924></TR
925><TR
926><TD CLASS="s15"
927></TD
928></TR
929><TR
930><TD CLASS="decl"
931><SPAN CLASS="keyword"
932>data</SPAN
933> <A NAME="t%3ATest"
934></A
935><B
936>Test</B
937> </TD
938></TR
939><TR
940><TD CLASS="body"
941><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
942><TR
943><TD CLASS="section4"
944>Constructors</TD
945></TR
946><TR
947><TD CLASS="body"
948><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
949><TR
950><TD CLASS="arg"
951><A NAME="v%3ATestCase"
952></A
953><B
954>TestCase</B
955> <A HREF="Test-HUnit-Base.html#t%3AAssertion"
956>Assertion</A
957></TD
958><TD CLASS="rdoc"
959></TD
960></TR
961><TR
962><TD CLASS="arg"
963><A NAME="v%3ATestList"
964></A
965><B
966>TestList</B
967> [<A HREF="Test-HUnit-Base.html#t%3ATest"
968>Test</A
969>]</TD
970><TD CLASS="rdoc"
971></TD
972></TR
973><TR
974><TD CLASS="arg"
975><A NAME="v%3ATestLabel"
976></A
977><B
978>TestLabel</B
979> String <A HREF="Test-HUnit-Base.html#t%3ATest"
980>Test</A
981></TD
982><TD CLASS="rdoc"
983></TD
984></TR
985></TABLE
986></TD
987></TR
988><TR
989><TD CLASS="section4"
990><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Test')" ALT="show/hide"
991> Instances</TD
992></TR
993><TR
994><TD CLASS="body"
995><DIV ID="i:Test" STYLE="display:block;"
996><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
997><TR
998><TD CLASS="decl"
999>Show <A HREF="Test-HUnit-Base.html#t%3ATest"
1000>Test</A
1001></TD
1002></TR
1003><TR
1004><TD CLASS="decl"
1005><A HREF="Test-HUnit-Base.html#t%3ATestable"
1006>Testable</A
1007> <A HREF="Test-HUnit-Base.html#t%3ATest"
1008>Test</A
1009></TD
1010></TR
1011></TABLE
1012></DIV
1013></TD
1014></TR
1015></TABLE
1016></TD
1017></TR
1018><TR
1019><TD CLASS="s15"
1020></TD
1021></TR
1022><TR
1023><TD CLASS="decl"
1024><A NAME="v%3A~%3D%3F"
1025></A
1026><B
1027>(~=?)</B
1028></TD
1029></TR
1030><TR
1031><TD CLASS="body"
1032><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1033><TR
1034><TD CLASS="arg"
1035>:: (Eq a, Show a)</TD
1036><TD CLASS="rdoc"
1037></TD
1038></TR
1039><TR
1040><TD CLASS="arg"
1041>=&gt; a</TD
1042><TD CLASS="rdoc"
1043>the expected value
1044</TD
1045></TR
1046><TR
1047><TD CLASS="arg"
1048>-&gt; a</TD
1049><TD CLASS="rdoc"
1050>the actual value
1051</TD
1052></TR
1053><TR
1054><TD CLASS="arg"
1055>-&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
1056>Test</A
1057></TD
1058><TD CLASS="rdoc"
1059></TD
1060></TR
1061><TR
1062><TD CLASS="ndoc" COLSPAN="2"
1063>shorthand for a test case that asserts equality (with the expected
1064   value on the left-hand side, and the actual value on the right-hand
1065   side).
1066</TD
1067></TR
1068></TABLE
1069></TD
1070></TR
1071><TR
1072><TD CLASS="s15"
1073></TD
1074></TR
1075><TR
1076><TD CLASS="decl"
1077><A NAME="v%3A~%3F%3D"
1078></A
1079><B
1080>(~?=)</B
1081></TD
1082></TR
1083><TR
1084><TD CLASS="body"
1085><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1086><TR
1087><TD CLASS="arg"
1088>:: (Eq a, Show a)</TD
1089><TD CLASS="rdoc"
1090></TD
1091></TR
1092><TR
1093><TD CLASS="arg"
1094>=&gt; a</TD
1095><TD CLASS="rdoc"
1096>the actual value
1097</TD
1098></TR
1099><TR
1100><TD CLASS="arg"
1101>-&gt; a</TD
1102><TD CLASS="rdoc"
1103>the expected value
1104</TD
1105></TR
1106><TR
1107><TD CLASS="arg"
1108>-&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
1109>Test</A
1110></TD
1111><TD CLASS="rdoc"
1112></TD
1113></TR
1114><TR
1115><TD CLASS="ndoc" COLSPAN="2"
1116>shorthand for a test case that asserts equality (with the actual
1117   value on the left-hand side, and the expected value on the right-hand
1118   side).
1119</TD
1120></TR
1121></TABLE
1122></TD
1123></TR
1124><TR
1125><TD CLASS="s15"
1126></TD
1127></TR
1128><TR
1129><TD CLASS="decl"
1130><A NAME="v%3A~%3A"
1131></A
1132><B
1133>(~:)</B
1134> :: <A HREF="Test-HUnit-Base.html#t%3ATestable"
1135>Testable</A
1136> t =&gt; String -&gt; t -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
1137>Test</A
1138></TD
1139></TR
1140><TR
1141><TD CLASS="doc"
1142>creates a test from the specified <TT
1143><A HREF="Test-HUnit-Base.html#t%3ATestable"
1144>Testable</A
1145></TT
1146>, with the specified
1147   label attached to it.
1148</TD
1149></TR
1150><TR
1151><TD CLASS="s15"
1152></TD
1153></TR
1154><TR
1155><TD CLASS="decl"
1156><A NAME="v%3A~%3F"
1157></A
1158><B
1159>(~?)</B
1160></TD
1161></TR
1162><TR
1163><TD CLASS="body"
1164><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1165><TR
1166><TD CLASS="arg"
1167>:: <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1168>AssertionPredicable</A
1169> t</TD
1170><TD CLASS="rdoc"
1171></TD
1172></TR
1173><TR
1174><TD CLASS="arg"
1175>=&gt; t</TD
1176><TD CLASS="rdoc"
1177>a value of which the asserted condition is predicated
1178</TD
1179></TR
1180><TR
1181><TD CLASS="arg"
1182>-&gt; String</TD
1183><TD CLASS="rdoc"
1184>a message that is displayed on test failure
1185</TD
1186></TR
1187><TR
1188><TD CLASS="arg"
1189>-&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
1190>Test</A
1191></TD
1192><TD CLASS="rdoc"
1193></TD
1194></TR
1195><TR
1196><TD CLASS="ndoc" COLSPAN="2"
1197>creates a test case resulting from asserting the condition obtained
1198   from the specified <TT
1199><A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1200>AssertionPredicable</A
1201></TT
1202>.
1203</TD
1204></TR
1205></TABLE
1206></TD
1207></TR
1208><TR
1209><TD CLASS="s15"
1210></TD
1211></TR
1212><TR
1213><TD CLASS="section2"
1214><A NAME="2"
1215>Making assertions
1216</A
1217></TD
1218></TR
1219><TR
1220><TD CLASS="s15"
1221></TD
1222></TR
1223><TR
1224><TD CLASS="decl"
1225><A NAME="v%3AassertBool"
1226></A
1227><B
1228>assertBool</B
1229></TD
1230></TR
1231><TR
1232><TD CLASS="body"
1233><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1234><TR
1235><TD CLASS="arg"
1236>:: String</TD
1237><TD CLASS="rdoc"
1238>a message that is displayed if the assertion fails
1239</TD
1240></TR
1241><TR
1242><TD CLASS="arg"
1243>-&gt; Bool</TD
1244><TD CLASS="rdoc"
1245>the condition that is asserted to hold
1246</TD
1247></TR
1248><TR
1249><TD CLASS="arg"
1250>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1251>Assertion</A
1252></TD
1253><TD CLASS="rdoc"
1254></TD
1255></TR
1256><TR
1257><TD CLASS="ndoc" COLSPAN="2"
1258>asserts that the specified condition holds.
1259</TD
1260></TR
1261></TABLE
1262></TD
1263></TR
1264><TR
1265><TD CLASS="s15"
1266></TD
1267></TR
1268><TR
1269><TD CLASS="decl"
1270><A NAME="v%3AassertEqual"
1271></A
1272><B
1273>assertEqual</B
1274></TD
1275></TR
1276><TR
1277><TD CLASS="body"
1278><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1279><TR
1280><TD CLASS="arg"
1281>:: (Eq a, Show a)</TD
1282><TD CLASS="rdoc"
1283></TD
1284></TR
1285><TR
1286><TD CLASS="arg"
1287>=&gt; String</TD
1288><TD CLASS="rdoc"
1289>a message that is displayed if the assertion fails
1290</TD
1291></TR
1292><TR
1293><TD CLASS="arg"
1294>-&gt; a</TD
1295><TD CLASS="rdoc"
1296>the expected value
1297</TD
1298></TR
1299><TR
1300><TD CLASS="arg"
1301>-&gt; a</TD
1302><TD CLASS="rdoc"
1303>the actual value
1304</TD
1305></TR
1306><TR
1307><TD CLASS="arg"
1308>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1309>Assertion</A
1310></TD
1311><TD CLASS="rdoc"
1312></TD
1313></TR
1314><TR
1315><TD CLASS="ndoc" COLSPAN="2"
1316>asserts that the specified actual value is equal to the expected value.
1317</TD
1318></TR
1319></TABLE
1320></TD
1321></TR
1322><TR
1323><TD CLASS="s15"
1324></TD
1325></TR
1326><TR
1327><TD CLASS="decl"
1328><A NAME="v%3AassertString"
1329></A
1330><B
1331>assertString</B
1332></TD
1333></TR
1334><TR
1335><TD CLASS="body"
1336><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1337><TR
1338><TD CLASS="arg"
1339>:: String</TD
1340><TD CLASS="rdoc"
1341>a message that is displayed with the assertion failure
1342</TD
1343></TR
1344><TR
1345><TD CLASS="arg"
1346>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1347>Assertion</A
1348></TD
1349><TD CLASS="rdoc"
1350></TD
1351></TR
1352><TR
1353><TD CLASS="ndoc" COLSPAN="2"
1354>signals an assertion failure if a non-empty message is passed.
1355</TD
1356></TR
1357></TABLE
1358></TD
1359></TR
1360><TR
1361><TD CLASS="s15"
1362></TD
1363></TR
1364><TR
1365><TD CLASS="decl"
1366><A NAME="v%3AassertFailure"
1367></A
1368><B
1369>assertFailure</B
1370></TD
1371></TR
1372><TR
1373><TD CLASS="body"
1374><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1375><TR
1376><TD CLASS="arg"
1377>:: String</TD
1378><TD CLASS="rdoc"
1379>a message that is displayed with the assertion failure
1380</TD
1381></TR
1382><TR
1383><TD CLASS="arg"
1384>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1385>Assertion</A
1386></TD
1387><TD CLASS="rdoc"
1388></TD
1389></TR
1390><TR
1391><TD CLASS="ndoc" COLSPAN="2"
1392>signals an assertion failure with a given message.
1393</TD
1394></TR
1395></TABLE
1396></TD
1397></TR
1398><TR
1399><TD CLASS="s15"
1400></TD
1401></TR
1402><TR
1403><TD CLASS="decl"
1404><SPAN CLASS="keyword"
1405>type</SPAN
1406> <A NAME="t%3AAssertion"
1407></A
1408><B
1409>Assertion</B
1410> = IO ()</TD
1411></TR
1412><TR
1413><TD CLASS="doc"
1414>An assertion is an IO computation with trivial result. An assertion or
1415   a sequence of assertions makes up a test case.
1416</TD
1417></TR
1418><TR
1419><TD CLASS="s15"
1420></TD
1421></TR
1422><TR
1423><TD CLASS="decl"
1424><A NAME="v%3A%40%3D%3F"
1425></A
1426><B
1427>(@=?)</B
1428></TD
1429></TR
1430><TR
1431><TD CLASS="body"
1432><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1433><TR
1434><TD CLASS="arg"
1435>:: (Eq a, Show a)</TD
1436><TD CLASS="rdoc"
1437></TD
1438></TR
1439><TR
1440><TD CLASS="arg"
1441>=&gt; a</TD
1442><TD CLASS="rdoc"
1443>the expected value
1444</TD
1445></TR
1446><TR
1447><TD CLASS="arg"
1448>-&gt; a</TD
1449><TD CLASS="rdoc"
1450>the actual value
1451</TD
1452></TR
1453><TR
1454><TD CLASS="arg"
1455>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1456>Assertion</A
1457></TD
1458><TD CLASS="rdoc"
1459></TD
1460></TR
1461><TR
1462><TD CLASS="ndoc" COLSPAN="2"
1463>asserts that the specified actual value is equal to the expected value
1464   (with the expected value on the left-hand side).
1465</TD
1466></TR
1467></TABLE
1468></TD
1469></TR
1470><TR
1471><TD CLASS="s15"
1472></TD
1473></TR
1474><TR
1475><TD CLASS="decl"
1476><A NAME="v%3A%40%3F%3D"
1477></A
1478><B
1479>(@?=)</B
1480></TD
1481></TR
1482><TR
1483><TD CLASS="body"
1484><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1485><TR
1486><TD CLASS="arg"
1487>:: (Eq a, Show a)</TD
1488><TD CLASS="rdoc"
1489></TD
1490></TR
1491><TR
1492><TD CLASS="arg"
1493>=&gt; a</TD
1494><TD CLASS="rdoc"
1495>the actual value
1496</TD
1497></TR
1498><TR
1499><TD CLASS="arg"
1500>-&gt; a</TD
1501><TD CLASS="rdoc"
1502>the expected value
1503</TD
1504></TR
1505><TR
1506><TD CLASS="arg"
1507>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1508>Assertion</A
1509></TD
1510><TD CLASS="rdoc"
1511></TD
1512></TR
1513><TR
1514><TD CLASS="ndoc" COLSPAN="2"
1515>asserts that the specified actual value is equal to the expected value
1516   (with the actual value on the left-hand side).
1517</TD
1518></TR
1519></TABLE
1520></TD
1521></TR
1522><TR
1523><TD CLASS="s15"
1524></TD
1525></TR
1526><TR
1527><TD CLASS="decl"
1528><A NAME="v%3A%40%3F"
1529></A
1530><B
1531>(@?)</B
1532></TD
1533></TR
1534><TR
1535><TD CLASS="body"
1536><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1537><TR
1538><TD CLASS="arg"
1539>:: <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1540>AssertionPredicable</A
1541> t</TD
1542><TD CLASS="rdoc"
1543></TD
1544></TR
1545><TR
1546><TD CLASS="arg"
1547>=&gt; t</TD
1548><TD CLASS="rdoc"
1549>a value of which the asserted condition is predicated
1550</TD
1551></TR
1552><TR
1553><TD CLASS="arg"
1554>-&gt; String</TD
1555><TD CLASS="rdoc"
1556>a message that is displayed if the assertion fails
1557</TD
1558></TR
1559><TR
1560><TD CLASS="arg"
1561>-&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1562>Assertion</A
1563></TD
1564><TD CLASS="rdoc"
1565></TD
1566></TR
1567><TR
1568><TD CLASS="ndoc" COLSPAN="2"
1569>asserts that the condition obtained from the specified
1570   <TT
1571><A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1572>AssertionPredicable</A
1573></TT
1574> holds.
1575</TD
1576></TR
1577></TABLE
1578></TD
1579></TR
1580><TR
1581><TD CLASS="s15"
1582></TD
1583></TR
1584><TR
1585><TD CLASS="section2"
1586><A NAME="3"
1587>Extending the assertion functionality
1588</A
1589></TD
1590></TR
1591><TR
1592><TD CLASS="s15"
1593></TD
1594></TR
1595><TR
1596><TD CLASS="decl"
1597><SPAN CLASS="keyword"
1598>class</SPAN
1599> <A NAME="t%3AAssertable"
1600></A
1601><B
1602>Assertable</B
1603> t  <SPAN CLASS="keyword"
1604>where</SPAN
1605></TD
1606></TR
1607><TR
1608><TD CLASS="body"
1609><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1610><TR
1611><TD CLASS="s8"
1612></TD
1613></TR
1614><TR
1615><TD CLASS="section4"
1616>Methods</TD
1617></TR
1618><TR
1619><TD CLASS="body"
1620><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1621><TR
1622><TD CLASS="decl"
1623><A NAME="v%3Aassert"
1624></A
1625><B
1626>assert</B
1627> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1628>Assertion</A
1629></TD
1630></TR
1631></TABLE
1632></TD
1633></TR
1634><TR
1635><TD CLASS="s8"
1636></TD
1637></TR
1638><TR
1639><TD CLASS="section4"
1640><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Assertable')" ALT="show/hide"
1641> Instances</TD
1642></TR
1643><TR
1644><TD CLASS="body"
1645><DIV ID="i:Assertable" STYLE="display:block;"
1646><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
1647><TR
1648><TD CLASS="decl"
1649><A HREF="Test-HUnit-Base.html#t%3AAssertable"
1650>Assertable</A
1651> Bool</TD
1652></TR
1653><TR
1654><TD CLASS="decl"
1655><A HREF="Test-HUnit-Base.html#t%3AAssertable"
1656>Assertable</A
1657> ()</TD
1658></TR
1659><TR
1660><TD CLASS="decl"
1661><A HREF="Test-HUnit-Base.html#t%3AAssertable"
1662>Assertable</A
1663> t =&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertable"
1664>Assertable</A
1665> (IO t)</TD
1666></TR
1667><TR
1668><TD CLASS="decl"
1669><A HREF="Test-HUnit-Base.html#t%3AListAssertable"
1670>ListAssertable</A
1671> t =&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertable"
1672>Assertable</A
1673> [t]</TD
1674></TR
1675></TABLE
1676></DIV
1677></TD
1678></TR
1679></TABLE
1680></TD
1681></TR
1682><TR
1683><TD CLASS="s15"
1684></TD
1685></TR
1686><TR
1687><TD CLASS="decl"
1688><SPAN CLASS="keyword"
1689>class</SPAN
1690> <A NAME="t%3AListAssertable"
1691></A
1692><B
1693>ListAssertable</B
1694> t  <SPAN CLASS="keyword"
1695>where</SPAN
1696></TD
1697></TR
1698><TR
1699><TD CLASS="body"
1700><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1701><TR
1702><TD CLASS="s8"
1703></TD
1704></TR
1705><TR
1706><TD CLASS="section4"
1707>Methods</TD
1708></TR
1709><TR
1710><TD CLASS="body"
1711><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1712><TR
1713><TD CLASS="decl"
1714><A NAME="v%3AlistAssert"
1715></A
1716><B
1717>listAssert</B
1718> :: [t] -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertion"
1719>Assertion</A
1720></TD
1721></TR
1722></TABLE
1723></TD
1724></TR
1725><TR
1726><TD CLASS="s8"
1727></TD
1728></TR
1729><TR
1730><TD CLASS="section4"
1731><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ListAssertable')" ALT="show/hide"
1732> Instances</TD
1733></TR
1734><TR
1735><TD CLASS="body"
1736><DIV ID="i:ListAssertable" STYLE="display:block;"
1737><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
1738><TR
1739><TD CLASS="decl"
1740><A HREF="Test-HUnit-Base.html#t%3AListAssertable"
1741>ListAssertable</A
1742> Char</TD
1743></TR
1744></TABLE
1745></DIV
1746></TD
1747></TR
1748></TABLE
1749></TD
1750></TR
1751><TR
1752><TD CLASS="s15"
1753></TD
1754></TR
1755><TR
1756><TD CLASS="decl"
1757><SPAN CLASS="keyword"
1758>type</SPAN
1759> <A NAME="t%3AAssertionPredicate"
1760></A
1761><B
1762>AssertionPredicate</B
1763> = IO Bool</TD
1764></TR
1765><TR
1766><TD CLASS="s15"
1767></TD
1768></TR
1769><TR
1770><TD CLASS="decl"
1771><SPAN CLASS="keyword"
1772>class</SPAN
1773> <A NAME="t%3AAssertionPredicable"
1774></A
1775><B
1776>AssertionPredicable</B
1777> t  <SPAN CLASS="keyword"
1778>where</SPAN
1779></TD
1780></TR
1781><TR
1782><TD CLASS="body"
1783><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1784><TR
1785><TD CLASS="s8"
1786></TD
1787></TR
1788><TR
1789><TD CLASS="section4"
1790>Methods</TD
1791></TR
1792><TR
1793><TD CLASS="body"
1794><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1795><TR
1796><TD CLASS="decl"
1797><A NAME="v%3AassertionPredicate"
1798></A
1799><B
1800>assertionPredicate</B
1801> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicate"
1802>AssertionPredicate</A
1803></TD
1804></TR
1805></TABLE
1806></TD
1807></TR
1808><TR
1809><TD CLASS="s8"
1810></TD
1811></TR
1812><TR
1813><TD CLASS="section4"
1814><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AssertionPredicable')" ALT="show/hide"
1815> Instances</TD
1816></TR
1817><TR
1818><TD CLASS="body"
1819><DIV ID="i:AssertionPredicable" STYLE="display:block;"
1820><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
1821><TR
1822><TD CLASS="decl"
1823><A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1824>AssertionPredicable</A
1825> Bool</TD
1826></TR
1827><TR
1828><TD CLASS="decl"
1829><A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1830>AssertionPredicable</A
1831> t =&gt; <A HREF="Test-HUnit-Base.html#t%3AAssertionPredicable"
1832>AssertionPredicable</A
1833> (IO t)</TD
1834></TR
1835></TABLE
1836></DIV
1837></TD
1838></TR
1839></TABLE
1840></TD
1841></TR
1842><TR
1843><TD CLASS="s15"
1844></TD
1845></TR
1846><TR
1847><TD CLASS="decl"
1848><SPAN CLASS="keyword"
1849>data</SPAN
1850> <A NAME="t%3ANode"
1851></A
1852><B
1853>Node</B
1854> </TD
1855></TR
1856><TR
1857><TD CLASS="body"
1858><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1859><TR
1860><TD CLASS="section4"
1861>Constructors</TD
1862></TR
1863><TR
1864><TD CLASS="body"
1865><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
1866><TR
1867><TD CLASS="arg"
1868><A NAME="v%3AListItem"
1869></A
1870><B
1871>ListItem</B
1872> Int</TD
1873><TD CLASS="rdoc"
1874></TD
1875></TR
1876><TR
1877><TD CLASS="arg"
1878><A NAME="v%3ALabel"
1879></A
1880><B
1881>Label</B
1882> String</TD
1883><TD CLASS="rdoc"
1884></TD
1885></TR
1886></TABLE
1887></TD
1888></TR
1889><TR
1890><TD CLASS="section4"
1891><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Node')" ALT="show/hide"
1892> Instances</TD
1893></TR
1894><TR
1895><TD CLASS="body"
1896><DIV ID="i:Node" STYLE="display:block;"
1897><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
1898><TR
1899><TD CLASS="decl"
1900>Eq <A HREF="Test-HUnit-Base.html#t%3ANode"
1901>Node</A
1902></TD
1903></TR
1904><TR
1905><TD CLASS="decl"
1906>Read <A HREF="Test-HUnit-Base.html#t%3ANode"
1907>Node</A
1908></TD
1909></TR
1910><TR
1911><TD CLASS="decl"
1912>Show <A HREF="Test-HUnit-Base.html#t%3ANode"
1913>Node</A
1914></TD
1915></TR
1916></TABLE
1917></DIV
1918></TD
1919></TR
1920></TABLE
1921></TD
1922></TR
1923><TR
1924><TD CLASS="s15"
1925></TD
1926></TR
1927><TR
1928><TD CLASS="decl"
1929><SPAN CLASS="keyword"
1930>type</SPAN
1931> <A NAME="t%3APath"
1932></A
1933><B
1934>Path</B
1935> = [<A HREF="Test-HUnit-Base.html#t%3ANode"
1936>Node</A
1937>]</TD
1938></TR
1939><TR
1940><TD CLASS="s15"
1941></TD
1942></TR
1943><TR
1944><TD CLASS="decl"
1945><A NAME="v%3AtestCaseCount"
1946></A
1947><B
1948>testCaseCount</B
1949> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
1950>Test</A
1951> -&gt; Int</TD
1952></TR
1953><TR
1954><TD CLASS="doc"
1955>recursively counts all test cases contained in the specified test.
1956</TD
1957></TR
1958><TR
1959><TD CLASS="s15"
1960></TD
1961></TR
1962><TR
1963><TD CLASS="decl"
1964><SPAN CLASS="keyword"
1965>class</SPAN
1966> <A NAME="t%3ATestable"
1967></A
1968><B
1969>Testable</B
1970> t  <SPAN CLASS="keyword"
1971>where</SPAN
1972></TD
1973></TR
1974><TR
1975><TD CLASS="body"
1976><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1977><TR
1978><TD CLASS="s8"
1979></TD
1980></TR
1981><TR
1982><TD CLASS="section4"
1983>Methods</TD
1984></TR
1985><TR
1986><TD CLASS="body"
1987><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
1988><TR
1989><TD CLASS="decl"
1990><A NAME="v%3Atest"
1991></A
1992><B
1993>test</B
1994> :: t -&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
1995>Test</A
1996></TD
1997></TR
1998></TABLE
1999></TD
2000></TR
2001><TR
2002><TD CLASS="s8"
2003></TD
2004></TR
2005><TR
2006><TD CLASS="section4"
2007><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Testable')" ALT="show/hide"
2008> Instances</TD
2009></TR
2010><TR
2011><TD CLASS="body"
2012><DIV ID="i:Testable" STYLE="display:block;"
2013><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
2014><TR
2015><TD CLASS="decl"
2016><A HREF="Test-HUnit-Base.html#t%3ATestable"
2017>Testable</A
2018> <A HREF="Test-HUnit-Base.html#t%3ATest"
2019>Test</A
2020></TD
2021></TR
2022><TR
2023><TD CLASS="decl"
2024><A HREF="Test-HUnit-Base.html#t%3AAssertable"
2025>Assertable</A
2026> t =&gt; <A HREF="Test-HUnit-Base.html#t%3ATestable"
2027>Testable</A
2028> (IO t)</TD
2029></TR
2030><TR
2031><TD CLASS="decl"
2032><A HREF="Test-HUnit-Base.html#t%3ATestable"
2033>Testable</A
2034> t =&gt; <A HREF="Test-HUnit-Base.html#t%3ATestable"
2035>Testable</A
2036> [t]</TD
2037></TR
2038></TABLE
2039></DIV
2040></TD
2041></TR
2042></TABLE
2043></TD
2044></TR
2045><TR
2046><TD CLASS="s15"
2047></TD
2048></TR
2049><TR
2050><TD CLASS="section2"
2051><A NAME="4"
2052>Test execution
2053</A
2054></TD
2055></TR
2056><TR
2057><TD CLASS="s15"
2058></TD
2059></TR
2060><TR
2061><TD CLASS="doc"
2062>Note: the rest of the functionality in this module is intended for
2063 implementors of test controllers. If you just want to run your tests cases,
2064 simply use a test controller, such as the text-based controller in
2065 <A HREF="Test-HUnit-Text.html"
2066>Test.HUnit.Text</A
2067>.
2068</TD
2069></TR
2070><TR
2071><TD CLASS="s15"
2072></TD
2073></TR
2074><TR
2075><TD CLASS="decl"
2076><SPAN CLASS="keyword"
2077>data</SPAN
2078> <A NAME="t%3ACounts"
2079></A
2080><B
2081>Counts</B
2082> </TD
2083></TR
2084><TR
2085><TD CLASS="body"
2086><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
2087><TR
2088><TD CLASS="section4"
2089>Constructors</TD
2090></TR
2091><TR
2092><TD CLASS="body"
2093><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
2094><TR
2095><TD CLASS="arg"
2096><A NAME="v%3ACounts"
2097></A
2098><B
2099>Counts</B
2100></TD
2101><TD CLASS="rdoc"
2102></TD
2103></TR
2104><TR
2105><TD CLASS="body" COLSPAN="2"
2106><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
2107><TR
2108><TD CLASS="arg"
2109><A NAME="v%3Acases"
2110></A
2111><B
2112>cases</B
2113>, <A NAME="v%3Atried"
2114></A
2115><B
2116>tried</B
2117>, <A NAME="v%3Aerrors"
2118></A
2119><B
2120>errors</B
2121>, <A NAME="v%3Afailures"
2122></A
2123><B
2124>failures</B
2125> :: Int</TD
2126><TD CLASS="rdoc"
2127></TD
2128></TR
2129></TABLE
2130></TD
2131></TR
2132></TABLE
2133></TD
2134></TR
2135><TR
2136><TD CLASS="section4"
2137><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Counts')" ALT="show/hide"
2138> Instances</TD
2139></TR
2140><TR
2141><TD CLASS="body"
2142><DIV ID="i:Counts" STYLE="display:block;"
2143><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
2144><TR
2145><TD CLASS="decl"
2146>Eq <A HREF="Test-HUnit-Base.html#t%3ACounts"
2147>Counts</A
2148></TD
2149></TR
2150><TR
2151><TD CLASS="decl"
2152>Read <A HREF="Test-HUnit-Base.html#t%3ACounts"
2153>Counts</A
2154></TD
2155></TR
2156><TR
2157><TD CLASS="decl"
2158>Show <A HREF="Test-HUnit-Base.html#t%3ACounts"
2159>Counts</A
2160></TD
2161></TR
2162></TABLE
2163></DIV
2164></TD
2165></TR
2166></TABLE
2167></TD
2168></TR
2169><TR
2170><TD CLASS="s15"
2171></TD
2172></TR
2173><TR
2174><TD CLASS="decl"
2175><SPAN CLASS="keyword"
2176>data</SPAN
2177> <A NAME="t%3AState"
2178></A
2179><B
2180>State</B
2181> </TD
2182></TR
2183><TR
2184><TD CLASS="body"
2185><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
2186><TR
2187><TD CLASS="section4"
2188>Constructors</TD
2189></TR
2190><TR
2191><TD CLASS="body"
2192><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
2193><TR
2194><TD CLASS="arg"
2195><A NAME="v%3AState"
2196></A
2197><B
2198>State</B
2199></TD
2200><TD CLASS="rdoc"
2201></TD
2202></TR
2203><TR
2204><TD CLASS="body" COLSPAN="2"
2205><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
2206><TR
2207><TD CLASS="arg"
2208><A NAME="v%3Apath"
2209></A
2210><B
2211>path</B
2212> :: <A HREF="Test-HUnit-Base.html#t%3APath"
2213>Path</A
2214></TD
2215><TD CLASS="rdoc"
2216></TD
2217></TR
2218><TR
2219><TD CLASS="arg"
2220><A NAME="v%3Acounts"
2221></A
2222><B
2223>counts</B
2224> :: <A HREF="Test-HUnit-Base.html#t%3ACounts"
2225>Counts</A
2226></TD
2227><TD CLASS="rdoc"
2228></TD
2229></TR
2230></TABLE
2231></TD
2232></TR
2233></TABLE
2234></TD
2235></TR
2236><TR
2237><TD CLASS="section4"
2238><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:State')" ALT="show/hide"
2239> Instances</TD
2240></TR
2241><TR
2242><TD CLASS="body"
2243><DIV ID="i:State" STYLE="display:block;"
2244><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
2245><TR
2246><TD CLASS="decl"
2247>Eq <A HREF="Test-HUnit-Base.html#t%3AState"
2248>State</A
2249></TD
2250></TR
2251><TR
2252><TD CLASS="decl"
2253>Read <A HREF="Test-HUnit-Base.html#t%3AState"
2254>State</A
2255></TD
2256></TR
2257><TR
2258><TD CLASS="decl"
2259>Show <A HREF="Test-HUnit-Base.html#t%3AState"
2260>State</A
2261></TD
2262></TR
2263></TABLE
2264></DIV
2265></TD
2266></TR
2267></TABLE
2268></TD
2269></TR
2270><TR
2271><TD CLASS="s15"
2272></TD
2273></TR
2274><TR
2275><TD CLASS="decl"
2276><SPAN CLASS="keyword"
2277>type</SPAN
2278> <A NAME="t%3AReportStart"
2279></A
2280><B
2281>ReportStart</B
2282> us = <A HREF="Test-HUnit-Base.html#t%3AState"
2283>State</A
2284> -&gt; us -&gt; IO us</TD
2285></TR
2286><TR
2287><TD CLASS="doc"
2288>report generator for reporting the start of a test run.
2289</TD
2290></TR
2291><TR
2292><TD CLASS="s15"
2293></TD
2294></TR
2295><TR
2296><TD CLASS="decl"
2297><SPAN CLASS="keyword"
2298>type</SPAN
2299> <A NAME="t%3AReportProblem"
2300></A
2301><B
2302>ReportProblem</B
2303> us = String -&gt; <A HREF="Test-HUnit-Base.html#t%3AState"
2304>State</A
2305> -&gt; us -&gt; IO us</TD
2306></TR
2307><TR
2308><TD CLASS="doc"
2309>report generator for reporting problems that have occurred during
2310   a test run. Problems may be errors or assertion failures.
2311</TD
2312></TR
2313><TR
2314><TD CLASS="s15"
2315></TD
2316></TR
2317><TR
2318><TD CLASS="decl"
2319><A NAME="v%3AtestCasePaths"
2320></A
2321><B
2322>testCasePaths</B
2323> :: <A HREF="Test-HUnit-Base.html#t%3ATest"
2324>Test</A
2325> -&gt; [<A HREF="Test-HUnit-Base.html#t%3APath"
2326>Path</A
2327>]</TD
2328></TR
2329><TR
2330><TD CLASS="s15"
2331></TD
2332></TR
2333><TR
2334><TD CLASS="decl"
2335><A NAME="v%3AperformTest"
2336></A
2337><B
2338>performTest</B
2339></TD
2340></TR
2341><TR
2342><TD CLASS="body"
2343><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
2344><TR
2345><TD CLASS="arg"
2346>:: <A HREF="Test-HUnit-Base.html#t%3AReportStart"
2347>ReportStart</A
2348> us</TD
2349><TD CLASS="rdoc"
2350>report generator for the test run start
2351</TD
2352></TR
2353><TR
2354><TD CLASS="arg"
2355>-&gt; <A HREF="Test-HUnit-Base.html#t%3AReportProblem"
2356>ReportProblem</A
2357> us</TD
2358><TD CLASS="rdoc"
2359>report generator for errors during the test run
2360</TD
2361></TR
2362><TR
2363><TD CLASS="arg"
2364>-&gt; <A HREF="Test-HUnit-Base.html#t%3AReportProblem"
2365>ReportProblem</A
2366> us</TD
2367><TD CLASS="rdoc"
2368>report generator for assertion failures during the test run
2369</TD
2370></TR
2371><TR
2372><TD CLASS="arg"
2373>-&gt; us</TD
2374><TD CLASS="rdoc"
2375></TD
2376></TR
2377><TR
2378><TD CLASS="arg"
2379>-&gt; <A HREF="Test-HUnit-Base.html#t%3ATest"
2380>Test</A
2381></TD
2382><TD CLASS="rdoc"
2383>the test to be executed
2384</TD
2385></TR
2386><TR
2387><TD CLASS="arg"
2388>-&gt; IO (<A HREF="Test-HUnit-Base.html#t%3ACounts"
2389>Counts</A
2390>, us)</TD
2391><TD CLASS="rdoc"
2392></TD
2393></TR
2394><TR
2395><TD CLASS="ndoc" COLSPAN="2"
2396><P
2397>performs a test run with the specified report generators.
2398</P
2399><P
2400>Note that the counts in a start report do not include the test case
2401   being started, whereas the counts in a problem report do include the
2402   test case just finished.  The principle is that the counts are sampled
2403   only between test case executions.  As a result, the number of test
2404   case successes always equals the difference of test cases tried and
2405   the sum of test case errors and failures.
2406</P
2407></TD
2408></TR
2409></TABLE
2410></TD
2411></TR
2412><TR
2413><TD CLASS="s15"
2414></TD
2415></TR
2416><TR
2417><TD CLASS="botbar"
2418>Produced by <A HREF="http://www.haskell.org/haddock/"
2419>Haddock</A
2420> version 0.8</TD
2421></TR
2422></TABLE
2423></BODY
2424></HTML
2425>