Re: [racket-users] How to make unit test for error "unbound identifier"?

2017-04-25 Thread Alexis King
You can use convert-syntax-error from syntax/macro-testing to convert the syntax error to a runtime error, which can be caught by RackUnit: http://docs.racket-lang.org/syntax/macro-testing.html#%28form._%28%28lib._syntax%2Fmacro-testing..rkt%29._convert-syntax-error%29%29 Alexis > On Apr 25, 201

[racket-users] How to make unit test for error "unbound identifier"?

2017-04-25 Thread Jinzhou Zhang
Hi there, I am writing a simple macro `if-let` that tried to bind the condition to a variable. ``` (define-simple-macro (if-let (~describe "binding pairs" [binding:expr value:expr]) (~describe "\"then\" clause" then:expr) (~describe "\"e