mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Add unittests bug #12889
This commit is contained in:
parent
285d027677
commit
6ff3378c79
2 changed files with 22 additions and 0 deletions
|
@ -8726,6 +8726,19 @@ unittest
|
|||
auto arr = [1,2,3];
|
||||
arr = arr.remove!(SwapStrategy.unstable)(2);
|
||||
assert(arr == [1,2]);
|
||||
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
// Bug# 12889
|
||||
int[1][] arr = [[0], [1], [2], [3], [4], [5], [6]];
|
||||
auto orig = arr.dup;
|
||||
foreach (i; iota(arr.length))
|
||||
{
|
||||
assert(orig == arr.remove!(SwapStrategy.unstable)(tuple(i,i)));
|
||||
assert(orig == arr.remove!(SwapStrategy.stable)(tuple(i,i)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue