diff options
| author | 2025-11-01 22:29:42 -0400 | |
|---|---|---|
| committer | 2025-11-01 22:29:42 -0400 | |
| commit | 44e4fd1e1f914e5b307435769c8909da8a72aafb (patch) | |
| tree | 0c5e707c836f646229462adb08314ac8988e2d14 /README.md | |
| parent | add expect-to-fail (diff) | |
Big rewrite:
1. Rename to "cuprate".
2. Remove mutexes.
3. Move rewriters to other library.
4. Move the DTO out of the `test-info` parameter. They are now separate
parameters, with the expectation that the DTO will not change over
time. This significantly reduces the complexity of the code.
5. Use SRFI-146 for Chicken.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 58 |
1 files changed, 28 insertions, 30 deletions
@@ -1,8 +1,8 @@ -# Conspire +# Cuprate TODO: pretty printing -Conspire is an experiment in providing a portable R6RS/R7RS testing +Cuprate is an experiment in providing a portable R6RS/R7RS testing library. It uses purely functional data structures in a mutable parameter object, allowing for procedural programming inside of a dynamic extent to not affect the rest of the test system. @@ -11,22 +11,26 @@ to not affect the rest of the test system. ### `test-info` procedures - `test-info` + test-info + test-info? + test-dto -What SRFI-64 would call the "test runner" is in Conspire the `test-info`, -which contains a pure SRFI-225 dictionary with an associated DTO. The +What SRFI-64 would call the "test runner" is in Cuprate the `test-info`, +which contains test-info record containing a pure SRFI-225 dictionary. The dictionary must map at least symbols to values (including procedures). Whenever a test group or a test is entered, a new dynamic extent is entered with a new test-info object. Destructive updates to the new test info are not reflected in the test info of the call. -The `test-info` is a parameter and can be modified with the `parameterize` -form. The inputs to `test-info` must be one of: +When `test-info` is parameterized with a value satisfying `test-info?`, +then that test-info is used in the dynamic extent of the invocation of +`parameterize`. Otherwise, a new record is allocated, and the value passed +to `parameterize` is inserted into that record. This new record does not +share state with any other test-info. -* `copy`: Return an unchanged copy of the `test-info` -* `replace dict [dto]`: In the new dynamic extent, the dictionary is - replaced with `dict`, optionally with new dto `dto`. +The dictionary inside the `test-info` parameter must be a dictionary +according to the DTO in `test-dto`. The value in `test-dto` must be a DTO. test-set! test-update! @@ -47,15 +51,14 @@ is equivalent to `(dict-set! dto dict key value)`. (modify-test-info! proc) -Evaluates `(proc dto dict)`, where `dto` is the current `test-info` DTO -and `dict` is the current `test-info` dict. The procedure must return -a dict satisfying the same DTO. This dictionary is set as the current -`test-info` dictionary within the dynamic extent. +Evaluates `(proc dict)`, where `dict` is the current `test-info` dict. The +procedure must return a dict satisfying the same DTO. This dictionary +is set as the current `test-info` dictionary within the dynamic extent. (inspect-test-info proc) -Evaluates `(proc dto dict)`, where `dto` is the current `test-info` DTO -and `dict` is the current `test-info` dict, and returns the result. +Evaluates `(proc dict)`, where `dict` is the current `test-info` dict, +and returns the result. ### `test-info` Standard Procedure Keys @@ -70,15 +73,15 @@ false, then the test is skipped. A procedure of zero arguments. Called in the dynamic extent of a test. Used to set up parts of a test. - after-test (default-after-test dto dict) + after-test (default-after-test dict) -A procedure of two arguments (the DTO and dictionary of the test). Called +A procedure of one argument (the dictionary of the test). Called in the dynamic extent of the caller. Used to report information about the test, and to merge desired information into the calling test info. - report-test (default-report-test dto dict) + report-test (default-report-test dict) -A procedure of two arguments (the DTO and dictionary of the test). Used by +A procedure of one argument (the dictionary of the test). Used by `default-after-test` to report the result of the test to the user. group-begin (default-group-begin name) @@ -86,11 +89,11 @@ A procedure of two arguments (the DTO and dictionary of the test). Used by A procedure of one argument (the name of the group). Called in the dynamic extent of the group. Used to set up common information for a whole group. - group-end (default-group-end dto dict) + group-end (default-group-end dict) -A procedure of two arguments (the DTO and the dictionary of the -test). Called in the dynamic extent containing the group. Used to report -information about the group and merge it with the containing test info. +A procedure of one (the dictionary of the test). Called in the dynamic +extent containing the group. Used to report information about the group +and merge it with the containing test info. ### `test-info` Standard Keys @@ -181,16 +184,11 @@ This library requires `make-parameter` and `parameterize` to work like in R7RS. Most R6RS implementations should support dynamic parameters out of the box. -Multi-threaded implementations must export an SRFI-18 compatible -interface for mutexes. Single threaded implementations can use the -`compat.single-threaded.sld` (`compat.single-threaded.sls` for R6RS) -implementations. - ## Instructions Per Implementation ### CHICKEN -Just run `chicken-install conspire`. +Just run `chicken-install cuprate`. ### Foment |
