-
Notifications
You must be signed in to change notification settings - Fork 35
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
Improve test suite #38
Comments
It is possible to generet a code coverage report with |
SWEET! That's super useful @zuiderkwast! For posterity I just want to say that the coverage report can be found in |
How do I know what tests need to be written? It's tricky to look at the coverage report and figure out what will cause flow to reach each branch. Is it a better idea to pick a big corpus of code and type check that and then minimize each failing case? |
I think it should be pretty strait-forward to come up with a test case for most of the uncovered lines. Most functions are helper functions for either the subtyping relation, for type_check_expr (type inference/propagation) or for type_check_expr_in (typechecking against a known type). Basically every erlang expression can exist in a context where we expect a certain type (e.g. a function with a spec) and in a context where we don't. If some code is really hard to understand why it is there, perhaps it shouldn't be there or it needs some renaming or explanation in comments. Post a comment on any part of the code and I'll be happy to try to answer. |
|
I think there are plain text cover files generated under |
We have a reasonably good test suite with a lot of unit tests and a few test programs. It's very helpful and I use it all the time. But sadly, there are many cases that are not covered by the test suite. We can make it even more helpful! It'd be wonderful if people wanted to help out with this. It's also a very easy way to help out this project. I'm happy to assist anyone who wants to make a contribution.
The text was updated successfully, but these errors were encountered: