Changeset 39295 in project


Ignore:
Timestamp:
11/17/20 19:28:56 (8 days ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [84.186.38.17]: removed leading spaces of itemization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/srfi-78

    r39258 r39295  
    5151Neil Van Dyke's Testeez library [3] is very close in spirit to this SRFI. In Testeez, tests are disabled by (re-)defining a macro. The advantage of this method is that the code for the test cases can be removed entirely, and hence even the dependency on the Testeez library. This SRFI on the other hand, uses a Scheme conditional ({{COND}}, {{IF}}) to prevent execution of the testing code. This method is more dynamic but retains dead testing code, unless a compiler and a module system are used to apply constant folding and dead code elimination. The only major addition in SRFI over Testeez is the comprehension for formulating parametric tests.
    5252==== Design considerations for this SRFI include the following:
    53  * Reporting is human-readable and as specific as possible, i.e. not just "assertion failed" but the expression with actual and expected value, and if possibly the relevant part of the bindings environment.
    54  * An effort is made to print closed Scheme expressions, i.e. expressions that can directly be copy/pasted into a REPL for further analysis (e.g. the let expression in the abstract).
    55  * By default the checks report both correct and failed checks. However, it is possible to reduce the output---or even to switch off the execution of checks. It has turned out useful to be able to run only some subset checks for the features currently under development. This can be done by changing the reporting mode between differnt sections.
    56  * The global state (correct/failed count) is not made available to the user program. This reduces the dependencies between different checks because it is not possible to use the state.
    57  * Occasionally, it is useful to check that a certain expression does *not* yield an ordinary result but raises an error. However, R5RS [4] does not specify the mechanism by which this occurs (e.g. raising exception, breaking into a REPL, aborting the program, etc.). For this reason, this SRFI is restricted to the case that the checked expressions evaluate normally.
    58  * Though usually I am very much in favor of strictly prefix syntax, for this SRFI I make an exception because the infix "=>" syntax is widely used and intuitive.
     53* Reporting is human-readable and as specific as possible, i.e. not just "assertion failed" but the expression with actual and expected value, and if possibly the relevant part of the bindings environment.
     54* An effort is made to print closed Scheme expressions, i.e. expressions that can directly be copy/pasted into a REPL for further analysis (e.g. the let expression in the abstract).
     55* By default the checks report both correct and failed checks. However, it is possible to reduce the output---or even to switch off the execution of checks. It has turned out useful to be able to run only some subset checks for the features currently under development. This can be done by changing the reporting mode between differnt sections.
     56* The global state (correct/failed count) is not made available to the user program. This reduces the dependencies between different checks because it is not possible to use the state.
     57* Occasionally, it is useful to check that a certain expression does *not* yield an ordinary result but raises an error. However, R5RS [4] does not specify the mechanism by which this occurs (e.g. raising exception, breaking into a REPL, aborting the program, etc.). For this reason, this SRFI is restricted to the case that the checked expressions evaluate normally.
     58* Though usually I am very much in favor of strictly prefix syntax, for this SRFI I make an exception because the infix "=>" syntax is widely used and intuitive.
    5959=== Specification
    6060==== check
Note: See TracChangeset for help on using the changeset viewer.