<p dir="ltr"><br>
On Oct 30, 2012 12:28 AM, "Neil Toronto" <<a href="mailto:neil.toronto@gmail.com">neil.toronto@gmail.com</a>> wrote:<br>
><br>
> On 10/29/2012 02:41 PM, Sam Tobin-Hochstadt wrote:<br>
>><br>
>> This commit marks a few files that have intermittent failures as<br>
>> randomly failing, and possibly-more-controversially, removes the<br>
>> annotation from some genuinely random tests. These tests, such as the<br>
>> random test for places, consistently succeed.<br>
><br>
><br>
> Does the annotation mean "this test uses randomness" or "this test has a practically nonzero probability of failing"?</p>
<p dir="ltr">The annotation means "if this file fails on a push, don't email the pusher, just the person responsible for the file".</p>
<p dir="ltr">Certainly some of the annotated files don't explicitly use randomness, but nonetheless fail intermittently.</p>
<p dir="ltr">Sam</p>
<p dir="ltr">> Here are a couple of tests that use randomness but always succeed:<br>
><br>
> (check-true ((+ (random) 1.0) . >= . 1.0))<br>
><br>
> (check-true (let loop ()<br>
> (if (zero? (random 10)) #t (loop))))<br>
><br>
> Here's one that's more interesting because its probability of failure is nonzero (about 1/20^19):<br>
><br>
> (check-false (= 0 (+ (random 65536)<br>
> (random 65536)<br>
> (random 65536)<br>
> (random 65536))))<br>
><br>
> Another way to restate my question is, should those tests be marked as random?<br>
><br>
> Neil ⊥<br>
><br>
> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev">http://lists.racket-lang.org/dev</a><br>
</p>