Skip to content

Commit

Permalink
add test for Issue 16413
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Colvin committed Aug 27, 2016
1 parent 9abe256 commit 7c7af21
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions std/algorithm/sorting.d
Expand Up @@ -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;
Expand Down

0 comments on commit 7c7af21

Please sign in to comment.