-
Notifications
You must be signed in to change notification settings - Fork 27
Add tests for when-let
#808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a099d18 to
d5aaa84
Compare
|
This is how (assert-args
(vector? bindings) "a vector for its binding"
(= 2 (count bindings)) "exactly 2 forms in binding vector") |
Yeah, I think this makes sense. It is on the macro to validate its own inputs, so we can test that logic. |
Tests are based on the tests for when-first.
d5aaa84 to
ff07bf0
Compare
ff07bf0 to
9f0091b
Compare
|
It turned out clunkier than I expected, as the exception is thrown during compilation and can't be caught. I also couldn't test for a very specific exception, as I think that could vary by implementation. |
|
Hmm, looks like that doesn't work for ClojureScript. |
|
CLJS does weird stuff with macros. We could just disable that test for CLJS using a reader conditional. |
|
Yeah I'd second the suggestion to just not test |
Tests are based on the tests for
when-first.