Files
dotfiles/cabal/share/doc/x86_64-osx-ghc-7.10.1/HUnit-1.2.5.2/html/Test-HUnit-Lang.html
2015-04-05 17:47:08 +02:00

11 lines
6.7 KiB
HTML

<!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.Lang</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Test-HUnit-Lang.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">HUnit-1.2.5.2: 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>Haskell98</td></tr></table><p class="caption">Test.HUnit.Lang</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Internals</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module abstracts the differences between implementations of
Haskell (e.g., GHC, Hugs, and NHC).</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">type</span> <a href="#t:Assertion">Assertion</a> = <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:assertFailure">assertFailure</a> :: <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Test-HUnit-Lang.html#t:Assertion">Assertion</a></li><li class="src short"><a href="#v:performTestCase">performTestCase</a> :: <a href="Test-HUnit-Lang.html#t:Assertion">Assertion</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-Bool.html#t:Bool">Bool</a>, <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a>))</li><li class="src short"><span class="keyword">data</span> <a href="#t:HUnitFailure">HUnitFailure</a> = <a href="#v:HUnitFailure">HUnitFailure</a> <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Assertion" class="def">Assertion</a> = <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</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 name="v:assertFailure" class="def">assertFailure</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.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-Lang.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 name="v:performTestCase" class="def">performTestCase</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Test-HUnit-Lang.html#t:Assertion">Assertion</a></td><td class="doc"><p>an assertion to be made during the test case run </p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-Bool.html#t:Bool">Bool</a>, <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a>))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Performs a single test case. The meaning of the result is as follows:</p><dl><dt><code>Nothing</code></dt><dd>test case success<dl><dt><code>Just (True, msg)</code></dt><dd>test case failure with the given message</dd><dt><code>Just (False, msg)</code></dt><dd>test case error with the given message</dd></dl></dd></dl></div></div><h1 id="g:1">Internals</h1><div class="doc"><p><em>Note:</em> This is not part of the public API! It is exposed so that you can
tinker with the internals of HUnit, but do not expect it to be stable!</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:HUnitFailure" class="def">HUnitFailure</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HUnitFailure" class="def">HUnitFailure</a> <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.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:HUnitFailure" class="caption collapser" onclick="toggleSection('i:HUnitFailure')">Instances</p><div id="section.i:HUnitFailure" class="show"><table><tr><td class="src"><a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Text-Show.html#t:Show">Show</a> <a href="Test-HUnit-Lang.html#t:HUnitFailure">HUnitFailure</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Test-HUnit-Lang.html#t:HUnitFailure">HUnitFailure</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.0</p></div></body></html>