mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 07:00:37 +03:00
add test for Issue 16413
This commit is contained in:
parent
9abe256cab
commit
7c7af21d48
1 changed files with 8 additions and 0 deletions
|
@ -999,6 +999,14 @@ private void multiSortImpl(Range, SwapStrategy ss, funs...)(Range r)
|
|||
assert(arr == [[1, 0], [1, 1], [1, 2], [2, 0]]);
|
||||
}
|
||||
|
||||
unittest //Issue 16413 - @system comparison function
|
||||
{
|
||||
bool lt(int a, int b) { return a < b; } static @system
|
||||
auto a = [2, 1];
|
||||
a.multiSort!(lt, lt);
|
||||
assert(a == [1, 2]);
|
||||
}
|
||||
|
||||
private size_t getPivot(alias less, Range)(Range r)
|
||||
{
|
||||
import std.algorithm.mutation : swapAt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue