Re: [racket-users] unit testing syntax errors

2016-10-24 Thread Ryan Culpepper
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

Re: [racket-users] unit testing syntax errors

2016-10-24 Thread Alexis King
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]:

[racket-users] unit testing syntax errors

2016-10-24 Thread Dan Liebgold
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