Skip to content

Commit f18b00b

Browse files
Christoph ZurniedenChristoph Zurnieden
authored andcommitted
Refined tests
1 parent 4106133 commit f18b00b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

demo/test.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ static int test_mp_fread_fwrite(void)
315315
return EXIT_FAILURE;
316316
}
317317

318+
#ifndef SC_RSA_1_WITH_TESTS
318319
#include <printf.h>
319320
#define LTM_TEST_BUFSIZ 1024
320321
static int test_mp_printf_extension(void)
@@ -427,9 +428,8 @@ static int test_mp_printf_extension(void)
427428
fclose(test_file);
428429
/* We don't delete the testfile in case of error, conrtent might be helpful. */
429430
return EXIT_FAILURE;
430-
431-
432431
}
432+
#endif
433433

434434
static mp_err very_random_source(void *out, size_t size)
435435
{
@@ -1692,6 +1692,9 @@ static int test_mp_log(void)
16921692
DO(mp_rand(&a, i));
16931693
for (j = 1; j < ((i/2)+1); j++) {
16941694
DO(mp_rand(&base, j));
1695+
if (mp_cmp_d(&base,2u) == MP_LT) {
1696+
continue;
1697+
}
16951698
DO(mp_log(&a, &base, &lb));
16961699
DO(mp_expt_n(&base, lb, &bn));
16971700
/* "bn" must be smaller than or equal to "a" at this point. */

0 commit comments

Comments
 (0)