diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-12-02 18:52:16 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-12-02 18:52:16 +0000 |
commit | 38fdb7a40ed5be345cf4d42eb417be31c50835b3 (patch) | |
tree | 5b00914f6f6ee787f7330892fb2eca31744f8309 | |
parent | 529ca9ee0d826399b791f7fdcaf03a7ba80d77c2 (diff) | |
download | mpc-38fdb7a40ed5be345cf4d42eb417be31c50835b3.tar.gz |
[tests/] Add templated generic tests.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1358 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | tests/tacos_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tacosh_tmpl.c | 7 | ||||
-rw-r--r-- | tests/targ_tmpl.c | 6 | ||||
-rw-r--r-- | tests/tasin_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tasinh_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tatan_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tatanh_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tconj_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tcos_tmpl.c | 6 | ||||
-rw-r--r-- | tests/tcosh_tmpl.c | 9 | ||||
-rw-r--r-- | tests/tdiv_fr_tmpl.c | 8 | ||||
-rw-r--r-- | tests/tdiv_tmpl.c | 8 | ||||
-rw-r--r-- | tests/texp_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tfma_tmpl.c | 9 | ||||
-rw-r--r-- | tests/tfr_div_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tfr_sub_tmpl.c | 8 | ||||
-rw-r--r-- | tests/tlog10_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tlog_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tmul_fr_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tmul_tmpl.c | 9 | ||||
-rw-r--r-- | tests/tneg_tmpl.c | 6 | ||||
-rw-r--r-- | tests/tnorm_tmpl.c | 18 | ||||
-rw-r--r-- | tests/tpow_fr_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tpow_tmpl.c | 8 | ||||
-rw-r--r-- | tests/tproj_tmpl.c | 6 | ||||
-rw-r--r-- | tests/tsin_tmpl.c | 7 | ||||
-rw-r--r-- | tests/tsinh_tmpl.c | 6 | ||||
-rw-r--r-- | tests/ttan_tmpl.c | 8 | ||||
-rw-r--r-- | tests/ttanh_tmpl.c | 7 |
29 files changed, 97 insertions, 123 deletions
diff --git a/tests/tacos_tmpl.c b/tests/tacos_tmpl.c index 27327c5..3db6d2c 100644 --- a/tests/tacos_tmpl.c +++ b/tests/tacos_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_acos (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_acos (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_acos); - test_start (); data_check_template ("acos.dsc", "acos.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("acos.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/tacosh_tmpl.c b/tests/tacosh_tmpl.c index e6b29dd..82be18f 100644 --- a/tests/tacosh_tmpl.c +++ b/tests/tacosh_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void bug20091120 (void) @@ -46,18 +45,18 @@ bug20091120 (void) P[0].mpc_inex = mpc_acosh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_acosh); - test_start (); bug20091120 (); data_check_template ("acosh.dsc", "acosh.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("acosh.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/targ_tmpl.c b/tests/targ_tmpl.c index 41f79fe..690bea1 100644 --- a/tests/targ_tmpl.c +++ b/tests/targ_tmpl.c @@ -19,23 +19,21 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpfr_inex = mpc_arg (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (FC, f, mpc_arg); - test_start (); data_check_template ("arg.dsc", "arg.dat"); - tgeneric (f, 2, 1024, 1, 4096); + tgeneric_template ("arg.dsc", 2, 1024, 1, 4096); test_end (); diff --git a/tests/tasin_tmpl.c b/tests/tasin_tmpl.c index de2c47c..13f4e2e 100644 --- a/tests/tasin_tmpl.c +++ b/tests/tasin_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_asin (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_asin (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_asin); - test_start (); data_check_template ("asin.dsc", "asin.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("asin.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/tasinh_tmpl.c b/tests/tasinh_tmpl.c index 5664020..c046d51 100644 --- a/tests/tasinh_tmpl.c +++ b/tests/tasinh_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void bug20091120 (void) @@ -46,18 +45,18 @@ bug20091120 (void) P[0].mpc_inex = mpc_asinh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_asinh); - test_start (); bug20091120 (); data_check_template ("asinh.dsc", "asinh.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("asinh.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/tatan_tmpl.c b/tests/tatan_tmpl.c index 6c68840..e6d6688 100644 --- a/tests/tatan_tmpl.c +++ b/tests/tatan_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #if 0 /* tests intermediate underflow; WONTFIX */ @@ -57,16 +56,16 @@ test_underflow (void) P[0].mpc_inex = mpc_atan (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_atan); - test_start (); data_check_template ("atan.dsc", "atan.dat"); - tgeneric (f, 2, 512, 5, 128); + + tgeneric_template ("atan.dsc", 2, 512, 5, 128); test_end (); diff --git a/tests/tatanh_tmpl.c b/tests/tatanh_tmpl.c index 77ad689..6c4fcc9 100644 --- a/tests/tatanh_tmpl.c +++ b/tests/tatanh_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void bug20091120 (void) @@ -46,18 +45,18 @@ bug20091120 (void) P[0].mpc_inex = mpc_atanh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_atanh); - test_start (); bug20091120 (); data_check_template ("atanh.dsc", "atanh.dat"); - tgeneric (f, 2, 512, 5, 128); + + tgeneric_template ("atanh.dsc", 2, 512, 5, 128); test_end (); diff --git a/tests/tconj_tmpl.c b/tests/tconj_tmpl.c index c2e418b..d875ad9 100644 --- a/tests/tconj_tmpl.c +++ b/tests/tconj_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_conj (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_conj (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_conj); - test_start (); data_check_template ("conj.dsc", "conj.dat"); - tgeneric (f, 2, 1024, 1, 0); + + tgeneric_template ("conj.dsc", 2, 1024, 1, 0); test_end (); diff --git a/tests/tcos_tmpl.c b/tests/tcos_tmpl.c index 712b9d6..66fb76f 100644 --- a/tests/tcos_tmpl.c +++ b/tests/tcos_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void bug20090105 (void) @@ -54,17 +53,16 @@ bug20090105 (void) P[0].mpc_inex = mpc_cos (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_cos); - test_start (); data_check_template ("cos.dsc", "cos.dat"); - tgeneric (f, 2, 512, 7, 7); + tgeneric_template ("cos.dsc", 2, 512, 7, 7); bug20090105 (); /* TODO: move data in cos.dat */ diff --git a/tests/tcosh_tmpl.c b/tests/tcosh_tmpl.c index b53a2ce..344f25b 100644 --- a/tests/tcosh_tmpl.c +++ b/tests/tcosh_tmpl.c @@ -20,7 +20,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include <stdlib.h> #include "templates.h" -#include "mpc-tests.h" static void pure_real_argument (void) @@ -122,17 +121,17 @@ pure_imaginary_argument (void) P[0].mpc_inex = mpc_cosh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" - +#include "tgeneric.tpl" int main (void) { - DECL_FUNC(CC, f, mpc_cosh); - test_start (); data_check_template ("cosh.dsc", "cosh.dat"); - tgeneric (f, 2, 512, 7, 7); + tgeneric_template ("cosh.dsc", 2, 512, 7, 7); + + /* FIXME: remove the following tests? (Now tested by tgeneric) */ pure_real_argument (); pure_imaginary_argument (); diff --git a/tests/tdiv_fr_tmpl.c b/tests/tdiv_fr_tmpl.c index dd200cd..bf8298c 100644 --- a/tests/tdiv_fr_tmpl.c +++ b/tests/tdiv_fr_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_div_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd) @@ -27,16 +26,15 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_div_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd) #include "data_check.tpl" - +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CCF, f, mpc_div_fr); - test_start (); data_check_tmpl ("div_fr.dsc", "div_fr.dat"); - tgeneric (f, 2, 1024, 7, -1); + + tgeneric_template ("div_fr.dsc", 2, 1024, 7, -1); test_end (); diff --git a/tests/tdiv_tmpl.c b/tests/tdiv_tmpl.c index 3400c7c..e70f5e2 100644 --- a/tests/tdiv_tmpl.c +++ b/tests/tdiv_tmpl.c @@ -20,7 +20,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include <stdlib.h> #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_div (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd) @@ -30,17 +29,18 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_div (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (C_CC, f, mpc_div); - test_start (); data_check_template ("div.dsc", "div.dat"); - tgeneric (f, 2, 1024, 7, 4096); + + tgeneric_template ("div.dsc", 2, 1024, 7, 4096); test_end (); + return 0; } diff --git a/tests/texp_tmpl.c b/tests/texp_tmpl.c index fd8a30b..c7c37e6 100644 --- a/tests/texp_tmpl.c +++ b/tests/texp_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_exp (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_exp (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_exp); - test_start (); data_check_template ("exp.dsc", "exp.dat"); - tgeneric (f, 2, 512, 7, 256); + + tgeneric_template ("exp.dsc", 2, 512, 7, 256); test_end (); diff --git a/tests/tfma_tmpl.c b/tests/tfma_tmpl.c index d699205..cfc1ea3 100644 --- a/tests/tfma_tmpl.c +++ b/tests/tfma_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void cmpfma (mpc_srcptr a, mpc_srcptr b, mpc_srcptr c, mpc_rnd_t rnd) @@ -103,18 +102,18 @@ check_random (void) mpc_fma (P[1].mpc, P[2].mpc, P[3].mpc, P[1].mpc, P[5].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CCCC, f, mpc_fma); - test_start (); - check_random (); + check_random (); /* Remove it? */ data_check_template ("fma.dsc", "fma.dat"); - tgeneric (f, 2, 1024, 1, 256); + + tgeneric_template ("fma.dsc", 2, 1024, 1, 256); test_end (); diff --git a/tests/tfr_div_tmpl.c b/tests/tfr_div_tmpl.c index 91bd435..39e53a5 100644 --- a/tests/tfr_div_tmpl.c +++ b/tests/tfr_div_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_fr_div (P[1].mpc, P[2].mpfr, P[3].mpc, P[4].mpc_rnd) @@ -27,16 +26,18 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_fr_div (P[1].mpc, P[2].mpfr, P[1].mpc, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CFC, f, mpc_fr_div); test_start(); data_check_template ("fr_div.dsc", "fr_div.dat"); - tgeneric (f, 2, 1024, 7, 65535); + + tgeneric_template ("fr_div.dsc", 2, 1024, 7, 65535); test_end (); + return 0; } diff --git a/tests/tfr_sub_tmpl.c b/tests/tfr_sub_tmpl.c index 3eb865f..7b295b4 100644 --- a/tests/tfr_sub_tmpl.c +++ b/tests/tfr_sub_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_fr_sub (P[1].mpc, P[2].mpfr, P[3].mpc, P[4].mpc_rnd) @@ -27,17 +26,18 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_fr_sub (P[1].mpc, P[2].mpfr, P[1].mpc, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC(CFC, f, mpc_fr_sub); - test_start(); data_check_template ("fr_sub.dsc", "fr_sub.dat"); - tgeneric (f, 2, 4096, 7, 0); + + tgeneric_template ("fr_sub.dsc", 2, 4096, 7, 1024); test_end (); + return 0; } diff --git a/tests/tlog10_tmpl.c b/tests/tlog10_tmpl.c index 425196c..1d57350 100644 --- a/tests/tlog10_tmpl.c +++ b/tests/tlog10_tmpl.c @@ -20,7 +20,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_log10 (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -28,16 +27,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_log10 (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_log10); - test_start (); data_check_template ("log10.dsc", "log10.dat"); - tgeneric (f, 2, 512, 7, 128); + + tgeneric_template ("log10.dsc", 2, 512, 7, 128); test_end (); diff --git a/tests/tlog_tmpl.c b/tests/tlog_tmpl.c index 0bdfb9f..5de84e5 100644 --- a/tests/tlog_tmpl.c +++ b/tests/tlog_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_log (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_log (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_log); - test_start (); data_check_template ("log.dsc", "log.dat"); - tgeneric (f, 2, 512, 7, 128); + + tgeneric_template ("log.dsc", 2, 512, 7, 128); test_end (); diff --git a/tests/tmul_fr_tmpl.c b/tests/tmul_fr_tmpl.c index 28021b6..9c4b32d 100644 --- a/tests/tmul_fr_tmpl.c +++ b/tests/tmul_fr_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_mul_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_mul_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CCF, f, mpc_mul_fr); - test_start (); data_check_template ("mul_fr.dsc", "mul_fr.dat"); - tgeneric (f, 2, 1024, 7, -1); + + tgeneric_template ("mul_fr.dsc", 2, 1024, 7, -1); test_end (); diff --git a/tests/tmul_tmpl.c b/tests/tmul_tmpl.c index a4f54d4..9c01361 100644 --- a/tests/tmul_tmpl.c +++ b/tests/tmul_tmpl.c @@ -24,7 +24,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #endif #include "templates.h" -#include "mpc-tests.h" static void cmpmul (mpc_srcptr x, mpc_srcptr y, mpc_rnd_t rnd) @@ -198,19 +197,19 @@ timemul (void) #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_mul (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd) +#define MPC_FUNCTION_CALL_SYMMETRIC \ + P[0].mpc_inex = mpc_mul (P[1].mpc, P[3].mpc, P[2].mpc, P[4].mpc_rnd) #define MPC_FUNCTION_CALL_REUSE_OP1 \ P[0].mpc_inex = mpc_mul (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd) #define MPC_FUNCTION_CALL_REUSE_OP2 \ P[0].mpc_inex = mpc_mul (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (C_CC, f, mpc_mul); - f.properties = FUNC_PROP_SYMETRIC; - test_start (); #ifdef TIMING @@ -221,7 +220,7 @@ main (void) data_check_template ("mul.dsc", "mul.dat"); - tgeneric (f, 2, 4096, 41, 100); + tgeneric_template ("mul.dsc", 2, 4096, 41, 1024); test_end (); diff --git a/tests/tneg_tmpl.c b/tests/tneg_tmpl.c index 833d678..fbcc3ad 100644 --- a/tests/tneg_tmpl.c +++ b/tests/tneg_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_neg (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,15 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_neg (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_neg); test_start (); data_check_template ("neg.dsc", "neg.dat"); - tgeneric (f, 2, 1024, 1, 0); + + tgeneric_template ("neg.dsc", 2, 1024, 1, 0); test_end (); diff --git a/tests/tnorm_tmpl.c b/tests/tnorm_tmpl.c index 950f87e..78ca948 100644 --- a/tests/tnorm_tmpl.c +++ b/tests/tnorm_tmpl.c @@ -20,12 +20,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include "templates.h" -#include "mpc-tests.h" - -#define MPC_FUNCTION_CALL \ - P[0].mpfr_inex = mpc_norm (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd) - -#include "data_check.tpl" static void test_underflow (void) @@ -100,15 +94,21 @@ test_underflow (void) mpfr_set_emin (emin); } +#define MPC_FUNCTION_CALL \ + P[0].mpfr_inex = mpc_norm (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd) + +#include "data_check.tpl" +#include "tgeneric.tpl" + int main (void) { - DECL_FUNC (FC, f, mpc_norm); - test_start (); data_check_template ("norm.dsc", "norm.dat"); - tgeneric (f, 2, 1024, 1, 4096); + + tgeneric_template ("norm.dsc", 2, 1024, 1, 4096); + test_underflow (); test_end (); diff --git a/tests/tpow_fr_tmpl.c b/tests/tpow_fr_tmpl.c index 6206ed5..32c8352 100644 --- a/tests/tpow_fr_tmpl.c +++ b/tests/tpow_fr_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void test_reuse (void) @@ -54,18 +53,18 @@ test_reuse (void) P[0].mpc_inex = mpc_pow_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CCF, f, mpc_pow_fr); test_start (); - test_reuse (); + test_reuse (); /* FIXME: remove it, already checked by tgeneric */ data_check_template ("pow_fr.dsc", "pow_fr.dat"); - tgeneric (f, 2, 1024, 7, 10); + tgeneric_template ("pow_fr.dsc", 2, 1024, 7, 10); test_end (); diff --git a/tests/tpow_tmpl.c b/tests/tpow_tmpl.c index 499e3da..7a66c0c 100644 --- a/tests/tpow_tmpl.c +++ b/tests/tpow_tmpl.c @@ -1,6 +1,6 @@ /* tpow_tmpl.c -- test file for mpc_pow. -Copyright (C) 2009, 2011 INRIA +Copyright (C) 2009, 2011, 2013 INRIA This file is part of GNU MPC. @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" static void reuse_bug (void) @@ -61,19 +60,18 @@ reuse_bug (void) P[0].mpc_inex = mpc_pow (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (C_CC, f, mpc_pow); - test_start (); reuse_bug (); data_check_template ("pow.dsc", "pow.dat"); - tgeneric (f, 2, 1024, 7, 10); + tgeneric_template ("pow.dsc", 2, 1024, 7, 10); test_end (); diff --git a/tests/tproj_tmpl.c b/tests/tproj_tmpl.c index e7825ab..fd90650 100644 --- a/tests/tproj_tmpl.c +++ b/tests/tproj_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_proj (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,17 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_proj (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_proj); - test_start (); data_check_template ("proj.dsc", "proj.dat"); - tgeneric (f, 2, 1024, 1, 4096); + tgeneric_template ("proj.dsc", 2, 1024, 1, 4096); test_end (); diff --git a/tests/tsin_tmpl.c b/tests/tsin_tmpl.c index 36f10f2..7f66e54 100644 --- a/tests/tsin_tmpl.c +++ b/tests/tsin_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_sin (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_sin (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_sin); - test_start (); data_check_template ("sin.dsc", "sin.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("sin.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/tsinh_tmpl.c b/tests/tsinh_tmpl.c index 56c67e3..909229b 100644 --- a/tests/tsinh_tmpl.c +++ b/tests/tsinh_tmpl.c @@ -27,16 +27,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_sinh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_sinh); - test_start (); data_check_template ("sinh.dsc", "sinh.dat"); - tgeneric (f, 2, 512, 7, 7); + + tgeneric_template ("sinh.dsc", 2, 512, 7, 7); test_end (); diff --git a/tests/ttan_tmpl.c b/tests/ttan_tmpl.c index 79841db..d74a74a 100644 --- a/tests/ttan_tmpl.c +++ b/tests/ttan_tmpl.c @@ -20,7 +20,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include <stdlib.h> #include "templates.h" -#include "mpc-tests.h" static void pure_real_argument (void) @@ -204,17 +203,18 @@ pure_imaginary_argument (void) P[0].mpc_inex = mpc_tan (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_tan); - test_start (); data_check_template ("tan.dsc", "tan.dat"); - tgeneric (f, 2, 512, 7, 4); + tgeneric_template ("tan.dsc", 2, 512, 7, 4); + + /* FIXME: remove them? */ pure_real_argument (); pure_imaginary_argument (); diff --git a/tests/ttanh_tmpl.c b/tests/ttanh_tmpl.c index 232b46c..ca4f457 100644 --- a/tests/ttanh_tmpl.c +++ b/tests/ttanh_tmpl.c @@ -19,7 +19,6 @@ along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "templates.h" -#include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_tanh (P[1].mpc, P[2].mpc, P[3].mpc_rnd) @@ -27,16 +26,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_tanh (P[1].mpc, P[1].mpc, P[3].mpc_rnd) #include "data_check.tpl" +#include "tgeneric.tpl" int main (void) { - DECL_FUNC (CC, f, mpc_tanh); - test_start (); data_check_template ("tanh.dsc", "tanh.dat"); - tgeneric (f, 2, 512, 7, 4); + + tgeneric_template ("tanh.dsc", 2, 512, 7, 4); test_end (); |