svn: r14264
This commit is contained in:
parent
242c28a0b6
commit
fdbbaa9e68
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>5 Acknowlegements</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script></head><body id="scribble-plt-scheme-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink"><b>Scheme<span class="mywbr"> </span>Unit</b>:<span class="mywbr"> </span> Unit Testing for Scheme</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="quick-start.html" class="tocviewlink">Quick Start Guide for Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">2 </td><td><a href="philosophy.html" class="tocviewlink">The Philosophy of Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">3 </td><td><a href="api.html" class="tocviewlink">Scheme<span class="mywbr"> </span>Unit API</a></td></tr><tr><td align="right">4 </td><td><a href="Release_Notes.html" class="tocviewlink">Release Notes</a></td></tr><tr><td align="right">5 </td><td><a href="Acknowlegements.html" class="tocviewselflink">Acknowlegements</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink">Index</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">Version: 4.1.5.3</span></div><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="Release_Notes.html" title="backward to "4 Release Notes"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="doc-index.html" title="forward to "Index"">next →</a></span> </div><h3>5<tt> </tt><a name="(part._.Acknowlegements)"></a>Acknowlegements</h3><p>The following people have contributed to SchemeUnit:</p><ul><li><p>Robby Findler pushed me to release version 3</p></li><li><p>Matt Jadud and his students at Olin College
|
||||
suggested renaming <span class="schemesymbol">test/text-ui</span></p></li><li><p>Dave Gurnell reported a bug in check-not-exn and
|
||||
suggested improvements to SchemeUnit</p></li><li><p>Danny Yoo reported a bug in and provided a fix for
|
||||
trim-current-directory</p></li><li><p>Jacob Matthews and Guillaume Marceau for bug reports
|
||||
and fixes</p></li><li><p>Eric Hanchow suggested test/text-ui return a useful
|
||||
result</p></li><li><p>Ray Racine and Richard Cobbe provided require/expose</p></li><li><p>John Clements suggested several new checks</p></li><li><p>Jose A. Ortega Ruiz alerted me a problem in the
|
||||
packaging system and helped fix it.</p></li><li><p>Sebastian H. Seidel provided help packaging SchemeUnit
|
||||
into a .plt</p></li><li><p>Don Blaheta provided the method for grabbing line number
|
||||
and file name in checks</p></li><li><p>Patrick Logan ported example.ss to version 1.3</p></li><li><p>The PLT team made PLT Scheme</p></li><li><p>The Extreme Programming community started the whole
|
||||
testing framework thing</p></li></ul><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="Release_Notes.html" title="backward to "4 Release Notes"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="doc-index.html" title="forward to "Index"">next →</a></span> </div></div></div></body></html>
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>4 Release Notes</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script></head><body id="scribble-plt-scheme-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink"><b>Scheme<span class="mywbr"> </span>Unit</b>:<span class="mywbr"> </span> Unit Testing for Scheme</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="quick-start.html" class="tocviewlink">Quick Start Guide for Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">2 </td><td><a href="philosophy.html" class="tocviewlink">The Philosophy of Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">3 </td><td><a href="api.html" class="tocviewlink">Scheme<span class="mywbr"> </span>Unit API</a></td></tr><tr><td align="right">4 </td><td><a href="Release_Notes.html" class="tocviewselflink">Release Notes</a></td></tr><tr><td align="right">5 </td><td><a href="Acknowlegements.html" class="tocviewlink">Acknowlegements</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>4 </td><td><a href="Release_Notes.html" class="tocviewselflink">Release Notes</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1 </td><td><a href="Release_Notes.html#(part._.Version_3_4)" class="tocviewlink">Version 3.4</a></td></tr><tr><td align="right">4.2 </td><td><a href="Release_Notes.html#(part._.Version_3)" class="tocviewlink">Version 3</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.1<tt> </tt></span><a href="#(part._.Version_3_4)" class="tocsubseclink">Version 3.4</a></td></tr><tr><td><span class="tocsublinknumber">4.2<tt> </tt></span><a href="#(part._.Version_3)" class="tocsubseclink">Version 3</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">Version: 4.1.5.3</span></div><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="api.html" title="backward to "3 SchemeUnit API"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="Acknowlegements.html" title="forward to "5 Acknowlegements"">next →</a></span> </div><h3>4<tt> </tt><a name="(part._.Release_.Notes)"></a>Release Notes</h3><h4>4.1<tt> </tt><a name="(part._.Version_3_4)"></a>Version 3.4</h4><p>This version allows arbitrary expressions within test
|
||||
suites, fixing the semantics issue below.</p><p>There are also miscellaneous Scribble fixes.</p><h4>4.2<tt> </tt><a name="(part._.Version_3)"></a>Version 3</h4><p>This version of SchemeUnit is largely backwards compatible
|
||||
with version 2 but there are significant changes to the
|
||||
underlying model, justifying incrementing the major version
|
||||
number. These changes are best explained in
|
||||
<a href="philosophy.html">The Philosophy of SchemeUnit</a>.</p><p>There are a few omissions in this release, that will
|
||||
hopefully be corrected in later minor version releases:</p><ul><li><p>There is no graphical UI, and in particular no
|
||||
integration with DrScheme.</p></li><li><p>The semantics of <span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-suite</span></span></span> are not the
|
||||
desired ones. In particular, only checks and test cases
|
||||
have their evaluation delayed by a test suite; other
|
||||
expressions will be evaluated before the suite is
|
||||
constructed. This won’t affect tests written in the version
|
||||
2 style. In particular this doesn’t effect test suites that
|
||||
contain other test suites; they continue to work in the
|
||||
expected way. However people incrementally developing tests
|
||||
from plain checks to test suites might be surprised. I’m
|
||||
hoping that few enough people will do this that no-one will
|
||||
notice before it’s fixed.</p></li></ul><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="api.html" title="backward to "3 SchemeUnit API"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="Acknowlegements.html" title="forward to "5 Acknowlegements"">next →</a></span> </div></div></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,58 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>2 The Philosophy of SchemeUnit</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script></head><body id="scribble-plt-scheme-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink"><b>Scheme<span class="mywbr"> </span>Unit</b>:<span class="mywbr"> </span> Unit Testing for Scheme</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="quick-start.html" class="tocviewlink">Quick Start Guide for Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">2 </td><td><a href="philosophy.html" class="tocviewselflink">The Philosophy of Scheme<span class="mywbr"> </span>Unit</a></td></tr><tr><td align="right">3 </td><td><a href="api.html" class="tocviewlink">Scheme<span class="mywbr"> </span>Unit API</a></td></tr><tr><td align="right">4 </td><td><a href="Release_Notes.html" class="tocviewlink">Release Notes</a></td></tr><tr><td align="right">5 </td><td><a href="Acknowlegements.html" class="tocviewlink">Acknowlegements</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>2 </td><td><a href="philosophy.html" class="tocviewselflink">The Philosophy of Scheme<span class="mywbr"> </span>Unit</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">2.1 </td><td><a href="philosophy.html#(part._.Historical_.Context)" class="tocviewlink">Historical Context</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">2.1<tt> </tt></span><a href="#(part._.Historical_.Context)" class="tocsubseclink">Historical Context</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">Version: 4.1.5.3</span></div><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="quick-start.html" title="backward to "1 Quick Start Guide for SchemeUnit"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="api.html" title="forward to "3 SchemeUnit API"">next →</a></span> </div><h3>2<tt> </tt><a name="(part._philosophy)"></a>The Philosophy of SchemeUnit</h3><p>SchemeUnit is designed to allow tests to evolve in step with
|
||||
the evolution of the program under testing. SchemeUnit
|
||||
scales from the unstructed checks suitable for simple
|
||||
programs to the complex structure necessary for large
|
||||
projects.</p><p>Simple programs, such as those in How to Design Programs,
|
||||
are generally purely functional with no setup required to
|
||||
obtain a context in which the function may operate.
|
||||
Therefore the tests for these programs are extremely simple:
|
||||
the test expressions are single checks, usually for
|
||||
equality, and there are no dependencies between expressions.
|
||||
For example, a HtDP student may be writing simple list
|
||||
functions such as length, and the properties they are
|
||||
checking are of the form:</p><p><table cellspacing="0" class="schemeblock"><tr><td><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBl%0D%0AcXVhbD8pKSk%3D%0D%0A" class="schemevaluelink">equal?</a></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBu%0D%0AdWxsKSkp%0D%0A" class="schemevaluelink">null</a></span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">0</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBl%0D%0AcXVhbD8pKSk%3D%0D%0A" class="schemevaluelink">equal?</a></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">a</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">1</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBl%0D%0AcXVhbD8pKSk%3D%0D%0A" class="schemevaluelink">equal?</a></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">a</span><span class="hspace"> </span><span class="schemevalue">b</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">2</span><span class="schemeparen">)</span></td></tr></table></p><p>SchemeUnit directly supports this style of testing. A check
|
||||
on its own is a valid test. So the above examples may be
|
||||
written in SchemeUnit as:</p><p><table cellspacing="0" class="schemeblock"><tr><td><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check-equal?</span></span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBu%0D%0AdWxsKSkp%0D%0A" class="schemevaluelink">null</a></span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">0</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check-equal?</span></span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">a</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">1</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check-equal?</span></span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZGVmIGMgKGMgKGMgcXVvdGUgYyAjJWtlcm5lbCkgYyBs%0D%0AZW5ndGgpKSk%3D%0D%0A" class="schemevaluelink">length</a></span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">(</span><span class="schemevalue">a</span><span class="hspace"> </span><span class="schemevalue">b</span><span class="schemevalue">)</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">2</span><span class="schemeparen">)</span></td></tr></table></p><p>Simple programs now get all the benefits of SchemeUnit with
|
||||
very little overhead.</p><p>There are limitations to this style of testing that more
|
||||
complex programs will expose. For example, there might be
|
||||
dependencies between expressions, caused by state, so that
|
||||
it does not make sense to evaluate some expressions if
|
||||
earlier ones have failed. This type of program needs a way
|
||||
to group expressions so that a failure in one group causes
|
||||
evaluation of that group to stop and immediately proceed to
|
||||
the next group. In SchemeUnit all that is required is to
|
||||
wrap a <span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-begin</span></span></span> expression around a group of
|
||||
expressions:</p><p><table cellspacing="0" class="schemeblock"><tr><td><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-begin</span></span></span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol">setup-some-state!</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check-equal?</span></span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol">foo!</span><span class="hspace"> </span><span class="schemevalue">1</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">expected-value-1</span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check-equal?</span></span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol">foo!</span><span class="hspace"> </span><span class="schemevalue">2</span><span class="schemeparen">)</span><span class="hspace"> </span><span class="schemevalue">'</span><span class="schemevalue">expected-value-2</span><span class="schemeparen">)</span><span class="schemeparen">)</span></td></tr></table></p><p>Now if any expression within the <span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-begin</span></span></span>
|
||||
expression fails no further expressions in that group will
|
||||
be evaluated.</p><p>Notice that all the previous tests written in the simple
|
||||
style are still valid. Introducing grouping is a local
|
||||
change only. This is a key feature of SchemeUnit’s support
|
||||
for the evolution of the program.</p><p>The programmer may wish to name a group of tests. This is
|
||||
done using the <span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-case</span></span></span> expression, a simple
|
||||
variant on test-begin:</p><p><table cellspacing="0" class="schemeblock"><tr><td><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-case</span></span></span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemevalue">"The name"</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZm9ybSBjIChjIChjIGxpYiBjICh1IC4gc2NoZW1lL3By%0D%0AaXZhdGUvc3R4Y2FzZS1zY2hlbWUuc3MpKSBjIC4uLikpKQ%3D%3D%0D%0A" class="schemesyntaxlink">...</a></span><span class="hspace"> </span><span class="schemesymbol">test</span><span class="hspace"> </span><span class="schemesymbol">expressions</span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZm9ybSBjIChjIChjIGxpYiBjICh1IC4gc2NoZW1lL3By%0D%0AaXZhdGUvc3R4Y2FzZS1zY2hlbWUuc3MpKSBjIC4uLikpKQ%3D%3D%0D%0A" class="schemesyntaxlink">...</a></span><span class="schemeparen">)</span></td></tr></table></p><p>Most programs will stick with this style. However,
|
||||
programmers writing very complex programs may wish to
|
||||
maintain separate groups of tests for different parts of the
|
||||
program, or run their tests in different ways to the normal
|
||||
SchemeUnit manner (for example, test results may be logged
|
||||
for the purpose of improving software quality, or they may
|
||||
be displayed on a website to indicate service quality). For
|
||||
these programmers it is necessary to delay the execution of
|
||||
tests so they can processed in the programmer’s chosen
|
||||
manner. To do this, the programmer simply wraps a test-suite
|
||||
around their tests:</p><p><table cellspacing="0" class="schemeblock"><tr><td><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-suite</span></span></span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemevalue">"Suite name"</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">check</span></span></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZm9ybSBjIChjIChjIGxpYiBjICh1IC4gc2NoZW1lL3By%0D%0AaXZhdGUvc3R4Y2FzZS1zY2hlbWUuc3MpKSBjIC4uLikpKQ%3D%3D%0D%0A" class="schemesyntaxlink">...</a></span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-begin</span></span></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZm9ybSBjIChjIChjIGxpYiBjICh1IC4gc2NoZW1lL3By%0D%0AaXZhdGUvc3R4Y2FzZS1zY2hlbWUuc3MpKSBjIC4uLikpKQ%3D%3D%0D%0A" class="schemesyntaxlink">...</a></span><span class="schemeparen">)</span></td></tr><tr><td><span class="schemeplain"><span class="hspace"> </span></span><span class="hspace"> </span><span class="schemeparen">(</span><span class="schemesymbol"><span class="badlink"><span class="schemevaluelink">test-case</span></span></span><span class="hspace"> </span><span class="schemesymbol"><a href="/servlets/doc-search.ss?tag=KCgxKSAwICgpIDAgKCkgKCkgKGMgZm9ybSBjIChjIChjIGxpYiBjICh1IC4gc2NoZW1lL3By%0D%0AaXZhdGUvc3R4Y2FzZS1zY2hlbWUuc3MpKSBjIC4uLikpKQ%3D%3D%0D%0A" class="schemesyntaxlink">...</a></span><span class="schemeparen">)</span><span class="schemeparen">)</span></td></tr></table></p><p>The tests now change from expressions that are immediately
|
||||
evaluated to objects that may be programmatically
|
||||
manipulated. Note again this is a local change. Tests
|
||||
outside the suite continue to evaluate as before.</p><h4>2.1<tt> </tt><a name="(part._.Historical_.Context)"></a>Historical Context</h4><p>Most testing frameworks, including earlier versions of
|
||||
SchemeUnit, support only the final form of testing. This is
|
||||
likely due to the influence of the SUnit testing framework,
|
||||
which is the ancestor of SchemeUnit and the most widely used
|
||||
frameworks in Java, .Net, Python, and Ruby, and many other
|
||||
languages. That this is insufficient for all users is
|
||||
apparent if one considers the proliferation of "simpler"
|
||||
testing frameworks in Scheme such as SRFI-78, or the the
|
||||
practice of beginner programmers. Unfortunately these
|
||||
simpler methods are inadequate for testing larger
|
||||
systems. To the best of my knowledge SchemeUnit is the only
|
||||
testing framework that makes a conscious effort to support
|
||||
the testing style of all levels of programmer.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="quick-start.html" title="backward to "1 Quick Start Guide for SchemeUnit"">← prev</a> <a href="index.html" title="up to "SchemeUnit: Unit Testing for Scheme"">up</a> <a href="api.html" title="forward to "3 SchemeUnit API"">next →</a></span> </div></div></div></body></html>
|
File diff suppressed because one or more lines are too long
|
@ -1,67 +0,0 @@
|
|||
// Common functionality for PLT documentation pages
|
||||
|
||||
function GetCookie(key, def) {
|
||||
if (document.cookie.length <= 0) return def;
|
||||
var i, cookiestrs = document.cookie.split(/; */);
|
||||
for (i = 0; i < cookiestrs.length; i++) {
|
||||
var cur = cookiestrs[i];
|
||||
var eql = cur.indexOf('=');
|
||||
if (eql >= 0 && cur.substring(0,eql) == key)
|
||||
return unescape(cur.substring(eql+1));
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
function SetCookie(key, val) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime()+(365*24*60*60*1000));
|
||||
document.cookie =
|
||||
key + "=" + escape(val) + "; expires="+ d.toGMTString() + "; path=/";
|
||||
}
|
||||
|
||||
// note that this always stores a directory name, ending with a "/"
|
||||
function SetPLTRoot(ver, relative) {
|
||||
var root = location.protocol + "//" + location.host
|
||||
+ NormalizePath(location.pathname.replace(/[^\/]*$/, relative));
|
||||
SetCookie("PLT_Root."+ver, root);
|
||||
}
|
||||
|
||||
// adding index.html works because of the above
|
||||
function GotoPLTRoot(ver, relative) {
|
||||
var u = GetCookie("PLT_Root."+ver, null);
|
||||
if (u == null) return true; // no cookie: use plain up link
|
||||
// the relative path is optional, default goes to the toplevel start page
|
||||
if (!relative) relative = "index.html";
|
||||
location = u + relative;
|
||||
return false;
|
||||
}
|
||||
|
||||
normalize_rxs = [/\/\/+/g, /\/\.(\/|$)/, /\/[^\/]*\/\.\.(\/|$)/];
|
||||
function NormalizePath(path) {
|
||||
var tmp, i;
|
||||
for (i = 0; i < normalize_rxs.length; i++)
|
||||
while ((tmp = path.replace(normalize_rxs[i], "/")) != path) path = tmp;
|
||||
return path;
|
||||
}
|
||||
|
||||
function DoSearchKey(event, field, ver, top_path) {
|
||||
var val = field.value;
|
||||
if (event && event.keyCode == 13) {
|
||||
var u = GetCookie("PLT_Root."+ver, null);
|
||||
if (u == null) u = top_path; // default: go to the top path
|
||||
location = u + "search/index.html" + "?q=" + escape(val);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function TocviewToggle(glyph,id) {
|
||||
var s = document.getElementById(id).style;
|
||||
var expand = s.display == "none";
|
||||
s.display = expand ? "block" : "none";
|
||||
glyph.innerHTML = expand ? "▼" : "►";
|
||||
}
|
||||
|
||||
// `noscript' is problematic in some browsers (always renders as a
|
||||
// block), use this hack instead (does not always work!)
|
||||
// document.write("<style>mynoscript { display:none; }</style>");
|
|
@ -1,549 +0,0 @@
|
|||
|
||||
/* CSS seems backward: List all the classes for which we want a
|
||||
particular font, so that the font can be changed in one place. (It
|
||||
would be nicer to reference a font definition from all the places
|
||||
that we want it.)
|
||||
|
||||
As you read the rest of the file, remember to double-check here to
|
||||
see if any font is set. */
|
||||
|
||||
/* Monospace: */
|
||||
.maincolumn, .refpara, .tocset, .stt, .hspace,
|
||||
.schemeinput, .schemereader, .schemeparen, .schememeta,
|
||||
.schememod, .schemekeyword, .schemevariable, .schemesymbol,
|
||||
.schemeresult, .schemestdout, .schemecomment, .schemevalue {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Serif: */
|
||||
.main, .refcontent, .tocview, .tocsub, .inheritedlbl, i {
|
||||
font-family: serif;
|
||||
}
|
||||
|
||||
/* Sans-serif: */
|
||||
.version {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
|
||||
h2 { /* per-page main title */
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h3, h4, h5, h6, h7, h8 {
|
||||
margin-top: 1.75em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* Needed for browsers like Opera, and eventually for HTML 4 conformance.
|
||||
This means that multiple paragraphs in a table element do not have a space
|
||||
between them. */
|
||||
table p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Main */
|
||||
|
||||
body {
|
||||
color: black;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.maincolumn {
|
||||
width: 43em;
|
||||
margin-right: -40em;
|
||||
margin-left: 15em;
|
||||
}
|
||||
|
||||
.main {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Navigation */
|
||||
|
||||
.navsettop, .navsetbottom {
|
||||
background-color: #f0f0e0;
|
||||
padding: 0.25em 0 0.25em 0;
|
||||
}
|
||||
|
||||
.navsettop {
|
||||
margin-bottom: 1.5em;
|
||||
border-bottom: 2px solid #e0e0c0;
|
||||
}
|
||||
|
||||
.navsetbottom {
|
||||
margin-top: 2em;
|
||||
border-top: 2px solid #e0e0c0;
|
||||
}
|
||||
|
||||
.navleft {
|
||||
margin-left: 1ex;
|
||||
position: relative;
|
||||
float: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.navright {
|
||||
margin-right: 1ex;
|
||||
position: relative;
|
||||
float: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.nonavigation {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.searchform {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.searchbox {
|
||||
width: 16em;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Version */
|
||||
|
||||
.versionbox {
|
||||
position: relative;
|
||||
float: right;
|
||||
left: 2em;
|
||||
height: 0em;
|
||||
width: 13em;
|
||||
margin: 0em -13em 0em 0em;
|
||||
}
|
||||
.version {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Margin notes */
|
||||
|
||||
.refpara {
|
||||
position: relative;
|
||||
float: right;
|
||||
left: 2em;
|
||||
top: -1em;
|
||||
height: 0em;
|
||||
width: 13em;
|
||||
margin: 0em -13em 0em 0em;
|
||||
}
|
||||
|
||||
.refcolumn {
|
||||
background-color: #F5F5DC;
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 13em;
|
||||
font-size: 85%;
|
||||
border: 0.5em solid #F5F5DC;
|
||||
}
|
||||
|
||||
.refcontent {
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Table of contents, inline */
|
||||
|
||||
.toclink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.toptoclink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Table of contents, left margin */
|
||||
|
||||
.tocset {
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 12.5em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
.tocset td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.tocview {
|
||||
text-align: left;
|
||||
background-color: #f0f0e0;
|
||||
}
|
||||
|
||||
.tocsub {
|
||||
text-align: left;
|
||||
margin-top: 0.5em;
|
||||
background-color: #f0f0e0;
|
||||
}
|
||||
|
||||
.tocviewlist, .tocsublist {
|
||||
margin-left: 0.2em;
|
||||
margin-right: 0.2em;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
}
|
||||
.tocviewlist table {
|
||||
font-size: 82%;
|
||||
}
|
||||
|
||||
.tocviewsublist, .tocviewsublistonly, .tocviewsublisttop, .tocviewsublistbottom {
|
||||
margin-left: 0.4em;
|
||||
border-left: 1px solid #bbf;
|
||||
padding-left: 0.8em;
|
||||
}
|
||||
.tocviewsublist {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.tocviewsublist table,
|
||||
.tocviewsublistonly table,
|
||||
.tocviewsublisttop table,
|
||||
.tocviewsublistbottom table {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.tocviewtitle * {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tocviewlink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.tocviewselflink {
|
||||
text-decoration: underline;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.tocviewtoggle {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */
|
||||
}
|
||||
|
||||
.tocsublist td {
|
||||
padding-left: 1em;
|
||||
text-indent: -1em;
|
||||
}
|
||||
|
||||
.tocsublinknumber {
|
||||
font-size: 82%;
|
||||
}
|
||||
|
||||
.tocsublink {
|
||||
font-size: 82%;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tocsubseclink {
|
||||
font-size: 82%;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tocsubnonseclink {
|
||||
font-size: 82%;
|
||||
text-decoration: none;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
.tocsubtitle {
|
||||
font-size: 82%;
|
||||
font-style: italic;
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
.sepspace {
|
||||
font-size: 40%;
|
||||
}
|
||||
|
||||
.septitle {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Inherited methods, left margin */
|
||||
|
||||
.inherited {
|
||||
width: 100%;
|
||||
margin-top: 0.5em;
|
||||
text-align: left;
|
||||
background-color: #ECF5F5;
|
||||
}
|
||||
|
||||
.inherited td {
|
||||
font-size: 82%;
|
||||
padding-left: 1em;
|
||||
text-indent: -0.8em;
|
||||
padding-right: 0.2em;
|
||||
}
|
||||
|
||||
.inheritedlbl {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Scheme text styles */
|
||||
|
||||
.schemeinput {
|
||||
color: #cc6633;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.schemeinputbg {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.schemereader {
|
||||
}
|
||||
|
||||
.schemeparen {
|
||||
color: #843c24;
|
||||
}
|
||||
|
||||
.schememeta {
|
||||
color: #262680;
|
||||
}
|
||||
|
||||
.schememod {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.schemeopt {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.schemekeyword {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.schemeerror {
|
||||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.schemevariable {
|
||||
color: #262680;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.schemesymbol {
|
||||
color: #262680;
|
||||
}
|
||||
|
||||
.schemevaluelink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.schememodlink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.schemesyntaxlink {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.schemeresult {
|
||||
color: #0000af;
|
||||
}
|
||||
|
||||
.schemestdout {
|
||||
color: #960096;
|
||||
}
|
||||
|
||||
.schemecomment {
|
||||
color: #c2741f;
|
||||
}
|
||||
|
||||
.schemevalue {
|
||||
color: #228b22;
|
||||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Some inline styles */
|
||||
|
||||
.leftindent {
|
||||
margin-left: 1em;
|
||||
margin-right: 0em;
|
||||
}
|
||||
|
||||
.insetpara {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.indexlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nobreak {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stt {
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 200%;
|
||||
font-weight: normal;
|
||||
margin-top: 2.8em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
pre { margin-left: 2em; }
|
||||
blockquote { margin-left: 2em; }
|
||||
|
||||
ol { list-style-type: decimal; }
|
||||
ol ol { list-style-type: lower-alpha; }
|
||||
ol ol ol { list-style-type: lower-roman; }
|
||||
ol ol ol ol { list-style-type: upper-alpha; }
|
||||
|
||||
i {
|
||||
}
|
||||
|
||||
.boxed {
|
||||
width: 100%;
|
||||
background-color: #E8E8FF;
|
||||
}
|
||||
|
||||
.inlinetop{
|
||||
display: inline;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.together {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.prototype td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
.longprototype td {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.schemeblock td {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.argcontract td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.ghost {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.highlighted {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
.defmodule {
|
||||
width: 100%;
|
||||
background-color: #F5F5DC;
|
||||
}
|
||||
|
||||
.specgrammar {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.hspace {
|
||||
}
|
||||
|
||||
.slant {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.inferencetop td {
|
||||
border-bottom: 1px solid black;
|
||||
text-align: center;
|
||||
}
|
||||
.inferencebottom td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.badlink {
|
||||
text-decoration: underline;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.plainlink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.techoutside { text-decoration: underline; color: #b0b0b0; }
|
||||
.techoutside:hover { text-decoration: underline; color: blue; }
|
||||
|
||||
/* .techinside:hover doesn't work with FF, .techinside:hover>
|
||||
.techinside doesn't work with IE, so use both (and IE doesn't
|
||||
work with inherit in the second one, so use blue directly) */
|
||||
.techinside { color: black; }
|
||||
.techinside:hover { color: blue; }
|
||||
.techoutside:hover>.techinside { color: inherit; }
|
||||
|
||||
.SBibliography td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.imageleft {
|
||||
float: left;
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.smaller{
|
||||
font-size: 82%;
|
||||
}
|
||||
|
||||
/* A hack, inserted to break some Scheme ids: */
|
||||
.mywbr {
|
||||
width: 0;
|
||||
font-size: 1px;
|
||||
}
|
||||
|
||||
.compact li p {
|
||||
margin: 0em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
.noborder img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.author {
|
||||
position: relative;
|
||||
float: right;
|
||||
left: 2em;
|
||||
top: -3em;
|
||||
height: 0em;
|
||||
width: 23em; /* very wide to keep author names on separate lines */
|
||||
margin: 0em -23em 0em 0em;
|
||||
font-size: 82%;
|
||||
}
|
||||
.author:before {
|
||||
content: "by ";
|
||||
}
|
Loading…
Reference in New Issue
Block a user