Skip to content

Commit

Permalink
Update junit doc to 2.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Khady committed Dec 25, 2024
1 parent 99a2e8d commit 88563a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="junit/index.html">junit</a> <span class="version">2.1.0</span></li>
<li><a href="junit_alcotest/index.html">junit_alcotest</a> <span class="version">2.1.0</span></li>
<li><a href="junit_ounit/index.html">junit_ounit</a> <span class="version">2.1.0</span></li>
<li><a href="junit/index.html">junit</a> <span class="version">2.2.0</span></li>
<li><a href="junit_alcotest/index.html">junit_alcotest</a> <span class="version">2.2.0</span></li>
<li><a href="junit_ounit/index.html">junit_ounit</a> <span class="version">2.2.0</span></li>
</ol>
</div>
</main>
Expand Down
16 changes: 8 additions & 8 deletions junit_alcotest/Junit_alcotest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<span><span class="optlabel">?classname</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><a href="../../junit/Junit/Testcase/index.html#type-t">Junit.Testcase.t</a> <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>unit <span class="xref-unresolved">Alcotest</span>.test_case</span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="xref-unresolved">Alcotest</span>.test_case</span></span></code></div><div class="spec-doc"><p><code>wrap_test handle_result test_cases</code> wraps test cases to create Junit testcases and pass them to <code>handle_result</code>.</p><p>Can be used with <a href="#val-run"><code>run</code></a> to create customized Junit testsuites if the output of <a href="#val-run_and_report"><code>run_and_report</code></a> is not as expected.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">classname</span> <p>will populate the 'classname' attribute for the test case. For best hierarchic rendering in Jenkins, it should contain a period. For example, &quot;foo.bar.baz&quot; will be rendered a package &quot;foo.bar&quot; that contains a class &quot;baz&quot;, which contains the current test case and others. Defaults to the name of the test case.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run"><a href="#val-run" class="anchor"></a><code><span><span class="keyword">val</span> run : <span><span class="optlabel">?argv</span>:<span>string array</span> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <span><span><span>unit <span class="xref-unresolved">Alcotest</span>.test</span> list</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>run ?argv n t</code> is a wrapper around <code>Alcotest.run</code>, only setting <code>and_exit</code> to false. It is mandatory to be able to process results after the end of the run.</p><p>Low level function. It is easier to use <a href="#val-run_and_report"><code>run_and_report</code></a>.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-exit"><a href="#type-exit" class="anchor"></a><code><span><span class="keyword">type</span> exit</span><span> = <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>exit ()</code> exists with appropriate code if <a href="#val-run_and_report"><code>run_and_report</code></a>'s <code>and_exit</code> was <code>true</code> or raise <code>Alcotest.Test_error</code> in case of error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_and_report"><a href="#val-run_and_report" class="anchor"></a><code><span><span class="keyword">val</span> run_and_report :
<span><span class="optlabel">?and_exit</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?package</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?timestamp</span>:<span class="xref-unresolved">Ptime</span>.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?argv</span>:<span>string array</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(string * <span><span>unit <span class="xref-unresolved">Alcotest</span>.test_case</span> list</span>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../junit/Junit/Testsuite/index.html#type-t">Junit.Testsuite.t</a> * <a href="#type-exit">exit</a></span></code></div><div class="spec-doc"><p><code>run name tests</code> is a wrapper around <a href="#val-run"><code>run</code></a> and <a href="#val-wrap_test"><code>wrap_test</code></a>. It runs the tests and creates a Junit testsuite from the results.</p><p>As <code>Alcotest.run</code> is always called with <code>and_exit = false</code> to be able to produce a report, the behavior is emulated by the returned <a href="#type-exit"><code>exit</code></a> function.</p><p>The optional argument <code>and_exit</code> controls what happens when the <a href="#type-exit"><code>exit</code></a> function is called. By default, <code>and_exit</code> is set, which makes the function exit with <code>0</code> if everything is fine or <code>1</code> if there is an issue. If <code>and_exit</code> is <code>false</code>, then the function raises <code>Test_error</code> on error.</p><p><code>?argv</code> is forwarded to <a href="#val-run"><code>run</code></a>. <code>?package</code> and <code>?timestamp</code> are forwarded to <a href="../../junit/Junit/Testsuite/index.html#val-make"><code>Junit.Testsuite.make</code></a>.</p></div></div></div></body></html>
<span>unit <span class="xref-unresolved">Alcotest</span>.test_case</span></span></code></div><div class="spec-doc"><p><code>wrap_test handle_result test_cases</code> wraps test cases to create Junit testcases and pass them to <code>handle_result</code>.</p><p>Can be used with <code>Alcotest.run</code> to create customized Junit testsuites if the output of <a href="#val-run_and_report"><code>run_and_report</code></a> is not as expected.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">classname</span> <p>will populate the 'classname' attribute for the test case. For best hierarchic rendering in Jenkins, it should contain a period. For example, &quot;foo.bar.baz&quot; will be rendered a package &quot;foo.bar&quot; that contains a class &quot;baz&quot;, which contains the current test case and others. Defaults to the name of the test case.</p></li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-exit"><a href="#type-exit" class="anchor"></a><code><span><span class="keyword">type</span> exit</span><span> = <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>exit ()</code> exits with appropriate code if <a href="#val-run_and_report"><code>run_and_report</code></a>'s <code>and_exit</code> was <code>true</code> or raise <code>Alcotest.Test_error</code> in case of error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_and_report"><a href="#val-run_and_report" class="anchor"></a><code><span><span class="keyword">val</span> run_and_report :
<span><span>(<span><span class="optlabel">?package</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?timestamp</span>:<span class="xref-unresolved">Ptime</span>.t <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?argv</span>:<span>string array</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(string * <span><span>unit <span class="xref-unresolved">Alcotest</span>.test_case</span> list</span>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../junit/Junit/Testsuite/index.html#type-t">Junit.Testsuite.t</a> * <a href="#type-exit">exit</a>)</span>
<span class="xref-unresolved">Alcotest</span>.with_options</span></span></code></div><div class="spec-doc"><p><code>run_and_report name tests</code> is a wrapper around <code>Alcotest.run</code> and <a href="#val-wrap_test"><code>wrap_test</code></a>. It runs the tests and creates a Junit testsuite from the results.</p><p>As <code>Alcotest.run</code> is always called with <code>and_exit = false</code> to be able to produce a report, the behavior is emulated by the returned <a href="#type-exit"><code>exit</code></a> function.</p><p>The optional argument <code>and_exit</code> controls what happens when the <a href="#type-exit"><code>exit</code></a> function is called. By default, <code>and_exit</code> is set, which makes the function exit with <code>0</code> if everything is fine or <code>1</code> if there is an issue. If <code>and_exit</code> is <code>false</code>, then the function raises <code>Test_error</code> on error.</p><p><code>?argv</code> is forwarded to <code>run</code>. <code>?package</code> and <code>?timestamp</code> are forwarded to <a href="../../junit/Junit/Testsuite/index.html#val-make"><code>Junit.Testsuite.make</code></a>.</p></div></div></div></body></html>

0 comments on commit 88563a1

Please sign in to comment.