Take a look at convert-compile-time-error and convert-syntax-error from syntax/macro-testing[1], which make it possible to defer syntax errors to runtime. The docs include examples for using them with rackunit’s check-exn form to make assertions about syntax errors.
[1]: http://docs.racket-lang.org/syntax/macro-testing.html > On Oct 24, 2016, at 3:15 PM, Dan Liebgold <dan_liebg...@naughtydog.com> 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.