Age | Commit message (Collapse) | Author |
|
This is a purely cosmetic change just to keep definitions outside the
test cases.
* tests/utils.scm (plist-ref): Move ahead of test-begin.
|
|
* ccwl/conditions.scm (&unrecognized-keyword-assertion,
&invalid-keyword-arity-assertion,
&invalid-positional-arguments-arity-assertion): New conditions.
* ccwl/utils.scm: Import (rnrs conditions), (rnrs exceptions)
and (ccwl conditions).
(group-keyword-arguments): Raise &invalid-keyword-arity-assertion on
error.
(lambda**, syntax-lambda**): Raise &unrecognized-keyword-assertion,
&invalid-keyword-arity-assertion and
&invalid-positional-arguments-arity-assertion on error.
* tests/utils.scm: Import (rnrs conditions), (rnrs exceptions), (srfi
srfi-1) and (ccwl conditions).
("lambda** should raise an &unrecognized-keyword-assertion on
unrecognized keywords in arguments with syntax objects as irritants"):
Check for &unrecognized-keyword-assertion.
("Unrecognized keyword argument passed to lambda** should raise an
&unrecognized-keyword-assertion condition", "Unary lambda** keyword
argument passed multiple arguments should raise an
&invalid-keyword-arity-assertion condition", "Wrong number of
positional arguments to lambda** should raise an
&invalid-positional-arguments-arity-assertion condition",
"syntax-lambda** should raise an &unrecognized-keyword-assertion on
unrecognized keywords in arguments", "Unrecognized keyword argument
passed to syntax-lambda** should raise an
&unrecognized-keyword-assertion condition with syntax objects as
irritants", "Unary syntax-lambda** keyword argument passed multiple
arguments should raise an &invalid-keyword-arity-assertion condition",
"Wrong number of positional arguments to syntax-lambda** should raise
an &invalid-positional-arguments-arity-assertion condition"): New
tests.
|
|
@@ is shorter and looks neater with fewer quotes.
* tests/ccwl.scm ("stdin input should not have inputBinding"),
tests/utils.scm ("unsyntax-keywords"): Use @@ instead of module-ref
and resolve-module.
|
|
* ccwl/utils.scm (lambda**): Support #:allow-other-keys. Update
docstring.
(syntax-lambda**): Update docstring.
* tests/utils.scm ("Allow other keys in lambda**", "Allow other keys
in syntax-lambda**"): New tests.
|
|
* ccwl/utils.scm (lambda**): Error out on invalid keywords (that is,
keywords other than #:key, #:key* and #:allow-other-keys).
* tests/utils.scm ("lambda** should error out on unrecognized keywords
in arguments"): New test.
|
|
* tests/utils.scm: Remove stray syntax-lambda** form.
|
|
I have tripped up several times on the differences between lambda**
and syntax-lambda**. No longer! Making syntax-lambda** as close as
possible to lambda** makes the code much more readable and align
better with common sense.
* ccwl/utils.scm (syntax-lambda**): Do not ignore the first
identifier. Accept multiple values as arguments, not a single syntax
object.
* ccwl/ccwl.scm (command): Update use of syntax-lambda**.
* tests/utils.scm ("syntax-lambda**", "syntax-lambda** with default
values"): Update tests.
|
|
* ccwl/utils.scm (lambda**): Set default value of lambda** n-ary
arguments to the empty list. Document this in the docstring.
* tests/utils.scm ("default value of lambda** unary argument should be
#f", "default value of lambda** n-ary argument should be the empty
list"): New tests.
|
|
* ccwl/utils.scm (syntax-lambda**): Add example to docstring
documenting support for default arguments.
* tests/utils.scm ("syntax-lambda** with default values"): New test.
|
|
* ccwl/utils.scm (lambda**): Support default values for arguments,
both unary and n-ary.
* tests/utils.scm ("lambda** with default values"): New test.
|
|
* tests/utils.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
|