20_riemann_zeta/check_value_neg.c (MAX_ITERATIONS): Add limit when target is simulator.
authorJesper Nilsson <jesper.nilsson@axis.com>
Fri, 12 Oct 2007 10:23:55 +0000 (10:23 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 12 Oct 2007 10:23:55 +0000 (10:23 +0000)
2007-10-12  Jesper Nilsson  <jesper.nilsson@axis.com>

       * testsuite/tr1/5_numerical_facilities/special_functions/
       20_riemann_zeta/check_value_neg.c (MAX_ITERATIONS): Add limit
       when target is simulator.
       * testsuite/tr1/5_numerical_facilities/special_functions/
       20_riemann_zeta/check_value_pos.c (MAX_ITERATIONS): Likewise.

From-SVN: r129258

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc
libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc

index 56414255cc72e98c3889f07ee85c2d9958f2da33..6f175345ebc31c8b50187f0c4195bdc31425cd95 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-12  Jesper Nilsson  <jesper.nilsson@axis.com>
+
+       * testsuite/tr1/5_numerical_facilities/special_functions/
+       20_riemann_zeta/check_value_neg.c (MAX_ITERATIONS): Add limit
+       when target is simulator.
+       * testsuite/tr1/5_numerical_facilities/special_functions/
+       20_riemann_zeta/check_value_pos.c (MAX_ITERATIONS): Likewise.
+
 2007-10-11  Roger Sayle  <roger@eyesopen.com>
 
        * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EOVERFLOW for Tru64.
index 2a86846ea4ae6d69fac39eab79b34209a21e06a0..ac80c334d31c11cf92fb99169d14c5131c6975f8 100644 (file)
 
 //  riemann_zeta
 
+// This can take long on simulators, timing out the test.
+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } }
+
+#ifndef MAX_ITERATIONS
+#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>))
+#endif
 
 //  Compare against values generated by the GNU Scientific Library.
 //  The GSL can be found on the web: http://www.gnu.org/software/gsl/
@@ -106,8 +112,7 @@ void test001()
   const Tp eps = std::numeric_limits<Tp>::epsilon();
   Tp max_abs_diff = -Tp(1);
   Tp max_abs_frac = -Tp(1);
-  unsigned int num_datum = sizeof(data001)
-                         / sizeof(testcase_riemann_zeta<double>);
+  unsigned int num_datum = MAX_ITERATIONS;
   for (unsigned int i = 0; i < num_datum; ++i)
     {
       const Tp f = std::tr1::riemann_zeta(Tp(data001[i].x));
index 3188c334f5bf50c3a089008dcbb2a4526f614a69..e5d8758ec4d6fbed3c6e0b7d751eb606b58b1a82 100644 (file)
 
 //  riemann_zeta
 
+// This can take long on simulators, timing out the test.
+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } }
+
+#ifndef MAX_ITERATIONS
+#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>))
+#endif
 
 //  Compare against values generated by the GNU Scientific Library.
 //  The GSL can be found on the web: http://www.gnu.org/software/gsl/
@@ -196,8 +202,7 @@ void test001()
   const Tp eps = std::numeric_limits<Tp>::epsilon();
   Tp max_abs_diff = -Tp(1);
   Tp max_abs_frac = -Tp(1);
-  unsigned int num_datum = sizeof(data001)
-                         / sizeof(testcase_riemann_zeta<double>);
+  unsigned int num_datum = MAX_ITERATIONS;
   for (unsigned int i = 0; i < num_datum; ++i)
     {
       const Tp f = std::tr1::riemann_zeta(Tp(data001[i].x));