Skip to content

Commit

Permalink
CharSpliteratorTest: test is fixed
Browse files Browse the repository at this point in the history
It was able to produce empty string for testing (with random seed
6256759380414315431L). Such case is handled specially in StreamEx.split,
but CharSpliterator produces result different from String.split, so it
should not be checked here
  • Loading branch information
amaembo committed Aug 18, 2016
1 parent b02c303 commit 22b13eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/java/one/util/streamex/CharSpliteratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void testSpliterator() {
String[] inputs = { ",", "abcd,e,f,gh,,,i,j,kl,,,,,,", ",", "abcdasdfgsdfgsdfgsdfgsdfgsdgdfsgs",
"abcdasdfgsdfgsdfgsdfgsdfgsdgdfsgs,", "abcdasdfgs,dfgsdfgsdfgsdfgsdgdfsgs",
"abcd,e,f,gh,,,i,j,kl,,,,,,x", "abcd,e,f,gh,,,i,j,kl,,,,,,x,",
IntStreamEx.of(r, 0, 3).limit(r.nextInt(1000)).elements(new int[] { ',', 'a', 'b' }).charsToString() };
IntStreamEx.of(r, 0, 3).limit(r.nextInt(1000)+1).elements(new int[] { ',', 'a', 'b' }).charsToString() };
for (String input : inputs) {
checkSpliterator(input, Arrays.asList(input.split(",")), () -> new CharSpliterator(input, ',', true));
checkSpliterator(input, Arrays.asList(input.split(",", -1)), () -> new CharSpliterator(input, ',', false));
Expand Down

0 comments on commit 22b13eb

Please sign in to comment.