diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-16 22:46:02 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-21 20:44:26 +0000 |
commit | 7245ac11ef9be2420c8356c12acc79f93ea211bb (patch) | |
tree | e971c5c6e10c2310afe4b2cd80212feac9839f2a /auto_tests/messenger_test.c | |
parent | 7c2b95ef5e4ccdae01bd104aa7400294c9ea391b (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/messenger_test.c')
-rw-r--r-- | auto_tests/messenger_test.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index d7f2b9e7..b8fbbc1f 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -14,16 +14,7 @@ | |||
14 | #include "config.h" | 14 | #include "config.h" |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #include "check_compat.h" | ||
18 | |||
19 | #include "helpers.h" | ||
20 | |||
21 | #include "../testing/misc_tools.c" // hex_string_to_bin | ||
22 | #include "../toxcore/Messenger.h" | ||
23 | |||
24 | #include <stdint.h> | ||
25 | #include <string.h> | 17 | #include <string.h> |
26 | #include <sys/types.h> | ||
27 | 18 | ||
28 | #ifdef VANILLA_NACL | 19 | #ifdef VANILLA_NACL |
29 | #include <crypto_box.h> // crypto_box_PUBLICKEYBYTES and other defines. | 20 | #include <crypto_box.h> // crypto_box_PUBLICKEYBYTES and other defines. |
@@ -31,6 +22,10 @@ | |||
31 | #include <sodium.h> | 22 | #include <sodium.h> |
32 | #endif | 23 | #endif |
33 | 24 | ||
25 | #include "check_compat.h" | ||
26 | #include "../testing/misc_tools.h" | ||
27 | #include "../toxcore/Messenger.h" | ||
28 | |||
34 | #define REALLY_BIG_NUMBER ((1) << (sizeof(uint16_t) * 7)) | 29 | #define REALLY_BIG_NUMBER ((1) << (sizeof(uint16_t) * 7)) |
35 | 30 | ||
36 | static bool enable_broken_tests = false; | 31 | static bool enable_broken_tests = false; |