This file is indexed.

/usr/share/doc/racket/rackunit/api.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>3&nbsp;RackUnit API</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><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,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Rack<span class="mywbr"> &nbsp;</span>Unit:<span class="mywbr"> &nbsp;</span> Unit Testing</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="quick-start.html" class="tocviewlink" data-pltdoc="x">Quick Start Guide for Rack<span class="mywbr"> &nbsp;</span>Unit</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="philosophy.html" class="tocviewlink" data-pltdoc="x">The Philosophy of Rack<span class="mywbr"> &nbsp;</span>Unit</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Rack<span class="mywbr"> &nbsp;</span>Unit API</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="Testing_Utilities.html" class="tocviewlink" data-pltdoc="x">Testing Utilities</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="internals.html" class="tocviewlink" data-pltdoc="x">Rack<span class="mywbr"> &nbsp;</span>Unit Internals and Extension API</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="Release_Notes.html" class="tocviewlink" data-pltdoc="x">Release Notes</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Acknowlegements.html" class="tocviewlink" data-pltdoc="x">Acknowlegements</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">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,&quot;tocview_1&quot;);">&#9658;</a></td><td>3&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Rack<span class="mywbr"> &nbsp;</span>Unit API</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">3.1&nbsp;</td><td><a href="#%28part._.Overview_of_.Rack.Unit%29" class="tocviewlink" data-pltdoc="x">Overview of Rack<span class="mywbr"> &nbsp;</span>Unit</a></td></tr><tr><td align="right">3.2&nbsp;</td><td><a href="#%28part._.Checks%29" class="tocviewlink" data-pltdoc="x">Checks</a></td></tr><tr><td align="right">3.3&nbsp;</td><td><a href="#%28part._.Compound_.Testing_.Forms%29" class="tocviewlink" data-pltdoc="x">Compound Testing Forms</a></td></tr><tr><td align="right">3.4&nbsp;</td><td><a href="#%28part._.Test_.Control_.Flow%29" class="tocviewlink" data-pltdoc="x">Test Control Flow</a></td></tr><tr><td align="right">3.5&nbsp;</td><td><a href="#%28part._.Miscellaneous_.Utilities%29" class="tocviewlink" data-pltdoc="x">Miscellaneous Utilities</a></td></tr><tr><td align="right">3.6&nbsp;</td><td><a href="#%28part._ui%29" class="tocviewlink" data-pltdoc="x">User Interfaces</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">3.1<tt>&nbsp;</tt></span><a href="#%28part._.Overview_of_.Rack.Unit%29" class="tocsubseclink" data-pltdoc="x">Overview of Rack<span class="mywbr"> &nbsp;</span>Unit</a></td></tr><tr><td><span class="tocsublinknumber">3.2<tt>&nbsp;</tt></span><a href="#%28part._.Checks%29" class="tocsubseclink" data-pltdoc="x">Checks</a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>eq?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eq~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>not-<wbr></wbr>eq?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eqv~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>eqv?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eqv~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>not-<wbr></wbr>eqv?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-equal~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>equal?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-equal~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>not-<wbr></wbr>equal?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-pred%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>pred</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-~3d%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>=</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-true%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>true</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-false%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>false</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-false%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>not-<wbr></wbr>false</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>exn</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-exn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>not-<wbr></wbr>exn</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-regexp-match%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>regexp-<wbr></wbr>match</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">check-<wbr></wbr>match</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._fail%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">fail</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.2.1<tt>&nbsp;</tt></span><a href="#%28part._.Augmenting_.Information_on_.Check_.Failure%29" class="tocsubseclink" data-pltdoc="x">Augmenting Information on Check Failure</a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>info</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-name%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>name</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-params%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>params</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-location%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>location</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-expression%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>expression</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-message%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>message</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-actual%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>actual</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-expected%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>check-<wbr></wbr>expected</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">with-<wbr></wbr>check-<wbr></wbr>info*</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">with-<wbr></wbr>check-<wbr></wbr>info</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.2.2<tt>&nbsp;</tt></span><a href="#%28part._.Custom_.Checks%29" class="tocsubseclink" data-pltdoc="x">Custom Checks</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>simple-<wbr></wbr>check</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>binary-<wbr></wbr>check</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>check</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._fail-check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">fail-<wbr></wbr>check</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.3<tt>&nbsp;</tt></span><a href="#%28part._.Compound_.Testing_.Forms%29" class="tocsubseclink" data-pltdoc="x">Compound Testing Forms</a></td></tr><tr><td><span class="tocsublinknumber">3.3.1<tt>&nbsp;</tt></span><a href="#%28part._.Test_.Cases%29" class="tocsubseclink" data-pltdoc="x">Test Cases</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">test-<wbr></wbr>begin</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">test-<wbr></wbr>case</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>case?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.3.1.1<tt>&nbsp;</tt></span><a href="#%28part._.Shortcuts_for_.Defining_.Test_.Cases%29" class="tocsubseclink" data-pltdoc="x">Shortcuts for Defining Test Cases</a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-check%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>check</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-pred%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>pred</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-equal~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>equal?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-eq~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>eq?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-eqv~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>eqv?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-~3d%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>=</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-true%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>true</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-false%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>false</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-not-false%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>not-<wbr></wbr>false</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-exn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>exn</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-not-exn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>not-<wbr></wbr>exn</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.3.2<tt>&nbsp;</tt></span><a href="#%28part._.Test_.Suites%29" class="tocsubseclink" data-pltdoc="x">Test Suites</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-suite%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">test-<wbr></wbr>suite</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-test-suite%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>test-<wbr></wbr>suite</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test-<wbr></wbr>suite?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.3.2.1<tt>&nbsp;</tt></span><a href="#%28part._.Utilities_for_.Defining_.Test_.Suites%29" class="tocsubseclink" data-pltdoc="x">Utilities for Defining Test Suites</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-test-suite%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>test-<wbr></wbr>suite</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define%2Fprovide-test-suite%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define/<span class="mywbr"> &nbsp;</span>provide-<wbr></wbr>test-<wbr></wbr>suite</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.4<tt>&nbsp;</tt></span><a href="#%28part._.Test_.Control_.Flow%29" class="tocsubseclink" data-pltdoc="x">Test Control Flow</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._before%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">before</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._after%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">after</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._around%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">around</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._delay-test%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">delay-<wbr></wbr>test</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.5<tt>&nbsp;</tt></span><a href="#%28part._.Miscellaneous_.Utilities%29" class="tocsubseclink" data-pltdoc="x">Miscellaneous Utilities</a></td></tr><tr><td><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">require/<span class="mywbr"> &nbsp;</span>expose</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._dynamic-require%2Fexpose%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dynamic-<wbr></wbr>require/<span class="mywbr"> &nbsp;</span>expose</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.6<tt>&nbsp;</tt></span><a href="#%28part._ui%29" class="tocsubseclink" data-pltdoc="x">User Interfaces</a></td></tr><tr><td><span class="tocsublinknumber">3.6.1<tt>&nbsp;</tt></span><a href="#%28part._.Textual_.User_.Interface%29" class="tocsubseclink" data-pltdoc="x">Textual User Interface</a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Ftext-ui..rkt%29._run-tests%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">run-<wbr></wbr>tests</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3.6.2<tt>&nbsp;</tt></span><a href="#%28part._.Graphical_.User_.Interface%29" class="tocsubseclink" data-pltdoc="x">Graphical User Interface</a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fgui..rkt%29._test%2Fgui%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">test/<span class="mywbr"> &nbsp;</span>gui</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._rackunit%2Fgui..rkt%29._make-gui-runner%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>gui-<wbr></wbr>runner</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="philosophy.html" title="backward to &quot;2 The Philosophy of RackUnit&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;RackUnit: Unit Testing&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Testing_Utilities.html" title="forward to &quot;4 Testing Utilities&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;api&quot;">3<tt>&nbsp;</tt><a name="(part._api)"></a><a name="(mod-path._rackunit)"></a>RackUnit API</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">rackunit</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">rackunit-lib</span></span></td></tr></table></p><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Overview_of_RackUnit&quot;">3.1<tt>&nbsp;</tt><a name="(part._.Overview_of_.Rack.Unit)"></a>Overview of RackUnit</h4><p>There are three basic concepts in RackUnit:</p><ul><li><p>A <span style="font-style: italic">check</span> is the basic unit of a test.  As the name
suggests, it checks some condition is true.</p></li><li><p>A <span style="font-style: italic">test case</span> is a group of checks that form one
conceptual unit.  If any check within the case fails, the entire case
fails.</p></li><li><p>A <span style="font-style: italic">test suite</span> is a group of test cases and test suites
that has a name.</p></li></ul><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Checks&quot;">3.2<tt>&nbsp;</tt><a name="(part._.Checks)"></a>Checks</h4><p>Checks are the basic building block of RackUnit.  A check
checks some condition and always
evaluates to <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void</a></span><span class="RktPn">)</span>.  If the condition doesn&rsquo;t hold, the
check will report the failure (see <span class="RktSym"><a href="internals.html#%28def._%28%28lib._rackunit%2Fmain..rkt%29._current-check-handler%29%29" class="RktValLink" data-pltdoc="x">current-check-handler</a></span>
for customizing how failures are handled).</p><p>Although checks are implemented as macros, which is
necessary to grab source location, they are conceptually
functions (with the exception of <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span> below).
This means, for instance, checks always evaluate
their arguments.  You can use checks as first class
functions, though you will lose precision in the reported
source locations if you do so.</p><p>The following are the basic checks RackUnit provides.  You
can create your own checks using <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="RktStxLink" data-pltdoc="x">define-check</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-eq~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-eq?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-not-eq~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eq~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-not-eq?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-eqv~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eqv~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-eqv?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-not-eqv~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eqv~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-not-eqv?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-equal~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-equal~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-equal?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-not-equal~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-equal~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-not-equal?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">v1</span> is equal (or not equal) to <span class="RktVar">v2</span>, using
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eq%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">eq?</a></span>, <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eqv%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span>, respectively. The
optional <span class="RktVar">message</span> is included in the output if the check
fails.</div></p><p>For example, the following checks all fail:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="RktValLink" data-pltdoc="x">check-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">"allocated data not eq?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1)</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1)</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-eq?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 3 0 3 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-eq? (list 1) (list 1))</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"allocated data not eq?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eq~3f%29%29" class="RktValLink" data-pltdoc="x">check-not-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">"fixnums are eq?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-eq?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 4 0 4 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-not-eq? 1 1)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1 1)</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"fixnums are eq?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">check-eqv?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="hspace">&nbsp;</span><span class="RktVal">"not eqv?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">1</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">1.0</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-eqv?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 5 0 5 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-eqv? 1 1.0)</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"not eqv?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">check-not-eqv?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">"integers are eqv?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-eqv?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 6 0 6 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-not-eqv? 1 1)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1 1)</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"integers are eqv?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-equal~3f%29%29" class="RktValLink" data-pltdoc="x">check-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="hspace">&nbsp;</span><span class="RktVal">"not equal?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">1</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">1.0</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-equal?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 7 0 7 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-equal? 1 1.0)</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"not equal?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-equal~3f%29%29" class="RktValLink" data-pltdoc="x">check-not-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">"equal?"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-equal?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 8 0 8 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-not-equal? (list 1) (list 1))</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">((1) (1))</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"equal?"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-pred))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-pred%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-pred</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">pred</span> returns a value that is not <span class="RktVal">#f</span> when
applied to <span class="RktVar">v</span>.  The optional <span class="RktVar">message</span> is included in
the output if the check fails. The value returned by a successful
check is the value returned by <span class="RktVar">pred</span>.</div></p><p><div class="SIntrapara">For example, the following check passes:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-pred%29%29" class="RktValLink" data-pltdoc="x">check-pred</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"I work"</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The following check fails:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-pred%29%29" class="RktValLink" data-pltdoc="x">check-pred</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"I fail"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-pred</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 10 0 10 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-pred number? "I fail")</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:number?&gt; "I fail")</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-~3d))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-~3d%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-=</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span><span class="RktVar">epsilon</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">epsilon</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">v1</span> and <span class="RktVar">v2</span> are numbers within
<span class="RktVar">epsilon</span> of one another.  The optional
<span class="RktVar">message</span> is included in the output if the check
fails.</div></p><p>For example, the following check passes:</p><p><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-~3d%29%29" class="RktValLink" data-pltdoc="x">check-=</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="hspace">&nbsp;</span><span class="RktVal">1.01</span><span class="hspace">&nbsp;</span><span class="RktVal">0.02</span><span class="hspace">&nbsp;</span><span class="RktVal">"I work"</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The following check fails:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-~3d%29%29" class="RktValLink" data-pltdoc="x">check-=</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="hspace">&nbsp;</span><span class="RktVal">1.01</span><span class="hspace">&nbsp;</span><span class="RktVal">0.005</span><span class="hspace">&nbsp;</span><span class="RktVal">"I fail"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-=</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 12 0 12 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-= 1.0 1.01 0.005)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1.0 1.01 0.005)</span></p></td></tr><tr><td><p><span class="RktErr">message:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"I fail"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-true))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-true%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-true</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-false))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-false%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-false</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-not-false))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-false%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-not-false</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">v</span> is <span class="RktVal">#t</span>, is <span class="RktVal">#f</span>, or is not
<span class="RktVal">#f</span>, respectively.  The optional <span class="RktVar">message</span> is included
in the output if the check fails.</div></p><p>For example, the following checks all fail:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-true%29%29" class="RktValLink" data-pltdoc="x">check-true</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-true</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 13 0 13 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-true 1)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-false%29%29" class="RktValLink" data-pltdoc="x">check-false</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-false</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 14 0 14 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-false 1)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-false%29%29" class="RktValLink" data-pltdoc="x">check-not-false</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-false</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 15 0 15 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-not-false #f)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#f)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-exn))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-exn</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">exn-predicate</span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">exn-predicate</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=regexp.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._regexp%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">regexp?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">thunk</span> raises an exception and that either
<span class="RktVar">exn-predicate</span> returns <span class="RktVal">#t</span> if it is a function, or
that it matches the message in the exception if <span class="RktVar">exn-predicate</span>
is a regexp. In the latter case, the exception raised must be an
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3afail%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail?</a></span>.  The optional <span class="RktVar">message</span> is included in the
output if the check fails.  A common error is to use an expression
instead of a function of no arguments for <span class="RktVar">thunk</span>.  Remember
that checks are conceptually functions.</div></p><p>For example, the following checks succeed:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3afail%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._raise%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">raise</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._make-exn%7E3afail%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">make-exn:fail</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Hi there"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contmarks.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-continuation-marks%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-continuation-marks</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3afail%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._error%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">error</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">hi</span><span class="hspace">&nbsp;</span><span class="RktVal">"there"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>The following check fails:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3afail%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=threads.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._break-thread%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">break-thread</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=threads.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-thread%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-thread</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">ERROR</span></p></td></tr><tr><td><p><span class="RktErr">user break</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p>The following example is a common mistake. The call to <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._error%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">error</a></span>
is not within a <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span>, so it bypasses <span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span>
entirely.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">Forgot to wrap the expression in a thunk.  Don't do this!</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3afail%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._error%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">error</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">hi</span><span class="hspace">&nbsp;</span><span class="RktVal">"there"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">hi: there</span></p></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-not-exn))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-exn%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-not-exn</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">thunk</span> does not raise any exceptions.
The optional <span class="RktVar">message</span> is included in the output if
the check fails.</div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-exn%29%29" class="RktValLink" data-pltdoc="x">check-not-exn</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-exn%29%29" class="RktValLink" data-pltdoc="x">check-not-exn</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">message: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"Exception raised"</span></p></td></tr><tr><td><p><span class="RktErr">exception-message: "car: contract violation\n</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">expected: pair?\n</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">given: '()"</span></p></td></tr><tr><td><p><span class="RktErr">exception: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#(struct:exn:fail:contract "car: contract violation\n</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">expected: pair?\n</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">given: '()" #&lt;continuation-mark-set&gt;)</span></p></td></tr><tr><td><p><span class="RktErr">name:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-exn</span></p></td></tr><tr><td><p><span class="RktErr">location:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 21 0 21 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(check-not-exn (&#955; () (car (quote ()))))</span></p></td></tr><tr><td><p><span class="RktErr">params:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:temp79&gt;)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-not-exn%29%29" class="RktValLink" data-pltdoc="x">check-not-exn</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">"don't divide by 0"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">exception-message: "/: division by zero"</span></p></td></tr><tr><td><p><span class="RktErr">exception: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#(struct:exn:fail:contract:divide-by-zero "/: division by zero" #&lt;continuation-mark-set&gt;)</span></p></td></tr><tr><td><p><span class="RktErr">name:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-not-exn</span></p></td></tr><tr><td><p><span class="RktErr">location:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 22 0 22 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(check-not-exn (&#955; () (/ 1 0)))</span></p></td></tr><tr><td><p><span class="RktErr">params:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:temp82&gt;)</span></p></td></tr><tr><td><p><span class="RktErr">message: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">"don't divide by 0"</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check-regexp-match))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-regexp-match%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-regexp-match</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">regexp</span><span class="hspace">&nbsp;</span><span class="RktVar">string</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">regexp</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=regexp.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._regexp%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">regexp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">string</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">regexp</span> matches the <span class="RktVar">string</span>.</div></p><p>For example, the following check succeeds:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-regexp-match%29%29" class="RktValLink" data-pltdoc="x">check-regexp-match</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"a+bba"</span><span class="hspace">&nbsp;</span><span class="RktVal">"aaaaaabba"</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The following check fails:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-regexp-match%29%29" class="RktValLink" data-pltdoc="x">check-regexp-match</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"a+bba"</span><span class="hspace">&nbsp;</span><span class="RktVal">"aaaabbba"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-regexp-match</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 24 0 24 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-regexp-match "a+bba" "aaaabbba")</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">("a+bba" "aaaabbba")</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._check-match))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">check-match</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktVar">pattern</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktVar">pattern</span><span class="hspace">&nbsp;</span><span class="RktVar">pred</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A check that pattern matches on the test value.  Matches the test value
<span class="RktVar">v</span> against <span class="RktVar">pattern</span> as a <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=match.html%23%2528form._%2528%2528lib._racket%252Fmatch..rkt%2529._match%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">match</a></span> clause.  If no
<span class="RktVar">pred</span> is provided, then if the match succeeds, the entire check
succeeds.  For example, this use succeeds:</div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>This check fails to match:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#f)</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-match</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 26 0 26 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-match (list 1 2 3) (list _ _ 4) #t)</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1 2 3)</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(list _ _ 4)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p>If <span class="RktVar">pred</span> is provided, it is evaluated with the bindings from the
match pattern.  If it produces <span class="RktVal">#t</span>, the entire check succeeds,
otherwise it fails.  For example, this use succeeds, binding <span class="RktSym">x</span>
in the predicate:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>This check fails because the <span class="RktVar">pred</span> fails:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktVal">6</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#f)</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-match</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 28 0 28 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-match 6 x (odd? x))</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">6</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">x</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p>This check fails because of a failure to match:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._check-match%29%29" class="RktStxLink" data-pltdoc="x">check-match</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#f)</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-match</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 29 0 29 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-match (list 1 2) (list x) (odd? x))</span></p></td></tr><tr><td><p><span class="RktErr">actual: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(1 2)</span></p></td></tr><tr><td><p><span class="RktErr">expected: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(list x)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="RktValDef RktValLink" data-pltdoc="x">check</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">op</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">op</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">The most generic check.  Succeeds if <span class="RktVar">op</span> applied to
<span class="RktVar">v1</span> and <span class="RktVar">v2</span> is not <span class="RktVal">#f</span>, otherwise raises an
exception of type <span class="RktSym"><a href="internals.html#%28def._%28%28lib._rackunit%2Fmain..rkt%29._exn~3atest~3acheck%29%29" class="RktValLink" data-pltdoc="x">exn:test:check</a></span>.  The optional
<span class="RktVar">message</span> is included in the output if the check fails.</div></p><p>For example, the following check succeeds:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="RktValLink" data-pltdoc="x">check</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The following check fails:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="RktValLink" data-pltdoc="x">check</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._memq%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">memq</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">pine</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">apple</span><span class="hspace">&nbsp;</span><span class="RktVal">orange</span><span class="hspace">&nbsp;</span><span class="RktVal">pear</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 31 0 31 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check memq (quote pine) (quote (apple orange pear)))</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:memq&gt; pine (apple orange pear))</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._fail))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._fail%29%29" class="RktValDef RktValLink" data-pltdoc="x">fail</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">message</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">message</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">""</span></td></tr></table></blockquote></div><div class="SIntrapara">This check fails unconditionally.  Good for creating test stubs that
you intend to fill out later.  The optional <span class="RktVar">message</span> is
included in the output.</div></p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Augmenting_Information_on_Check_Failure&quot;">3.2.1<tt>&nbsp;</tt><a name="(part._.Augmenting_.Information_on_.Check_.Failure)"></a>Augmenting Information on Check Failure</h5><p>When a check fails it stores information including the name
of the check, the location and message (if available), the
expression the check is called with, and the parameters to
the check.  Additional information can be stored by using
the <span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%2A%29%29" class="RktValLink" data-pltdoc="x">with-check-info*</a></span> function, and the
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span> macro.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace">&nbsp;</span></td><td><a name="(def._((lib._rackunit/main..rkt)._check-info-value))"></a><a name="(def._((lib._rackunit/main..rkt)._check-info-name))"></a><a name="(def._((lib._rackunit/main..rkt)._make-check-info))"></a><a name="(def._((lib._rackunit/main..rkt)._check-info~3f))"></a><a name="(def._((lib._rackunit/main..rkt)._struct~3acheck-info))"></a><a name="(def._((lib._rackunit/main..rkt)._check-info))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-info</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">name</span><span class="stt"> </span><span class="RktSym">value</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:extra-constructor-name</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-info%29%29" class="RktValLink" data-pltdoc="x">make-check-info</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">value</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A check-info structure stores information associated
with the context of execution of a check.</div></p><p>The are several predefined functions that create check
information structures with predefined names.  This avoids
misspelling errors:</p><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-name))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-name%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-name</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-params))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-params%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-params</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">params</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">params</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-location))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-location%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-location</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">loc</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">loc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-expression))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-expression%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-expression</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">msg</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">msg</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-message))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-message%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-message</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">msg</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">msg</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-actual))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-actual%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-actual</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">param</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">param</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-check-expected))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-expected%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-check-expected</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">param</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">param</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._with-check-info*))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">with-check-info*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">info</span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">info</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-info~3f%29%29" class="RktValLink" data-pltdoc="x">check-info?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Stores the given <span class="RktVar">info</span> on the check-info stack for
the duration (the dynamic extent) of the execution of
<span class="RktVar">thunk</span></div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%2A%29%29" class="RktValLink" data-pltdoc="x">with-check-info*</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-info%29%29" class="RktValLink" data-pltdoc="x">make-check-info</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">time</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=time.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-seconds%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-seconds</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="RktValLink" data-pltdoc="x">check</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 32 0 32 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check = 1 2)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:=&gt; 1 2)</span></p></td></tr><tr><td><p><span class="RktErr">time: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">1492921241</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p>When this check fails the message</p><p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="stt">time: &lt;current-seconds-at-time-of-running-check&gt;</span></p></td></tr></table></p><p>is printed along with the usual information on an check failure.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._with-check-info))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">with-check-info</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">val</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">body</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span> macro stores the given
information in the check information stack for the duration
of the execution of the body expressions.  <span class="RktSym">Name</span> is
a quoted symbol and <span class="RktVar">val</span> is any value.</div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._for-each%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">for-each</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">elt</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktVal">'</span><span class="RktVal">current-element</span><span class="hspace">&nbsp;</span><span class="RktSym">elt</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-pred%29%29" class="RktValLink" data-pltdoc="x">check-pred</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">elt</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">7</span><span class="hspace">&nbsp;</span><span class="RktVal">8</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-pred</span></p></td></tr><tr><td><p><span class="RktErr">location:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 33 0 33 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(check-pred odd? elt)</span></p></td></tr><tr><td><p><span class="RktErr">params:</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(#&lt;procedure:odd?&gt; 8)</span></p></td></tr><tr><td><p><span class="RktErr">current-element: 8</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p>When this test fails the message</p><p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="stt">current-element: 8</span></p></td></tr></table></p><p>is displayed along with the usual information on an check failure.</p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Custom_Checks&quot;">3.2.2<tt>&nbsp;</tt><a name="(part._.Custom_.Checks)"></a>Custom Checks</h5><p>Custom checks can be defined using <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="RktStxLink" data-pltdoc="x">define-check</a></span> and
its variants.  To effectively use these macros it is useful
to understand a few details about a check&rsquo;s evaluation
model.</p><p>Firstly, a check should be considered a function, even
though most uses are actually macros.  In particular, checks
always evaluate their arguments exactly once before
executing any expressions in the body of the checks.  Hence
if you wish to write checks that evaluate user defined code
that code must be wrapped in a thunk (a function of no
arguments) by the user.  The predefined <span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-exn%29%29" class="RktValLink" data-pltdoc="x">check-exn</a></span>
is an example of this type of check.</p><p>It is also useful to understand how the check information stack
operates.  The stack is stored in a parameter and the
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span> forms evaluate to calls to
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=parameters.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fmore-scheme..rkt%2529._parameterize%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">parameterize</a></span>.  For this reason simple checks (see below)
cannot usefully contain calls to <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span> to report
additional information.  All checks created using
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxLink" data-pltdoc="x">define-simple-check</a></span> or <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="RktStxLink" data-pltdoc="x">define-check</a></span> grab some
information by default: the name of the checks and the values of the
parameters.  Additionally the macro forms of checks grab location
information and the expressions passed as parameters.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._define-simple-check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-simple-check</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">param</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">body</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxLink" data-pltdoc="x">define-simple-check</a></span> macro constructs a check
called <span class="RktVar">name</span> that takes the params and an optional
message as arguments and evaluates the <span class="RktVar">body</span>s.  The
check fails if the result of the last <span class="RktVar">body</span> is
<span class="RktVal">#f</span>.  Otherwise the check succeeds.  Note that
simple checks cannot report extra information using
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._with-check-info%29%29" class="RktStxLink" data-pltdoc="x">with-check-info</a></span>.</div></p><p>For example, the following code defines a check <span class="RktSym">check-odd?</span></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxLink" data-pltdoc="x">define-simple-check</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">check-odd?</span><span class="hspace">&nbsp;</span><span class="RktSym">number</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">number</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>We can use these checks in the usual way:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">check-odd?</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">check-odd?</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktErr">--------------------</span></p></td></tr><tr><td><p><span class="RktErr">FAILURE</span></p></td></tr><tr><td><p><span class="RktErr">name: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">check-odd?</span></p></td></tr><tr><td><p><span class="RktErr">location: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(eval 36 0 36 1)</span></p></td></tr><tr><td><p><span class="RktErr">expression: (check-odd? 2)</span></p></td></tr><tr><td><p><span class="RktErr">params: </span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(2)</span></p></td></tr><tr><td><p><span class="RktErr"></span></p></td></tr><tr><td><p><span class="RktErr">Check failure</span></p></td></tr><tr><td><p><span class="RktErr">--------------------</span></p></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._define-binary-check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-binary-check</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span><span class="RktVar">actual</span><span class="hspace">&nbsp;</span><span class="RktVar">expected</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-binary-check</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">actual</span><span class="hspace">&nbsp;</span><span class="RktVar">expected</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">body</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="RktStxLink" data-pltdoc="x">define-binary-check</a></span> macro constructs a check
that tests a binary predicate.  It&rsquo;s benefit over
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxLink" data-pltdoc="x">define-simple-check</a></span> is in better reporting on check
failure.  The first form of the macro accepts a binary
predicate and tests if the predicate holds for the given
values.  The second form tests if the last <span class="RktVar">body</span>
evaluates to a non-false value.</div></p><p>Here&rsquo;s the first form, where we use a predefined predicate
to construct a binary check:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="RktStxLink" data-pltdoc="x">define-binary-check</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">check-char=?</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=characters.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._char%7E3d%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">char=?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">actual</span><span class="hspace">&nbsp;</span><span class="RktSym">expected</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>In use:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">check-char=?</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Byte_and_String_Input.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read-char%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">read-char</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stringport.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._open-input-string%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">open-input-string</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"a"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#\a</span><span class="RktPn">)</span></td></tr></table></blockquote><p>If the expression is more complicated the second form should
be used.  For example, below we define a binary check that
tests a number if within 0.01 of the expected value:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-binary-check%29%29" class="RktStxLink" data-pltdoc="x">define-binary-check</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">check-in-tolerance</span><span class="hspace">&nbsp;</span><span class="RktSym">actual</span><span class="hspace">&nbsp;</span><span class="RktSym">expected</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._abs%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">abs</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym">actual</span><span class="hspace">&nbsp;</span><span class="RktSym">expected</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0.01</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._define-check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-check</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">param</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">body</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-check%29%29" class="RktStxLink" data-pltdoc="x">define-check</a></span> macro acts in exactly the same way
as <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-simple-check%29%29" class="RktStxLink" data-pltdoc="x">define-simple-check</a></span>, except the check only fails
if the macro <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._fail-check%29%29" class="RktStxLink" data-pltdoc="x">fail-check</a></span> is called in the body of
the check.  This allows more flexible checks, and in
particular more flexible reporting options.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._fail-check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._fail-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">fail-check</a></span></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._fail-check%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">fail-check</a></span><span class="hspace">&nbsp;</span><span class="RktVar">message-expr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._fail-check%29%29" class="RktStxLink" data-pltdoc="x">fail-check</a></span> macro raises an <span class="RktSym"><a href="internals.html#%28def._%28%28lib._rackunit%2Fmain..rkt%29._exn~3atest~3acheck%29%29" class="RktValLink" data-pltdoc="x">exn:test:check</a></span> with
the contents of the check information stack. The optional message
is used as the exception&rsquo;s message.</div></p><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Compound_Testing_Forms&quot;">3.3<tt>&nbsp;</tt><a name="(part._.Compound_.Testing_.Forms)"></a>Compound Testing Forms</h4><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Test_Cases&quot;">3.3.1<tt>&nbsp;</tt><a name="(part._.Test_.Cases)"></a>Test Cases</h5><p>As programs increase in complexity the unit of testing
grows beyond a single check. For example, it may be the case
that if one check fails it doesn&rsquo;t make sense to run
another.  To solve this problem compound testing forms can
be used to group expressions.  If any expression in a group
fails (by raising an exception) the remaining expressions
will not be evaluated.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._test-begin))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">test-begin</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">expr</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="RktStxLink" data-pltdoc="x">test-begin</a></span> form groups the <span class="RktVar">expr</span>s into a
single unit.  If any <span class="RktVar">expr</span> fails the following ones
are not evaluated.  </div></p><p>For example, in the following code the world is not
destroyed as the preceding check fails:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="RktStxLink" data-pltdoc="x">test-begin</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="RktValLink" data-pltdoc="x">check-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">a</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">This line won't be run</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">destroy-the-world</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._test-case))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">test-case</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">body</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like a <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="RktStxLink" data-pltdoc="x">test-begin</a></span> except a name is associated with
the <span class="RktVar">body</span>s.  The name will be reported if
the test fails.  </div></p><p>Here&rsquo;s the above example rewritten to use <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span>
so the test can be named.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">"Example test"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="RktValLink" data-pltdoc="x">check-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">a</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">This line won't be run</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">destroy-the-world</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-case~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-case?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">obj</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">obj</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr></table></blockquote></div><div class="SIntrapara">True if <span class="RktVar">obj</span> is a test case, and false otherwise.</div></p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Shortcuts_for_Defining_Test_Cases&quot;">3.3.1.1<tt>&nbsp;</tt><a name="(part._.Shortcuts_for_.Defining_.Test_.Cases)"></a>Shortcuts for Defining Test Cases</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-check))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-check%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-check</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">operator</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">operator</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-pred))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-pred%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-pred</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-equal~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-equal~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-equal?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-eq~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-eq~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-eq?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-eqv~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-eqv~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-eqv?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-~3d))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-~3d%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-=</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span><span class="RktVar">epsilon</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">epsilon</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-true))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-true%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-true</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-false))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-false%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-false</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-not-false))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-not-false%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-not-false</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-exn))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-exn%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-exn</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pred</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=regexp.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._regexp%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">regexp?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-not-exn))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-not-exn%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-not-exn</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a test case with the given <span class="RktVar">name</span> that performs the
corresponding check. For example,</div></p><p><div class="SIntrapara"><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-equal~3f%29%29" class="RktValLink" data-pltdoc="x">test-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Fruit test"</span><span class="hspace">&nbsp;</span><span class="RktVal">"apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">"pear"</span><span class="RktPn">)</span></p></blockquote></div><div class="SIntrapara">is equivalent to
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Fruit test"</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-equal~3f%29%29" class="RktValLink" data-pltdoc="x">check-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">"pear"</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></div></p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Test_Suites&quot;">3.3.2<tt>&nbsp;</tt><a name="(part._.Test_.Suites)"></a>Test Suites</h5><p>Test cases can themselves be grouped into test suites.  A
test suite can contain both test cases and test suites.
Unlike a check or test case, a test suite is not immediately
run.  Instead use one of the functions described in
<a href="#%28part._ui%29" data-pltdoc="x">User Interfaces</a> or <a href="internals.html#%28part._running%29" data-pltdoc="x">Programmatically Running Tests and Inspecting Results</a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._test-suite))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-suite%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">test-suite</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">maybe-before</span><span class="hspace">&nbsp;</span><span class="RktVar">maybe-after</span><span class="hspace">&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-before</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:before</span><span class="hspace">&nbsp;</span><span class="RktVar">before-thunk</span></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-after</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:after</span><span class="hspace">&nbsp;</span><span class="RktVar">after-thunk</span></td></tr></table></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">name-expr</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Constructs a test suite with the given name and tests.  The tests may
be checks, test cases, constructed using <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-begin%29%29" class="RktStxLink" data-pltdoc="x">test-begin</a></span> or
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span>, or other test suites.</div></p><p>The <span class="RktVar">before-thunk</span> and <span class="RktVar">after-thunk</span> are
optional thunks (functions with no argument).  They are run
before and after the tests are run, respectively.</p><p>Unlike a check or test case, a test suite is not immediately
run.  Instead use one of the functions described in
<a href="#%28part._ui%29" data-pltdoc="x">User Interfaces</a> or <a href="internals.html#%28part._running%29" data-pltdoc="x">Programmatically Running Tests and Inspecting Results</a>.</p><p>For example, here is a test suite that displays <span class="stt">Before</span>
before any tests are run, and <span class="stt">After</span> when the tests have
finished.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-suite%29%29" class="RktStxLink" data-pltdoc="x">test-suite</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">"An example suite"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">#:before</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._display%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">display</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Before"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">#:after</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._display%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">display</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"After"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">"An example test"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-eq~3f%29%29" class="RktValLink" data-pltdoc="x">check-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-suite%29%29" class="RktStxLink" data-pltdoc="x">test-suite</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"A nested test suite"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-case%29%29" class="RktStxLink" data-pltdoc="x">test-case</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Another test"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">check-&lt;</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._make-test-suite))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-test-suite%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-test-suite</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">tests</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:before</span><span class="hspace">&nbsp;</span><span class="RktVar">before-thunk</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:after</span><span class="hspace">&nbsp;</span><span class="RktVar">after-thunk</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValLink" data-pltdoc="x">test-suite?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">tests</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="RktValLink" data-pltdoc="x">test-case?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValLink" data-pltdoc="x">test-suite?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">before-thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">after-thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs a test suite with the given <span class="RktVar">name</span> containing the
given <span class="RktVar">tests</span>. Unlike the <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._test-suite%29%29" class="RktStxLink" data-pltdoc="x">test-suite</a></span> form, the tests
are represented as a list of test values.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._test-suite~3f))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">test-suite?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">obj</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">obj</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> True if
<span class="RktVar">obj</span> is a test suite, and false otherwise</div></p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Utilities_for_Defining_Test_Suites&quot;">3.3.2.1<tt>&nbsp;</tt><a name="(part._.Utilities_for_.Defining_.Test_.Suites)"></a>Utilities for Defining Test Suites</h5><p>There are some macros that simplify the common cases of
defining test suites:</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._define-test-suite))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-test-suite%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-test-suite</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> The
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-test-suite%29%29" class="RktStxLink" data-pltdoc="x">define-test-suite</a></span> form creates a test suite with
the given name (converted to a string) and tests, and binds
it to the same name.</div></p><p>For example, this code creates a binding for the name
<span class="RktSym">example-suite</span> as well as creating a test suite with
the name <span class="RktVal">"example-suite"</span>:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-test-suite%29%29" class="RktStxLink" data-pltdoc="x">define-test-suite</a></span><span class="hspace">&nbsp;</span><span class="RktSym">example-suite</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check%29%29" class="RktValLink" data-pltdoc="x">check</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._define/provide-test-suite))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define%2Fprovide-test-suite%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define/provide-test-suite</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"> This
form is just like <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._define-test-suite%29%29" class="RktStxLink" data-pltdoc="x">define-test-suite</a></span>, and in addition
it <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">provide</a></span>s the test suite.</div></p><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Test_Control_Flow&quot;">3.4<tt>&nbsp;</tt><a name="(part._.Test_.Control_.Flow)"></a>Test Control Flow</h4><p>The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._before%29%29" class="RktStxLink" data-pltdoc="x">before</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._after%29%29" class="RktStxLink" data-pltdoc="x">after</a></span>, and <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._around%29%29" class="RktStxLink" data-pltdoc="x">around</a></span>
macros allow you to specify code that is always run before,
after, or around expressions in a test case.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._before))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._before%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">before</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">before-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">expr1</span><span class="hspace">&nbsp;</span><span class="RktVar">expr2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Whenever control enters the scope execute the <span class="RktVar">before-expr</span>
before executing <span class="RktSym">expr-1</span>, and <span class="RktSym">expr-2</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._after))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._after%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">after</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">expr-1</span><span class="hspace">&nbsp;</span><span class="RktVar">expr-2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktVar">after-expr</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Whenever control exits the scope execute the <span class="RktVar">after-expr</span>
after executing <span class="RktVar">expr-1</span>, and <span class="RktVar">expr-2</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span>  The <span class="RktVar">after-expr</span> is
executed even if control exits via an exception or other means.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._around))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._around%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">around</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">before-expr</span><span class="hspace">&nbsp;</span><span class="RktVar">expr-1</span><span class="hspace">&nbsp;</span><span class="RktVar">expr-2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktVar">after-expr</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Whenever control enters the scope execute the
<span class="RktVar">before-expr</span> before executing <span class="RktVar">expr-1</span><span class="stt"> </span><span class="RktVar">expr-2</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span>, and execute <span class="RktVar">after-expr</span> whenever control
leaves the scope.</div></p><p>Example:</p><p>The test below checks that the file <span class="stt">test.dat</span> contains
the string <span class="stt">"foo"</span>.  The before action writes to this
file.  The after action deletes it.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._around%29%29" class="RktStxLink" data-pltdoc="x">around</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=file-ports.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._with-output-to-file%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">with-output-to-file</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"test.dat"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._write%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">write</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"foo"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=file-ports.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._with-input-from-file%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">with-input-from-file</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"test.dat"</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._check-equal~3f%29%29" class="RktValLink" data-pltdoc="x">check-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"foo"</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">read</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Filesystem.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._delete-file%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">delete-file</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"test.dat"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._delay-test))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._delay-test%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">delay-test</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">test1</span><span class="hspace">&nbsp;</span><span class="RktVar">test2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This somewhat curious macro evaluates the given tests in a
context where <span class="RktSym"><a href="internals.html#%28def._%28%28lib._rackunit%2Fmain..rkt%29._current-test-case-around%29%29" class="RktValLink" data-pltdoc="x">current-test-case-around</a></span> is
parameterized to <span class="RktSym"><a href="internals.html#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite-test-case-around%29%29" class="RktValLink" data-pltdoc="x">test-suite-test-case-around</a></span>.  This
has been useful in testing RackUnit.  It might be useful
for you if you create test cases that create test cases.</div></p><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Miscellaneous_Utilities&quot;">3.5<tt>&nbsp;</tt><a name="(part._.Miscellaneous_.Utilities)"></a>Miscellaneous Utilities</h4><p>The <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxLink" data-pltdoc="x">require/expose</a></span> macro allows you to access
bindings that a module does not provide.  It is useful for
testing the private functions of modules.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._rackunit/main..rkt)._require/expose))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">require/expose</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">module</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Requires <span class="RktVar">id</span> from <span class="RktVar">module</span> into the current module.  It
doesn&rsquo;t matter if the source module provides the bindings or not;
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxLink" data-pltdoc="x">require/expose</a></span> can still get at them.</div></p><p>Note that <span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxLink" data-pltdoc="x">require/expose</a></span> can be a bit fragile,
especially when mixed with compiled code.  Use at your own risk!</p><p>This example gets <span class="RktSym">make-failure-test</span>, which is defined in a RackUnit test:</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxLink" data-pltdoc="x">require/expose</a></span><span class="hspace">&nbsp;</span><span class="RktSym">rackunit/private/check-test</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">make-failure-test</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/main..rkt)._dynamic-require/expose))"></a><span title="Provided from: rackunit | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._dynamic-require%2Fexpose%29%29" class="RktValDef RktValLink" data-pltdoc="x">dynamic-require/expose</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">mod</span><span class="hspace">&nbsp;</span><span class="RktVar">name</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">mod</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._resolved-module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">resolved-module-path?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._dynamic-require%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">dynamic-require</a></span>, but gets internal bindings like
<span class="RktSym"><a href="#%28form._%28%28lib._rackunit%2Fmain..rkt%29._require%2Fexpose%29%29" class="RktStxLink" data-pltdoc="x">require/expose</a></span>.</div></p><h4 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;ui&quot;">3.6<tt>&nbsp;</tt><a name="(part._ui)"></a>User Interfaces</h4><p>RackUnit provides a textual and a graphical user interface</p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Textual_User_Interface&quot;">3.6.1<tt>&nbsp;</tt><a name="(part._.Textual_.User_.Interface)"></a><a name="(mod-path._rackunit/text-ui)"></a>Textual User Interface</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._rackunit%2Ftext-ui%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">rackunit/text-ui</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">rackunit-lib</span></span></td></tr></table></p><p>The textual UI is in the <a href="#%28mod-path._rackunit%2Ftext-ui%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">rackunit/text-ui</span></a> module.
It is run via the <span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Ftext-ui..rkt%29._run-tests%29%29" class="RktValLink" data-pltdoc="x">run-tests</a></span> function.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/text-ui..rkt)._run-tests))"></a><span title="Provided from: rackunit/text-ui | Package: rackunit-lib"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Ftext-ui..rkt%29._run-tests%29%29" class="RktValDef RktValLink" data-pltdoc="x">run-tests</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span>[<span class="RktVar">verbosity</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._natural-number%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">natural-number/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="RktValLink" data-pltdoc="x">test-case?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValLink" data-pltdoc="x">test-suite?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">verbosity</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._symbols%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbols</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">quiet</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">normal</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">verbose</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">normal</span></td></tr></table></blockquote></div><div class="SIntrapara">The given <span class="RktVar">test</span> is run and the result of running it
output to the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-output-port%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-output-port</a></span>.  The output is
compatable with the (X)Emacs next-error command (as used,
for example, by (X)Emacs&rsquo;s compile function)</div></p><p>The optional <span class="RktVar">verbosity</span> is one of <span class="RktVal">'</span><span class="RktVal">quiet</span>,
<span class="RktVal">'</span><span class="RktVal">normal</span>, or <span class="RktVal">'</span><span class="RktVal">verbose</span>.  Quiet output
displays only the number of successes, failures, and errors.
Normal reporting suppresses some extraneous check
information (such as the expression).  Verbose reports all
information.</p><p><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Ftext-ui..rkt%29._run-tests%29%29" class="RktValLink" data-pltdoc="x">run-tests</a></span> returns the number of unsuccessful tests.</p><h5 x-source-module="(lib &quot;rackunit/scribblings/rackunit.scrbl&quot;)" x-source-pkg="rackunit-doc" x-part-tag="&quot;Graphical_User_Interface&quot;">3.6.2<tt>&nbsp;</tt><a name="(part._.Graphical_.User_.Interface)"></a><a name="(mod-path._rackunit/gui)"></a>Graphical User Interface</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._rackunit%2Fgui%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">rackunit/gui</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">rackunit-gui</span></span></td></tr></table></p><p>RackUnit also provides a GUI test runner, available from the
<a href="#%28mod-path._rackunit%2Fgui%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">rackunit/gui</span></a> module.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/gui..rkt)._test/gui))"></a><span title="Provided from: rackunit/gui | Package: rackunit-gui"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fgui..rkt%29._test%2Fgui%29%29" class="RktValDef RktValLink" data-pltdoc="x">test/gui</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:wait?</span><span class="hspace">&nbsp;</span><span class="RktVar">wait?</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">test</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="RktValLink" data-pltdoc="x">test-case?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValLink" data-pltdoc="x">test-suite?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">wait?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new RackUnit GUI window and runs each <span class="RktVar">test</span>. The
GUI is updated as tests complete.</div></p><p>When <span class="RktVar">wait?</span> is true, <span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fgui..rkt%29._test%2Fgui%29%29" class="RktValLink" data-pltdoc="x">test/gui</a></span> does not return until
the test runner window has been closed.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._rackunit/gui..rkt)._make-gui-runner))"></a><span title="Provided from: rackunit/gui | Package: rackunit-gui"><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fgui..rkt%29._make-gui-runner%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-gui-runner</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-case~3f%29%29" class="RktValLink" data-pltdoc="x">test-case?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._rackunit%2Fmain..rkt%29._test-suite~3f%29%29" class="RktValLink" data-pltdoc="x">test-suite?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new RackUnit GUI window and returns a procedure that, when
applied, runs the given tests and displays the results in the GUI.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="philosophy.html" title="backward to &quot;2 The Philosophy of RackUnit&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;RackUnit: Unit Testing&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="Testing_Utilities.html" title="forward to &quot;4 Testing Utilities&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>