Add unittests bug #12889

This commit is contained in:
safety0ff 2014-06-16 19:42:30 -04:00
parent 285d027677
commit 6ff3378c79
2 changed files with 22 additions and 0 deletions

View file

@ -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)));
}
}
/**