80 lines
No EOL
4.4 KiB
HTML
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 Framework.html" class="category">Test Framework</a> whose goal is to be as simple as possible.<p>Author: <a href="Marco 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> (def-suite my-suite :description "My Example Suite")
|
|
CL-USER> (in-suite my-suite)
|
|
CL-USER>
|
|
(test my-tests
|
|
"Example"
|
|
(is (= 4 (+ 2 2)) "2 plus 2 wasn't equal to 4 (using #'= to test equality)")
|
|
(is (= 0 (+ -1 1)))
|
|
(signals
|
|
(error "Trying to add 4 to FOO didn't signal an error")
|
|
(+ 'foo 4))
|
|
(is (= 0 (+ 1 1)) "this should have failed"))
|
|
CL-USER> (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&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 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> |