Add option to run all prime tests.
authorBen Laurie <ben@links.org>
Sat, 31 May 2014 17:20:03 +0000 (18:20 +0100)
committerBen Laurie <ben@links.org>
Sun, 1 Jun 2014 14:31:27 +0000 (15:31 +0100)
apps/speed.c

index 00a7f19..0816565 100644 (file)
@@ -1018,6 +1018,11 @@ int MAIN(int argc, char **argv)
                        prime_doit[D_PRIME_TRIAL_DIVISION_RETRY] = 1;
                else if (strcmp(*argv,"prime-coprime") == 0)
                        prime_doit[D_PRIME_COPRIME] = 1;
+               else if (strcmp(*argv,"prime") == 0)
+                       {
+                       for (i=0; i < PRIME_NUM; i++)
+                               prime_doit[i]=1;
+                       }
                else
                        {
                        BIO_printf(bio_err,"Error: bad option or value\n");