-
-
Notifications
You must be signed in to change notification settings - Fork 390
Avoid expectFail
in the test suite
#4130
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
Comments
Most of the |
I think |
I updated a few tests in #4402 for discussion. Is this basically what you were imagining? |
Yes, that's basically what I am imagining, thanks! Do you think that would make sense? |
I like the idea of correctly typing both possibilities. Say,
EDIT: My other thought is to use something at the type level to make it a bit easier to read, eg:
|
This looks nice to me! |
Which one? |
Both look good to me, the second proposal sounds better, and I'd be curious what the tests look like in practice with this change. |
I've updated most of the tests. I'm not really sure what to do with the golden tests, so I left those alone. Otherwise, they all make use of a simple GADT that's meant to distinguish between current and ideal behaviors. |
Thanks, closed by #4402 |
expectFail
interprets a test failure for any reason as a success. But since we don't check why exactly the test is failing, we lose valuable information.Thus, many of the tests that use
expectFail
are likely not really testing what they are supposed to be.In my opinion, we should replace all occurrences of
expectFail
with an assertion that shows what is failing precisely, or delete/ignore the respective test case.The text was updated successfully, but these errors were encountered: