mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Added unittest related to fix, and moved unittest related to issue to std/algorithm/iterartion.d
This commit is contained in:
parent
41959deae6
commit
d2b8a15e69
2 changed files with 19 additions and 7 deletions
|
@ -771,6 +771,23 @@ private struct MapResult(alias fun, Range)
|
|||
assert(dd.length == 4);
|
||||
}
|
||||
|
||||
// Verify fix for: https://issues.dlang.org/show_bug.cgi?id=16034
|
||||
@safe unittest
|
||||
{
|
||||
struct One
|
||||
{
|
||||
int entry = 1;
|
||||
@disable this(this);
|
||||
}
|
||||
|
||||
One[] ones = [One(), One()];
|
||||
|
||||
import std.algorithm.comparison : equal;
|
||||
|
||||
assert(ones.map!`a.entry + 1`.equal([2, 2]));
|
||||
}
|
||||
|
||||
|
||||
@safe unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue