summaryrefslogtreecommitdiff
path: root/auto_tests/dht_test.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-16 22:46:02 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-21 20:44:26 +0000
commit7245ac11ef9be2420c8356c12acc79f93ea211bb (patch)
treee971c5c6e10c2310afe4b2cd80212feac9839f2a /auto_tests/dht_test.c
parent7c2b95ef5e4ccdae01bd104aa7400294c9ea391b (diff)
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
Diffstat (limited to 'auto_tests/dht_test.c')
-rw-r--r--auto_tests/dht_test.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c
index f57d706b..8b96f09a 100644
--- a/auto_tests/dht_test.c
+++ b/auto_tests/dht_test.c
@@ -1,19 +1,11 @@
1#ifndef _XOPEN_SOURCE
2#define _XOPEN_SOURCE 600
3#endif
4
5#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
6#include "config.h" 2#include "config.h"
7#endif 3#endif
8 4
9#include "check_compat.h" 5#include "check_compat.h"
10 6#include "../testing/misc_tools.h"
11#include <sys/param.h>
12#include <time.h>
13
14#include "helpers.h"
15
16#include "../toxcore/crypto_core.h" 7#include "../toxcore/crypto_core.h"
8
17#ifndef DHT_C_INCLUDED 9#ifndef DHT_C_INCLUDED
18#include "../toxcore/DHT.c" 10#include "../toxcore/DHT.c"
19#endif // DHT_C_INCLUDED 11#endif // DHT_C_INCLUDED
@@ -819,7 +811,6 @@ static Suite *dht_suite(void)
819int main(void) 811int main(void)
820{ 812{
821 setvbuf(stdout, nullptr, _IONBF, 0); 813 setvbuf(stdout, nullptr, _IONBF, 0);
822 srand((unsigned int) time(nullptr));
823 814
824 Suite *dht = dht_suite(); 815 Suite *dht = dht_suite();
825 SRunner *test_runner = srunner_create(dht); 816 SRunner *test_runner = srunner_create(dht);