mirror of
https://github.com/dlang/phobos.git
synced 2025-05-04 00:54:05 +03:00
Removed an unittest of minimallyInitializedArray that can fail randomly
This commit is contained in:
parent
67cc14806d
commit
84fe94c00e
1 changed files with 6 additions and 2 deletions
|
@ -708,8 +708,12 @@ if (isDynamicArray!T && allSatisfy!(isIntegral, I))
|
||||||
|
|
||||||
auto arr = minimallyInitializedArray!(int[])(42);
|
auto arr = minimallyInitializedArray!(int[])(42);
|
||||||
assert(arr.length == 42);
|
assert(arr.length == 42);
|
||||||
// Elements aren't necessarily initialized to 0
|
|
||||||
assert(!arr.equal(0.repeat(42)));
|
// Elements aren't necessarily initialized to 0, so don't do this:
|
||||||
|
// assert(arr.equal(0.repeat(42)));
|
||||||
|
// If that is needed, initialize the array normally instead:
|
||||||
|
auto arr2 = new int[42];
|
||||||
|
assert(arr2.equal(0.repeat(42)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@safe pure nothrow unittest
|
@safe pure nothrow unittest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue