On Mon, 24 May 2021 16:35:08 GMT, Paul Sandoz <psan...@openjdk.org> wrote:
>> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Test: formatting; tests for empty spliterator > > Changes look good. > > Testing wise we have the combo test `SpliteratorTraversingAndSplittingTest` > that includes a case that tests a Spliterator produced via Spliterator -> > Iterator -> Spliterator, and operations on that under various actions. GIven > that case do you still think we require explicit tests? @PaulSandoz thanks for review! As for `SpliteratorTraversingAndSplittingTest`, I commented in the issue description above: > Test-wise, some scenarios are already covered by > SpliteratorTraversingAndSplittingTest. However, the resulting iterator is > always wrapped into `Spliterators::spliterator`, so usage scenarios are > somewhat limited. In particular, calling `hasNext` (without `next`) before > `forEachRemaining` was not covered there. I added more tests in > `IteratorFromSpliteratorTest` to cover these scenarios. I checked that > removing `valueReady = false;` or `action.accept(t);` lines from newly > implemented `forEachRemaining` method causes new tests to fail (but old tests > don't fail due to this). In short, it doesn't pass manual mutation testing. New tests are capable to catch more possible regressions. ------------- PR: https://git.openjdk.java.net/jdk/pull/4124