summaryrefslogtreecommitdiff
path: root/tests/tsqr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tsqr.c')
-rw-r--r--tests/tsqr.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/tsqr.c b/tests/tsqr.c
index 2ec2099..fa4350a 100644
--- a/tests/tsqr.c
+++ b/tests/tsqr.c
@@ -1,6 +1,6 @@
/* tsqr -- test file for mpc_sqr.
-Copyright (C) 2002, 2005, 2008, 2010, 2011, 2012 INRIA
+Copyright (C) 2002, 2005, 2008, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
@@ -164,10 +164,17 @@ reuse_bug (void)
mpc_clear (z1);
}
+#define MPC_FUNCTION_CALL \
+ P[0].mpc_inex = mpc_sqr (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
+#define MPC_FUNCTION_CALL_REUSE_OP1 \
+ P[0].mpc_inex = mpc_sqr (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_sqr);
test_start ();
testsqr (247, -65, 8, 24);
@@ -180,8 +187,9 @@ main (void)
testsqr (0, 1816, 8, 24);
testsqr (145, 0, 8, 24);
- data_check (f, "sqr.dat");
- tgeneric (f, 2, 1024, 1, 0);
+ data_check_template ("sqr.dsc", "sqr.dat");
+
+ tgeneric_template ("sqr.dsc", 2, 1024, 1, 1024);
reuse_bug ();