-
Notifications
You must be signed in to change notification settings - Fork 81
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
[Breaking] Change match_raises to be more intuitive #419
Conversation
Current behaviour is unintuitive, let users know how to use the function, and test it
Change the user-defined function to better match the expectation to "match" the expected exception. Fixes mirage#418
The failures are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of introducing a breaking change to fix the API. Users can set the lower-bound.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks for the fix @psafont
Just in case people are waiting on me merging this PR, I can't merge it :) |
Thanks for the fix |
CHANGES: - Add `seq`, a testable for `Seq.t` and `contramap` (mirage/alcotest#412 @xvw) - Expose the `V1.Skip` exception (mirage/alcotest#415, mirage/alcotest#416, @Khady) - BREAKING FIX: `match_raises` now expects the user-defined function to return true for expected exceptions. Previously false was interpreted as an expected exception. (mirage/alcotest#418, mirage/alcotest#419, @psafont)
I don't know whether breaking behaviour is acceptable or not, opening to receive feedback.
I can always drop the commit with the breaking change and keep the one documenting current behaviour, suggestions on how to deal with this is welcome.
Fixes #418