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

additional tests for take/drop iterators #12029

Merged
merged 2 commits into from
Mar 17, 2018
Merged

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Jul 6, 2015

This adds a length method for the Take and Drop iterators. I also added a check that the specified length is nonnegative, and a couple of corresponding tests in the test suite.

Note that #12009 is implicated by the added length method, if the underlying iterator is missing length.

@mschauer
Copy link
Contributor

With the typealias InfiniteIterator Union{Cycle,Repeated,Count} of #13276 we could special-case the length of takes of infinite iterators here as well in the meanwhile.

@ararslan
Copy link
Member

Still relevant? We have length methods for these now, but the argument validation still seems worthwhile.

@stevengj
Copy link
Member Author

Updated it with just the argument checks and tests.

@stevengj stevengj changed the title add length method and additional tests for take/drop iterators additional tests for take/drop iterators Mar 16, 2018
@ararslan
Copy link
Member

Windows failure is a timeout, macOS failure is #26499.

@ararslan ararslan merged commit 7dfa6ec into JuliaLang:master Mar 17, 2018
@stevengj stevengj deleted the takelength branch March 17, 2018 13:56
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.

4 participants