This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-668-g8cfa635


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  8cfa635ab822caf5a441eaf33ac9a8e73a14029f (commit)
      from  0175558aa0a16a647ee368898a83a7d42e2011e8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cfa635ab822caf5a441eaf33ac9a8e73a14029f

commit 8cfa635ab822caf5a441eaf33ac9a8e73a14029f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue May 14 20:36:03 2013 +0000

    Convert TEST_ffI_f1 tests from code to data.

diff --git a/ChangeLog b/ChangeLog
index 6699cfb..209b797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-05-14  Joseph Myers  <joseph@codesourcery.com>
 
+	* math/libm-test.inc (test_ffI_f1_data): New type.
+	(RUN_TEST_LOOP_ffI_f1): New macro.
+	(remquo_test_data): New variable.
+	(remquo_test): Run tests with RUN_TEST_LOOP_ffI_f1.
+
 	* setjmp/tst-setjmp-fp.c: New file.
 	* setjmp/Makefile (tests): Add tst-setjmp-fp.
 	(link-libm): New variable.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index e216e99..68013be 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -960,6 +960,19 @@ struct test_fF_f1_data
   FLOAT extra_expected;
   FLOAT extra_ulp;
 };
+struct test_ffI_f1_data
+{
+  const char *test_name;
+  FLOAT arg1, arg2;
+  FLOAT expected;
+  FLOAT max_ulp;
+  int exceptions;
+  const char *extra_name;
+  int extra_init;
+  int extra_test;
+  int extra_expected;
+  int extra_ulp;
+};
 struct test_c_c_data
 {
   const char *test_name;
@@ -1144,6 +1157,19 @@ struct test_f_i_data
 		   EXTRA_ULP, 0);					\
     }									\
   while (0)
+#define RUN_TEST_LOOP_ffI_f1(FUNC_NAME, ARRAY, ROUNDING_MODE,		\
+			     EXTRA_VAR)					\
+  IF_ROUND_INIT_ ## ROUNDING_MODE					\
+    for (size_t i = 0; i < sizeof (ARRAY) / sizeof (ARRAY)[0]; i++)	\
+      RUN_TEST_ffI_f1 ((ARRAY)[i].test_name, FUNC_NAME,			\
+		       (ARRAY)[i].arg1, (ARRAY)[i].arg2,		\
+		       (ARRAY)[i].expected, (ARRAY)[i].max_ulp,		\
+		       (ARRAY)[i].exceptions, (ARRAY)[i].extra_name,	\
+		       EXTRA_VAR, (ARRAY)[i].extra_init,		\
+		       (ARRAY)[i].extra_test,				\
+		       (ARRAY)[i].extra_expected,			\
+		       (ARRAY)[i].extra_ulp);				\
+  ROUND_RESTORE_ ## ROUNDING_MODE
 #define RUN_TEST_c_c(TEST_NAME, FUNC_NAME, ARGR, ARGC, EXPR, EXPC,	\
 		     MAX_ULP, EXCEPTIONS)				\
   check_complex (TEST_NAME,						\
@@ -12615,6 +12641,25 @@ remainder_test (void)
   END (remainder);
 }
 
+static const struct test_ffI_f1_data remquo_test_data[] =
+  {
+    START_DATA (remquo),
+    TEST_ffI_f1 (remquo, 1, 0, qnan_value, IGNORE, INVALID_EXCEPTION),
+    TEST_ffI_f1 (remquo, 1, minus_zero, qnan_value, IGNORE, INVALID_EXCEPTION),
+    TEST_ffI_f1 (remquo, plus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION),
+    TEST_ffI_f1 (remquo, minus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION),
+    TEST_ffI_f1 (remquo, qnan_value, qnan_value, qnan_value, IGNORE),
+
+    TEST_ffI_f1 (remquo, 1.625, 1.0, -0.375, 2),
+    TEST_ffI_f1 (remquo, -1.625, 1.0, 0.375, -2),
+    TEST_ffI_f1 (remquo, 1.625, -1.0, -0.375, -2),
+    TEST_ffI_f1 (remquo, -1.625, -1.0, 0.375, 2),
+
+    TEST_ffI_f1 (remquo, 5, 2, 1, 2),
+    TEST_ffI_f1 (remquo, 3, 2, -1, 2),
+    END_DATA (remquo)
+  };
+
 static void
 remquo_test (void)
 {
@@ -12628,21 +12673,7 @@ remquo_test (void)
     return;
 
   START (remquo);
-
-  TEST_ffI_f1 (remquo, 1, 0, qnan_value, IGNORE, INVALID_EXCEPTION);
-  TEST_ffI_f1 (remquo, 1, minus_zero, qnan_value, IGNORE, INVALID_EXCEPTION);
-  TEST_ffI_f1 (remquo, plus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION);
-  TEST_ffI_f1 (remquo, minus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION);
-  TEST_ffI_f1 (remquo, qnan_value, qnan_value, qnan_value, IGNORE);
-
-  TEST_ffI_f1 (remquo, 1.625, 1.0, -0.375, 2);
-  TEST_ffI_f1 (remquo, -1.625, 1.0, 0.375, -2);
-  TEST_ffI_f1 (remquo, 1.625, -1.0, -0.375, -2);
-  TEST_ffI_f1 (remquo, -1.625, -1.0, 0.375, 2);
-
-  TEST_ffI_f1 (remquo, 5, 2, 1, 2);
-  TEST_ffI_f1 (remquo, 3, 2, -1, 2);
-
+  RUN_TEST_LOOP_ffI_f1 (remquo, remquo_test_data, , x);
   END (remquo);
 }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    5 ++++
 math/libm-test.inc |   61 +++++++++++++++++++++++++++++++++++++++------------
 2 files changed, 51 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]