diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-17 14:50:27 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-17 14:50:27 +0000 |
commit | d5a3ca63260b399f31fb5e4b40b8ea542e1d6c94 (patch) | |
tree | fdfe342392f733c02852de04737c9281cf9c1967 /tests/tfr_sub.c | |
parent | d9b9bbac92266eb7fe10f6bd8348ad318a68a980 (diff) | |
download | mpc-d5a3ca63260b399f31fb5e4b40b8ea542e1d6c94.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://scm.gforge.inria.fr/svn/mpc/trunk@258 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/tfr_sub.c')
-rw-r--r-- | tests/tfr_sub.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/tests/tfr_sub.c b/tests/tfr_sub.c index adb6aa6..195381d 100644 --- a/tests/tfr_sub.c +++ b/tests/tfr_sub.c @@ -19,40 +19,16 @@ 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_sub_ref (mpc_t q, mpfr_t x, mpc_t z, mpc_rnd_t rnd); - -#include "random.c" -#define TEST_FUNCTION mpc_fr_sub -#define REFERENCE_FUNCTION mpc_fr_sub_ref -#include "tgeneric_cfc.c" - -static int -mpc_fr_sub_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_sub (q, y, z, rnd); - - mpc_clear (y); - return inexact; -} +#include "mpc-tests.h" int main (void) { + DECL_CFC_FUNC(f, mpc_fr_sub); + test_start(); - tgeneric (2, 4096, 7, 0); + tgeneric (f, 2, 4096, 7, 0); test_end (); return 0; |