From 84fe94c00e46b022bbab0e4ff2af6adf12b02e67 Mon Sep 17 00:00:00 2001 From: dukc Date: Mon, 29 Oct 2018 10:22:55 +0200 Subject: [PATCH] Removed an unittest of minimallyInitializedArray that can fail randomly --- std/array.d | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/std/array.d b/std/array.d index 637b64a1a..2ffb0ba09 100644 --- a/std/array.d +++ b/std/array.d @@ -708,8 +708,12 @@ if (isDynamicArray!T && allSatisfy!(isIntegral, I)) auto arr = minimallyInitializedArray!(int[])(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