Skip to content

Commit

Permalink
This is the beginning of series of patches with addition
Browse files Browse the repository at this point in the history
of vector math functions infrastructure and several x86_64 implementations.
This patch is preparatory change in libm-test.c - splitting of macros which
form name of tested functions for ability to use separate name for tested
functions and for functions used in test suite infrastructure.

2015-05-14  Andrew Senkevich  <andrew.senkevich@intel.com>

    * math/test-double.c (FUNC_TEST): New macro.
    * math/test-float.c: Likewise.
    * math/test-idouble.c: Likewise.
    * math/test-ifloat.c: Likewise.
    * math/test-ildoubl.c: Likewise.
    * math/test-ldouble.c: Likewise.
    * math/libm-test.inc: Use FUNC_TEST for name of tested functions.
  • Loading branch information
Andrew Senkevich committed May 14, 2015
1 parent 9e4ec74 commit ee97160
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 18 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2015-05-14 Andrew Senkevich <andrew.senkevich@intel.com>

* math/test-double.c (FUNC_TEST): New macro.
* math/test-float.c: Likewise.
* math/test-idouble.c: Likewise.
* math/test-ifloat.c: Likewise.
* math/test-ildoubl.c: Likewise.
* math/test-ldouble.c: Likewise.
* math/libm-test.inc: Use FUNC_TEST for name of tested functions.

2015-05-13 Roland McGrath <roland@hack.frob.com>

* sysdeps/nacl/fdopendir.c: New file.
Expand Down
36 changes: 18 additions & 18 deletions math/libm-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,8 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_float (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG), \
EXPECTED, EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
while (0)
Expand All @@ -1320,7 +1320,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_float (test_name, FUNC (FUNC_NAME) (ARG1, ARG2), \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG1, ARG2), \
EXPECTED, EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1347,7 +1347,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_float (test_name, FUNC (FUNC_NAME) (ARG1, ARG2, ARG3), \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG1, ARG2, ARG3), \
EXPECTED, EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1367,7 +1367,7 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_float (test_name, \
FUNC (FUNC_NAME) (BUILD_COMPLEX (ARG1, ARG2)), \
FUNC_TEST (FUNC_NAME) (BUILD_COMPLEX (ARG1, ARG2)),\
EXPECTED, EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1388,7 +1388,7 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
(EXTRA_VAR) = (EXTRA_EXPECTED) == 0 ? 1 : 0; \
check_float (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
EXTRA_OUTPUT_TEST_SETUP (ARG_STR, 1); \
if (EXTRA_TEST) \
Expand All @@ -1415,7 +1415,7 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
(EXTRA_VAR) = (EXTRA_EXPECTED) == 0 ? 1 : 0; \
check_float (test_name, FUNC (FUNC_NAME) (ARG, &(EXTRA_VAR)), \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG, &(EXTRA_VAR)), \
EXPECTED, EXCEPTIONS); \
EXTRA_OUTPUT_TEST_SETUP (ARG_STR, 1); \
if (EXTRA_TEST) \
Expand All @@ -1442,7 +1442,7 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
(EXTRA_VAR) = (EXTRA_EXPECTED) == 0 ? 1 : 0; \
check_float (test_name, FUNC (FUNC_NAME) (ARG, &(EXTRA_VAR)), \
check_float (test_name, FUNC_TEST (FUNC_NAME) (ARG, &(EXTRA_VAR)), \
EXPECTED, EXCEPTIONS); \
EXTRA_OUTPUT_TEST_SETUP (ARG_STR, 1); \
if (EXTRA_TEST) \
Expand Down Expand Up @@ -1470,7 +1470,7 @@ struct test_fFF_11_data
COMMON_TEST_SETUP (ARG_STR); \
(EXTRA_VAR) = (EXTRA_EXPECTED) == 0 ? 1 : 0; \
check_float (test_name, \
FUNC (FUNC_NAME) (ARG1, ARG2, &(EXTRA_VAR)), \
FUNC_TEST (FUNC_NAME) (ARG1, ARG2, &(EXTRA_VAR)), \
EXPECTED, EXCEPTIONS); \
EXTRA_OUTPUT_TEST_SETUP (ARG_STR, 1); \
if (EXTRA_TEST) \
Expand Down Expand Up @@ -1498,7 +1498,7 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_complex (test_name, \
FUNC (FUNC_NAME) (BUILD_COMPLEX (ARGR, ARGC)), \
FUNC_TEST (FUNC_NAME) (BUILD_COMPLEX (ARGR, ARGC)), \
BUILD_COMPLEX (EXPR, EXPC), EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1519,8 +1519,8 @@ struct test_fFF_11_data
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_complex (test_name, \
FUNC (FUNC_NAME) (BUILD_COMPLEX (ARG1R, ARG1C), \
BUILD_COMPLEX (ARG2R, ARG2C)), \
FUNC_TEST (FUNC_NAME) (BUILD_COMPLEX (ARG1R, ARG1C), \
BUILD_COMPLEX (ARG2R, ARG2C)), \
BUILD_COMPLEX (EXPR, EXPC), EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1540,7 +1540,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_int (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
check_int (test_name, FUNC_TEST (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand Down Expand Up @@ -1593,7 +1593,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_bool (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
check_bool (test_name, FUNC_TEST (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand Down Expand Up @@ -1627,7 +1627,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_long (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
check_long (test_name, FUNC_TEST (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
Expand All @@ -1644,8 +1644,8 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
check_longlong (test_name, FUNC (FUNC_NAME) (ARG), EXPECTED, \
EXCEPTIONS); \
check_longlong (test_name, FUNC_TEST (FUNC_NAME) (ARG), \
EXPECTED, EXCEPTIONS); \
COMMON_TEST_CLEANUP; \
} \
while (0)
Expand All @@ -1664,7 +1664,7 @@ struct test_fFF_11_data
if (enable_test (EXCEPTIONS)) \
{ \
COMMON_TEST_SETUP (ARG_STR); \
FUNC (FUNC_NAME) (ARG, &(EXTRA1_VAR), &(EXTRA2_VAR)); \
FUNC_TEST (FUNC_NAME) (ARG, &(EXTRA1_VAR), &(EXTRA2_VAR)); \
EXTRA_OUTPUT_TEST_SETUP (ARG_STR, 1); \
if (EXTRA1_TEST) \
check_float (extra1_name, EXTRA1_VAR, EXTRA1_EXPECTED, \
Expand Down
1 change: 1 addition & 0 deletions math/test-double.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function
#define FUNC_TEST(function) FUNC (function)
#define FLOAT double
#define TEST_MSG "testing double (without inline functions)\n"
#define MATHCONST(x) x
Expand Down
1 change: 1 addition & 0 deletions math/test-float.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function ## f
#define FUNC_TEST(function) FUNC (function)
#define FLOAT float
#define TEST_MSG "testing float (without inline functions)\n"
#define MATHCONST(x) x
Expand Down
1 change: 1 addition & 0 deletions math/test-idouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function
#define FUNC_TEST(function) FUNC (function)
#define FLOAT double
#define TEST_MSG "testing double (inline functions)\n"
#define MATHCONST(x) x
Expand Down
1 change: 1 addition & 0 deletions math/test-ifloat.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function ## f
#define FUNC_TEST(function) FUNC (function)
#define FLOAT float
#define TEST_MSG "testing float (inline functions)\n"
#define MATHCONST(x) x
Expand Down
1 change: 1 addition & 0 deletions math/test-ildoubl.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function##l
#define FUNC_TEST(function) FUNC (function)
#define FLOAT long double
#define TEST_MSG "testing long double (inline functions)\n"
#define MATHCONST(x) x##L
Expand Down
1 change: 1 addition & 0 deletions math/test-ldouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */

#define FUNC(function) function##l
#define FUNC_TEST(function) FUNC (function)
#define FLOAT long double
#define TEST_MSG "testing long double (without inline functions)\n"
#define MATHCONST(x) x##L
Expand Down

0 comments on commit ee97160

Please sign in to comment.