Skip to content
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

Lwt_list: More tests. #392

Merged
merged 3 commits into from
Jun 11, 2017
Merged

Lwt_list: More tests. #392

merged 3 commits into from
Jun 11, 2017

Conversation

ryanslade
Copy link
Contributor

Also formatted the code using ocp-indent and renamed the tests so they
have descriptive names instead of just numbers.

@ryanslade
Copy link
Contributor Author

One other thing, can we translate the comment in test_exception into English?

@Drup
Copy link
Member

Drup commented Jun 11, 2017

Here's the translation

Is this the desired behavior ? 
We might wish for iter and map to pass their parameters in Lwt.apply.
Another solution would be to have two binds, one tail recursive, the other not.

Tbh, I'm not sure this comment has any purpose.

@aantron
Copy link
Collaborator

aantron commented Jun 11, 2017

Thanks!

It seems that comment can be deleted indeed.

Could you split the commit into two, one that does whitespace and renamings, and another that adds the new tests? The reason is that it will make it both easier to review now (not that important, but nice), and also easier to read the history later (more important). For the lines that changed only whitespace, a person reading the blame will see something like "whitespace and renamings" and be able to immediately recognize the commit doesn't change logic, and click past it to the previous blame.

@ryanslade
Copy link
Contributor Author

@aantron I've split the changes into three commits, please take another look.

@aantron aantron merged commit 3679d13 into ocsigen:master Jun 11, 2017
@aantron
Copy link
Collaborator

aantron commented Jun 11, 2017

Great, thank you!

This brings the coverage of Lwt_list up to 100%.

We also probably need to test everything against exceptions raised by f, and check that the _s functions really run f in series, and the _p functions really run it in parallel. After solving #347 (currently being worked on), we should probably also add tests checking that these functions are stack-safe. I'll open a new issue about all of this. I think we can check off the Lwt_list line in #385 :)

@aantron
Copy link
Collaborator

aantron commented Jun 11, 2017

The follow-on is #395. Also, cherry-picked these commits onto working-coverage, which we need until Bisect_ppx is running on the new jbuilder build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants