diff options
-rw-r--r-- | source/tests/secure_random.test.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/tests/secure_random.test.c b/source/tests/secure_random.test.c index cb7b477..7ba78e6 100644 --- a/source/tests/secure_random.test.c +++ b/source/tests/secure_random.test.c @@ -4,9 +4,9 @@ #define KIT_TEST_FILE secure_random #include "../kit_test/test.h" -TEST("secure random") { - int i, j; +#include <stdio.h> +TEST("secure random") { int v[20]; memset(v, 0, sizeof v); @@ -15,10 +15,13 @@ TEST("secure random") { int repeats = 0; - for (i = 1; i < sizeof v / sizeof *v; i++) - for (j = 0; j < i; j++) + for (int i = 1; i < sizeof v / sizeof *v; i++) + printf(" %d \n", v[i]); + + for (int i = 1; i < sizeof v / sizeof *v; i++) + for (int j = 0; j < i; j++) if (v[i] == v[j]) repeats++; - REQUIRE(repeats <= 1); + REQUIRE(repeats == 0); } |