Commit 813963178f5ef8c114329daae5b8c5864d2b78a1

czurnieden 2018-12-30T22:35:03

reg. #143 added test to demo.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/demo/demo.c b/demo/demo.c
index a93ce1d..0aeae25 100644
--- a/demo/demo.c
+++ b/demo/demo.c
@@ -715,6 +715,16 @@ int main(void)
          return EXIT_FAILURE;
       }
    }
+   /* Check regarding problem #143 */
+#ifndef MP_8BIT
+   mp_read_radix(&a,    "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF",
+                 16);
+   mp_prime_strong_lucas_selfridge(&a, &cnt);
+   if (cnt != MP_YES) {
+      printf("\n\nissue #143 - mp_prime_strong_lucas_selfridge FAILED!\n");
+      return EXIT_FAILURE;
+   }
+#endif
 
    printf("\n\n");