emacs.d/clones/lisp/www.cliki.net/FiveAM.html
2022-10-07 15:47:14 +02:00

80 lines
No EOL
4.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: FiveAM</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=FiveAM">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - FiveAM</span>
<div id="content"><div id="content-area"><div id="article-title">FiveAM</div><div id="article"><a href="http://common-lisp.net/project/fiveam/">FiveAM</a> is a <a href="Test&#32;Framework.html" class="category">Test Framework</a> whose goal is to be as simple as possible.<p>Author: <a href="Marco&#32;Baringer.html" class="internal">Marco Baringer</a><p>Some useful <a href="http://darrint.wordpress.com/2004/11/16/fiveam-test-framework-123/">user comment</a> is linked from the project home page.<p><blockquote>has the usual features you would expect from an <a href="http://en.wikipedia.org/wiki/XUnit">xUnit</a> style test framework [...] presents a more lispish macro interface.</blockquote><p><h4>Distinguishing Characteristics</h4><p><ol>
<li>assert-equal, assert-eql, assert-true, etc. have been replaced by the single <tt>is</tt> macro which inspects its argument to determine how to test equality</li>
<li>Tests and test suites are named via symbols, this allows tests with the same name to peacfully live together (in different packages), and makes removing or runing single tests easy.</li>
<li>!, !! and !!! functions for easily re-running recently run tests.</li>
<li>inter test dependencies</li>
</ol><p><hr><p>Example:<p><pre>
CL-USER&gt; (def-suite my-suite :description &quot;My Example Suite&quot;)
CL-USER&gt; (in-suite my-suite)
CL-USER&gt;
(test my-tests
&quot;Example&quot;
(is (= 4 (+ 2 2)) &quot;2 plus 2 wasn&#039;t equal to 4 (using #&#039;= to test equality)&quot;)
(is (= 0 (+ -1 1)))
(signals
(error &quot;Trying to add 4 to FOO didn&#039;t signal an error&quot;)
(+ &#039;foo 4))
(is (= 0 (+ 1 1)) &quot;this should have failed&quot;))
CL-USER&gt; (run!)
...f
Did 4 checks.
Pass: 3 (75%)
Skip: 0 ( 0%)
Fail: 1 (25%)
Failure Details:
--------------------------------
MY-TESTS [Example]:
this should have failed.
--------------------------------
</pre></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="FiveAM.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=FiveAM">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=FiveAM">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=FiveAM&amp;from-revision=3686416791">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>