summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mpz/t-pprime_p.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/mpz/t-pprime_p.c b/tests/mpz/t-pprime_p.c
index 65d1a9648..65e95c05f 100644
--- a/tests/mpz/t-pprime_p.c
+++ b/tests/mpz/t-pprime_p.c
@@ -104,6 +104,21 @@ check_composites (int count)
mpz_init (n);
mpz_init (bs);
+ static const char * const composites[] = {
+ "1194649", /* A square, but strong base-2 pseudoprime, */
+ "12327121", /* another base-2 pseudoprime square. */
+ "18446744066047760377", /* Should trigger Fibonacci's test, */
+ "1397419", /* Lucas' test with "large" D=43, */
+ "395009109077493751", /* Lucas' test with large D=113. */
+ NULL
+ };
+
+ for (i = 0; composites[i]; i++)
+ {
+ mpz_set_str_or_abort (n, composites[i], 0);
+ check_one (n, 0);
+ }
+
for (i = 0; i < count; i++)
{
mpz_urandomb (bs, rands, 32);