From ef259db8d2d724ebc86eaa61d663e1d0e878bd7c Mon Sep 17 00:00:00 2001 From: "H. S. Teoh" Date: Wed, 6 Feb 2013 16:30:18 -0800 Subject: [PATCH] Disable unittest that eats too much memory. --- std/algorithm.d | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/std/algorithm.d b/std/algorithm.d index 8f4684f85..6d534b687 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -11489,15 +11489,24 @@ unittest { auto N = sequence!"n"(0); auto N3 = cartesianProduct(N, N, N); - auto N4 = cartesianProduct(N, N, N, N); // Check that tuples are properly denested assert(is(ElementType!(typeof(N3)) == Tuple!(size_t,size_t,size_t))); - assert(is(ElementType!(typeof(N4)) == Tuple!(size_t,size_t,size_t,size_t))); assert(canFind(N3, tuple(0, 27, 7))); assert(canFind(N3, tuple(50, 23, 71))); assert(canFind(N3, tuple(9, 3, 0))); +} + +version(none) +// This unittest causes `make -f posix.mak unittest` to run out of memory. Why? +unittest +{ + auto N = sequence!"n"(0); + auto N4 = cartesianProduct(N, N, N, N); + + // Check that tuples are properly denested + assert(is(ElementType!(typeof(N4)) == Tuple!(size_t,size_t,size_t,size_t))); assert(canFind(N4, tuple(1, 2, 3, 4))); assert(canFind(N4, tuple(4, 3, 2, 1)));