summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-11-06 13:44:20 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-11-06 13:44:20 +0000
commit3ae3579bf1c8557859a194414c9eb5d3bfb2d76d (patch)
tree0e0b7111603aa6bdf3e9cee7aa1403eb3b59cc2e
parent18725b5b45ab48300a7da4cf74b848ea902d0e01 (diff)
downloadmpc-3ae3579bf1c8557859a194414c9eb5d3bfb2d76d.tar.gz
[tests/] Add templated test for mpc_acos.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1318 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/acos.dsc28
-rw-r--r--tests/tacos_tmpl.c44
3 files changed, 77 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7c5044b..dd5335d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,8 +28,8 @@ AM_LDFLAGS = -no-install
LOADLIBES=$(DEFS) -I$(top_srcdir)/src -I$(top_builddir) $(CPPFLAGS) \
$(CFLAGS) -L$(top_builddir)/tests/.libs -lmpc-tests -lmpc -lm $(LIBS)
-TEMPLATED = tabs_tmpl tadd_tmpl tadd_fr_tmpl tmul_tmpl tpow_tmpl tpow_fr_tmpl \
- tpow_si_tmpl tpow_ui_tmpl tpow_z_tmpl tsub_tmpl
+TEMPLATED = tabs_tmpl tacos_tmpl tadd_tmpl tadd_fr_tmpl tmul_tmpl tpow_tmpl \
+ tpow_fr_tmpl tpow_si_tmpl tpow_ui_tmpl tpow_z_tmpl tsub_tmpl
check_PROGRAMS = tabs tacos tacosh tadd tadd_fr tadd_si tadd_ui targ tasin \
tasinh tatan tatanh tconj tcos tcosh tdiv tdiv_2si tdiv_2ui tdiv_fr tdiv_ui \
texp tfma tfr_div tfr_sub timag tio_str tlog tlog10 tmul tmul_2si tmul_2ui \
@@ -45,8 +45,9 @@ libmpc_tests_la_SOURCES=mpc-tests.h random.c tgeneric.c read_data.c \
print_parameter.c read_description.c read_line.c tpl_gmp.c \
tpl_mpc.c tpl_mpfr.c tpl_native.c
-TEMPLATES = data_check.tpl abs.dsc add.dsc add_fr.dsc add_si.dsc add_ui.dsc \
- mul.dsc pow.dsc pow_fr.dsc pow_si.dsc pow_ui.dsc pow_z.dsc sub.dsc
+TEMPLATES = data_check.tpl abs.dsc acos.dsc add.dsc add_fr.dsc add_si.dsc \
+ add_ui.dsc mul.dsc pow.dsc pow_fr.dsc pow_si.dsc pow_ui.dsc pow_z.dsc \
+ sub.dsc
DATA_SETS = abs.dat acos.dat acosh.dat asin.dat asinh.dat atan.dat \
atanh.dat add.dat add_fr.dat arg.dat conj.dat cos.dat cosh.dat \
div.dat div_fr.dat exp.dat fma.dat fr_div.dat fr_sub.dat \
diff --git a/tests/acos.dsc b/tests/acos.dsc
new file mode 100644
index 0000000..08a1c13
--- /dev/null
+++ b/tests/acos.dsc
@@ -0,0 +1,28 @@
+# Description file for mpc_acos
+#
+# Copyright (C) 2013 INRIA
+#
+# This file is part of GNU MPC.
+#
+# GNU MPC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+#o ption) any later version.
+#
+# GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+# more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/ .
+#
+NAME:
+ mpc_acos
+RETURN:
+ mpc_inex
+OUTPUT:
+ mpc_ptr
+INPUT:
+ mpc_srcptr
+ mpc_rnd_t
diff --git a/tests/tacos_tmpl.c b/tests/tacos_tmpl.c
new file mode 100644
index 0000000..27327c5
--- /dev/null
+++ b/tests/tacos_tmpl.c
@@ -0,0 +1,44 @@
+/* tacos_tmpl -- templated test file for mpc_acos.
+
+Copyright (C) 2009, 2013 INRIA
+
+This file is part of GNU MPC.
+
+GNU MPC is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+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)
+#define MPC_FUNCTION_CALL_REUSE_OP1 \
+ P[0].mpc_inex = mpc_acos (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
+
+#include "data_check.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);
+
+ test_end ();
+
+ return 0;
+}