mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 07:30:33 +03:00
Fix std.algorithm.topN example
This commit is contained in:
parent
b8bdef9c42
commit
09fc88f719
1 changed files with 1 additions and 4 deletions
|
@ -8614,10 +8614,7 @@ unittest
|
||||||
{
|
{
|
||||||
int[] v = [ 25, 7, 9, 2, 0, 5, 21 ];
|
int[] v = [ 25, 7, 9, 2, 0, 5, 21 ];
|
||||||
auto n = 4;
|
auto n = 4;
|
||||||
topN!(less)(v, n);
|
topN!"a < b"(v, n);
|
||||||
assert(v[n] == 9);
|
|
||||||
// Equivalent form:
|
|
||||||
topN!("a < b")(v, n);
|
|
||||||
assert(v[n] == 9);
|
assert(v[n] == 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue