UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

109 lines (102 loc) 36.6 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Unit testing &mdash; Run-time Checking, Testing, and Profiling for Ciao</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="ciaodbg_ref_man.html">&#x2191;</a><a class="lpdoc-navbutton" href="rtchecks_tutorial.html">&#x2190;</a><a class="lpdoc-navbutton" href="unittest_props.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaodbg_ref_mansearch.html">&#x1F50D;</a></span><span><a href="ciaodbg_ref_manfulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciaodbg_ref_man.html">Run-time Checking, Testing, and Profiling for Ciao</a> &raquo;<br/> </li><li><a href=""><strong>Unit testing</strong></a> &#9662;<ul><li><a href="unittest_props.html">Special properties for testing</a></li><li><a href="unittestdecls_doc.html">Loading auxiliary test-related code</a></li><li><a href="unittest_statistics.html">Testing statistics</a></li><li><a href="unittest_examples.html">Examples (unittest)</a></li></ul></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Writing test assertions">Writing test assertions</a></li><li><a href="#Unit tests as examples">Unit tests as examples</a></li><li><a href="#Running tests in a bundle">Running tests in a bundle</a></li><li><a href="#Running the tests from the IDE">Running the tests from the IDE</a></li><li><a href="#Running the tests from the top level or programmatically">Running the tests from the top level or programmatically</a></li><li><a href="#Combination with run-time tests">Combination with run-time tests</a></li><li><a href="#Integration tests">Integration tests</a></li><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on multifiles">Documentation on multifiles</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Unit testing</h1><a class="lpdoc-idx-anchor" href="ciaodbg_ref_mansearch.html#unittest"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Edison Mera" href="ciaodbg_ref_mansearch.html#Edison Mera">Edison Mera</a>, <a class="lpdoc-idx-anchor" id="Pedro Lopez" href="ciaodbg_ref_mansearch.html#Pedro Lopez">Pedro L&oacute;pez</a>, <a class="lpdoc-idx-anchor" id="Manuel Hermenegildo" href="ciaodbg_ref_mansearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>, <a class="lpdoc-idx-anchor" id="Alvaro Sevilla San Mateo" href="ciaodbg_ref_mansearch.html#Alvaro Sevilla San Mateo">Alvaro Sevilla San Mateo</a>, <a class="lpdoc-idx-anchor" id="Nataliia Stulova" href="ciaodbg_ref_mansearch.html#Nataliia Stulova">Nataliia Stulova</a>, <a class="lpdoc-idx-anchor" id="Ignacio Casso" href="ciaodbg_ref_mansearch.html#Ignacio Casso">Ignacio Casso</a>.<p> <strong>Stability: [</strong><strong>beta</strong><strong>] </strong>Most of the functionality is there but it is still missing some testing and/or verification.<p><br/> The Ciao assertion language (see <span class="lpdoc-missing">The Ciao assertion language</span>) allows writing <a class="lpdoc-idx-anchor" id="0" href="ciaodbg_ref_mansearch.html#tests"><em>tests</em></a> (including <a class="lpdoc-idx-anchor" id="1" href="ciaodbg_ref_mansearch.html#unit tests"><em>unit tests</em></a>) by means of <a class="lpdoc-idx-anchor" id="2" href="ciaodbg_ref_mansearch.html#test assertions"><em>test assertions</em></a>. These assertions make it possible to write specific test cases at the predicate level. This library contains predicates that can be used to run tests in modules and gather or pretty-print the results. It also provides some special properties that are convenient when writing tests and the corresponding run-time support.<p><div id="Writing test assertions"><h3>Writing test assertions</h3> <a class="lpdoc-idx-anchor" id="3" href="ciaodbg_ref_mansearch.html#writing unit tests"></a> <p>As described in <span class="lpdoc-missing">The Ciao assertion language</span> a <a class="lpdoc-idx-anchor" id="4" href="ciaodbg_ref_mansearch.html#test assertion"><em>test assertion</em></a> is written as follows:<p><pre class="lpdoc-codeblock"> :- test predicate(A1, A2, ..., An) : &lt;Precondition&gt; =&gt; &lt;Postcondition&gt; + &lt;Global properties&gt; # &lt;Comment&gt;.</pre> <p>Where the fields of the test assertion have the usual meaning in Ciao assertions, i.e., they contain conjunctions of properties which must hold at certain points in the execution. Here we give a somewhat more operational (``test oriented&apos;&apos;) reading to these fields:<p><ul> <li><a class="lpdoc-idx-anchor" id="5" href="ciaodbg_ref_mansearch.html#predicate/n"><tt>predicate/n</tt></a> is the predicate to be tested.<p><li><span class="lpdoc-var">Precondition</span> is a goal (a literal or a conjuntion of literals) that is called before the predicate being tested, and can be used to generate values of the input parameters. While in some other types of assertions these preconditions contain properties to be checked, the typical role of the preconditions here is to provide concrete input values for which the predicate can be actually executed.<p><li><span class="lpdoc-var">Postcondition</span> is a goal that should succeed after <a class="lpdoc-idx-anchor" id="6" href="ciaodbg_ref_mansearch.html#predicate/n"><tt>predicate/n</tt></a> has been called. This is used to test that the output of the predicate is the correct one for the input provided.<p><li><span class="lpdoc-var">Golbal properties</span> specifies some global properties that the predicate should meet, in the same way as other assertions. For example, <a class="lpdoc-idx-anchor" id="7" href="ciaodbg_ref_mansearch.html#not_fails"><tt>not_fails</tt></a> means that the predicate does not fail, <a class="lpdoc-idx-anchor" id="8" href="ciaodbg_ref_mansearch.html#exception(error(a,b))"><tt>exception(error(a,b))</tt></a> means that the predicate should throw the exception <a class="lpdoc-idx-anchor" id="9" href="ciaodbg_ref_mansearch.html#error(a,b)"><tt>error(a,b)</tt></a>, and so on.<p><li><span class="lpdoc-var">Comment</span> is a string that documents the test. </ul> <p>The following are some example tests for a complex number evaluator (see <a href="unittest_examples.html">Examples (unittest)</a> for the full code):<p><pre class="lpdoc-codeblock"> :- module(ceval2, [ceval/2], [assertions, regtypes, nativeprops]). :- test ceval(A, B) : (A = c(3, 4) + c(1, 2) - c(2, 3)) =&gt; (B = c(2, 3)) + (not_fails, is_det). :- test ceval(A, B) : (A = c(3, 4) * c(1, 2) / c(1, 2)) =&gt; (B = c(3.0, 4.0)) + (not_fails, is_det). ceval(A, A) :- complex(A), !. ceval(A+B, C) :- ceval(A, CA), ceval(B, CB), add(CA, CB, C). ceval(A-B, C) :- ceval(A, CA), ceval(B, CB), sub(CA, CB, C). ceval(A*B, C) :- ceval(A, CA), ceval(B, CB), mul(CA, CB, C). ceval(A/B, C) :- ceval(A, CA), ceval(B, CB), div(CA, CB, C). ... :- regtype complex/1. :- export(complex/1). complex(c(A, B)) :- num(A), num(B).</pre> <p>Test assertions can be combined with other assertions:<p><pre class="lpdoc-codeblock"> :- test ceval(A, B) : (A = c(3, 4) + c(1, 2) - c(2, 3)) =&gt; (B = c(2, 3)) + (not_fails, is_det). :- test ceval(A, B) : (A = c(3, 4) * c(1, 2) / c(1, 2)) =&gt; (B = c(3.0, 4.0)) + (not_fails, is_det). :- check pred ceval/2 : gnd * term =&gt; gnd * complex.</pre> <p>Test assertions can also take the standard assertion status prefixes. In particular, a status of <tt>false</tt> can be used to state that a test fails. This can be useful to flag bugs as known.<p><pre class="lpdoc-codeblock"> :- false test ceval(A, B) : (A = c(3, 4) + c(1, 2) - c(2, 3)) =&gt; (B = c(2, 3)) + (not_fails, is_det).</pre> <p>Tests with a <tt>false</tt> (or <tt>true</tt>) prefix are not run.<p>There are some specific properties that only apply to testing which are provided in module <a class="lpdoc-idx-anchor" id="10" href="ciaodbg_ref_mansearch.html#unittest_props.pl"><tt>unittest_props.pl</tt></a> (see <a href="unittest_props.html">Special properties for testing</a>). For example, the limit to the number of solutions to be generated for the tested predicate can be set with the property <a class="lpdoc-idx-anchor" id="11" href="ciaodbg_ref_mansearch.html#try_sols(N)"><tt>try_sols(N)</tt></a>, a timeout to a test can be set with the property <a class="lpdoc-idx-anchor" id="12" href="ciaodbg_ref_mansearch.html#timeout(N)"><tt>timeout(N)</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="ciaodbg_ref_mansearch.html#times(N)"><tt>times(N)</tt></a> specifies that the given test should be executed <a class="lpdoc-idx-anchor" id="14" href="ciaodbg_ref_mansearch.html#N"><tt>N</tt></a> times, etc.<p></div><div id="Unit tests as examples"><h3>Unit tests as examples</h3> <p>The special property <tt>example</tt> can be used to mark the unit test as an example, so that it is documented as such in manuals. The default behavior in <a class="lpdoc-idx-anchor" id="15" href="ciaodbg_ref_mansearch.html#lpdoc"><tt>lpdoc</tt></a> is to not include the unit tests in manuals unless they are marked this way. For example, the following test would be included in the manual as an example:<p><pre class="lpdoc-codeblock"> :- test ceval(A, B) : (A = c(3, 4) + c(1, 2) - c(2, 3)) =&gt; (B = c(2, 3)) + (not_fails, is_det, example).</pre> <p></div><div id="Running tests in a bundle"><h3>Running tests in a bundle</h3> <p>To run all these tests in a given bundle (as well as the other standard tests in the system) run the following (at the top level of the source tree or a bundle <a class="lpdoc-idx-anchor" id="16" href="ciaodbg_ref_mansearch.html#bundle"></a>):<p><pre class="lpdoc-codeblock"> ciao test</pre> <p></div><div id="Running the tests from the IDE"><h3>Running the tests from the IDE</h3> <p>A convenient way to run these tests is by selecting options in the <strong>CiaoDbg</strong> menu within the development environment. This menu offers the following options: <a class="lpdoc-idx-anchor" id="17" href="ciaodbg_ref_mansearch.html#running unit tests"></a> <p><div class="lpdoc-cartouche"> <ol> <p><li ><tt>Run tests in current module</tt>: execute only the tests specified in the current module.<p><li ><tt>Run tests in current and all related modules</tt>: execute the tests specified in the current module and in all the modules being used by it.<p><li ><tt>Show untested exported predicates</tt>: show the <em>exported</em> predicates that do not have any test assertions.<p></ol> </div> <p></div><div id="Running the tests from the top level or programmatically"><h3>Running the tests from the top level or programmatically</h3> <p>The tests can also be run from the top level, loading this module (<a class="lpdoc-idx-anchor" id="18" href="ciaodbg_ref_mansearch.html#unittest.pl"><tt>unittest.pl</tt></a>) and calling the appropiate predicates that it exports (see the module <a href="rtchecks_tutorial.html#Usage and interface">Usage and interface</a> section below). This can also be done from a program, provided it imports this module.<p></div><div id="Combination with run-time tests"><h3>Combination with run-time tests</h3> <p>These tests can be combined with the run-time checking of other assertions present in the involved modules. This can be done by including the <a class="lpdoc-idx-anchor" id="19" href="ciaodbg_ref_mansearch.html#rtchecks"><tt>rtchecks</tt></a> package in the desired modules. Any <tt>check</tt> assertions present in the code will then be checked dynamically during the execution of the tests and can detect additional errors.<p></div><div id="Integration tests"><h3>Integration tests</h3> <p>If you need to write tests for predicates that are spread over several modules, but work together, it may be useful to create a separate module, and reexport the predicates required to build the tests. This allows performing <em>integration testing</em>, using the syntax and functionality of the test assertions. </div><br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(library(unittest)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="20" href="#show_untested_exp_preds/1"><tt>show_untested_exp_preds/1</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="#run_tests_in_dir_rec/3"><tt>run_tests_in_dir_rec/3</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="#show_test_output/2"><tt>show_test_output/2</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="#show_test_related_output/2"><tt>show_test_related_output/2</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="#run_tests/3"><tt>run_tests/3</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="#run_tests/4"><tt>run_tests/4</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="#run_tests_in_module/3"><tt>run_tests_in_module/3</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="#run_tests_in_module/2"><tt>run_tests_in_module/2</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="#run_tests_in_module/1"><tt>run_tests_in_module/1</tt></a>, <a class="lpdoc-idx-anchor" id="29" href="#run_tests_in_module_check_exp_assrts/1"><tt>run_tests_in_module_check_exp_assrts/1</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="#run_tests_related_modules/1"><tt>run_tests_related_modules/1</tt></a>. <li><em>Regular Types:</em><br/><a class="lpdoc-idx-anchor" id="31" href="#test_option/1"><tt>test_option/1</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="#test_action/1"><tt>test_action/1</tt></a>. <li><em>Multifiles:</em><br/><a class="lpdoc-idx-anchor" id="33" href="#define_flag/3"><tt>define_flag/3</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="#test_filter/2"><tt>test_filter/2</tt></a>. </ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="show_untested_exp_preds/1" href="ciaodbg_ref_mansearch.html#show_untested_exp_preds/1">show_untested_exp_preds/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>show_untested_exp_preds(Alias)</tt> </span><p>Show any exported predicates that do not have test assertions. This is an aid towards ensuring that all exported predicates have tests.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="35" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_in_dir_rec/3" href="ciaodbg_ref_mansearch.html#run_tests_in_dir_rec/3">run_tests_in_dir_rec/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>run_tests_in_dir_rec(BaseDir,Opts,S)</tt> </span><p>Executes all the tests in the modules of the given directory and its subdirectories. You can indicate that the modules in a sub-directory should not be tested by placing an empty NOTEST file in that sub-directory. Also, if a NOTESTFILES file is present, containing patterns for modules, those modules will not be tested. Unittest&apos;s statistical summary is summarised in S, which is given value 0 if there are as many successes as expected, and 1 otherwise.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="36" href="ciaodbg_ref_mansearch.html#pathname/1"><tt>pathname/1</tt></a>)</span><span><span class="lpdoc-var">BaseDir</span> is a pathname (encoded as an atom) </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="ciaodbg_ref_mansearch.html#list/2"><tt>list/2</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is a list of <span class="lpdoc-var">test_option</span>s. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="ciaodbg_ref_mansearch.html#var/1"><tt>var/1</tt></a>)</span><span><span class="lpdoc-var">S</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="test_option/1" href="ciaodbg_ref_mansearch.html#test_option/1">test_option/1</a></div><div class="lpdoc-deftext">A global option that controls the testing system. The current set of options is:<p><ul> <p><li><tt>stdout(save)</tt>: Save stdout as test output, do not show <li><tt>stdout(dump)</tt>: Save stdout as test output, then show <li><tt>stdout(show)</tt>: Just show stdout (do not save) <li><tt>stdout(null)</tt>: Ignore stdout <li><tt>stderr(Opt)</tt>: (same as above) <li><tt>stderr(stdout)</tt>: redirect stderr to stdout<p><li><tt>dump_output</tt>: Equivalent to <tt>stdout(dump)</tt> <li><tt>dump_error</tt>: Equivalent to <tt>stderr(dump)</tt> <p><li><tt>rtc_entry</tt>: Force run-time checking of at least exported assertions even if the runtime_checks flag has not been activated. (This is a workaround since currently we cannot enable runtime checks in system libraries smoothly).<p><li><tt>treat_related</tt> : Run tests in current and all related modules;<p><li><tt>dir_rec</tt> : Run tests in a specified directory recursively.<p></ul><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>test_option(Opt)</tt> </span><p><span class="lpdoc-var">Opt</span> is a testing option.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="test_action/1" href="ciaodbg_ref_mansearch.html#test_action/1">test_action/1</a></div><div class="lpdoc-deftext">A global option that specifies a testing routine. The current set of actions is:<p><ul> <p><li><tt>check</tt> : run tests and temporarily save results in the auto-rewritable <tt>module.testout</tt> file;<p><li><tt>show_output</tt> : print the testing trace to the standard output;<p><li><tt>show_stats</tt> : print the test results statistics to the standard output;<p><li><tt>save</tt> : save test results file in <tt>module.testout-saved</tt> file;<p><li><tt>briefcompare</tt> : check whether current and saved test output files differ;<p><li><tt>compare</tt> : see the differences in the current and saved test output files in the diff format;<p></ul><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>test_action(Action)</tt> </span><p><span class="lpdoc-var">Action</span> is a testing action</p><ul class="lpdoc-itemize-minus"></ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="show_test_output/2" href="ciaodbg_ref_mansearch.html#show_test_output/2">show_test_output/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>show_test_output(Alias,Format)</tt> </span><p>Given a file <span class="lpdoc-var">Alias</span>, tries to look up the respective unittest output file and print it to the standard output in the specified <span class="lpdoc-var">Format</span> (&apos;output&apos; for test full trace, &apos;stats&apos; for a statistical summary only, &apos;full&apos; for both), otherwise emits a warning message that no test output file is avaiable.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="ciaodbg_ref_mansearch.html#atm/1"><tt>atm/1</tt></a>)</span><span><span class="lpdoc-var">Format</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="show_test_related_output/2" href="ciaodbg_ref_mansearch.html#show_test_related_output/2">show_test_related_output/2</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests/3" href="ciaodbg_ref_mansearch.html#run_tests/3">run_tests/3</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests/4" href="ciaodbg_ref_mansearch.html#run_tests/4">run_tests/4</a></div><div class="lpdoc-deftext">No further documentation available for this predicate. <em>Meta-predicate</em> with arguments: <tt>run_tests(?,?,?,pred(1))</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_in_module/3" href="ciaodbg_ref_mansearch.html#run_tests_in_module/3">run_tests_in_module/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>run_tests_in_module(Alias,Opts,TestSummaries)</tt> </span><p>Run the tests in module <span class="lpdoc-var">Alias</span> (with options <span class="lpdoc-var">Opts</span>). The results of the tests are returned as data in <span class="lpdoc-var">TestSummaries</span>. <span class="lpdoc-var">TestSummaries</span> can be pretty printed using <a class="lpdoc-idx-anchor" id="41" href="ciaodbg_ref_mansearch.html#show_test_summaries/1"><tt>show_test_summaries/1</tt></a> and <a class="lpdoc-idx-anchor" id="42" href="ciaodbg_ref_mansearch.html#statistical_summary/2"><tt>statistical_summary/2</tt></a>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="ciaodbg_ref_mansearch.html#list/2"><tt>list/2</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is a list of <span class="lpdoc-var">test_option</span>s. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="ciaodbg_ref_mansearch.html#list/1"><tt>list/1</tt></a>)</span><span><span class="lpdoc-var">TestSummaries</span> is a list. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_in_module/2" href="ciaodbg_ref_mansearch.html#run_tests_in_module/2">run_tests_in_module/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>run_tests_in_module(Alias,Opts)</tt> </span><p>Run the tests in module <span class="lpdoc-var">Alias</span>. The results of the tests are printed out.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="ciaodbg_ref_mansearch.html#list/2"><tt>list/2</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is a list of <span class="lpdoc-var">test_option</span>s. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_in_module/1" href="ciaodbg_ref_mansearch.html#run_tests_in_module/1">run_tests_in_module/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>run_tests_in_module(Alias)</tt> </span><p>Run the tests in module <span class="lpdoc-var">Alias</span> (using default options). The results of the tests are printed out.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="48" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_in_module_check_exp_assrts/1" href="ciaodbg_ref_mansearch.html#run_tests_in_module_check_exp_assrts/1">run_tests_in_module_check_exp_assrts/1</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="run_tests_related_modules/1" href="ciaodbg_ref_mansearch.html#run_tests_related_modules/1">run_tests_related_modules/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>run_tests_related_modules(Alias)</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="ciaodbg_ref_mansearch.html#sourcename/1"><tt>sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Alias</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="show_test_summaries/1" href="ciaodbg_ref_mansearch.html#show_test_summaries/1">show_test_summaries/1</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="50" href="ciaodbg_ref_mansearch.html#unittest_summaries"><tt>unittest_summaries</tt></a> (see the corresponding documentation for details).<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="statistical_summary/1" href="ciaodbg_ref_mansearch.html#statistical_summary/1">statistical_summary/1</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="51" href="unittest_statistics.html"><tt>unittest_statistics</tt></a> (see the corresponding documentation for details).<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="statistical_summary/1" href="ciaodbg_ref_mansearch.html#statistical_summary/1">statistical_summary/1</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="52" href="unittest_statistics.html"><tt>unittest_statistics</tt></a> (see the corresponding documentation for details).<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="get_statistical_summary/2" href="ciaodbg_ref_mansearch.html#get_statistical_summary/2">get_statistical_summary/2</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="53" href="unittest_statistics.html"><tt>unittest_statistics</tt></a> (see the corresponding documentation for details).<br/></div></div><p> </div><div id="Documentation on multifiles"><h2>Documentation on multifiles</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="define_flag/3" href="ciaodbg_ref_mansearch.html#define_flag/3">define_flag/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>define_flag(Flag,FlagValues,Default)</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="ciaodbg_ref_mansearch.html#atm/1"><tt>atm/1</tt></a>)</span><span><span class="lpdoc-var">Flag</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="ciaodbg_ref_mansearch.html#flag_values/1"><tt>flag_values/1</tt></a>)</span><span>Define the valid flag values </span> </ul> The predicate is <em>multifile</em>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="test_filter/2" href="ciaodbg_ref_mansearch.html#test_filter/2">test_filter/2</a></div><div class="lpdoc-deftext">No further documentation available for this predicate. The predicate is <em>multifile</em>.<br/></div></div><p> </div><div id="Documentation on imports"><h2>Documentation on imports</h2>This module has the following direct dependencies:<ul class="lpdoc-itemize-minus"><li><em>Application modules:</em><br/><a class="lpdoc-idx-anchor" id="56" href="unittest_statistics.html"><tt>unittest_statistics</tt></a>, <a class="lpdoc-idx-anchor" id="57" href="ciaodbg_ref_mansearch.html#unittest_base"><tt>unittest_base</tt></a>, <a class="lpdoc-idx-anchor" id="58" href="ciaodbg_ref_mansearch.html#unittest_utils"><tt>unittest_utils</tt></a>, <a class="lpdoc-idx-anchor" id="59" href="ciaodbg_ref_mansearch.html#unittest_db"><tt>unittest_db</tt></a>, <a class="lpdoc-idx-anchor" id="60" href="ciaodbg_ref_mansearch.html#unittest_regression"><tt>unittest_regression</tt></a>, <a class="lpdoc-idx-anchor" id="61" href="ciaodbg_ref_mansearch.html#unittest_summaries"><tt>unittest_summaries</tt></a>, <a class="lpdoc-idx-anchor" id="62" href="ciaodbg_ref_mansearch.html#unittest_filters"><tt>unittest_filters</tt></a>, <a class="lpdoc-idx-anchor" id="63" href="ciaodbg_ref_mansearch.html#unittest_runner"><tt>unittest_runner</tt></a>. <li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="64" href="ciaodbg_ref_mansearch.html#native_props"><tt>native_props</tt></a>, <a class="lpdoc-idx-anchor" id="65" href="ciaodbg_ref_mansearch.html#datafacts_rt"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="66" href="ciaodbg_ref_mansearch.html#streams"><tt>streams</tt></a>, <a class="lpdoc-idx-anchor" id="67" href="ciaodbg_ref_mansearch.html#stream_utils"><tt>stream_utils</tt></a>, <a class="lpdoc-idx-anchor" id="68" href="ciaodbg_ref_mansearch.html#terms"><tt>terms</tt></a>, <a class="lpdoc-idx-anchor" id="69" href="ciaodbg_ref_mansearch.html#sort"><tt>sort</tt></a>, <a class="lpdoc-idx-anchor" id="70" href="ciaodbg_ref_mansearch.html#aggregates"><tt>aggregates</tt></a>, <a class="lpdoc-idx-anchor" id="71" href="ciaodbg_ref_mansearch.html#assrt_lib"><tt>assrt_lib</tt></a>, <a class="lpdoc-idx-anchor" id="72" href="ciaodbg_ref_mansearch.html#system"><tt>system</tt></a>, <a class="lpdoc-idx-anchor" id="73" href="ciaodbg_ref_mansearch.html#hiordlib"><tt>hiordlib</tt></a>, <a class="lpdoc-idx-anchor" id="74" href="ciaodbg_ref_mansearch.html#c_itf"><tt>c_itf</tt></a>, <a class="lpdoc-idx-anchor" id="75" href="ciaodbg_ref_mansearch.html#bundle_paths"><tt>bundle_paths</tt></a>, <a class="lpdoc-idx-anchor" id="76" href="ciaodbg_ref_mansearch.html#lists"><tt>lists</tt></a>, <a class="lpdoc-idx-anchor" id="77" href="ciaodbg_ref_mansearch.html#llists"><tt>llists</tt></a>, <a class="lpdoc-idx-anchor" id="78" href="ciaodbg_ref_mansearch.html#system_extra"><tt>system_extra</tt></a>, <a class="lpdoc-idx-anchor" id="79" href="ciaodbg_ref_mansearch.html#exemaker"><tt>exemaker</tt></a>, <a class="lpdoc-idx-anchor" id="80" href="ciaodbg_ref_mansearch.html#source_tree"><tt>source_tree</tt></a>, <a class="lpdoc-idx-anchor" id="81" href="ciaodbg_ref_mansearch.html#pathnames"><tt>pathnames</tt></a>, <a class="lpdoc-idx-anchor" id="82" href="ciaodbg_ref_mansearch.html#messages"><tt>messages</tt></a>, <a class="lpdoc-idx-anchor" id="83" href="ciaodbg_ref_mansearch.html#formulae"><tt>formulae</tt></a>, <a class="lpdoc-idx-anchor" id="84" href="ciaodbg_ref_mansearch.html#cpx_process"><tt>cpx_process</tt></a>, <a class="lpdoc-idx-anchor" id="85" href="ciaodbg_ref_mansearch.html#config_common"><tt>config_common</tt></a>, <a class="lpdoc-idx-anchor" id="86" href="ciaodbg_ref_mansearch.html#rtchecks_tr"><tt>rtchecks_tr</tt></a>, <a class="lpdoc-idx-anchor" id="87" href="ciaodbg_ref_mansearch.html#write"><tt>write</tt></a>, <a class="lpdoc-idx-anchor" id="88" href="ciaodbg_ref_mansearch.html#apply_dict"><tt>apply_dict</tt></a>. <li><em>Internal (engine) modules:</em><br/><a class="lpdoc-idx-anchor" id="89" href="ciaodbg_ref_mansearch.html#term_basic"><tt>term_basic</tt></a>, <a class="lpdoc-idx-anchor" id="90" href="ciaodbg_ref_mansearch.html#arithmetic"><tt>arithmetic</tt></a>, <a class="lpdoc-idx-anchor" id="91" href="ciaodbg_ref_mansearch.html#atomic_basic"><tt>atomic_basic</tt></a>, <a class="lpdoc-idx-anchor" id="92" href="ciaodbg_ref_mansearch.html#basiccontrol"><tt>basiccontrol</tt></a>, <a class="lpdoc-idx-anchor" id="93" href="ciaodbg_ref_mansearch.html#exceptions"><tt>exceptions</tt></a>, <a class="lpdoc-idx-anchor" id="94" href="ciaodbg_ref_mansearch.html#term_compare"><tt>term_compare</tt></a>, <a class="lpdoc-idx-anchor" id="95" href="ciaodbg_ref_mansearch.html#term_typing"><tt>term_typing</tt></a>, <a class="lpdoc-idx-anchor" id="96" href="ciaodbg_ref_mansearch.html#debugger_support"><tt>debugger_support</tt></a>, <a class="lpdoc-idx-anchor" id="97" href="ciaodbg_ref_mansearch.html#basic_props"><tt>basic_props</tt></a>, <a class="lpdoc-idx-anchor" id="98" href="ciaodbg_ref_mansearch.html#hiord_rt"><tt>hiord_rt</tt></a>, <a class="lpdoc-idx-anchor" id="99" href="ciaodbg_ref_mansearch.html#stream_basic"><tt>stream_basic</tt></a>, <a class="lpdoc-idx-anchor" id="100" href="ciaodbg_ref_mansearch.html#messages_basic"><tt>messages_basic</tt></a>, <a class="lpdoc-idx-anchor" id="101" href="ciaodbg_ref_mansearch.html#internals"><tt>internals</tt></a>, <a class="lpdoc-idx-anchor" id="102" href="ciaodbg_ref_mansearch.html#runtime_control"><tt>runtime_control</tt></a>, <a class="lpdoc-idx-anchor" id="103" href="ciaodbg_ref_mansearch.html#system_info"><tt>system_info</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="104" href="ciaodbg_ref_mansearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="105" href="ciaodbg_ref_mansearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="106" href="ciaodbg_ref_mansearch.html#condcomp"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="107" href="ciaodbg_ref_mansearch.html#assertions"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="108" href="ciaodbg_ref_mansearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="109" href="ciaodbg_ref_mansearch.html#regtypes"><tt>regtypes</tt></a>, <a class="lpdoc-idx-anchor" id="110" href="ciaodbg_ref_mansearch.html#isomodes"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="111" href="ciaodbg_ref_mansearch.html#nativeprops"><tt>nativeprops</tt></a>, <a class="lpdoc-idx-anchor" id="112" href="ciaodbg_ref_mansearch.html#dcg"><tt>dcg</tt></a>, <a class="lpdoc-idx-anchor" id="113" href="ciaodbg_ref_mansearch.html#fsyntax"><tt>fsyntax</tt></a>, <a class="lpdoc-idx-anchor" id="114" href="ciaodbg_ref_mansearch.html#hiord"><tt>hiord</tt></a>, <a class="lpdoc-idx-anchor" id="115" href="ciaodbg_ref_mansearch.html#datafacts"><tt>datafacts</tt></a>, <a class="lpdoc-idx-anchor" id="116" href="ciaodbg_ref_mansearch.html#define_flag"><tt>define_flag</tt></a>. </ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>