mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 11:07:39 +03:00
Add back the entropy following dmd bug fix
This commit is contained in:
parent
d5e2b607d7
commit
a9b7fb0313
1 changed files with 8 additions and 0 deletions
|
@ -2813,6 +2813,10 @@ schwartzSort(alias transform, alias less = "a < b",
|
|||
arr[2] = highEnt;
|
||||
|
||||
schwartzSort!(entropy, q{a > b})(arr);
|
||||
|
||||
assert(arr[0] == highEnt);
|
||||
assert(arr[1] == midEnt);
|
||||
assert(arr[2] == lowEnt);
|
||||
assert(isSorted!("a > b")(map!(entropy)(arr)));
|
||||
}
|
||||
|
||||
|
@ -2843,6 +2847,10 @@ schwartzSort(alias transform, alias less = "a < b",
|
|||
arr[2] = highEnt;
|
||||
|
||||
schwartzSort!(entropy, q{a < b})(arr);
|
||||
|
||||
assert(arr[0] == lowEnt);
|
||||
assert(arr[1] == midEnt);
|
||||
assert(arr[2] == highEnt);
|
||||
assert(isSorted!("a < b")(map!(entropy)(arr)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue