summaryrefslogtreecommitdiff
path: root/tests/tadd.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-04-07 07:44:14 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-04-07 07:44:14 +0000
commit674ba0a09c4fa5b29cc04c1a21b251554208fb4c (patch)
tree5a089f7a5deebe71006320ed37975be6c221dc2b /tests/tadd.c
parent4d4386e4ca0a203f8ea925d7b4e3bfd9d00a2ee1 (diff)
downloadmpfr-674ba0a09c4fa5b29cc04c1a21b251554208fb4c.tar.gz
Add random tests (tgeneric + random2).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3433 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tadd.c')
-rw-r--r--tests/tadd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/tadd.c b/tests/tadd.c
index 149810424..4fdff27c5 100644
--- a/tests/tadd.c
+++ b/tests/tadd.c
@@ -19,7 +19,7 @@ along with the MPFR 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. */
-#define N 30000
+#define NUM 30000
#include <stdio.h>
#include <stdlib.h>
@@ -682,7 +682,7 @@ check_1111 (void)
mpfr_init2 (one, MPFR_PREC_MIN);
mpfr_set_ui (one, 1, GMP_RNDN);
- for (n = 0; n < N; n++)
+ for (n = 0; n < NUM; n++)
{
mp_prec_t prec_a, prec_b, prec_c;
mp_exp_t tb=0, tc, diff;
@@ -1067,11 +1067,17 @@ tests (void)
check_1minuseps ();
}
+#define TEST_FUNCTION test_add
+#define TWO_ARGS
+#define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100)
+#include "tgeneric.c"
+
int
main (int argc, char *argv[])
{
+ MPFR_TEST_USE_RANDS ();
tests_start_mpfr ();
- mpfr_test_init ();
+ /* mpfr_test_init (); */
usesp = 0;
tests ();
@@ -1080,6 +1086,7 @@ main (int argc, char *argv[])
usesp = 1;
tests ();
#endif
+ test_generic (2, 1000, 100);
tests_end_mpfr ();
return 0;