diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-12-02 16:54:12 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-12-02 16:54:12 +0000 |
commit | 0622de8c9f06a5579febd362da72639bd6e17e1f (patch) | |
tree | 3835ad63ef1d1b2346a64d999721c3a17fd4346f | |
parent | 2c25c7826d4bed8226209a1e9b1f06bff0783ceb (diff) | |
download | mpc-0622de8c9f06a5579febd362da72639bd6e17e1f.tar.gz |
[tests/] Add templated generic tests for mpc_add and mpc_sub, remove old test framework in tadd_tmpl and tsub_tmpl.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1348 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | tests/tadd_tmpl.c | 11 | ||||
-rw-r--r-- | tests/tsub_tmpl.c | 6 |
2 files changed, 7 insertions, 10 deletions
diff --git a/tests/tadd_tmpl.c b/tests/tadd_tmpl.c index e049468..044cb33 100644 --- a/tests/tadd_tmpl.c +++ b/tests/tadd_tmpl.c @@ -1,6 +1,6 @@ /* tadd_tmpl.c -- templated test file for mpc_add. -Copyright (C) 2008, 2010, 2011, 2012 INRIA +Copyright (C) 2008, 2010, 2011, 2012, 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 check_ternary_value (void) @@ -54,26 +53,26 @@ check_ternary_value (void) #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_add (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd) +#define MPC_FUNCTION_CALL_SYMMETRIC \ + P[0].mpc_inex = mpc_add (P[1].mpc, P[3].mpc, P[2].mpc, P[4].mpc_rnd) #define MPC_FUNCTION_CALL_REUSE_OP1 \ P[0].mpc_inex = mpc_add (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd) #define MPC_FUNCTION_CALL_REUSE_OP2 \ P[0].mpc_inex = mpc_add (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_add); - f.properties = FUNC_PROP_SYMETRIC; - test_start (); check_ternary_value(); data_check_template ("add.dsc", "add.dat"); - tgeneric (f, 2, 1024, 7, -1); + tgeneric_template ("add.dsc", 2, 1024, 7, 128); test_end (); diff --git a/tests/tsub_tmpl.c b/tests/tsub_tmpl.c index 7d457c1..77fff84 100644 --- a/tests/tsub_tmpl.c +++ b/tests/tsub_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_sub (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd) @@ -29,17 +28,16 @@ along with this program. If not, see http://www.gnu.org/licenses/ . P[0].mpc_inex = mpc_sub (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_sub); - test_start (); data_check_template ("sub.dsc", "sub.dat"); - tgeneric (f, 2, 1024, 7, -1); + tgeneric_template ("sub.dsc", 2, 1024, 7, 128); test_end (); |