Changeset 38641 in project


Ignore:
Timestamp:
04/24/20 11:59:19 (6 weeks ago)
Author:
juergen
Message:

simple-tests 2.1 docu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/simple-tests

    r38611 r38641  
    55
    66This module exports some macros and procedures which help in debugging
    7 and testing. Most of the code is a straight-forward port of Peter
     7and testing. Two interfaces are supplied.
     8The old interface is a straight-forward port of Peter
    89Seibel's test suite in "Practical Common Lisp" to Chicken Scheme.
    910
     11Notice the special meaning of dots and colons in the documentation.
     12Two dots: Repeat the form to the left zero or one times,
     13three dots: zero or many times
     14four dots: one or many times.
     15Colons to the left of dots group forms: the dots refer to as many forms
     16as are enclosed by colons.
     17
    1018=== Common
    1119
    1220==== simple-tests
    1321
    14 <procedure>(simple-tests [sym])</procedure>
     22<procedure>(simple-tests ..)</procedure>
    1523
    1624documentation-procedure; returns the list of exported symbols if called
     
    5058==== ppp*
    5159
    52 <macro>(ppp* {xpr val} ...)</macro>
     60<macro>(ppp* :xpr val: ...)</macro>
    5361
    5462print each xpr quoted in a headline, and pretty-print xpr's computed as well as
     
    5765==== xpr:val*
    5866
    59 <macro>(xpr:val* {xpr val} ...)</macro>
     67<macro>(xpr:val* :xpr val: ...)</macro>
    6068
    6169alias to ppp*
     
    103111operator, (== x) will do it for you.
    104112
    105 ==== define-checks
    106 
    107 <macro>(define-checks (name? verbose? {arg val} ...) {xpr expected} ...)</macro>
     113==== do-checks
     114
     115<macro>(do-checks (name? verbose? :arg val: ...) :xpr expected: ...)</macro>
    108116
    109117defines a unary predicate, name?, with argument verbose?, which compares
    110 all pairs {xpr expected} and prints a list of failures, if verbose? is
     118all pairs :xpr expected: and prints a list of failures, if verbose? is
    111119#t or not given.  Otherwise simply returns #t or #f, depending on the
    112120comparison of the pairs' items.
     
    116124
    117125Comparison is done by the generic procedure ==.
    118 {arg val} ... is translated into a let,  supplying values to be used in test pairs.
    119 
     126Each :arg val: pair is translated into a let,  supplying values to be used in test pairs.
     127
     128==== define-checks
     129
     130<macro>(define-checks (name? verbose? :arg val: ...) :xpr expected: ...)</macro>
     131
     132alias to do-checks
    120133
    121134==== check-all
     
    166179== Last update
    167180
    168 Mar 17, 2020
     181Apr 24, 2020
    169182
    170183== Author
     
    205218== Version History
    206219
     220; 2.1 : do-checks as an alias to define-checks added
    207221; 2.0.3 : bugfix: protect state changing functions
    208222; 2.0.1 : test-predicates without verbose? argument are verbose by default
Note: See TracChangeset for help on using the changeset viewer.