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-663-gd9c2a0f


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  d9c2a0fd2c4809392e579e988ce98ff68842df9f (commit)
      from  9dc9095d565db04da8474b15f646f6bfb84a8395 (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=d9c2a0fd2c4809392e579e988ce98ff68842df9f

commit d9c2a0fd2c4809392e579e988ce98ff68842df9f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue May 14 19:12:10 2013 +0000

    Convert TEST_fI_f1 tests from code to data.

diff --git a/ChangeLog b/ChangeLog
index 7ffba37..8763870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-05-14  Joseph Myers  <joseph@codesourcery.com>
 
+	* math/libm-test.inc (struct test_f_f1_data): Add comment.
+	(RUN_TEST_LOOP_fI_f1): New macro.
+	(frexp_test_data): New variable.
+	(frexp_test): Run tests with RUN_TEST_LOOP_fI_f1.
+
 	* math/libm-test.inc (struct test_fF_f1_data): New type.
 	(RUN_TEST_LOOP_fF_f1): New macro.
 	(modf_test_data): New variable.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 8a3d41b..425d9d5 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -933,6 +933,7 @@ struct test_c_f_data
   FLOAT max_ulp;
   int exceptions;
 };
+/* Used for both RUN_TEST_LOOP_f_f1 and RUN_TEST_LOOP_fI_f1.  */
 struct test_f_f1_data
 {
   const char *test_name;
@@ -1110,6 +1111,16 @@ struct test_c_c_data
 		   EXTRA_ULP, 0);					\
     }									\
   while (0)
+#define RUN_TEST_LOOP_fI_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_fI_f1 ((ARRAY)[i].test_name, FUNC_NAME, (ARRAY)[i].arg,	\
+		      (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_ffI_f1(TEST_NAME, FUNC_NAME, ARG1, ARG2, EXPECTED,	\
 			MAX_ULP, EXCEPTIONS,				\
 			EXTRA_NAME, EXTRA_VAR, EXTRA_INIT, EXTRA_TEST,	\
@@ -9544,23 +9555,28 @@ fpclassify_test (void)
 }
 
 
+static const struct test_f_f1_data frexp_test_data[] =
+  {
+    START_DATA (frexp),
+    TEST_fI_f1 (frexp, plus_infty, plus_infty, IGNORE),
+    TEST_fI_f1 (frexp, minus_infty, minus_infty, IGNORE),
+    TEST_fI_f1 (frexp, qnan_value, qnan_value, IGNORE),
+
+    TEST_fI_f1 (frexp, 0.0, 0.0, 0.0),
+    TEST_fI_f1 (frexp, minus_zero, minus_zero, 0.0),
+
+    TEST_fI_f1 (frexp, 12.8L, 0.8L, 4),
+    TEST_fI_f1 (frexp, -27.34L, -0.854375L, 5),
+    END_DATA (frexp)
+  };
+
 static void
 frexp_test (void)
 {
   int x;
 
   START (frexp);
-
-  TEST_fI_f1 (frexp, plus_infty, plus_infty, IGNORE);
-  TEST_fI_f1 (frexp, minus_infty, minus_infty, IGNORE);
-  TEST_fI_f1 (frexp, qnan_value, qnan_value, IGNORE);
-
-  TEST_fI_f1 (frexp, 0.0, 0.0, 0.0);
-  TEST_fI_f1 (frexp, minus_zero, minus_zero, 0.0);
-
-  TEST_fI_f1 (frexp, 12.8L, 0.8L, 4);
-  TEST_fI_f1 (frexp, -27.34L, -0.854375L, 5);
-
+  RUN_TEST_LOOP_fI_f1 (frexp, frexp_test_data, , x);
   END (frexp);
 }
 

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

Summary of changes:
 ChangeLog          |    5 +++++
 math/libm-test.inc |   38 +++++++++++++++++++++++++++-----------
 2 files changed, 32 insertions(+), 11 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]