Changeset 25388 in project


Ignore:
Timestamp:
10/19/11 22:26:44 (9 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [129.174.190.17]:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/cluckcheck

    r25387 r25388  
    3535Generate a random boolean.
    3636
    37         > (use (prefix cluckcheck cluckcheck:))
    3837        > (cluckcheck:gen-bool)
    3938        #t
     
    4342Generate a random character.
    4443
    45         > (use (prefix cluckcheck cluckcheck:))
    4644        > (cluckcheck:gen-char)
    4745        #\g
     
    5149Generate a random list populated by gen.
    5250
    53         > (use (prefix cluckcheck cluckcheck:))
    5451        > (cluckcheck:gen-list cluckcheck:gen-int)
    5552        (103 24 45 253 227 28 92 45 235 193 212 27 9 195 224 228 103 255)
     
    6158Generate a random string. gen-string is a wrapper around (gen-list gen-char).
    6259
    63         > (use (prefix cluckcheck cluckcheck:))
    6460        > (cluckcheck:gen-string)
    6561        "\x05&o@\by\x00J &\x00\v\x1691\x05\x19\x14z\r<VxU\x1b\x06~(wE\x05\x03LB&T\x1fLl-\x15\x06"
     
    6965Tests a property function with values generated by the generator functions. If the property returns false, testing halts and the offending input values are printed to the screen.
    7066
    71         > (use (prefix cluckcheck cluckcheck:))
    7267        > (define (is-even n)
    7368                (= 0 (modulo n 2)))
Note: See TracChangeset for help on using the changeset viewer.