&gt; <span style="font-family:arial,sans-serif;font-size:13px">Yeah, that is very nice! (It should begin with &quot;check&quot; not &quot;test&quot; tho, right?)</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Indeed; Jonah was writing w.r.t plai, which uses test.  Should use check- in rackunit.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I noticed that this also violates, from the rackunit docs:</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">&quot;</span><span style="color:rgb(0,0,0);font-family:serif;font-size:medium;text-align:left">Although checks are implemented as macros, which is necessary to grab source location, they are conceptually functions. This means, for instance, checks always evaluate their arguments.&quot;</span></div>
<div><span style="color:rgb(0,0,0);font-family:serif;font-size:medium;text-align:left"><br></span></div><div style="text-align:left">I suppose this should go in a separate section of &quot;additional checks&quot; or some such?</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 8:01 PM, Robby Findler <span dir="ltr">&lt;<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, that is very nice! (It should begin with &quot;check&quot; not &quot;test&quot; tho, right?)<span class="HOEnZb"><font color="#888888"><div>
<br></div></font></span><div><span class="HOEnZb"><font color="#888888">Robby</font></span><div><div class="h5"><br><br>On Monday, November 19, 2012, Matthias Felleisen  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
That is cute. Why don&#39;t you just create a pull request and Ryan can integrate it into rackunit? -- Matthias<br>
<br>
<br>
<br>
<br>
<br>
On Nov 19, 2012, at 4:22 PM, Joe Gibbs Politz wrote:<br>
<br>
&gt; A small suggestion:<br>
&gt;<br>
&gt; I used roughly this macro (credit Jonah Kagan) recently to help me write some tests for parsing code that agnostic to which source position is generated in the parse:<br>
&gt;<br>
&gt; (define-syntax test/match<br>
&gt;   (syntax-rules ()<br>
&gt;     [(test/match actual expected pred)<br>
&gt;      (let ([actual-val actual])<br>
&gt;        (with-check-info* (list (make-check-actual actual-val)<br>
&gt;                                (make-check-expected &#39;expected))<br>
&gt;                          (thunk (check-true (match actual-val<br>
&gt;                                                 [expected pred]<br>
&gt;                                                 [_ false])))))]<br>
&gt;<br>
&gt;     [(test/match actual expected)<br>
&gt;      (test/match actual expected true)]))<br>
&gt;<br>
&gt; Shriram remarked that he was surprised some sort of check-match wasn&#39;t in rackunit already.  Is it worth adding something like this?<br>
&gt;<br>
&gt; I&#39;m doing things like:<br>
&gt;<br>
&gt; (test/match (parse &quot;5 &#39;foo&#39;&quot;) (s-block _ (list (s-num _ 5) (s-str _ &quot;foo&quot;))))<br>
&gt;<br>
&gt; Where the structs s-block, s-num, and s-str all expect a srcloc as their first argument, but I don&#39;t care about it for these tests.<br>
&gt;<br>
&gt; The actual use is at:<br>
&gt;<br>
&gt; <a href="https://github.com/brownplt/pyret-lang/blob/master/src/tests/parse-tests.rkt#L36" target="_blank">https://github.com/brownplt/pyret-lang/blob/master/src/tests/parse-tests.rkt#L36</a><br>
&gt;<br>
&gt; That file would be much, much uglier without this macro.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Joe P.<br>
&gt;<br>
&gt; _________________________<br>
&gt;  Racket Developers list:<br>
&gt;  <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
<br>
</blockquote></div></div></div>
</blockquote></div><br></div>