From 7245ac11ef9be2420c8356c12acc79f93ea211bb Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 16 Jul 2018 22:46:02 +0000 Subject: Avoid implementations in .h files or #including .c files. Also, avoid the need for putting `_XOPEN_SOURCE` in every test file. --- auto_tests/TCP_test.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'auto_tests/TCP_test.c') diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index f5bc2471..07266543 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c @@ -1,27 +1,17 @@ -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "check_compat.h" - -#include #include #include -#include -#include +#include "../testing/misc_tools.h" #include "../toxcore/TCP_client.h" #include "../toxcore/TCP_server.h" - #include "../toxcore/crypto_core.h" #include "../toxcore/mono_time.h" #include "../toxcore/util.h" - -#include "helpers.h" +#include "check_compat.h" #define NUM_PORTS 3 @@ -836,8 +826,6 @@ int main(void) { setvbuf(stdout, nullptr, _IONBF, 0); - srand((unsigned int) time(nullptr)); - Suite *TCP = TCP_suite(); SRunner *test_runner = srunner_create(TCP); -- cgit v1.2.3