diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2014-03-20 11:48:07 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2014-03-20 11:48:07 +0000 |
| commit | ae3a5dff0f4135cc57ddddf3c19ed5be80285b54 (patch) | |
| tree | c712750bc3268163fc151e1a58d658960c5ebc22 /math/libm-test.inc | |
| parent | d71aeee8862acaabd5ccc151ba1b442a7b6d24d6 (diff) | |
| download | glibc-ae3a5dff0f4135cc57ddddf3c19ed5be80285b54.tar.xz glibc-ae3a5dff0f4135cc57ddddf3c19ed5be80285b54.zip | |
Make libm-test support ALL_RM_TEST with AUTO_TESTS_*.
This patch continues improvements to all-rounding-mode libm testing by
making testing with ALL_RM_TEST support test results from
auto-libm-test-out. gen-libm-test.pl is adapted to generate
appropriate output with results for each rounding mode, with
AUTO_TESTS_* calls no longer specifying a rounding mode. Where there
were separate functions in libm-test.inc to test a function in each
rounding mode, using AUTO_TESTS_* to list the tests for each rounding
mode, those are converted to using ALL_RM_TEST (so generally this
patch doesn't change the sets of tests run in each rounding mode,
except that in various cases special-case tests given directly in
libm-test.inc were previously run only for round-to-nearest, and now
are run for all rounding modes).
Tested x86_64 and x86.
* math/gen-libm-test.pl (generate_testfile): Expect only function
name as argument to AUTO_TESTS_* and pass results for all rounding
modes to parse_args.
(parse_auto_input): Separate inputs of automatic tests from
outputs before storing in %auto_tests.
* math/libm-test.inc (acos_test_data): Update call to
AUTO_TESTS_f_f.
(acos_test): Use ALL_RM_TEST.
(acos_tonearest_test_data): Remove.
(acos_test_tonearest): Likewise.
(acos_towardzero_test_data): Likewise.
(acos_test_towardzero): Likewise.
(acos_downward_test_data): Likewise.
(acos_test_downward): Likewise.
(acos_upward_test_data): Likewise.
(acos_test_upward): Likewise.
(acosh_test_data): Update call to AUTO_TESTS_f_f.
(asin_test_data): Likewise.
(asin_test): Use ALL_RM_TEST.
(asin_tonearest_test_data): Remove.
(asin_test_tonearest): Likewise.
(asin_towardzero_test_data): Likewise.
(asin_test_towardzero): Likewise.
(asin_downward_test_data): Likewise.
(asin_test_downward): Likewise.
(asin_upward_test_data): Likewise.
(asin_test_upward): Likewise.
(asinh_test_data): Update call to AUTO_TESTS_f_f.
(atan_test_data): Likewise.
(atanh_test_data): Likewise.
(atan2_test_data): Update call to AUTO_TESTS_ff_f.
(cabs_test_data): Update call to AUTO_TESTS_c_f.
(carg_test_data): Likewise.
(cbrt_test_data): Update call to AUTO_TESTS_f_f.
(ccos_test_data): Update call to AUTO_TESTS_c_c.
(ccosh_test_data): Likewise.
(cexp_test_data): Likewise.
(clog_test_data): Likewise.
(clog10_test_data): Likewise.
(cos_test_data): Update call to AUTO_TESTS_f_f.
(cos_test): Use ALL_RM_TEST.
(cos_tonearest_test_data): Remove.
(cos_test_tonearest): Likewise.
(cos_towardzero_test_data): Likewise.
(cos_test_towardzero): Likewise.
(cos_downward_test_data): Likewise.
(cos_test_downward): Likewise.
(cos_upward_test_data): Likewise.
(cos_test_upward): Likewise.
(cosh_test_data): Update call to AUTO_TESTS_f_f.
(cosh_test): Use ALL_RM_TEST.
(cosh_tonearest_test_data): Remove.
(cosh_test_tonearest): Likewise.
(cosh_towardzero_test_data): Likewise.
(cosh_test_towardzero): Likewise.
(cosh_downward_test_data): Likewise.
(cosh_test_downward): Likewise.
(cosh_upward_test_data): Likewise.
(cosh_test_upward): Likewise.
(cpow_test_data): Update call to AUTO_TESTS_cc_c.
(csqrt_test_data): Update call to AUTO_TESTS_c_c.
(ctan_test_data): Likewise.
(ctan_test): Use ALL_RM_TEST.
(ctan_tonearest_test_data): Remove.
(ctan_test_tonearest): Likewise.
(ctan_towardzero_test_data): Likewise.
(ctan_test_towardzero): Likewise.
(ctan_downward_test_data): Likewise.
(ctan_test_downward): Likewise.
(ctan_upward_test_data): Likewise.
(ctan_test_upward): Likewise.
(ctanh_test_data): Update call to AUTO_TESTS_c_c.
(ctanh_test): Use ALL_RM_TEST.
(ctanh_tonearest_test_data): Remove.
(ctanh_test_tonearest): Likewise.
(ctanh_towardzero_test_data): Likewise.
(ctanh_test_towardzero): Likewise.
(ctanh_downward_test_data): Likewise.
(ctanh_test_downward): Likewise.
(ctanh_upward_test_data): Likewise.
(ctanh_test_upward): Likewise.
(erf_test_data): Update call to AUTO_TESTS_f_f.
(erfc_test_data): Likewise.
(exp_test_data): Likewise.
(exp_test): Use ALL_RM_TEST.
(exp_tonearest_test_data): Remove.
(exp_test_tonearest): Likewise.
(exp_towardzero_test_data): Likewise.
(exp_test_towardzero): Likewise.
(exp_downward_test_data): Likewise.
(exp_test_downward): Likewise.
(exp_upward_test_data): Likewise.
(exp_test_upward): Likewise.
(exp10_test_data): Update call to AUTO_TESTS_f_f.
(exp10_test): Use ALL_RM_TEST.
(exp10_tonearest_test_data): Remove.
(exp10_test_tonearest): Likewise.
(exp10_towardzero_test_data): Likewise.
(exp10_test_towardzero): Likewise.
(exp10_downward_test_data): Likewise.
(exp10_test_downward): Likewise.
(exp10_upward_test_data): Likewise.
(exp10_test_upward): Likewise.
(exp2_test_data): Update call to AUTO_TESTS_f_f.
(expm1_test_data): Likewise.
(expm1_test): Use ALL_RM_TEST.
(expm1_tonearest_test_data): Remove.
(expm1_test_tonearest): Likewise.
(expm1_towardzero_test_data): Likewise.
(expm1_test_towardzero): Likewise.
(expm1_downward_test_data): Likewise.
(expm1_test_downward): Likewise.
(expm1_upward_test_data): Likewise.
(expm1_test_upward): Likewise.
(fma_test_data): Update call to AUTO_TESTS_fff_f.
(fma_test): Use ALL_RM_TEST.
(fma_towardzero_test_data): Remove.
(fma_test_towardzero): Likewise.
(fma_downward_test_data): Likewise.
(fma_test_downward): Likewise.
(fma_upward_test_data): Likewise.
(fma_test_upward): Likewise.
(hypot_test_data): Update call to AUTO_TESTS_ff_f.
(j0_test_data): Update call to AUTO_TESTS_f_f.
(j1_test_data): Likewise.
(jn_test_data): Update call to AUTO_TESTS_if_f.
(lgamma_test_data): Update call to AUTO_TESTS_f_f1.
(log_test_data): Update call to AUTO_TESTS_f_f.
(log10_test_data): Likewise.
(log1p_test_data): Likewise.
(log2_test_data): Likewise.
(pow_test_data): Update call to AUTO_TESTS_ff_f.
(pow_tonearest_test_data): Likewise.
(sin_test_data): Update call to AUTO_TESTS_f_f.
(sin_test): Use ALL_RM_TEST.
(sin_tonearest_test_data): Remove.
(sin_test_tonearest): Likewise.
(sin_towardzero_test_data): Likewise.
(sin_test_towardzero): Likewise.
(sin_downward_test_data): Likewise.
(sin_test_downward): Likewise.
(sin_upward_test_data): Likewise.
(sin_test_upward): Likewise.
(sincos_test_data): Update call to AUTO_TESTS_fFF_11.
(sinh_test_data): Update call to AUTO_TESTS_f_f.
(sinh_test): Use ALL_RM_TEST.
(sinh_tonearest_test_data): Remove.
(sinh_test_tonearest): Likewise.
(sinh_towardzero_test_data): Likewise.
(sinh_test_towardzero): Likewise.
(sinh_downward_test_data): Likewise.
(sinh_test_downward): Likewise.
(sinh_upward_test_data): Likewise.
(sinh_test_upward): Likewise.
(sqrt_test_data): Update call to AUTO_TESTS_f_f.
(sqrt_test): Use ALL_RM_TEST.
(sqrt_tonearest_test_data): Remove.
(sqrt_test_tonearest): Likewise.
(sqrt_towardzero_test_data): Likewise.
(sqrt_test_towardzero): Likewise.
(sqrt_downward_test_data): Likewise.
(sqrt_test_downward): Likewise.
(sqrt_upward_test_data): Likewise.
(sqrt_test_upward): Likewise.
(tan_test_data): Update call to AUTO_TESTS_f_f.
(tan_test): Use ALL_RM_TEST.
(tan_tonearest_test_data): Remove.
(tan_test_tonearest): Likewise.
(tan_towardzero_test_data): Likewise.
(tan_test_towardzero): Likewise.
(tan_downward_test_data): Likewise.
(tan_test_downward): Likewise.
(tan_upward_test_data): Likewise.
(tan_test_upward): Likewise.
(tanh_test_data): Update call to AUTO_TESTS_f_f.
(tgamma_test_data): Likewise.
(y0_test_data): Likewise.
(y1_test_data): Likewise.
(yn_test_data): Update call to AUTO_TESTS_if_f.
(main): Do not call removed functions.
Diffstat (limited to 'math/libm-test.inc')
| -rw-r--r-- | math/libm-test.inc | 1005 |
1 files changed, 63 insertions, 942 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 47c162fe27..b329b0065c 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -1759,73 +1759,16 @@ static const struct test_f_f_data acos_test_data[] = TEST_f_f (acos, max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (acos, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), - AUTO_TESTS_f_f (acos, tonearest), + AUTO_TESTS_f_f (acos), }; static void acos_test (void) { - START (acos, 0); - RUN_TEST_LOOP_f_f (acos, acos_test_data, ); - END; -} - - -static const struct test_f_f_data acos_tonearest_test_data[] = - { - AUTO_TESTS_f_f (acos, tonearest), - }; - -static void -acos_test_tonearest (void) -{ - START (acos_tonearest, 0); - RUN_TEST_LOOP_f_f (acos, acos_tonearest_test_data, FE_TONEAREST); - END; -} - - -static const struct test_f_f_data acos_towardzero_test_data[] = - { - AUTO_TESTS_f_f (acos, towardzero), - }; - -static void -acos_test_towardzero (void) -{ - START (acos_towardzero, 0); - RUN_TEST_LOOP_f_f (acos, acos_towardzero_test_data, FE_TOWARDZERO); - END; + ALL_RM_TEST (acos, 0, acos_test_data, RUN_TEST_LOOP_f_f, END); } -static const struct test_f_f_data acos_downward_test_data[] = - { - AUTO_TESTS_f_f (acos, downward), - }; - -static void -acos_test_downward (void) -{ - START (acos_downward, 0); - RUN_TEST_LOOP_f_f (acos, acos_downward_test_data, FE_DOWNWARD); - END; -} - - -static const struct test_f_f_data acos_upward_test_data[] = - { - AUTO_TESTS_f_f (acos, upward), - }; - -static void -acos_test_upward (void) -{ - START (acos_upward, 0); - RUN_TEST_LOOP_f_f (acos, acos_upward_test_data, FE_UPWARD); - END; -} - static const struct test_f_f_data acosh_test_data[] = { TEST_f_f (acosh, plus_infty, plus_infty), @@ -1843,7 +1786,7 @@ static const struct test_f_f_data acosh_test_data[] = TEST_f_f (acosh, -1.125L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (acosh, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), - AUTO_TESTS_f_f (acosh, tonearest), + AUTO_TESTS_f_f (acosh), }; static void @@ -1866,79 +1809,22 @@ static const struct test_f_f_data asin_test_data[] = TEST_f_f (asin, max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (asin, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), - AUTO_TESTS_f_f (asin, tonearest), + AUTO_TESTS_f_f (asin), }; static void asin_test (void) { - START (asin, 0); - RUN_TEST_LOOP_f_f (asin, asin_test_data, ); - END; + ALL_RM_TEST (asin, 0, asin_test_data, RUN_TEST_LOOP_f_f, END); } -static const struct test_f_f_data asin_tonearest_test_data[] = - { - AUTO_TESTS_f_f (asin, tonearest), - }; - -static void -asin_test_tonearest (void) -{ - START (asin_tonearest, 0); - RUN_TEST_LOOP_f_f (asin, asin_tonearest_test_data, FE_TONEAREST); - END; -} - - -static const struct test_f_f_data asin_towardzero_test_data[] = - { - AUTO_TESTS_f_f (asin, towardzero), - }; - -static void -asin_test_towardzero (void) -{ - START (asin_towardzero, 0); - RUN_TEST_LOOP_f_f (asin, asin_towardzero_test_data, FE_TOWARDZERO); - END; -} - - -static const struct test_f_f_data asin_downward_test_data[] = - { - AUTO_TESTS_f_f (asin, downward), - }; - -static void -asin_test_downward (void) -{ - START (asin_downward, 0); - RUN_TEST_LOOP_f_f (asin, asin_downward_test_data, FE_DOWNWARD); - END; -} - - -static const struct test_f_f_data asin_upward_test_data[] = - { - AUTO_TESTS_f_f (asin, upward), - }; - -static void -asin_test_upward (void) -{ - START (asin_upward, 0); - RUN_TEST_LOOP_f_f (asin, asin_upward_test_data, FE_UPWARD); - END; -} - static const struct test_f_f_data asinh_test_data[] = { TEST_f_f (asinh, plus_infty, plus_infty, NO_TEST_INLINE), TEST_f_f (asinh, minus_infty, minus_infty, NO_TEST_INLINE), TEST_f_f (asinh, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (asinh, tonearest), + AUTO_TESTS_f_f (asinh), }; static void @@ -1955,7 +1841,7 @@ static const struct test_f_f_data atan_test_data[] = TEST_f_f (atan, minus_infty, -M_PI_2l), TEST_f_f (atan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (atan, tonearest), + AUTO_TESTS_f_f (atan), }; static void @@ -1982,7 +1868,7 @@ static const struct test_f_f_data atanh_test_data[] = TEST_f_f (atanh, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (atanh, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), - AUTO_TESTS_f_f (atanh, tonearest), + AUTO_TESTS_f_f (atanh), }; static void @@ -2019,7 +1905,7 @@ static const struct test_ff_f_data atan2_test_data[] = TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l), TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_ff_f (atan2, tonearest), + AUTO_TESTS_ff_f (atan2), }; static void @@ -2044,7 +1930,7 @@ static const struct test_c_f_data cabs_test_data[] = TEST_c_f (cabs, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_f (cabs, tonearest), + AUTO_TESTS_c_f (cabs), }; static void @@ -3463,7 +3349,7 @@ static const struct test_c_f_data carg_test_data[] = TEST_c_f (carg, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_f (carg, tonearest), + AUTO_TESTS_c_f (carg), }; static void @@ -5889,7 +5775,7 @@ static const struct test_f_f_data cbrt_test_data[] = TEST_f_f (cbrt, minus_infty, minus_infty), TEST_f_f (cbrt, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (cbrt, tonearest), + AUTO_TESTS_f_f (cbrt), }; static void @@ -5948,7 +5834,7 @@ static const struct test_c_c_data ccos_test_data[] = TEST_c_c (ccos, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (ccos, tonearest), + AUTO_TESTS_c_c (ccos), }; static void @@ -6007,7 +5893,7 @@ static const struct test_c_c_data ccosh_test_data[] = TEST_c_c (ccosh, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (ccosh, tonearest), + AUTO_TESTS_c_c (ccosh), }; static void @@ -6174,7 +6060,7 @@ static const struct test_c_c_data cexp_test_data[] = TEST_c_c (cexp, 1, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK), TEST_c_c (cexp, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (cexp, tonearest), + AUTO_TESTS_c_c (cexp), }; static void @@ -6254,7 +6140,7 @@ static const struct test_c_c_data clog_test_data[] = TEST_c_c (clog, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (clog, tonearest), + AUTO_TESTS_c_c (clog), }; static void @@ -6316,7 +6202,7 @@ static const struct test_c_c_data clog10_test_data[] = TEST_c_c (clog10, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (clog10, tonearest), + AUTO_TESTS_c_c (clog10), }; static void @@ -6402,71 +6288,13 @@ static const struct test_f_f_data cos_test_data[] = TEST_f_f (cos, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (cos, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - AUTO_TESTS_f_f (cos, tonearest), + AUTO_TESTS_f_f (cos), }; static void cos_test (void) { - START (cos, 0); - RUN_TEST_LOOP_f_f (cos, cos_test_data, ); - END; -} - - -static const struct test_f_f_data cos_tonearest_test_data[] = - { - AUTO_TESTS_f_f (cos, tonearest), - }; - -static void -cos_test_tonearest (void) -{ - START (cos_tonearest, 0); - RUN_TEST_LOOP_f_f (cos, cos_tonearest_test_data, FE_TONEAREST); - END; -} - - -static const struct test_f_f_data cos_towardzero_test_data[] = - { - AUTO_TESTS_f_f (cos, towardzero), - }; - -static void -cos_test_towardzero (void) -{ - START (cos_towardzero, 0); - RUN_TEST_LOOP_f_f (cos, cos_towardzero_test_data, FE_TOWARDZERO); - END; -} - - -static const struct test_f_f_data cos_downward_test_data[] = - { - AUTO_TESTS_f_f (cos, downward), - }; - -static void -cos_test_downward (void) -{ - START (cos_downward, 0); - RUN_TEST_LOOP_f_f (cos, cos_downward_test_data, FE_DOWNWARD); - END; -} - - -static const struct test_f_f_data cos_upward_test_data[] = - { - AUTO_TESTS_f_f (cos, upward), - }; - -static void -cos_test_upward (void) -{ - START (cos_upward, 0); - RUN_TEST_LOOP_f_f (cos, cos_upward_test_data, FE_UPWARD); - END; + ALL_RM_TEST (cos, 0, cos_test_data, RUN_TEST_LOOP_f_f, END); } @@ -6476,71 +6304,13 @@ static const struct test_f_f_data cosh_test_data[] = TEST_f_f (cosh, minus_infty, plus_infty, NO_TEST_INLINE), TEST_f_f (cosh, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (cosh, tonearest), + AUTO_TESTS_f_f (cosh), }; static void cosh_test (void) { - START (cosh, 0); - RUN_TEST_LOOP_f_f (cosh, cosh_test_data, ); - END; -} - - -static const struct test_f_f_data cosh_tonearest_test_data[] = - { - AUTO_TESTS_f_f (cosh, tonearest), - }; - -static void -cosh_test_tonearest (void) -{ - START (cosh_tonearest, 0); - RUN_TEST_LOOP_f_f (cosh, cosh_tonearest_test_data, FE_TONEAREST); - END; -} - - -static const struct test_f_f_data cosh_towardzero_test_data[] = - { - AUTO_TESTS_f_f (cosh, towardzero), - }; - -static void -cosh_test_towardzero (void) -{ - START (cosh_towardzero, 0); - RUN_TEST_LOOP_f_f (cosh, cosh_towardzero_test_data, FE_TOWARDZERO); - END; -} - - -static const struct test_f_f_data cosh_downward_test_data[] = - { - AUTO_TESTS_f_f (cosh, downward), - }; - -static void -cosh_test_downward (void) -{ - START (cosh_downward, 0); - RUN_TEST_LOOP_f_f (cosh, cosh_downward_test_data, FE_DOWNWARD); - END; -} - - -static const struct test_f_f_data cosh_upward_test_data[] = - { - AUTO_TESTS_f_f (cosh, upward), - }; - -static void -cosh_test_upward (void) -{ - START (cosh_upward, 0); - RUN_TEST_LOOP_f_f (cosh, cosh_upward_test_data, FE_UPWARD); - END; + ALL_RM_TEST (cosh, 0, cosh_test_data, RUN_TEST_LOOP_f_f, END); } @@ -6548,7 +6318,7 @@ static const struct test_cc_c_data cpow_test_data[] = { TEST_cc_c (cpow, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_cc_c (cpow, tonearest), + AUTO_TESTS_cc_c (cpow), }; static void @@ -6881,7 +6651,7 @@ static const struct test_c_c_data csqrt_test_data[] = TEST_c_c (csqrt, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (csqrt, tonearest), + AUTO_TESTS_c_c (csqrt), }; static void @@ -6929,71 +6699,13 @@ static const struct test_c_c_data ctan_test_data[] = TEST_c_c (ctan, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (ctan, tonearest), + AUTO_TESTS_c_c (ctan), }; static void ctan_test (void) { - START (ctan, 0); - RUN_TEST_LOOP_c_c (ctan, ctan_test_data, ); - END_COMPLEX; -} - - -static const struct test_c_c_data ctan_tonearest_test_data[] = - { - AUTO_TESTS_c_c (ctan, tonearest), - }; - -static void -ctan_test_tonearest (void) -{ - START (ctan_tonearest, 0); - RUN_TEST_LOOP_c_c (ctan, ctan_tonearest_test_data, FE_TONEAREST); - END_COMPLEX; -} - - -static const struct test_c_c_data ctan_towardzero_test_data[] = - { - AUTO_TESTS_c_c (ctan, towardzero), - }; - -static void -ctan_test_towardzero (void) -{ - START (ctan_towardzero, 0); - RUN_TEST_LOOP_c_c (ctan, ctan_towardzero_test_data, FE_TOWARDZERO); - END_COMPLEX; -} - - -static const struct test_c_c_data ctan_downward_test_data[] = - { - AUTO_TESTS_c_c (ctan, downward), - }; - -static void -ctan_test_downward (void) -{ - START (ctan_downward, 0); - RUN_TEST_LOOP_c_c (ctan, ctan_downward_test_data, FE_DOWNWARD); - END_COMPLEX; -} - - -static const struct test_c_c_data ctan_upward_test_data[] = - { - AUTO_TESTS_c_c (ctan, upward), - }; - -static void -ctan_test_upward (void) -{ - START (ctan_upward, 0); - RUN_TEST_LOOP_c_c (ctan, ctan_upward_test_data, FE_UPWARD); - END_COMPLEX; + ALL_RM_TEST (ctan, 0, ctan_test_data, RUN_TEST_LOOP_c_c, END_COMPLEX); } @@ -7033,71 +6745,13 @@ static const struct test_c_c_data ctanh_test_data[] = TEST_c_c (ctanh, qnan_value, qnan_value, qnan_value, qnan_value), - AUTO_TESTS_c_c (ctanh, tonearest), + AUTO_TESTS_c_c (ctanh), }; static void ctanh_test (void) { - START (ctanh, 0); - RUN_TEST_LOOP_c_c (ctanh, ctanh_test_data, ); - END_COMPLEX; -} - - -static const struct test_c_c_data ctanh_tonearest_test_data[] = - { - AUTO_TESTS_c_c (ctanh, tonearest), - }; - -static void -ctanh_test_tonearest (void) -{ - START (ctanh_tonearest, 0); - RUN_TEST_LOOP_c_c (ctanh, ctanh_tonearest_test_data, FE_TONEAREST); - END_COMPLEX; -} - - -static const struct test_c_c_data ctanh_towardzero_test_data[] = - { - AUTO_TESTS_c_c (ctanh, towardzero), - }; - -static void -ctanh_test_towardzero (void) -{ - START (ctanh_towardzero, 0); - RUN_TEST_LOOP_c_c (ctanh, ctanh_towardzero_test_data, FE_TOWARDZERO); - END_COMPLEX; -} - - -static const struct test_c_c_data ctanh_downward_test_data[] = - { - AUTO_TESTS_c_c (ctanh, downward), - }; - -static void -ctanh_test_downward (void) -{ - START (ctanh_downward, 0); - RUN_TEST_LOOP_c_c (ctanh, ctanh_downward_test_data, FE_DOWNWARD); - END_COMPLEX; -} - - -static const struct test_c_c_data ctanh_upward_test_data[] = - { - AUTO_TESTS_c_c (ctanh, upward), - }; - -static void -ctanh_test_upward (void) -{ - START (ctanh_upward, 0); - RUN_TEST_LOOP_c_c (ctanh, ctanh_upward_test_data, FE_UPWARD); - END_COMPLEX; + ALL_RM_TEST (ctanh, 0, ctanh_test_data, RUN_TEST_LOOP_c_c, END_COMPLEX); } @@ -7107,7 +6761,7 @@ static const struct test_f_f_data erf_test_data[] = TEST_f_f (erf, minus_infty, -1), TEST_f_f (erf, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (erf, tonearest), + AUTO_TESTS_f_f (erf), }; static void @@ -7125,7 +6779,7 @@ static const struct test_f_f_data erfc_test_data[] = TEST_f_f (erfc, minus_infty, 2.0), TEST_f_f (erfc, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (erfc, tonearest), + AUTO_TESTS_f_f (erfc), }; static void @@ -7143,71 +6797,13 @@ static const struct test_f_f_data exp_test_data[] = TEST_f_f (exp, minus_infty, 0, NO_TEST_INLINE), TEST_f_f (exp, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (exp, tonearest), + AUTO_TESTS_f_f (exp), }; static void exp_test (void) { - START (exp, 0); - RUN_TEST_LOOP_f_f (exp, exp_test_data, ); - END; -} - - -static const struct test_f_f_data exp_tonearest_test_data[] = - { - AUTO_TESTS_f_f (exp, tonearest), - }; - -static void -exp_test_tonearest (void) -{ - START (exp_tonearest, 0); - RUN_TEST_LOOP_f_f (exp, exp_tonearest_test_data, FE_TONEAREST); - END; -} - - -static const struct test_f_f_data exp_towardzero_test_data[] = - { - AUTO_TESTS_f_f (exp, towardzero), - }; - -static void -exp_test_towardzero (void) -{ - START (exp_towardzero, 0); - RUN_TEST_LOOP_f_f (exp, exp_towardzero_test_data, FE_TOWARDZERO); - END; -} - - -static const struct test_f_f_data exp_downward_test_data[] = - { - AUTO_TESTS_f_f (exp, downward), - }; - -static void -exp_test_downward (void) -{ - START (exp_downward, 0); - RUN_TEST_LOOP_f_f (exp, exp_downward_test_data, FE_DOWNWARD); - END; -} - - -static const struct test_f_f_data exp_upward_test_data[] = - { - AUTO_TESTS_f_f (exp, upward), - }; - -static void -exp_test_upward (void) -{ - START (exp_upward, 0); - RUN_TEST_LOOP_f_f (exp, exp_upward_test_data, FE_UPWARD); - END; + ALL_RM_TEST (exp, 0, exp_test_data, RUN_TEST_LOOP_f_f, END); } @@ -7217,71 +6813,13 @@ static const struct test_f_f_data exp10_test_data[] = TEST_f_f (exp10, minus_infty, 0), TEST_f_f (exp10, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - AUTO_TESTS_f_f (exp10, tonearest), + AUTO_TESTS_f_f (exp10), }; static void exp10_test (void) { - START (exp10, 0); - RUN_TEST_LOOP_f_f (exp10, exp10_test_data, ); - END; -} |
