-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow more test operators (<=, <, etc.) #24
Comments
This is basically what
or the like (perhaps with a different name for If there's any interest in this, I'd be happy to write the code. Then again, it might of course well be that @zachallaun woud want to write it himself—or to avoid adding this, for that matter. Perhaps a separate |
For now, I guess adding some simple matchers what are basically currying (using lambdas) won't clutter up your test code that much. For example, I currently have the following early on in a test file:
I then use |
the |
@ssfrr As I've been refactoring/playing with the code, I've kinda got into the helper idea. At first iI was really not into it. I'm going to add in more helpers like I feel like if you do add new operators though,
looks a bit odd because one of those things is not like the other... The nifty function right-hand-side thing would be odd if we allowed |
Currently the only allowable operator in a
@fact
is=>
. I have quite a few tests that do other boolean tests (e.g. check that@allocated
is less than N bytes). Right now I defined a function "lessthan" that's a FactCheck-compatible test, but it's pretty verbose.What I'd like is for the
@fact
macro to also handle other top-level boolean operators like<=
,<
, etc? Then I could just do:Are there any fundamental architecture issues that make this a bad idea?
The text was updated successfully, but these errors were encountered: