summaryrefslogtreecommitdiff
path: root/source/tests
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-06 03:22:20 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-06 03:22:20 +0200
commit684be371508fd505ad02c4a387cd69ce12152931 (patch)
tree94801f47977e6c359a74ae215d6311775d770bce /source/tests
parentc382f3913b5e78c75dba45bbf0ae7300efe012c9 (diff)
downloadkit-684be371508fd505ad02c4a387cd69ce12152931.zip
test
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/secure_random.test.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/tests/secure_random.test.c b/source/tests/secure_random.test.c
index 3e8fd9e..0f25b47 100644
--- a/source/tests/secure_random.test.c
+++ b/source/tests/secure_random.test.c
@@ -4,8 +4,6 @@
#define KIT_TEST_FILE secure_random
#include "../kit_test/test.h"
-#include <stdio.h>
-
TEST("secure random") {
int v[20];
memset(v, 0, sizeof v);
@@ -15,16 +13,10 @@ TEST("secure random") {
int repeats = 0;
- printf(" %d \n", v[0]);
- for (int i = 1; i < sizeof v / sizeof *v; i++) {
- printf(" %d", v[i]);
+ for (int i = 1; i < sizeof v / sizeof *v; i++)
for (int j = 0; j < i; j++)
- if (v[i] == v[j]) {
- printf(" - REPEAT");
+ if (v[i] == v[j])
repeats++;
- }
- printf(" \n");
- }
REQUIRE_EQ(repeats, 0);
}