jOOQ / jOOL

jOOλ - The Missing Parts in Java 8 jOOλ improves the JDK libraries in areas where the Expert Group's focus was elsewhere. It adds tuple support, function support, and a lot of additional functionality around sequential Streams. The JDK 8's main efforts (default methods, lambdas, and the Stream API) were focused around maintaining backwards compatibility and implementing a functional API for parallelism.
http://www.jooq.org/products
Apache License 2.0
2.09k stars 168 forks source link

Added SeqTest.verifyIteratorValidity() method #310

Closed tlinkowski closed 7 years ago

tlinkowski commented 7 years ago

I propose a new private method in SeqTest:

void verifyIteratorValidity(int expectedCount, Seq<T> source, Function<Seq<T>, Seq<?>> operation)

This method verifies whether our non-terminal Seq operations (e.g. limitWhile, partition, splitAt) behave as expected, i.e.:

Using this method I detected two defects: #308 and #309.

lukaseder commented 7 years ago

A late thank you very much for this suggestion. I agree with these tests, very useful.

lukaseder commented 7 years ago

Again, I really like this utility. It will help us validate the laziness of a lot of future features... Thanks again!