diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2022-12-18 00:12:32 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2022-12-18 00:12:32 +0100 |
commit | 251f92ede2255d7f52667a0d5794136f5da2b8c6 (patch) | |
tree | a5000513469d128aa56aa287fe6e7db653c41de1 /source/test/unittests | |
parent | 901478a2d04fcae70cf1f99f19b7508256633fa0 (diff) | |
download | kit-251f92ede2255d7f52667a0d5794136f5da2b8c6.zip |
Threads cleanup
Diffstat (limited to 'source/test/unittests')
-rw-r--r-- | source/test/unittests/atomic.test.c | 2 | ||||
-rw-r--r-- | source/test/unittests/condition_variable.test.c | 1 | ||||
-rw-r--r-- | source/test/unittests/mersenne_twister_64.test.c | 4 | ||||
-rw-r--r-- | source/test/unittests/mutex.test.c | 1 | ||||
-rw-r--r-- | source/test/unittests/secure_random.test.c | 4 | ||||
-rw-r--r-- | source/test/unittests/thread.test.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/source/test/unittests/atomic.test.c b/source/test/unittests/atomic.test.c index c909cb0..b8cf0ac 100644 --- a/source/test/unittests/atomic.test.c +++ b/source/test/unittests/atomic.test.c @@ -1,5 +1,5 @@ #include "../../kit/atomic.h" -#include "../../kit/threads.h" +#include "../../kit/thread.h" #define KIT_TEST_FILE atomic #include "../../kit_test/test.h" diff --git a/source/test/unittests/condition_variable.test.c b/source/test/unittests/condition_variable.test.c index c855b0c..c5b0468 100644 --- a/source/test/unittests/condition_variable.test.c +++ b/source/test/unittests/condition_variable.test.c @@ -1,4 +1,5 @@ #include "../../kit/condition_variable.h" +#include "../../kit/thread.h" #define KIT_TEST_FILE condition_variable #include "../../kit_test/test.h" diff --git a/source/test/unittests/mersenne_twister_64.test.c b/source/test/unittests/mersenne_twister_64.test.c index b986c55..80d1c2c 100644 --- a/source/test/unittests/mersenne_twister_64.test.c +++ b/source/test/unittests/mersenne_twister_64.test.c @@ -1,4 +1,5 @@ #include "../../kit/mersenne_twister_64.h" +#include "../../kit/secure_random.h" #define KIT_TEST_FILE mersenne_twister_64 #include "../../kit_test/test.h" @@ -6,7 +7,8 @@ enum { SIZE = 1000 }; TEST("mt64 same seeds") { - uint64_t seed = mt64_seed(); + uint64_t seed; + secure_random(sizeof seed, &seed); mt64_state_t foo, bar; mt64_init(&foo, seed); diff --git a/source/test/unittests/mutex.test.c b/source/test/unittests/mutex.test.c index a898557..e597e59 100644 --- a/source/test/unittests/mutex.test.c +++ b/source/test/unittests/mutex.test.c @@ -1,4 +1,5 @@ #include "../../kit/mutex.h" +#include "../../kit/thread.h" #define KIT_TEST_FILE mutex #include "../../kit_test/test.h" diff --git a/source/test/unittests/secure_random.test.c b/source/test/unittests/secure_random.test.c index eadae65..ec0a7b2 100644 --- a/source/test/unittests/secure_random.test.c +++ b/source/test/unittests/secure_random.test.c @@ -8,13 +8,9 @@ TEST("secure random") { int v[20]; memset(v, 0, sizeof v); - secure_random_init(); - secure_random(40, v); secure_random(40, v + 10); - secure_random_cleanup(); - int repeats = 0; for (int i = 1; i < sizeof v / sizeof *v; i++) diff --git a/source/test/unittests/thread.test.c b/source/test/unittests/thread.test.c index 786e992..01198c2 100644 --- a/source/test/unittests/thread.test.c +++ b/source/test/unittests/thread.test.c @@ -1,4 +1,4 @@ -#include "../../kit/threads.h" +#include "../../kit/thread.h" #define KIT_TEST_FILE thread #include "../../kit_test/test.h" |