2.cc: Constrain iterations when testing on a simultor.
authorMark Mitchell <mark@codesourcery.com>
Sat, 30 Aug 2008 17:31:22 +0000 (17:31 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sat, 30 Aug 2008 17:31:22 +0000 (17:31 +0000)
* testsuite/25_algorithms/nth_element/2.cc: Constrain iterations
when testing on a simultor.

From-SVN: r139805

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc

index a5073f7..ec3292f 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-29  Mark Mitchell  <mark@codesourcery.com>
+
+       * testsuite/25_algorithms/nth_element/2.cc: Constrain iterations
+       when testing on a simultor.
+
 2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * testsuite/tr1/6_containers/unordered_set/requirements/typedef.cc:
index 84f959a..47084ad 100644 (file)
 
 // 25.3.2 [lib.alg.nth.element]
 
+// { dg-options "-DMAX_SIZE=256" { target simulator } }
+
+#ifndef MAX_SIZE
+#define MAX_SIZE (1 << 10)
+#endif
+
 #include <vector>
 #include <algorithm>
 #include <testsuite_hooks.h>
@@ -64,7 +70,7 @@ do_test01(unsigned size)
 void
 test01()
 {
-  for (unsigned size = 4; size <= 1 << 10; size <<= 1)
+  for (unsigned size = 4; size <= MAX_SIZE; size <<= 1)
     do_test01(size);
 }