This file is indexed.

/usr/share/doc/libghc-hunit-doc/html/Test-HUnit-Base.html is in libghc-hunit-doc 1.5.0.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test.HUnit.Base</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Test-HUnit-Base.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Test-HUnit-Base.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">HUnit-1.5.0.0: A unit testing framework for Haskell</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Test.HUnit.Base</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Declaring tests</a></li><li><a href="#g:2">Making assertions</a></li><li><a href="#g:3">Extending the assertion functionality</a></li><li><a href="#g:4">Test execution</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Basic definitions for the HUnit library.</p><p>This module contains what you need to create assertions and test cases and
   combine them into test suites.</p><p>This module also provides infrastructure for
   implementing test controllers (which are used to execute tests).
   See <a href="Test-HUnit-Text.html">Test.HUnit.Text</a> for a great example of how to implement a test
   controller.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Test">Test</a><ul class="subs"><li>= <a href="#v:TestCase">TestCase</a> <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li>| <a href="#v:TestList">TestList</a> [<a href="Test-HUnit-Base.html#t:Test">Test</a>]</li><li>| <a href="#v:TestLabel">TestLabel</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="Test-HUnit-Base.html#t:Test">Test</a></li></ul></li><li class="src short"><a href="#v:-126--61--63-">(~=?)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; a -&gt; a -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></li><li class="src short"><a href="#v:-126--63--61-">(~?=)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; a -&gt; a -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></li><li class="src short"><a href="#v:-126-:">(~:)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:Testable">Testable</a> t) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; t -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></li><li class="src short"><a href="#v:-126--63-">(~?)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> t) =&gt; t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></li><li class="src short"><a href="#v:assertFailure">assertFailure</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:assertBool">assertBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:assertEqual">assertEqual</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; a -&gt; a -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:assertString">assertString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Assertion">Assertion</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:-64--61--63-">(@=?)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; a -&gt; a -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:-64--63--61-">(@?=)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a) =&gt; a -&gt; a -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:-64--63-">(@?)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> t) =&gt; t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:Assertable">Assertable</a> t <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:ListAssertable">ListAssertable</a> t <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:AssertionPredicate">AssertionPredicate</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:AssertionPredicable">AssertionPredicable</a> t <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Testable">Testable</a> t <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:State">State</a> = <a href="#v:State">State</a> {<ul class="subs"><li><a href="#v:path">path</a> :: <a href="Test-HUnit-Base.html#t:Path">Path</a></li><li><a href="#v:counts">counts</a> :: <a href="Test-HUnit-Base.html#t:Counts">Counts</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Counts">Counts</a> = <a href="#v:Counts">Counts</a> {<ul class="subs"><li><a href="#v:cases">cases</a>, <a href="#v:tried">tried</a>, <a href="#v:errors">errors</a>, <a href="#v:failures">failures</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Path">Path</a> = [<a href="Test-HUnit-Base.html#t:Node">Node</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:Node">Node</a><ul class="subs"><li>= <a href="#v:ListItem">ListItem</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li>| <a href="#v:Label">Label</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><a href="#v:testCasePaths">testCasePaths</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; [<a href="Test-HUnit-Base.html#t:Path">Path</a>]</li><li class="src short"><a href="#v:testCaseCount">testCaseCount</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ReportStart">ReportStart</a> us = <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; us -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> us</li><li class="src short"><span class="keyword">type</span> <a href="#t:ReportProblem">ReportProblem</a> us = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; us -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> us</li><li class="src short"><a href="#v:performTest">performTest</a> :: <a href="Test-HUnit-Base.html#t:ReportStart">ReportStart</a> us -&gt; <a href="Test-HUnit-Base.html#t:ReportProblem">ReportProblem</a> us -&gt; <a href="Test-HUnit-Base.html#t:ReportProblem">ReportProblem</a> us -&gt; us -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-HUnit-Base.html#t:Counts">Counts</a>, us)</li></ul></div><div id="interface"><h2 id="g:1">Declaring tests</h2><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Test" class="def">Test</a> <a href="src/Test-HUnit-Base.html#Test" class="link">Source</a> <a href="#t:Test" class="selflink">#</a></p><div class="doc"><p>The basic structure used to create an annotated tree of test cases.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TestCase" class="def">TestCase</a> <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc"><p>A single, independent test case composed.</p></td></tr><tr><td class="src"><a id="v:TestList" class="def">TestList</a> [<a href="Test-HUnit-Base.html#t:Test">Test</a>]</td><td class="doc"><p>A set of <code>Test</code>s sharing the same level in the hierarchy.</p></td></tr><tr><td class="src"><a id="v:TestLabel" class="def">TestLabel</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="Test-HUnit-Base.html#t:Test">Test</a></td><td class="doc"><p>A name or description for a subtree of the <code>Test</code>s.</p></td></tr></table></div><div class="subs instances"><p id="control.i:Test" class="caption collapser" onclick="toggleSection('i:Test')">Instances</p><div id="section.i:Test" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Test:Show:1" class="instance expander" onclick="toggleSection('i:id:Test:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Test-HUnit-Base.html#t:Test">Test</a></span> <a href="src/Test-HUnit-Base.html#line-186" class="link">Source</a> <a href="#t:Test" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Test:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Test-HUnit-Base.html#t:Test">Test</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Test:Testable:2" class="instance expander" onclick="toggleSection('i:id:Test:Testable:2')"></span> <a href="Test-HUnit-Base.html#t:Testable">Testable</a> <a href="Test-HUnit-Base.html#t:Test">Test</a></span> <a href="src/Test-HUnit-Base.html#line-199" class="link">Source</a> <a href="#t:Test" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Test:Testable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:test">test</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <a href="src/Test-HUnit-Base.html#test" class="link">Source</a> <a href="#v:test" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:-126--61--63-" class="def">(~=?)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#~%3D%3F" class="link">Source</a> <a href="#v:-126--61--63-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; a</td><td class="doc"><p>The expected value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The actual value</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Shorthand for a test case that asserts equality (with the expected
   value on the left-hand side, and the actual value on the right-hand
   side).</p></div></div><div class="top"><p class="src"><a id="v:-126--63--61-" class="def">(~?=)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#~%3F%3D" class="link">Source</a> <a href="#v:-126--63--61-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; a</td><td class="doc"><p>The actual value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The expected value</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Shorthand for a test case that asserts equality (with the actual
   value on the left-hand side, and the expected value on the right-hand
   side).</p></div></div><div class="top"><p class="src"><a id="v:-126-:" class="def">(~:)</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:Testable">Testable</a> t) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; t -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <span class="fixity">infixr 0</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#~%3A" class="link">Source</a> <a href="#v:-126-:" class="selflink">#</a></p><div class="doc"><p>Creates a test from the specified <code><a href="Test-HUnit-Base.html#t:Testable">Testable</a></code>, with the specified
   label attached to it.</p><p>Since <code><a href="Test-HUnit-Base.html#t:Test">Test</a></code> is <code>Testable</code>, this can be used as a shorthand way of attaching
 a <code><a href="Test-HUnit-Base.html#v:TestLabel">TestLabel</a></code> to one or more tests.</p></div></div><div class="top"><p class="src"><a id="v:-126--63-" class="def">(~?)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#~%3F" class="link">Source</a> <a href="#v:-126--63-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> t)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; t</td><td class="doc"><p>A value of which the asserted condition is predicated</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>A message that is displayed on test failure</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Creates a test case resulting from asserting the condition obtained
   from the specified <code><a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a></code>.</p></div></div><h2 id="g:2">Making assertions</h2><div class="top"><p class="src"><a id="v:assertFailure" class="def">assertFailure</a> <a href="src/Test-HUnit-Lang.html#assertFailure" class="link">Source</a> <a href="#v:assertFailure" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>A message that is displayed with the assertion failure</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Unconditionally signals that a failure has occured.  All
 other assertions can be expressed with the form:</p><pre>   if conditionIsMet
       then IO ()
       else assertFailure msg
</pre></div></div><div class="top"><p class="src"><a id="v:assertBool" class="def">assertBool</a> <a href="src/Test-HUnit-Base.html#assertBool" class="link">Source</a> <a href="#v:assertBool" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The message that is displayed if the assertion fails</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>The condition</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Asserts that the specified condition holds.</p></div></div><div class="top"><p class="src"><a id="v:assertEqual" class="def">assertEqual</a> <a href="src/Test-HUnit-Lang.html#assertEqual" class="link">Source</a> <a href="#v:assertEqual" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The message prefix</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The expected value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The actual value</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Asserts that the specified actual value is equal to the expected value.
 The output message will contain the prefix, the expected value, and the
 actual value.</p><p>If the prefix is the empty string (i.e., <code>&quot;&quot;</code>), then the prefix is omitted
 and only the expected and actual values are output.</p></div></div><div class="top"><p class="src"><a id="v:assertString" class="def">assertString</a> <a href="src/Test-HUnit-Base.html#assertString" class="link">Source</a> <a href="#v:assertString" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The message that is displayed with the assertion failure</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Signals an assertion failure if a non-empty message (i.e., a message
 other than <code>&quot;&quot;</code>) is passed.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Assertion" class="def">Assertion</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Test-HUnit-Lang.html#Assertion" class="link">Source</a> <a href="#t:Assertion" class="selflink">#</a></p><div class="doc"><p>When an assertion is evaluated, it will output a message if and only if the
 assertion fails.</p><p>Test cases are composed of a sequence of one or more assertions.</p></div></div><div class="top"><p class="src"><a id="v:-64--61--63-" class="def">(@=?)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#%40%3D%3F" class="link">Source</a> <a href="#v:-64--61--63-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; a</td><td class="doc"><p>The expected value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The actual value</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Asserts that the specified actual value is equal to the expected value
   (with the expected value on the left-hand side).</p></div></div><div class="top"><p class="src"><a id="v:-64--63--61-" class="def">(@?=)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#%40%3F%3D" class="link">Source</a> <a href="#v:-64--63--61-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; a</td><td class="doc"><p>The actual value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The expected value</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Asserts that the specified actual value is equal to the expected value
   (with the actual value on the left-hand side).</p></div></div><div class="top"><p class="src"><a id="v:-64--63-" class="def">(@?)</a> <span class="fixity">infix 1</span><span class="rightedge"></span> <a href="src/Test-HUnit-Base.html#%40%3F" class="link">Source</a> <a href="#v:-64--63-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a>, <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> t)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; t</td><td class="doc"><p>A value of which the asserted condition is predicated</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>A message that is displayed if the assertion fails</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Asserts that the condition obtained from the specified
   <code><a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a></code> holds.</p></div></div><h2 id="g:3">Extending the assertion functionality</h2><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:Assertable" class="def">Assertable</a> t <span class="keyword">where</span> <a href="src/Test-HUnit-Base.html#Assertable" class="link">Source</a> <a href="#t:Assertable" class="selflink">#</a></p><div class="doc"><p>Allows the extension of the assertion mechanism.</p><p>Since an <code><a href="Test-HUnit-Base.html#t:Assertion">Assertion</a></code> can be a sequence of <code>Assertion</code>s and <code>IO</code> actions,
 there is a fair amount of flexibility of what can be achieved.  As a rule,
 the resulting <code>Assertion</code> should be the body of a <code><a href="Test-HUnit-Base.html#v:TestCase">TestCase</a></code> or part of
 a <code>TestCase</code>; it should not be used to assert multiple, independent
 conditions.</p><p>If more complex arrangements of assertions are needed, <code><a href="Test-HUnit-Base.html#t:Test">Test</a></code>s and
 <code><a href="Test-HUnit-Base.html#t:Testable">Testable</a></code> should be used.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Test-HUnit-Base.html#v:assert">assert</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:assert" class="def">assert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; t -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#assert" class="link">Source</a> <a href="#v:assert" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:Assertable" class="caption collapser" onclick="toggleSection('i:Assertable')">Instances</p><div id="section.i:Assertable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Assertable:Assertable:1" class="instance expander" onclick="toggleSection('i:ic:Assertable:Assertable:1')"></span> <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/Test-HUnit-Base.html#line-87" class="link">Source</a> <a href="#t:Assertable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Assertable:Assertable:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assert">assert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#assert" class="link">Source</a> <a href="#v:assert" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Assertable:Assertable:2" class="instance expander" onclick="toggleSection('i:ic:Assertable:Assertable:2')"></span> <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> ()</span> <a href="src/Test-HUnit-Base.html#line-84" class="link">Source</a> <a href="#t:Assertable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Assertable:Assertable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assert">assert</a> :: () -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#assert" class="link">Source</a> <a href="#v:assert" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Assertable:Assertable:3" class="instance expander" onclick="toggleSection('i:ic:Assertable:Assertable:3')"></span> <a href="Test-HUnit-Base.html#t:ListAssertable">ListAssertable</a> t =&gt; <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> [t]</span> <a href="src/Test-HUnit-Base.html#line-90" class="link">Source</a> <a href="#t:Assertable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Assertable:Assertable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assert">assert</a> :: [t] -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#assert" class="link">Source</a> <a href="#v:assert" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Assertable:Assertable:4" class="instance expander" onclick="toggleSection('i:ic:Assertable:Assertable:4')"></span> <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> t =&gt; <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t)</span> <a href="src/Test-HUnit-Base.html#line-93" class="link">Source</a> <a href="#t:Assertable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Assertable:Assertable:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assert">assert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#assert" class="link">Source</a> <a href="#v:assert" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:ListAssertable" class="def">ListAssertable</a> t <span class="keyword">where</span> <a href="src/Test-HUnit-Base.html#ListAssertable" class="link">Source</a> <a href="#t:ListAssertable" class="selflink">#</a></p><div class="doc"><p>A specialized form of <code><a href="Test-HUnit-Base.html#t:Assertable">Assertable</a></code> to handle lists.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Test-HUnit-Base.html#v:listAssert">listAssert</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:listAssert" class="def">listAssert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; [t] -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#listAssert" class="link">Source</a> <a href="#v:listAssert" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:ListAssertable" class="caption collapser" onclick="toggleSection('i:ListAssertable')">Instances</p><div id="section.i:ListAssertable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ListAssertable:ListAssertable:1" class="instance expander" onclick="toggleSection('i:ic:ListAssertable:ListAssertable:1')"></span> <a href="Test-HUnit-Base.html#t:ListAssertable">ListAssertable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></span> <a href="src/Test-HUnit-Base.html#line-100" class="link">Source</a> <a href="#t:ListAssertable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:ListAssertable:ListAssertable:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:listAssert">listAssert</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -&gt; <a href="Test-HUnit-Base.html#t:Assertion">Assertion</a> <a href="src/Test-HUnit-Base.html#listAssert" class="link">Source</a> <a href="#v:listAssert" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:AssertionPredicate" class="def">AssertionPredicate</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Test-HUnit-Base.html#AssertionPredicate" class="link">Source</a> <a href="#t:AssertionPredicate" class="selflink">#</a></p><div class="doc"><p>The result of an assertion that hasn't been evaluated yet.</p><p>Most test cases follow the following steps:</p><ol><li>Do some processing or an action.</li><li>Assert certain conditions.</li></ol><p>However, this flow is not always suitable.  <code>AssertionPredicate</code> allows for
 additional steps to be inserted without the initial action to be affected
 by side effects.  Additionally, clean-up can be done before the test case
 has a chance to end.  A potential work flow is:</p><ol><li>Write data to a file.</li><li>Read data from a file, evaluate conditions.</li><li>Clean up the file.</li><li>Assert that the side effects of the read operation meet certain conditions.</li><li>Assert that the conditions evaluated in step 2 are met.</li></ol></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:AssertionPredicable" class="def">AssertionPredicable</a> t <span class="keyword">where</span> <a href="src/Test-HUnit-Base.html#AssertionPredicable" class="link">Source</a> <a href="#t:AssertionPredicable" class="selflink">#</a></p><div class="doc"><p>Used to signify that a data type can be converted to an assertion
 predicate.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Test-HUnit-Base.html#v:assertionPredicate">assertionPredicate</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:assertionPredicate" class="def">assertionPredicate</a> :: t -&gt; <a href="Test-HUnit-Base.html#t:AssertionPredicate">AssertionPredicate</a> <a href="src/Test-HUnit-Base.html#assertionPredicate" class="link">Source</a> <a href="#v:assertionPredicate" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:AssertionPredicable" class="caption collapser" onclick="toggleSection('i:AssertionPredicable')">Instances</p><div id="section.i:AssertionPredicable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:AssertionPredicable:AssertionPredicable:1" class="instance expander" onclick="toggleSection('i:ic:AssertionPredicable:AssertionPredicable:1')"></span> <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/Test-HUnit-Base.html#line-136" class="link">Source</a> <a href="#t:AssertionPredicable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:AssertionPredicable:AssertionPredicable:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assertionPredicate">assertionPredicate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Test-HUnit-Base.html#t:AssertionPredicate">AssertionPredicate</a> <a href="src/Test-HUnit-Base.html#assertionPredicate" class="link">Source</a> <a href="#v:assertionPredicate" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:AssertionPredicable:AssertionPredicable:2" class="instance expander" onclick="toggleSection('i:ic:AssertionPredicable:AssertionPredicable:2')"></span> <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> t =&gt; <a href="Test-HUnit-Base.html#t:AssertionPredicable">AssertionPredicable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t)</span> <a href="src/Test-HUnit-Base.html#line-139" class="link">Source</a> <a href="#t:AssertionPredicable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:AssertionPredicable:AssertionPredicable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:assertionPredicate">assertionPredicate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t -&gt; <a href="Test-HUnit-Base.html#t:AssertionPredicate">AssertionPredicate</a> <a href="src/Test-HUnit-Base.html#assertionPredicate" class="link">Source</a> <a href="#v:assertionPredicate" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:Testable" class="def">Testable</a> t <span class="keyword">where</span> <a href="src/Test-HUnit-Base.html#Testable" class="link">Source</a> <a href="#t:Testable" class="selflink">#</a></p><div class="doc"><p>Provides a way to convert data into a <code>Test</code> or set of <code>Test</code>.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Test-HUnit-Base.html#v:test">test</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:test" class="def">test</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:HasCallStack">HasCallStack</a> =&gt; t -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <a href="src/Test-HUnit-Base.html#test" class="link">Source</a> <a href="#v:test" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:Testable" class="caption collapser" onclick="toggleSection('i:Testable')">Instances</p><div id="section.i:Testable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Testable:Testable:1" class="instance expander" onclick="toggleSection('i:ic:Testable:Testable:1')"></span> <a href="Test-HUnit-Base.html#t:Testable">Testable</a> <a href="Test-HUnit-Base.html#t:Test">Test</a></span> <a href="src/Test-HUnit-Base.html#line-199" class="link">Source</a> <a href="#t:Testable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Testable:Testable:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:test">test</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <a href="src/Test-HUnit-Base.html#test" class="link">Source</a> <a href="#v:test" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Testable:Testable:2" class="instance expander" onclick="toggleSection('i:ic:Testable:Testable:2')"></span> <a href="Test-HUnit-Base.html#t:Testable">Testable</a> t =&gt; <a href="Test-HUnit-Base.html#t:Testable">Testable</a> [t]</span> <a href="src/Test-HUnit-Base.html#line-205" class="link">Source</a> <a href="#t:Testable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Testable:Testable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:test">test</a> :: [t] -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <a href="src/Test-HUnit-Base.html#test" class="link">Source</a> <a href="#v:test" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Testable:Testable:3" class="instance expander" onclick="toggleSection('i:ic:Testable:Testable:3')"></span> <a href="Test-HUnit-Base.html#t:Assertable">Assertable</a> t =&gt; <a href="Test-HUnit-Base.html#t:Testable">Testable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t)</span> <a href="src/Test-HUnit-Base.html#line-202" class="link">Source</a> <a href="#t:Testable" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:Testable:Testable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:test">test</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> t -&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a> <a href="src/Test-HUnit-Base.html#test" class="link">Source</a> <a href="#v:test" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h2 id="g:4">Test execution</h2><div class="doc"><p>Note: the rest of the functionality in this module is intended for
 implementors of test controllers. If you just want to run your tests cases,
 simply use a test controller, such as the text-based controller in
 <a href="Test-HUnit-Text.html">Test.HUnit.Text</a>.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:State" class="def">State</a> <a href="src/Test-HUnit-Base.html#State" class="link">Source</a> <a href="#t:State" class="selflink">#</a></p><div class="doc"><p>Keeps track of the remaining tests and the results of the performed tests.
 As each test is performed, the path is removed and the counts are
 updated as appropriate.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:State" class="def">State</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: <a href="Test-HUnit-Base.html#t:Path">Path</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:counts" class="def">counts</a> :: <a href="Test-HUnit-Base.html#t:Counts">Counts</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:State" class="caption collapser" onclick="toggleSection('i:State')">Instances</p><div id="section.i:State" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:State:Eq:1" class="instance expander" onclick="toggleSection('i:id:State:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Test-HUnit-Base.html#t:State">State</a></span> <a href="src/Test-HUnit-Base.html#line-269" class="link">Source</a> <a href="#t:State" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:State:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:State:Read:2" class="instance expander" onclick="toggleSection('i:id:State:Read:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Test-HUnit-Base.html#t:State">State</a></span> <a href="src/Test-HUnit-Base.html#line-269" class="link">Source</a> <a href="#t:State" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:State:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Test-HUnit-Base.html#t:State">State</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Test-HUnit-Base.html#t:State">State</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Test-HUnit-Base.html#t:State">State</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Test-HUnit-Base.html#t:State">State</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:State:Show:3" class="instance expander" onclick="toggleSection('i:id:State:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Test-HUnit-Base.html#t:State">State</a></span> <a href="src/Test-HUnit-Base.html#line-269" class="link">Source</a> <a href="#t:State" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:State:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Test-HUnit-Base.html#t:State">State</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Counts" class="def">Counts</a> <a href="src/Test-HUnit-Base.html#Counts" class="link">Source</a> <a href="#t:Counts" class="selflink">#</a></p><div class="doc"><p>A data structure that hold the results of tests that have been performed
 up until this point.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Counts" class="def">Counts</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:cases" class="def">cases</a>, <a id="v:tried" class="def">tried</a>, <a id="v:errors" class="def">errors</a>, <a id="v:failures" class="def">failures</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Counts" class="caption collapser" onclick="toggleSection('i:Counts')">Instances</p><div id="section.i:Counts" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Counts:Eq:1" class="instance expander" onclick="toggleSection('i:id:Counts:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Test-HUnit-Base.html#t:Counts">Counts</a></span> <a href="src/Test-HUnit-Base.html#line-263" class="link">Source</a> <a href="#t:Counts" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Counts:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Counts:Read:2" class="instance expander" onclick="toggleSection('i:id:Counts:Read:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Test-HUnit-Base.html#t:Counts">Counts</a></span> <a href="src/Test-HUnit-Base.html#line-263" class="link">Source</a> <a href="#t:Counts" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Counts:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Test-HUnit-Base.html#t:Counts">Counts</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Test-HUnit-Base.html#t:Counts">Counts</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Test-HUnit-Base.html#t:Counts">Counts</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Test-HUnit-Base.html#t:Counts">Counts</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Counts:Show:3" class="instance expander" onclick="toggleSection('i:id:Counts:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Test-HUnit-Base.html#t:Counts">Counts</a></span> <a href="src/Test-HUnit-Base.html#line-263" class="link">Source</a> <a href="#t:Counts" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Counts:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Test-HUnit-Base.html#t:Counts">Counts</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Test-HUnit-Base.html#t:Counts">Counts</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Path" class="def">Path</a> = [<a href="Test-HUnit-Base.html#t:Node">Node</a>] <a href="src/Test-HUnit-Base.html#Path" class="link">Source</a> <a href="#t:Path" class="selflink">#</a></p><div class="doc"><p>Uniquely describes the location of a test within a test hierarchy.
 Node order is from test case to root.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Node" class="def">Node</a> <a href="src/Test-HUnit-Base.html#Node" class="link">Source</a> <a href="#t:Node" class="selflink">#</a></p><div class="doc"><p>Composed into <code><a href="Test-HUnit-Base.html#t:Path">Path</a></code>s.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:ListItem" class="def">ListItem</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:Label" class="def">Label</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Node" class="caption collapser" onclick="toggleSection('i:Node')">Instances</p><div id="section.i:Node" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Node:Eq:1" class="instance expander" onclick="toggleSection('i:id:Node:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Test-HUnit-Base.html#t:Node">Node</a></span> <a href="src/Test-HUnit-Base.html#line-284" class="link">Source</a> <a href="#t:Node" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Node:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Node:Read:2" class="instance expander" onclick="toggleSection('i:id:Node:Read:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Test-HUnit-Base.html#t:Node">Node</a></span> <a href="src/Test-HUnit-Base.html#line-284" class="link">Source</a> <a href="#t:Node" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Node:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Test-HUnit-Base.html#t:Node">Node</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Test-HUnit-Base.html#t:Node">Node</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Test-HUnit-Base.html#t:Node">Node</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Test-HUnit-Base.html#t:Node">Node</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Node:Show:3" class="instance expander" onclick="toggleSection('i:id:Node:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Test-HUnit-Base.html#t:Node">Node</a></span> <a href="src/Test-HUnit-Base.html#line-284" class="link">Source</a> <a href="#t:Node" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Node:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Test-HUnit-Base.html#t:Node">Node</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Test-HUnit-Base.html#t:Node">Node</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:testCasePaths" class="def">testCasePaths</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; [<a href="Test-HUnit-Base.html#t:Path">Path</a>] <a href="src/Test-HUnit-Base.html#testCasePaths" class="link">Source</a> <a href="#v:testCasePaths" class="selflink">#</a></p><div class="doc"><p>Determines the paths for all <code><a href="Test-HUnit-Base.html#v:TestCase">TestCase</a></code>s in a tree of <code>Test</code>s.</p></div></div><div class="top"><p class="src"><a id="v:testCaseCount" class="def">testCaseCount</a> :: <a href="Test-HUnit-Base.html#t:Test">Test</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Test-HUnit-Base.html#testCaseCount" class="link">Source</a> <a href="#v:testCaseCount" class="selflink">#</a></p><div class="doc"><p>Counts the number of <code><a href="Test-HUnit-Base.html#v:TestCase">TestCase</a></code>s in a tree of <code>Test</code>s.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ReportStart" class="def">ReportStart</a> us = <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; us -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> us <a href="src/Test-HUnit-Base.html#ReportStart" class="link">Source</a> <a href="#t:ReportStart" class="selflink">#</a></p><div class="doc"><p>Report generator for reporting the start of a test run.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:ReportProblem" class="def">ReportProblem</a> us = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Stack.html#t:SrcLoc">SrcLoc</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Base.html#t:State">State</a> -&gt; us -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> us <a href="src/Test-HUnit-Base.html#ReportProblem" class="link">Source</a> <a href="#t:ReportProblem" class="selflink">#</a></p><div class="doc"><p>Report generator for reporting problems that have occurred during
   a test run. Problems may be errors or assertion failures.</p></div></div><div class="top"><p class="src"><a id="v:performTest" class="def">performTest</a> <a href="src/Test-HUnit-Base.html#performTest" class="link">Source</a> <a href="#v:performTest" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Test-HUnit-Base.html#t:ReportStart">ReportStart</a> us</td><td class="doc"><p>report generator for the test run start</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:ReportProblem">ReportProblem</a> us</td><td class="doc"><p>report generator for errors during the test run</p></td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:ReportProblem">ReportProblem</a> us</td><td class="doc"><p>report generator for assertion failures during the test run</p></td></tr><tr><td class="src">-&gt; us</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Test-HUnit-Base.html#t:Test">Test</a></td><td class="doc"><p>the test to be executed</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-HUnit-Base.html#t:Counts">Counts</a>, us)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Performs a test run with the specified report generators.</p><p>This handles the actual running of the tests.  Most developers will want
 to use <code>HUnit.Text.runTestTT</code> instead.  A developer could use this function
 to execute tests via another IO system, such as a GUI, or to output the
 results in a different manner (e.g., upload XML-formatted results to a
 webservice).</p><p>Note that the counts in a start report do not include the test case
 being started, whereas the counts in a problem report do include the
 test case just finished.  The principle is that the counts are sampled
 only between test case executions.  As a result, the number of test
 case successes always equals the difference of test cases tried and
 the sum of test case errors and failures.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>