mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Add more tests to cover the optimized {min,max}Element
This commit is contained in:
parent
64204177e5
commit
d30fa6728e
1 changed files with 2 additions and 0 deletions
|
@ -3435,6 +3435,7 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
DummyType d;
|
||||
assert(d.minElement == 1);
|
||||
assert(d.minElement!(a => a) == 1);
|
||||
assert(d.minElement!(a => -a) == 10);
|
||||
}
|
||||
|
||||
// with empty, but seeded ranges
|
||||
|
@ -3537,6 +3538,7 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
DummyType d;
|
||||
assert(d.maxElement == 10);
|
||||
assert(d.maxElement!(a => a) == 10);
|
||||
assert(d.maxElement!(a => -a) == 1);
|
||||
}
|
||||
|
||||
// with empty, but seeded ranges
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue