See `convert-compile-time-error` and `convert-syntax-error` from the
`syntax/macro-testing` library. I should fix the docs to say that the
type of the exception can change, so they work best for testing the
contents of the exception message.
For examples, there are tests for invalid uses of syntax-parse itself
(rather than invalid uses of macros defined using syntax-parse) in
pkgs/racket-test/test/stxparse/test-errors.rkt, using the `tcerr` macro
defined in setup.rkt in the same directory.
Ryan
On 10/24/2016 06:15 PM, Dan Liebgold wrote:
Hi -
Could someone point me to an example of using a test submodule and
rackunit to verify a correctly raised syntax-error in the syntax
phase?
Here's an example of the kind of code I have:
http://pasterack.org/pastes/82067
(Uncomment the last expression in the test submodule to see the
exception I'd like to test. The test is runtime, but the exception is
raised at syntax time, so it doesn't work... I see a way to fix
this, but it seems complicated? Maybe there's a simple example...)
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.