summaryrefslogtreecommitdiff
path: root/tests/tfr_div.c
diff options
context:
space:
mode:
authorPhilippe Theveny <philippe.theveny@laposte.net>2008-10-17 14:50:27 +0000
committerPhilippe Theveny <philippe.theveny@laposte.net>2008-10-17 14:50:27 +0000
commit221ce829211fab364f96b29e6a501964ad4584d5 (patch)
treefdfe342392f733c02852de04737c9281cf9c1967 /tests/tfr_div.c
parent86f5881eb28c7f7f9b7a8207dc2fa139bcb1407c (diff)
downloadmpc-git-221ce829211fab364f96b29e6a501964ad4584d5.tar.gz
tests/tgeneric_ccc.c, tests/tgeneric_ccs.c, tests/tgeneric_ccu.c, tests/tgeneric_cc.c, tests/tgeneric_cfc.c, tests/tgeneric_cuuc.c, tests/tgeneric_fc.c, tests/tgeneric_ccf.c, tests/tgeneric_cuc.c: code moved into test/tgeneric.c.
tests/read_data_cc.c: code moved into tests/read_data.c. tests/mpc-tests.h: helper test function are in this new library tests/tgeneric.c: generic are reuse tests for all function prototypes used in MPC. tests/read_data.c: read data in a file. tests/comparisons.c: comparaison function working also with special values tests/random.c: functions become public tests/tsub_ui.c: use new libmpc-tests tests/tconj.c: use new libmpc-tests tests/tmul_ui.c: use new libmpc-tests tests/tmul_2exp.c: use new libmpc-tests tests/texp.c: use new libmpc-tests tests/tsinh.c: use new libmpc-tests tests/tneg.c: use new libmpc-tests tests/tui_div.c: use new libmpc-tests tests/tsub_fr.c: use new libmpc-tests tests/tdiv_2exp.c: use new libmpc-tests tests/tmul_fr.c: use new libmpc-tests tests/tadd_ui.c: use new libmpc-tests tests/tsqrt.c: use new libmpc-tests tests/ttanh.c: use new libmpc-tests tests/tfr_div.c: use new libmpc-tests tests/tnorm.c: use new libmpc-tests tests/tadd_fr.c: use new libmpc-tests tests/tfr_sub.c: use new libmpc-tests tests/tui_ui_sub.c: use new libmpc-tests tests/tmul_si.c: use new libmpc-tests tests/tdiv_ui.c: use new libmpc-tests tests/tlog.c: use new libmpc-tests tests/tdiv.c: use new libmpc-tests tests/ttan.c: use new libmpc-tests tests/tcos.c: use new libmpc-tests tests/tadd.c: use new libmpc-tests tests/tsin.c: use new libmpc-tests tests/tsub.c: use new libmpc-tests tests/tcosh.c: use new libmpc-tests tests/tmul.c: use new libmpc-tests tests/tabs.c: use new libmpc-tests tests/tsqr.c: use new libmpc-tests tests/tdiv_fr.c: use new libmpc-tests tests/tui_sub.c: removed because mpc_ui_sub is a macro. tests/abs.dat: new test file for mpc_abs. tests/Makefile.am: record previous changes. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/trunk@258 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/tfr_div.c')
-rw-r--r--tests/tfr_div.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/tests/tfr_div.c b/tests/tfr_div.c
index 1d9dd0e..9c32baf 100644
--- a/tests/tfr_div.c
+++ b/tests/tfr_div.c
@@ -19,40 +19,15 @@ along with the MPC Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#include <stdio.h>
-#include <stdlib.h>
-#include "gmp.h"
-#include "mpfr.h"
-#include "mpc.h"
-
-static int
-mpc_fr_div_ref (mpc_t q, mpfr_t x, mpc_t z, mpc_rnd_t rnd);
-
-#include "random.c"
-#define TEST_FUNCTION mpc_fr_div
-#define REFERENCE_FUNCTION mpc_fr_div_ref
-#include "tgeneric_cfc.c"
-
-static int
-mpc_fr_div_ref (mpc_t q, mpfr_t x, mpc_t z, mpc_rnd_t rnd)
-{
- int inexact;
- mpc_t y;
- mpc_init2 (y, MPFR_PREC (x));
- mpc_set_fr (y, x, MPC_RNDNN);
-
- inexact = mpc_div (q, y, z, rnd);
-
- mpc_clear (y);
- return inexact;
-}
+#include "mpc-tests.h"
int
main (void)
{
+ DECL_CFC_FUNC (f, mpc_fr_div);
test_start();
- tgeneric (2, 1024, 7, 65535);
+ tgeneric (f, 2, 1024, 7, 65535);
test_end ();
return 0;