15 Macro Testing
(require syntax/macro-testing) | package: base |
syntax
(phase1-eval ct-expr maybe-quote maybe-catch?)
maybe-quote =
| #:quote quote-id maybe-catch? =
| #:catch? catch?
If catch? is #t, then if the evaluation of ct-expr raises a compile-time exception, it is caught and converted to a run-time exception.
Examples: | |||||||||
|
Added in version 6.3 of package base.
syntax
(convert-compile-time-error expr)
Use convert-compile-time-error to write tests for compile-time error checking like syntax errors:
Examples: | |||||||||||||||||||||||
|
Without the use of convert-compile-time-error, the checks above would not be executed because the test program would not compile.
Added in version 6.3 of package base.
syntax
(convert-syntax-error expr)
Example: | |||||
|
Added in version 6.3 of package base.