summaryrefslogtreecommitdiff
path: root/tests/tinternals.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-06-26 14:00:59 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-06-26 14:00:59 +0000
commit48a90247900d94e6fd660387e6a4ade9a833b41f (patch)
tree21120ab52b70ed5d8c5f61ee94ab5bf0ebcfe850 /tests/tinternals.c
parentd18b1abe1133d82b30e2ee43d9f7181209607cfd (diff)
downloadmpfr-48a90247900d94e6fd660387e6a4ade9a833b41f.tar.gz
[tests/tinternals.c] mpfr_set_prec_raw missing tests (thanks to Patrick).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8253 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tinternals.c')
-rw-r--r--tests/tinternals.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tinternals.c b/tests/tinternals.c
index 204aeead4..d179a517b 100644
--- a/tests/tinternals.c
+++ b/tests/tinternals.c
@@ -120,6 +120,25 @@ test_round_near_x (void)
mpfr_clears (x, y, z, eps, (mpfr_ptr) 0);
}
+static void
+test_set_prec_raw (void)
+{
+ mpfr_t x;
+ int i;
+
+ mpfr_init2 (x, 53);
+ for (i = 2; i < 11; i++)
+ {
+ mpfr_set_prec_raw (x, i);
+ if (MPFR_PREC (x) != i)
+ {
+ printf ("[ERROR]: mpfr_set_prec_raw %d\n", i);
+ exit (1);
+ }
+ }
+ mpfr_clear (x);
+}
+
int
main (int argc, char **argv)
{
@@ -132,6 +151,7 @@ main (int argc, char **argv)
#endif
test_round_near_x ();
+ test_set_prec_raw ();
tests_end_mpfr ();
return 0;