mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Fix std.algorithm.splitter example
This commit is contained in:
parent
209819fae3
commit
6d1799c37b
1 changed files with 1 additions and 3 deletions
|
@ -2383,10 +2383,8 @@ unittest
|
|||
{
|
||||
assert(equal(splitter("hello world", ' '), [ "hello", "", "world" ]));
|
||||
int[] a = [ 1, 2, 0, 0, 3, 0, 4, 5, 0 ];
|
||||
int[][] w = [ [1, 2], [], [3], [4, 5] ];
|
||||
int[][] w = [ [1, 2], [], [3], [4, 5], [] ];
|
||||
assert(equal(splitter(a, 0), w));
|
||||
a = null;
|
||||
assert(equal(splitter(a, 0), [ (int[]).init ]));
|
||||
a = [ 0 ];
|
||||
assert(equal(splitter(a, 0), [ (int[]).init, (int[]).init ]));
|
||||
a = [ 0, 1 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue